mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch -rt] make gendev_rel_sem a compat_semaphore
@ 2005-11-16 15:31 Steven Rostedt
  2005-11-16 15:34 ` Steven Rostedt
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2005-11-16 15:31 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: LKML

Hi Ingo,

I was getting the following:

BUG: nonzero lock count 10 at exit time?
        modprobe: 2972 [ffff81007e1aaf70, 116]

Call Trace:<ffffffff8014e2db>{printk_task+43} <ffffffff8015040f>{check_no_held_locks+111}
       <ffffffff80136d3c>{do_exit+3036} <ffffffff80136f5c>{do_group_exit+268}
       <ffffffff80136f72>{sys_exit_group+18} <ffffffff8011e471>{ia32_sysret+0}

---------------------------
| preempt count: 00000000 ]
| 0-level deep critical section nesting:
----------------------------------------
hdc: ATAPI 40X DVD-ROM DVD-R CD-R/RW drive, 2048kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.20

BUG: modprobe/2972, lock held at task exit time!
 [ffffffff8809fd00] {(struct semaphore *)(&hwif->gendev_rel_sem)}
.. held by:          modprobe: 2972 [ffff81007e1aaf70, 116]
... acquired at:               init_hwif_data+0xaf/0x1a0 [ide_core]

[snipped to not be so annoying]

Looking into this I see that gendev_rel_sem, which is only used when the
device is unregistered, is defined as a semaphore.  This patch changes
this to be a compat_semaphore.

-- Steve

Index: linux-2.6.14-rt13/include/linux/ide.h
===================================================================
--- linux-2.6.14-rt13.orig/include/linux/ide.h	2005-11-15 11:12:37.000000000 -0500
+++ linux-2.6.14-rt13/include/linux/ide.h	2005-11-16 10:09:10.000000000 -0500
@@ -910,7 +910,7 @@
 	unsigned	sg_mapped  : 1;	/* sg_table and sg_nents are ready */
 
 	struct device	gendev;
-	struct semaphore gendev_rel_sem; /* To deal with device release() */
+	struct compat_semaphore gendev_rel_sem; /* To deal with device release() */
 
 	void		*hwif_data;	/* extra hwif data */
 



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

* Re: [patch -rt] make gendev_rel_sem a compat_semaphore
  2005-11-16 15:31 [patch -rt] make gendev_rel_sem a compat_semaphore Steven Rostedt
@ 2005-11-16 15:34 ` Steven Rostedt
  2005-11-17  8:34   ` Ingo Molnar
  2005-11-17 16:08   ` Daniel Walker
  0 siblings, 2 replies; 5+ messages in thread
From: Steven Rostedt @ 2005-11-16 15:34 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: LKML

Crap! I sent this with my kihontech email.  Please respond to this
instead.  I'm still in the process of moving to my new machine, and the
email was messed up.

Thanks,

-- Steve


On Wed, 2005-11-16 at 10:31 -0500, Steven Rostedt wrote:
> Hi Ingo,
> 
> I was getting the following:
> 
> BUG: nonzero lock count 10 at exit time?
>         modprobe: 2972 [ffff81007e1aaf70, 116]
> 
> Call Trace:<ffffffff8014e2db>{printk_task+43} <ffffffff8015040f>{check_no_held_locks+111}
>        <ffffffff80136d3c>{do_exit+3036} <ffffffff80136f5c>{do_group_exit+268}
>        <ffffffff80136f72>{sys_exit_group+18} <ffffffff8011e471>{ia32_sysret+0}
> 
> ---------------------------
> | preempt count: 00000000 ]
> | 0-level deep critical section nesting:
> ----------------------------------------
> hdc: ATAPI 40X DVD-ROM DVD-R CD-R/RW drive, 2048kB Cache, UDMA(33)
> Uniform CD-ROM driver Revision: 3.20
> 
> BUG: modprobe/2972, lock held at task exit time!
>  [ffffffff8809fd00] {(struct semaphore *)(&hwif->gendev_rel_sem)}
> .. held by:          modprobe: 2972 [ffff81007e1aaf70, 116]
> ... acquired at:               init_hwif_data+0xaf/0x1a0 [ide_core]
> 
> [snipped to not be so annoying]
> 
> Looking into this I see that gendev_rel_sem, which is only used when the
> device is unregistered, is defined as a semaphore.  This patch changes
> this to be a compat_semaphore.
> 
> -- Steve
> 
> Index: linux-2.6.14-rt13/include/linux/ide.h
> ===================================================================
> --- linux-2.6.14-rt13.orig/include/linux/ide.h	2005-11-15 11:12:37.000000000 -0500
> +++ linux-2.6.14-rt13/include/linux/ide.h	2005-11-16 10:09:10.000000000 -0500
> @@ -910,7 +910,7 @@
>  	unsigned	sg_mapped  : 1;	/* sg_table and sg_nents are ready */
>  
>  	struct device	gendev;
> -	struct semaphore gendev_rel_sem; /* To deal with device release() */
> +	struct compat_semaphore gendev_rel_sem; /* To deal with device release() */
>  
>  	void		*hwif_data;	/* extra hwif data */
>  
> 


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

* Re: [patch -rt] make gendev_rel_sem a compat_semaphore
  2005-11-16 15:34 ` Steven Rostedt
@ 2005-11-17  8:34   ` Ingo Molnar
  2005-11-17 16:08   ` Daniel Walker
  1 sibling, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2005-11-17  8:34 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: LKML


* Steven Rostedt <rostedt@goodmis.org> wrote:

> I was getting the following:
> 
> BUG: nonzero lock count 10 at exit time?
>         modprobe: 2972 [ffff81007e1aaf70, 116]

> Looking into this I see that gendev_rel_sem, which is only used when 
> the device is unregistered, is defined as a semaphore.  This patch 
> changes this to be a compat_semaphore.

thanks, applied.

	Ingo

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

* Re: [patch -rt] make gendev_rel_sem a compat_semaphore
  2005-11-16 15:34 ` Steven Rostedt
  2005-11-17  8:34   ` Ingo Molnar
@ 2005-11-17 16:08   ` Daniel Walker
  2005-11-17 17:49     ` Steven Rostedt
  1 sibling, 1 reply; 5+ messages in thread
From: Daniel Walker @ 2005-11-17 16:08 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Ingo Molnar, LKML


How would you feel if we move this lock to a completion() . It's such a
small lock, and completions are faster anyway .. It might be a good test
bed for some other compat locks .

Daniel  


On Wed, 2005-11-16 at 10:34 -0500, Steven Rostedt wrote:
> Crap! I sent this with my kihontech email.  Please respond to this
> instead.  I'm still in the process of moving to my new machine, and the
> email was messed up.
> 
> Thanks,
> 
> -- Steve
> 
> 
> On Wed, 2005-11-16 at 10:31 -0500, Steven Rostedt wrote:
> > Hi Ingo,
> > 
> > I was getting the following:
> > 
> > BUG: nonzero lock count 10 at exit time?
> >         modprobe: 2972 [ffff81007e1aaf70, 116]
> > 
> > Call Trace:<ffffffff8014e2db>{printk_task+43} <ffffffff8015040f>{check_no_held_locks+111}
> >        <ffffffff80136d3c>{do_exit+3036} <ffffffff80136f5c>{do_group_exit+268}
> >        <ffffffff80136f72>{sys_exit_group+18} <ffffffff8011e471>{ia32_sysret+0}
> > 
> > ---------------------------
> > | preempt count: 00000000 ]
> > | 0-level deep critical section nesting:
> > ----------------------------------------
> > hdc: ATAPI 40X DVD-ROM DVD-R CD-R/RW drive, 2048kB Cache, UDMA(33)
> > Uniform CD-ROM driver Revision: 3.20
> > 
> > BUG: modprobe/2972, lock held at task exit time!
> >  [ffffffff8809fd00] {(struct semaphore *)(&hwif->gendev_rel_sem)}
> > .. held by:          modprobe: 2972 [ffff81007e1aaf70, 116]
> > ... acquired at:               init_hwif_data+0xaf/0x1a0 [ide_core]
> > 
> > [snipped to not be so annoying]
> > 
> > Looking into this I see that gendev_rel_sem, which is only used when the
> > device is unregistered, is defined as a semaphore.  This patch changes
> > this to be a compat_semaphore.
> > 
> > -- Steve
> > 
> > Index: linux-2.6.14-rt13/include/linux/ide.h
> > ===================================================================
> > --- linux-2.6.14-rt13.orig/include/linux/ide.h	2005-11-15 11:12:37.000000000 -0500
> > +++ linux-2.6.14-rt13/include/linux/ide.h	2005-11-16 10:09:10.000000000 -0500
> > @@ -910,7 +910,7 @@
> >  	unsigned	sg_mapped  : 1;	/* sg_table and sg_nents are ready */
> >  
> >  	struct device	gendev;
> > -	struct semaphore gendev_rel_sem; /* To deal with device release() */
> > +	struct compat_semaphore gendev_rel_sem; /* To deal with device release() */
> >  
> >  	void		*hwif_data;	/* extra hwif data */
> >  
> > 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


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

* Re: [patch -rt] make gendev_rel_sem a compat_semaphore
  2005-11-17 16:08   ` Daniel Walker
@ 2005-11-17 17:49     ` Steven Rostedt
  0 siblings, 0 replies; 5+ messages in thread
From: Steven Rostedt @ 2005-11-17 17:49 UTC (permalink / raw)
  To: dwalker; +Cc: Ingo Molnar, LKML

On Thu, 2005-11-17 at 08:08 -0800, Daniel Walker wrote:
> How would you feel if we move this lock to a completion() . It's such a
> small lock, and completions are faster anyway .. It might be a good test
> bed for some other compat locks .

I feel fine with that.  Looking at the code a little, this might be a
change for mainline.

You want to do it, or do you want me?

-- Steve



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

end of thread, other threads:[~2005-11-17 17:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-16 15:31 [patch -rt] make gendev_rel_sem a compat_semaphore Steven Rostedt
2005-11-16 15:34 ` Steven Rostedt
2005-11-17  8:34   ` Ingo Molnar
2005-11-17 16:08   ` Daniel Walker
2005-11-17 17:49     ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®