Messages in this thread Patch in this message | | | Date | Wed, 12 May 1999 08:38:40 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: 2.3.1: patches and oopses |
| |
On Wed, 12 May 1999, Carlo E. Prelz wrote: > > Hi. Here are the few patches I had to apply to compile 2.3.1pre2:
Thanks..
> May 12 13:52:11 eccolo kernel: bad magic 00000000 (should be c03820d8, creator 00000000), wq bug, forcing oops. > May 12 13:52:11 eccolo kernel: Unable to handle kernel NULL pointer dereference at virtual address 00000000 > May 12 13:52:11 eccolo kernel: current->tss.cr3 = 00101000, %cr3 = 00101000 > May 12 13:52:11 eccolo kernel: *pde = 00000000 > May 12 13:52:11 eccolo kernel: Oops: 0002 > May 12 13:52:11 eccolo kernel: CPU: 0 > May 12 13:52:11 eccolo kernel: EIP: 0010:[interruptible_sleep_on+138/344] > May 12 13:52:11 eccolo kernel: EFLAGS: 00010096 > May 12 13:52:11 eccolo kernel: eax: 00000016 ebx: c03820d0 ecx: c025e3f0 edx: c025e3f0 > May 12 13:52:11 eccolo kernel: esi: c1df4000 edi: 00000286 ebp: c1df5f9c esp: c1df5f5c > May 12 13:52:11 eccolo kernel: ds: 0018 es: 0018 ss: 0018 > May 12 13:52:11 eccolo kernel: Process msp3400 (pid: 62, process nr: 12, stackpage=c1df5000) > May 12 13:52:11 eccolo kernel: Stack: c03820d8 00000000 c1e99e1c c1df4000 c1df41ce c01185b1 c1df4000 400a23f0 > May 12 13:52:11 eccolo kernel: 00000000 c1df4000 c03a59ac 00000080 c1df5f8c c2c41b27 c1df4000 c03a5920 > May 12 13:52:11 eccolo kernel: c1e99e3c c2c41c23 00000100 c1e99da4 c03820a0 c1e99e3c 00000000 c028c000 > May 12 13:52:11 eccolo kernel: Call Trace: [exit_mm+85/104] [msp3400:d1+-7893/164] [msp3400:d1+-7641/164] [msp3400:d1+-7924/164] [fbcon_cfb32_putc+508/524] [kernel_thread+34/60] [kernel_thread+43/60]
The above means that the msp3400 driver obviously still hasn't really initialized the wait-queue it's sleeping on. Would you mind testing whether this diff to msp3400.c (against a clean 2.3.1-pre2) works for you?
Linus
----- --- v2.3.0/linux/drivers/char/msp3400.c Wed Feb 17 09:37:51 1999 +++ linux/drivers/char/msp3400.c Wed May 12 08:36:11 1999 @@ -83,7 +83,7 @@ /* thread */ struct task_struct *thread; - struct wait_queue *wq; + wait_queue_head_t wq; struct semaphore *notify; int active,restart,rmmod; @@ -523,7 +523,6 @@ current->fs->umask = 0; strcpy(current->comm,"msp3400"); - msp->wq = NULL; msp->thread = current; #ifdef __SMP__ @@ -748,7 +747,7 @@ { unsigned long flags; struct msp3400c *msp = data; - struct semaphore sem = MUTEX_LOCKED; + DECLARE_MUTEX_LOCKED(sem); int i, val; /* lock_kernel(); */ @@ -844,7 +843,7 @@ static struct msp3400c *mspmix = NULL; /* ugly hack, should do something more sensible */ static int mixer_num; static int mixer_modcnt = 0; -static struct semaphore mixer_sem = MUTEX; +static DECLARE_MUTEX(mixer_sem); static int mix_to_v4l(int i) { @@ -1016,7 +1015,7 @@ static int msp3400c_attach(struct i2c_device *device) { - struct semaphore sem = MUTEX_LOCKED; + DECLARE_MUTEX_LOCKED(sem); struct msp3400c *msp; int rev1,rev2; LOCK_FLAGS; @@ -1030,6 +1029,7 @@ msp->right = 65535; msp->bass = 32768; msp->treble = 32768; + init_waitqueue_head(&msp->wq); LOCK_I2C_BUS(msp->bus); if (-1 == msp3400c_reset(msp->bus)) { @@ -1069,7 +1069,6 @@ /* startup control thread */ MOD_INC_USE_COUNT; - msp->wq = NULL; msp->notify = &sem; kernel_thread(msp3400c_thread, (void *)msp, 0); down(&sem); @@ -1090,7 +1089,7 @@ static int msp3400c_detach(struct i2c_device *device) { - struct semaphore sem = MUTEX_LOCKED; + DECLARE_MUTEX_LOCKED(sem); struct msp3400c *msp = (struct msp3400c*)device->data; LOCK_FLAGS;
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |