Bug 40302 - [PATCH]spi master's parent device node 's reference count is not decreased
Summary: [PATCH]spi master's parent device node 's reference count is not decreased
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Grant Likely
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-29 01:22 UTC by Xu Chao
Modified: 2012-08-30 11:09 UTC (History)
3 users (show)

See Also:
Kernel Version: 2.6.39, 3.0
Subsystem:
Regression: No
Bisected commit-id:


Attachments
the patch for the two bugs. (485 bytes, patch)
2011-07-29 01:22 UTC, Xu Chao
Details | Diff

Description Xu Chao 2011-07-29 01:22:58 UTC
Created attachment 67072 [details]
the patch for the two bugs.

There are two bugs in it.
(1) when spi master is deconstructed, it's parent device node's reference count is not decreased. It exists from kernel 2.6.28 to 3.0. It sometimes results in memory leak. Example, its's parent device node will be always reference by others and never be released.

(2) when spi device is created, its parent device node should be spi master. It should be keep consistent with function spi_unregister_master. it exists in 2.6.39 and 3.0
Comment 1 Andrew Morton 2011-08-26 23:20:17 UTC
Please don't send patches via bugzilla - it causes lots of problems with
our usual patch management and review processes.

Please send this patch via email as per Documentation/SubmittingPatches. 
Suitable recipients may be found via scripts/get_maintainer.pl.  Please
also cc myself on the email.

Thanks.
Comment 2 Jean Delvare 2012-08-30 10:14:40 UTC
SPI isn't I2C, and I don't maintain SPI.

Note You need to log in before you can comment on or make changes to this bug.