Helge Hafting wrote:
>
> ..
> [<c01146c4>]__might_sleep+0x54/0x60
> [<c012dca0>]kmalloc+0x4c/0x130
> [<c010b6b2>]sys_ioperm+0x82/0x11c
> [<c0106fbb>]syscall_call+0x7/0xb
>
You up to trying this fix?
--- 2.5.40/arch/i386/kernel/ioport.c~ioperm-fix Tue Oct 1 02:17:51 2002
+++ 2.5.40-akpm/arch/i386/kernel/ioport.c Tue Oct 1 02:17:51 2002
@@ -56,6 +56,7 @@ asmlinkage int sys_ioperm(unsigned long
{
struct thread_struct * t = ¤t->thread;
struct tss_struct * tss;
+ unsigned long *bitmap = NULL;
int ret = 0;
if ((from + num <= from) || (from + num > IO_BITMAP_SIZE*32))
@@ -63,15 +64,12 @@ asmlinkage int sys_ioperm(unsigned long
if (turn_on && !capable(CAP_SYS_RAWIO))
return -EPERM;
- tss = init_tss + get_cpu();
-
/*
* If it's the first ioperm() call in this thread's lifetime, set the
* IO bitmap up. ioperm() is much less timing critical than clone(),
* this is why we delay this operation until now:
*/
if (!t->ts_io_bitmap) {
- unsigned long *bitmap;
bitmap = kmalloc(IO_BITMAP_BYTES, GFP_KERNEL);
if (!bitmap) {
ret = -ENOMEM;
@@ -83,20 +81,19 @@ asmlinkage int sys_ioperm(unsigned long
*/
memset(bitmap, 0xff, IO_BITMAP_BYTES);
t->ts_io_bitmap = bitmap;
- /*
- * this activates it in the TSS
- */
- tss->bitmap = IO_BITMAP_OFFSET;
}
+ tss = init_tss + get_cpu();
+ if (bitmap)
+ tss->bitmap = IO_BITMAP_OFFSET; /* Activate it in the TSS */
+
/*
* do it in the per-thread copy and in the TSS ...
*/
set_bitmap(t->ts_io_bitmap, from, num, !turn_on);
set_bitmap(tss->io_bitmap, from, num, !turn_on);
-
-out:
put_cpu();
+out:
return ret;
}
.
* Andrew Morton ([email protected]) wrote:
> Helge Hafting wrote:
> >
> > ..
> > [<c01146c4>]__might_sleep+0x54/0x60
> > [<c012dca0>]kmalloc+0x4c/0x130
> > [<c010b6b2>]sys_ioperm+0x82/0x11c
> > [<c0106fbb>]syscall_call+0x7/0xb
> >
>
>
> You up to trying this fix?
>
This patch on 2.3.40+xfsfix didnt change anything here, while my trace does look different it seems to be related. I get a similar oops when ide initializes during boot, then when i modprobe ide-scsi it times out, and it seems i get a prompt back, but the box is locked up and doesnt even respond to ping's.
UP athlon, disk on aic7xxx (xfs), ide dvdrom and cdrw on vt82c686b both set to master on separate channels.
.config is avaiable on http://midgaard.us/~aboman/dot.config-2.5
full log up to that point http://midgaard.us/~aboman/messages-40.1
Debug: sleeping function called from illegal context at slab.c:1374
deba1e40 deba1e60 c01333af c03597a5 0000055e dffec000 00000000 00001000
deba1e84 c0131a66 c15070c0 000001d0 00000000 c14cb800 00000246 00000000
00001000 deba1eb0 c0131dab 00001000 00000002 c14cc188 00001000 00001000
Call Trace:
[__kmem_cache_alloc+255/272]__kmem_cache_alloc+0xff/0x110
[get_vm_area+38/256]get_vm_area+0x26/0x100
[__vmalloc+75/304]__vmalloc+0x4b/0x130
[vmalloc+34/48]vmalloc+0x22/0x30
[<e08fe502>]sg_init+0x82/0x130 [sg]
[<e09022c7>].rodata.str1.1+0x23/0x2b0 [sg]
[<e0903be0>]sg_fops+0x0/0x58 [sg]
[<e0903b20>]sg_template+0x0/0x94 [sg]
[scsi_register_device+276/336]scsi_register_device+0x114/0x150
[<e08fec23>]init_sg+0x23/0x60 [sg]
[<e0903b20>]sg_template+0x0/0x94 [sg]
[sys_init_module+1311/1648]sys_init_module+0x51f/0x670
[<e08fc060>]E __insmod_sg_O/lib/modules/2.5.40anb1/kernel/drivers/scsi/sg.o_M3D9A1098_V132392+0x60/0x80 [sg]
[<e0902554>]__ksymtab+0x0/0x28 [sg]
[<e08fc060>]E __insmod_sg_O/lib/modules/2.5.40anb1/kernel/drivers/scsi/sg.o_M3D9A1098_V132392+0x60/0x80 [sg]
[syscall_call+7/11]syscall_call+0x7/0xb
scsi1 : SCSI host adapter emulation for IDE ATAPI devices
scsi_eh_offline_sdevs: Device set offline - notready or command retry failedafter error recovery: host1 channel 0 id 0 lun 0
Vendor: Model: Rev:
Type: Direct-Access ANSI SCSI revision: 00
hda: lost interrupt