Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[SCSI] attirbute_container: Initialize sysfs attributes with sysfs_attr_init

All of the SCSI transport classes are suddenly spitting lockdep
warnings. According to Eric Biderman this is because lockdep needs
static initialisers and the attribute container way of doing things
end up with dynamic sysfs attributes. Fix this by calling
sysfs_attr_init which sets the lockdep key correctly.

Tested-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>

+1
+1
drivers/base/attribute_container.c
··· 328 328 return sysfs_create_group(&classdev->kobj, cont->grp); 329 329 330 330 for (i = 0; attrs[i]; i++) { 331 + sysfs_attr_init(&attrs[i]->attr); 331 332 error = device_create_file(classdev, attrs[i]); 332 333 if (error) 333 334 return error;