All of lore.kernel.org
 help / color / mirror / Atom feed
* sleeper
@ 2002-10-04  8:29 Anton Blanchard
  2002-10-04  9:56 ` sleeper Anton Blanchard
  0 siblings, 1 reply; 3+ messages in thread
From: Anton Blanchard @ 2002-10-04  8:29 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel


Hi,

I cant remember if we have seen this one before.

scsi_try_to_abort_cmd does:

  spin_lock_irqsave(scmd->host->host_lock, flags);

and sym_eh_handler (in sym53c8xx_2 driver) does:

  down(&ep->sem);

Anton

Debug: sleeping function called from illegal context at
/scratch/anton/linux-2.5_ppc64_work/include/asm/semaphore.h:80
Call backtrace: 
C00000000005C390 __might_sleep+0xf4
C00000000029D220 sym_eh_handler+0x1d0
C000000000295C4C scsi_try_to_abort_cmd+0xdc
C000000000295EA4 scsi_eh_abort_cmd+0x60
C000000000296CE0 scsi_unjam_host+0xf4
C000000000296F44 scsi_error_handler+0x1fc

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

* Re: sleeper
  2002-10-04  8:29 sleeper Anton Blanchard
@ 2002-10-04  9:56 ` Anton Blanchard
  2002-10-04 14:06   ` sleeper Jaroslav Kysela
  0 siblings, 1 reply; 3+ messages in thread
From: Anton Blanchard @ 2002-10-04  9:56 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel


sound and devfs caught in action.

Anton

Debug: sleeping function called from illegal context at slab.c:1374
Call backtrace: 
C00000000005C3B8 __might_sleep+0xf4
C000000000091764 __kmem_cache_alloc+0x268
C0000000001369AC devfsd_notify_de+0xc4
C000000000136B0C devfsd_notify+0x3c
C0000000001370E4 _devfs_unregister+0xb0
C00000000013722C devfs_unregister+0x8c
C0000000002F8474 __sound_remove_unit+0x78
C0000000002F86F8 sound_remove_unit+0x60
C000000000303BD0 snd_unregister_oss_device+0x98
C0000000003085BC snd_mixer_oss_notify_handler+0x68
C0000000002FA2F4 snd_card_free+0x2a0
D0000000001494FC Unknown
C000000000064D84 free_module+0x1c0
C000000000062F60 sys_delete_module+0x220
C00000000001F7BC sys32_delete_module+0x10

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

* Re: sleeper
  2002-10-04  9:56 ` sleeper Anton Blanchard
@ 2002-10-04 14:06   ` Jaroslav Kysela
  0 siblings, 0 replies; 3+ messages in thread
From: Jaroslav Kysela @ 2002-10-04 14:06 UTC (permalink / raw)
  To: Anton Blanchard; +Cc: akpm@zip.com.au, linux-kernel@vger.kernel.org

On Fri, 4 Oct 2002, Anton Blanchard wrote:

> sound and devfs caught in action.

This patch should fix the problem:

--- sound_core.c	13 Aug 2002 16:13:33 -0000	1.8
+++ sound_core.c	4 Oct 2002 14:04:22 -0000
@@ -122,7 +122,7 @@
  *	Remove a node from the chain. Called with the lock asserted
  */
  
-static void __sound_remove_unit(struct sound_unit **list, int unit)
+static struct sound_unit *__sound_remove_unit(struct sound_unit **list, int unit)
 {
 	while(*list)
 	{
@@ -130,13 +130,12 @@
 		if(p->unit_minor==unit)
 		{
 			*list=p->next;
-			devfs_unregister (p->de);
-			kfree(p);
-			return;
+			return p;
 		}
 		list=&(p->next);
 	}
 	printk(KERN_ERR "Sound device %d went missing!\n", unit);
+	return NULL;
 }
 
 /*
@@ -189,9 +188,15 @@
  	
 static void sound_remove_unit(struct sound_unit **list, int unit)
 {
+	struct sound_unit *p;
+
 	spin_lock(&sound_loader_lock);
-	__sound_remove_unit(list, unit);
+	p = __sound_remove_unit(list, unit);
 	spin_unlock(&sound_loader_lock);
+	if (p) {
+		devfs_unregister (p->de);
+		kfree(p);
+	}
 }
 
 /*

					Jaroslav

> Anton
> 
> Debug: sleeping function called from illegal context at slab.c:1374
> Call backtrace: 
> C00000000005C3B8 __might_sleep+0xf4
> C000000000091764 __kmem_cache_alloc+0x268
> C0000000001369AC devfsd_notify_de+0xc4
> C000000000136B0C devfsd_notify+0x3c
> C0000000001370E4 _devfs_unregister+0xb0
> C00000000013722C devfs_unregister+0x8c
> C0000000002F8474 __sound_remove_unit+0x78
> C0000000002F86F8 sound_remove_unit+0x60
> C000000000303BD0 snd_unregister_oss_device+0x98
> C0000000003085BC snd_mixer_oss_notify_handler+0x68
> C0000000002FA2F4 snd_card_free+0x2a0
> D0000000001494FC Unknown
> C000000000064D84 free_module+0x1c0
> C000000000062F60 sys_delete_module+0x220
> C00000000001F7BC sys32_delete_module+0x10

-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project  http://www.alsa-project.org
SuSE Linux    http://www.suse.com


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

end of thread, other threads:[~2002-10-04 14:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-04  8:29 sleeper Anton Blanchard
2002-10-04  9:56 ` sleeper Anton Blanchard
2002-10-04 14:06   ` sleeper Jaroslav Kysela

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.