linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/3][-mm] reclassify the sg_sysfs_class mutex
@ 2008-05-20  9:58 Dave Young
  2008-05-20 17:22 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Young @ 2008-05-20  9:58 UTC (permalink / raw)
  To: akpm; +Cc: greg, matthew, kay.sievers, linux-scsi, linux-kernel

[Please first apply the patch 1/3 before this]

To please lockdep here we use class_reclassify to change
the lock class of sg_sysfs_class

Signed-off-by: Dave Young <hidave.darkstar@gmail.com>

---
 drivers/scsi/sg.c |    2 ++
 1 file changed, 2 insertions(+)

--- linux/drivers/scsi/sg.c	2008-05-19 12:41:05.000000000 +0800
+++ linux.new/drivers/scsi/sg.c	2008-05-19 14:08:19.000000000 +0800
@@ -1579,6 +1579,8 @@ init_sg(void)
 		rc = PTR_ERR(sg_sysfs_class);
 		goto err_out;
         }
+
+	class_reclassify(sg_sysfs_class);
 	sg_sysfs_valid = 1;
 	rc = scsi_register_interface(&sg_interface);
 	if (0 == rc) {

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/3][-mm] reclassify the sg_sysfs_class mutex
  2008-05-20  9:58 [PATCH 2/3][-mm] reclassify the sg_sysfs_class mutex Dave Young
@ 2008-05-20 17:22 ` Greg KH
  2008-05-21  1:25   ` Dave Young
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2008-05-20 17:22 UTC (permalink / raw)
  To: Dave Young; +Cc: akpm, matthew, kay.sievers, linux-scsi, linux-kernel

On Tue, May 20, 2008 at 05:58:51PM +0800, Dave Young wrote:
> [Please first apply the patch 1/3 before this]
> 
> To please lockdep here we use class_reclassify to change
> the lock class of sg_sysfs_class

Are you suggesting we do this for every struct class in the kernel?  If
so, why not just do it in the class core, instead of having to modify
every single caller?

I don't think the overall idea of this patch set is acceptable anyway :(

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/3][-mm] reclassify the sg_sysfs_class mutex
  2008-05-20 17:22 ` Greg KH
@ 2008-05-21  1:25   ` Dave Young
  2008-05-21  4:37     ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Young @ 2008-05-21  1:25 UTC (permalink / raw)
  To: Greg KH; +Cc: akpm, matthew, kay.sievers, linux-scsi, linux-kernel

On Wed, May 21, 2008 at 1:22 AM, Greg KH <greg@kroah.com> wrote:
> On Tue, May 20, 2008 at 05:58:51PM +0800, Dave Young wrote:
>> [Please first apply the patch 1/3 before this]
>>
>> To please lockdep here we use class_reclassify to change
>> the lock class of sg_sysfs_class
>
> Are you suggesting we do this for every struct class in the kernel?  If
> so, why not just do it in the class core, instead of having to modify
> every single caller?

I don't think it necessary to do this for every class, because only
class_interface_* calls could cause the issue, and the
class_interface_* are only used by pcmcia & scsi, do you think there
will be other users of them?

>
> I don't think the overall idea of this patch set is acceptable anyway :(
>
> thanks,
>
> greg k-h
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/3][-mm] reclassify the sg_sysfs_class mutex
  2008-05-21  1:25   ` Dave Young
@ 2008-05-21  4:37     ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2008-05-21  4:37 UTC (permalink / raw)
  To: Dave Young; +Cc: akpm, matthew, kay.sievers, linux-scsi, linux-kernel

On Wed, May 21, 2008 at 09:25:58AM +0800, Dave Young wrote:
> On Wed, May 21, 2008 at 1:22 AM, Greg KH <greg@kroah.com> wrote:
> > On Tue, May 20, 2008 at 05:58:51PM +0800, Dave Young wrote:
> >> [Please first apply the patch 1/3 before this]
> >>
> >> To please lockdep here we use class_reclassify to change
> >> the lock class of sg_sysfs_class
> >
> > Are you suggesting we do this for every struct class in the kernel?  If
> > so, why not just do it in the class core, instead of having to modify
> > every single caller?
> 
> I don't think it necessary to do this for every class, because only
> class_interface_* calls could cause the issue, and the
> class_interface_* are only used by pcmcia & scsi, do you think there
> will be other users of them?

I do not know, there might be in the future.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-05-21  4:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-20  9:58 [PATCH 2/3][-mm] reclassify the sg_sysfs_class mutex Dave Young
2008-05-20 17:22 ` Greg KH
2008-05-21  1:25   ` Dave Young
2008-05-21  4:37     ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).