Re: [PATCH v2 2/7] drivers/base: Verify struct device locking requirements at runtime

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2018-10-18 at 07:11 +-0200, Greg Kroah-Hartman wrote:
+AD4 On Wed, Oct 17, 2018 at 04:40:01PM -0700, Bart Van Assche wrote:
+AD4 +AD4 Make sure that a complaint appears in the kernel log if the driver core
+AD4 +AD4 locking assumptions are violated.
+AD4 +AD4 
+AD4 +AD4 Cc: Lee Duncan +ADw-lduncan+AEA-suse.com+AD4
+AD4 +AD4 Cc: Hannes Reinecke +ADw-hare+AEA-suse.com+AD4
+AD4 +AD4 Cc: Luis Chamberlain +ADw-mcgrof+AEA-kernel.org+AD4
+AD4 +AD4 Cc: Johannes Thumshirn +ADw-jthumshirn+AEA-suse.de+AD4
+AD4 +AD4 Cc: Christoph Hellwig +ADw-hch+AEA-lst.de+AD4
+AD4 +AD4 Cc: Greg Kroah-Hartman +ADw-gregkh+AEA-linuxfoundation.org+AD4
+AD4 +AD4 Signed-off-by: Bart Van Assche +ADw-bvanassche+AEA-acm.org+AD4
+AD4 +AD4 ---
+AD4 +AD4  drivers/base/dd.c     +AHw 16 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
+AD4 +AD4  drivers/base/memory.c +AHw  4 +-+-+-+-
+AD4 +AD4  2 files changed, 20 insertions(+-)
+AD4 +AD4 
+AD4 +AD4 diff --git a/drivers/base/dd.c b/drivers/base/dd.c
+AD4 +AD4 index b4212154a94b..033382421351 100644
+AD4 +AD4 --- a/drivers/base/dd.c
+AD4 +AD4 +-+-+- b/drivers/base/dd.c
+AD4 +AD4 +AEAAQA -315,11 +-315,15 +AEAAQA +AF8AXw-exitcall(deferred+AF8-probe+AF8-exit)+ADs
+AD4 +AD4   +ACo-/
+AD4 +AD4  bool device+AF8-is+AF8-bound(struct device +ACo-dev)
+AD4 +AD4  +AHs
+AD4 +AD4 +-	lockdep+AF8-assert+AF8-held(+ACY-dev-+AD4-mutex)+ADs
+AD4 
+AD4 With this patch applied, are you seeing lockdep messages anywhere?

No lockdep complaints appeared in my tests with this patch applied. I have
checked whether all callers of the modified functions hold dev-+AD4-mutex. This
patch is most useful to check new callers of the modified functions. I came
up with this patch to verify the new code I added myself in the drivers/base
directory.

Bart.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux