oops with 2.5.1-pre3 in ide-scsi module
Subsystems (8)
Hi,
just tried the new 2.5.1-pre3 and got the following oops when trying to burn a cd (ide-cd/rw with ide-scsi emulation).
I Hope this is some useful information.
____
ksymoops 2.4.3 on i586 2.5.1-pre3. Options used
-V (default)
-k /proc/ksyms (default)
-l /proc/modules (default)
-o /lib/modules/2.5.1-pre3/ (default)
-m /boot/System.map-2.5.1-pre3 (default)
Warning: You did not tell me where to find
symbol information. I will
assume that the log matches the kernel and
modules that are running
right now and I'll use the default options
above for symbol resolution.
If the current kernel and/or modules do not
match the log, you can get
more accurate output by telling me the kernel
version and where to find
map, modules, ksyms etc. ksymoops -h explains
the options.
Unable to handle kernel NULL pointer dereference at virtual address
00000038
c01af582
*pde = 00000000
Oops: 0000
CPU: 0
EIP: 0010:[idescsi_queue+1158/1396] Not tainted
EFLAGS: 00210002
eax: 00000000 ebx: d3f64320 ecx: d3f64ea0 edx: 00000000
esi: c0989000 edi: d3f64ea0 ebp: d3f64320 esp: c7321cc4
ds: 0018 es: 0018 ss: 0018
Process cdrecord (pid: 1055, stackpage=c7321000)
Stack: 00200293 d36761d4 d3eef800 d3f2dba0 00000000 c8a76ee0 d3eef858 c0989000
00000001 00000000 c7d5d3c0 c150eee0 c02c3be4 c01a7309 d3eef800 c01a77b4
d3eef800 d36761d4 d3eef8b8 d36761d4 00000000 c01ac422 d3eef800 d3eef800
Call Trace: [scsi_dispatch_cmd+257/372] [scsi_done+0/144] [scsi_request_fn+786/808] [__scsi_in sert_special+118/128] [scsi_insert_special_req+25/32]
Code: 03 42 38 89 46 00 83 c6 14 89 74 24 1c 83 6c 24 20 01 73 bf Using defaults from ksymoops -t elf32-i386 -a i386
Code; 00000000 Before first symbol
00000000 <_EIP>:
Code; 00000000 Before first symbol
0: 03 42 38 add 0x38(%edx),%eax
Code; 00000002 Before first symbol
3: 89 46 00 mov %eax,0x0(%esi)
Code; 00000006 Before first symbol
6: 83 c6 14 add $0x14,%esi
Code; 00000008 Before first symbol
9: 89 74 24 1c mov %esi,0x1c(%esp,1)
Code; 0000000c Before first symbol
d: 83 6c 24 20 01 subl $0x1,0x20(%esp,1)
Code; 00000012 Before first symbol
12: 73 bf jae ffffffd3 <_EIP+0xffffffd3> ffffffd2 <END_OF_CODE+2af53fd0/????>
1 warning issued. Results may not be reliable.
____
After the oops the following message appeared in syslog:
Nov 29 18:06:01 enterprise kernel: <6>scsi: device set offline -
command error recover failed: host 0 channel 0 id 0 lun 0
____
lsmod shows no loaded ide-scsi or cdrom modules, so the oops happened before loading them.
____
Please CC: me in replies or if you need further information as I'm not subscribed to l-k.
Cheers,
Dirk
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
Have you applied any other patches than the 2.5.1-pre3? If/When not you'll probably get some data corruption :( Please apply the 2 Patches attatched and
http://kernel.org/pub/linux/kernel/people/axboe/patches/v2.5/2.5.1-pre3/bio-pre3-1.gz
Then recompile your kernel ;)
These patches were posted before by Alan Cox and Jens Axboe
CD burning works fine for me with this patches but I have compiled all SCSI and IDE stuff directly into the kernel... maybe this matters Bye
Am Donnerstag, 29. November 2001 19:19 schrieb Dirk Pritsch:
Quoted 92 lines
Hi,
just tried the new 2.5.1-pre3 and got the following oops when trying to burn a cd (ide-cd/rw with ide-scsi emulation).
I Hope this is some useful information.
____
ksymoops 2.4.3 on i586 2.5.1-pre3. Options used
-V (default)
-k/proc/ksyms(default)
-l/proc/modules(default)
-o/lib/modules/2.5.1-pre3/(default)
-m/boot/System.map-2.5.1-pre3(default)Warning: You did not tell me where to find
symbol information. I will
assume that the log matches the kernel and
modules that are running
right now and I'll use the default options
above for symbol resolution.
If the current kernel and/or modules do not
match the log, you can get
more accurate output by telling me the kernel
version and where to find
map, modules, ksyms etc. ksymoops -h explains
the options.Unable to handle kernel NULL pointer dereference at virtual address 00000038 c01af582 *pde = 00000000 Oops: 0000 CPU: 0 EIP: 0010:[idescsi_queue+1158/1396] Not tainted EFLAGS: 00210002 eax: 00000000 ebx: d3f64320 ecx: d3f64ea0 edx: 00000000 esi: c0989000 edi: d3f64ea0 ebp: d3f64320 esp: c7321cc4 ds: 0018 es: 0018 ss: 0018 Process cdrecord (pid: 1055, stackpage=c7321000) Stack: 00200293 d36761d4 d3eef800 d3f2dba0 00000000 c8a76ee0 d3eef858
c098900000000001 00000000c7d5d3c0c150eee0c02c3be4c01a7309d3eef800c01a77b4d3eef800d36761d4d3eef8b8d36761d400000000c01ac422d3eef800d3eef800Call Trace: [scsi_dispatch_cmd+257/372] [scsi_done+0/144] [scsi_request_fn+786/808] [__scsi_insert_special+118/128] [scsi_insert_special_req+25/32] Code: 03 42 38 89 46 00 83 c6 14 89 74 24 1c 83 6c 24 20 01 73 bf
Using defaults from ksymoops -t elf32-i386 -a i386Code; 00000000 Before first symbol
00000000 <_EIP>:
Code; 00000000 Before first symbol
0: 03 42 38 add 0x38(%edx),%eax
Code; 00000002 Before first symbol
3: 89 46 00 mov %eax,0x0(%esi)
Code; 00000006 Before first symbol
6: 83 c6 14 add $0x14,%esi
Code; 00000008 Before first symbol
9: 89 74 24 1c mov %esi,0x1c(%esp,1)
Code;0000000cBefore first symbol
d: 83 6c 24 20 01 subl $0x1,0x20(%esp,1)
Code; 00000012 Before first symbol
12: 73 bf jaeffffffd3<_EIP+0xffffffd3>ffffffd2
<END_OF_CODE+2af53fd0/????>1 warning issued. Results may not be reliable.
____After the oops the following message appeared in syslog:
Nov 29 18:06:01 enterprise kernel: <6>scsi: device set offline -command error recover failed: host 0 channel 0 id 0 lun 0
____
lsmod shows no loaded ide-scsi or cdrom modules, so the oops happened before loading them.
____
Please CC: me in replies or if you need further information as I'm not subscribed to l-k.
Cheers,
Quoted 7 lines
Dirk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE8BoCwvIHrJes3kVIRAmvGAJ9RATNkAHklG/lr8zzP42y9hsNUvgCcCxP6 Y1/zljBJTzZFvFEb0goURGA=
=TlL+
-----END PGP SIGNATURE-----
drivers/block/elevator.c renamed from opt/kernel/linux-2.5.1-pre3/drivers/block/elevator.c +1 -1
@@ -98,7 +98,7 @@ {if (bio_data_dir (bio) == rq->cmd) {if (rq->rq_dev == bio->bi_dev && !rq->waiting - && !rq->special && rq->inactive && rq->q == q) + && !rq->special && rq->inactive)return 1 ; }
drivers/block/floppy.c renamed from opt/kernel/linux-2.5.1-pre3/drivers/block/floppy.c +8 -9
@@ -2437,16 +2437,15 @@char *base; base =CURRENT ->buffer; - size =CURRENT ->current_nr_sectors <<9 ; - bio =CURRENT ->bio; + size =0 ; -if (bio){ - bio = bio->bi_next; -while (bio &&bio_data (bio) == base + size){ - size +=bio_size (bio); - bio = bio->bi_next; - } +rq_for_each_bio (bio,CURRENT ) { +if (bio_data (bio) != base + size) +break ; + + size += bio->bi_size; } +return size >>9 ; }
@@ -2543,7 +2542,7 @@ break; }#endif - size =bio_size (bio); + size = bio->bi_size;; buffer =bio_data (bio); }#ifdef FLOPPY_SANITY_CHECK
drivers/block/ll_rw_blk.c renamed from opt/kernel/linux-2.5.1-pre3/drivers/block/ll_rw_blk.c +5 -9
@@ -303,10 +303,7 @@BIO_BUG_ON (i > bio->bi_vcnt); -if (!cluster) - goto new_segment; - -if (bvec_to_phys (bvec) == lastend) { +if (cluster &&bvec_to_phys (bvec) == lastend) {if (sg[nsegs -1 ].length + nbytes > q->max_segment_size) goto new_segment;
@@ -1135,7 +1132,7 @@BUG_ON (!bio->bi_end_io);BIO_BUG_ON (bio_offset (bio) >PAGE_SIZE ); -BIO_BUG_ON (!bio_size (bio)); +BIO_BUG_ON (!bio->bi_size);BIO_BUG_ON (!bio->bi_io_vec); bio->bi_rw = rw;
@@ -1172,11 +1169,7 @@ bio =bio_alloc (GFP_NOIO ,1 ); bio->bi_sector = bh->b_blocknr * (bh->b_size >>9 ); - bio->bi_next =NULL ; bio->bi_dev = bh->b_dev; - bio->bi_private = bh; - bio->bi_end_io = end_bio_bh_io_sync; - bio->bi_io_vec[0 ].bv_page = bh->b_page; bio->bi_io_vec[0 ].bv_len = bh->b_size; bio->bi_io_vec[0 ].bv_offset =bh_offset (bh);
@@ -1184,6 +1177,9 @@ bio->bi_vcnt =1 ; bio->bi_idx =0 ; bio->bi_size = bh->b_size; + + bio->bi_end_io = end_bio_bh_io_sync; + bio->bi_private = bh;return submit_bio (rw, bio); }
drivers/block/loop.c renamed from opt/kernel/linux-2.5.1-pre3/drivers/block/loop.c +4 -4
@@ -182,7 +182,7 @@down (&mapping->host->i_sem); index = pos >>PAGE_CACHE_SHIFT ; offset = pos & (PAGE_CACHE_SIZE -1 ); - len =bio_size (bio); + len = bio->bi_size; data =bio_data (bio);while (len >0 ) {int IV = index * (PAGE_CACHE_SIZE /bsize) + offset/bsize;
@@ -272,7 +272,7 @@ cookie.data =bio_data (bio); cookie.bsize = bsize; desc.written =0 ; - desc.count =bio_size (bio); + desc.count = bio->bi_size; desc.buf = (char *)&cookie; desc.error =0 ;spin_lock_irq (&lo->lo_lock);
@@ -470,7 +470,7 @@IV =loop_get_iv (lo, rbh->bi_sector);if (rw ==WRITE ) {if (lo_do_transfer (lo,WRITE ,bio_data (bh),bio_data (rbh), -bio_size (bh),IV )) + bh->bi_size,IV )) goto err; }
@@ -504,7 +504,7 @@unsigned long IV =loop_get_iv (lo, rbh->bi_sector); ret =lo_do_transfer (lo,READ ,bio_data (bio),bio_data (rbh), -bio_size (bio),IV ); + bio->bi_size,IV );bio_endio (rbh, !ret,bio_sectors (bio));loop_put_buffer (bio);
drivers/block/nbd.c renamed from opt/kernel/linux-2.5.1-pre3/drivers/block/nbd.c +2 -2
@@ -168,7 +168,7 @@struct bio *bio = req->bio;DEBUG ("data, " ); do { - result = nbd_xmit(1, sock, bio_data(bio), bio_size(bio), bio->bi_next == NULL ? 0 : MSG_MORE); + result = nbd_xmit(1, sock, bio_data(bio), bio->bi_size, bio->bi_next == NULL ? 0 : MSG_MORE); if (result <= 0) FAIL("Send data failed."); bio = bio->bi_next;
@@ -208,7 +208,7 @@struct bio *bio = req->bio;DEBUG ("data, " ); do { - result = nbd_xmit(0, lo->sock, bio_data(bio), bio_size(bio), MSG_WAITALL); + result = nbd_xmit(0, lo->sock, bio_data(bio), bio->bi_size, MSG_WAITALL); if (result <= 0) HARDFAIL("Recv data failed."); bio = bio->bi_next;
drivers/md/lvm.c renamed from opt/kernel/linux-2.5.1-pre3/drivers/md/lvm.c +0 -2
@@ -1246,8 +1246,6 @@ } out: -if (test_bit (BIO_HASHED , &bh->bi_flags)) -BUG (); bh->bi_dev = rdev_map; bh->bi_sector = rsector_map;up_read (&lv->lv_lock);
drivers/message/i2o/i2o_block.c renamed from opt/kernel/linux-2.5.1-pre3/drivers/message/i2o/i2o_block.c +14 -14
@@ -287,8 +287,8 @@while (bio) {if (bio_to_phys (bio) == last) { - size +=bio_size (bio); - last +=bio_size (bio); + size += bio->bi_size; + last += bio->bi_size;if (bio->bi_next)__raw_writel (0x14000000 |(size), mptr-8 );else
@@ -297,16 +297,16 @@else {if (bio->bi_next) -__raw_writel (0x10000000 |bio_size (bio), mptr); +__raw_writel (0x10000000 |bio->bi_size, mptr);else -__raw_writel (0xD0000000 |bio_size (bio), mptr); +__raw_writel (0xD0000000 |bio->bi_size, mptr);__raw_writel (bio_to_phys (bio), mptr+4 ); mptr +=8 ; - size =bio_size (bio); - last =bio_to_phys (bio) +bio_size (bio); + size = bio->bi_size; + last =bio_to_phys (bio) + bio->bi_size; } - count -=bio_size (bio); + count -= bio->bi_size; bio = bio->bi_next; }/*
@@ -326,8 +326,8 @@while (bio) {if (bio_to_phys (bio) == last) { - size +=bio_size (bio); - last +=bio_size (bio); + size += bio->bi_size; + last += bio->bi_size;if (bio->bi_next)__raw_writel (0x14000000 |(size), mptr-8 );else
@@ -336,16 +336,16 @@else {if (bio->bi_next) -__raw_writel (0x14000000 |bio_size (bio), mptr); +__raw_writel (0x14000000 |bio->bi_size, mptr);else -__raw_writel (0xD4000000 |bio_size (bio), mptr); +__raw_writel (0xD4000000 |bio->bi_size, mptr);__raw_writel (bio_to_phys (bio), mptr+4 ); mptr +=8 ; - size =bio_size (bio); - last =bio_to_phys (bio) +bio_size (bio); + size = bio->bi_size; + last =bio_to_phys (bio) + bio->bi_size; } - count -=bio_size (bio); + count -= bio->bi_size; bio = bio->bi_next; }
drivers/scsi/scsi_merge.c renamed from opt/kernel/linux-2.5.1-pre3/drivers/scsi/scsi_merge.c +4 -4
@@ -148,7 +148,7 @@*/ bio = req->bio;#ifdef DMA_SEGMENT_SIZE_LIMITED -if (reqsize +bio_size (bio) >PAGE_SIZE ) +if (reqsize + bio->bi_size >PAGE_SIZE ) ret++;#endif
@@ -156,7 +156,7 @@bio_for_each_segment (bvec, bio, i) ret++; - reqsize +=bio_size (bio); + reqsize += bio->bi_size; }if (remainder)
@@ -201,7 +201,7 @@ }#define MERGEABLE_BUFFERS (X ,Y ) \ -(((((long)bio_to_phys((X))+bio_size((X)))|((long)bio_to_phys((Y)))) & \ +(((((long)bio_to_phys((X))+(X)->bi_size)|((long)bio_to_phys((Y)))) & \ (DMA_CHUNK_SIZE - 1)) == 0)#ifdef DMA_CHUNK_SIZE
@@ -767,7 +767,7 @@* back and allocate a really small one - enough to satisfy * the first buffer. */ -if (bio_to_phys (bio) +bio_size (bio) -1 >ISA_DMA_THRESHOLD ) { +if (bio_to_phys (bio) + bio->bi_size -1 >ISA_DMA_THRESHOLD ) { buff = (char *)scsi_malloc (this_count <<9 );if (!buff) {printk ("Warning - running low on DMA memory\n" );
fs/bio.c renamed from opt/kernel/linux-2.5.1-pre3/fs/bio.c +3 -0
@@ -215,6 +215,9 @@atomic_set (&bio->bi_cnt,1 ); bio->bi_flags =0 ; bio->bi_rw =0 ; + bio->bi_vcnt =0 ; + bio->bi_idx =0 ; + bio->bi_size =0 ; bio->bi_end_io =NULL ; }
include/linux/bio.h renamed from opt/kernel/linux-2.5.1-pre3/include/linux/bio.h +7 -11
@@ -93,10 +93,9 @@#define bio_iovec_idx (bio, idx) (&((bio)->bi_io_vec[(bio)->bi_idx]))#define bio_iovec (bio) bio_iovec_idx((bio), (bio)->bi_idx)#define bio_page (bio) bio_iovec((bio))->bv_page -#define bio_size (bio) ((bio)->bi_size)#define __bio_offset (bio, idx) bio_iovec_idx((bio), (idx))->bv_offset#define bio_offset (bio) bio_iovec((bio))->bv_offset -#define bio_sectors (bio) (bio_size((bio)) >> 9) +#define bio_sectors (bio) ((bio)->bi_size >> 9)#define bio_data (bio) (page_address(bio_page((bio))) + bio_offset((bio)))#define bio_barrier (bio) ((bio)->bi_rw & (1 << BIO_BARRIER))
@@ -107,13 +106,6 @@#define bvec_to_phys (bv) (page_to_phys((bv)->bv_page) + (bv)->bv_offset)/* -* hack to avoid doing 64-bit calculations on 32-bit archs, instead use a -* pseudo-pfn check to do segment coalescing -*/ -#define bio_sec_pfn (bio) \ - ((((bio_page(bio) - bio_page(bio)->zone->zone_mem_map) << PAGE_SHIFT) / bio_size(bio)) + (bio_offset(bio) >> 9)) - -/* * queues that have highmem support enabled may still need to revert to * PIO transfers occasionally and thus map high pages temporarily. For * permanent PIO fall back, user is probably better off disabling highmem
@@ -124,12 +116,16 @@#define __bio_kunmap (bio, idx) kunmap(bio_iovec_idx((bio), (idx))->bv_page)#define bio_kunmap (bio) __bio_kunmap((bio), (bio)->bi_idx) +/* +* merge helpers etc +*/ +#define __BVEC_END (bio) bio_iovec_idx((bio), (bio)->bi_idx - 1)#define BIO_CONTIG (bio, nxt) \ - (bio_to_phys((bio)) + bio_size((bio)) == bio_to_phys((nxt))) + (bvec_to_phys(__BVEC_END((bio)) + (bio)->bi_size) ==bio_to_phys((nxt)))#define __BIO_SEG_BOUNDARY (addr1, addr2, mask) \ (((addr1) | (mask)) == (((addr2) - 1) | (mask)))#define BIO_SEG_BOUNDARY (q, b1, b2) \ - __BIO_SEG_BOUNDARY(bvec_to_phys(bio_iovec_idx((b1), (b1)->bi_cnt - 1)), bio_to_phys((b2)) + bio_size((b2)), (q)->seg_boundary_mask) + __BIO_SEG_BOUNDARY(bvec_to_phys(__BVEC_END((b1))), bio_to_phys((b2)) + (b2)->bi_size, (q)->seg_boundary_mask)typedef int (bio_end_io_t ) (struct bio *,int );typedef void (bio_destructor_t ) (struct bio *);
include/linux/blkdev.h renamed from opt/kernel/linux-2.5.1-pre3/include/linux/blkdev.h +2 -5
@@ -177,14 +177,11 @@#ifdef CONFIG_HIGHMEM -extern void create_bounce (struct bio **bio_orig,int gfp_mask); +extern void create_bounce (unsigned long pfn,struct bio **bio_orig,int gfp_mask);extern inline void blk_queue_bounce (request_queue_t *q,struct bio **bio) { -struct page *page =bio_page (*bio); - -if ((page - page->zone->zone_mem_map) + (page->zone->zone_start_paddr >>PAGE_SHIFT ) < q->bounce_pfn) -create_bounce (bio, q->bounce_gfp); +create_bounce (q->bounce_pfn, bio, q->bounce_gfp); }#else /* CONFIG_HIGHMEM */
include/linux/highmem.h renamed from opt/kernel/linux-2.5.1-pre3/include/linux/highmem.h +1 -1
@@ -13,7 +13,7 @@/* declarations for linux/mm/highmem.c */ unsigned int nr_free_highpages (void ); -extern void create_bounce (struct bio **bio_orig,int gfp_mask); +extern void create_bounce (unsigned long pfn,struct bio **bio_orig,int gfp_mask);static inline char *bh_kmap (struct buffer_head *bh) {
mm/highmem.c renamed from opt/kernel/linux-2.5.1-pre3/mm/highmem.c +71 -43
144 lines not on this page · raw message
drivers/block/rd.c +7 -6
@@ -409,13 +409,13 @@ {extern void free_initrd_mem (unsigned long ,unsigned long ); -spin_lock ( &initrd_users_lock ); +spin_lock (&initrd_users_lock);if (!--initrd_users) { -spin_unlock ( &initrd_users_lock ); +spin_unlock (&initrd_users_lock);free_initrd_mem (initrd_start, initrd_end); initrd_start =0 ; }else { -spin_unlock ( &initrd_users_lock ); +spin_unlock (&initrd_users_lock); }blkdev_put (inode->i_bdev,BDEV_FILE );
@@ -437,10 +437,11 @@#ifdef CONFIG_BLK_DEV_INITRD if (unit ==INITRD_MINOR ) { -spin_lock ( &initrd_users_lock ); +spin_lock (&initrd_users_lock); initrd_users++; -if (!initrd_start)return -ENODEV ; -spin_unlock ( &initrd_users_lock ); +spin_unlock (&initrd_users_lock); +if (!initrd_start) +return -ENODEV ; filp->f_op = &initrd_fops;return 0 ; }
drivers/char/pc110pad.c +11 -14
@@ -68,8 +68,8 @@/* driver/filesystem interface management */ static wait_queue_head_t queue;static struct fasync_struct *asyncptr; -static active_count = 0; /* number of concurrent open()s */ -static spinlock_t active_lock =SPIN_LOCK_UNLOCKED ; +static int active_count =0 ;/* number of concurrent open()s */ +static spinlock_t pc110_lock =SPIN_LOCK_UNLOCKED ;/* this lock should be held when referencing active_count */ static struct semaphore reader_lock;
@@ -482,15 +482,14 @@int thisd, thisdd, thisx, thisy;int b;unsigned long flags; - -save_flags (flags); -cli (); + +spin_lock_irqsave (&pc110_lock, flags);read_raw_pad (&thisd, &thisdd, &thisx, &thisy); d[0 ]=(thisd?0x80 :0 ) | (thisdd?0x40 :0 ) | bounce; d[1 ]=(recent_transition?0x80 :0 )+transition_count;read_button (&b); d[2 ]=(synthesize_tap<<4 ) | (b?0x01 :0 ); -restore_flags (flags); +spin_unlock_irqrestore (&pc110_lock, flags); }/**
@@ -586,11 +585,12 @@static int close_pad (struct inode * inode,struct file * file) { +unsigned long flags;fasync_pad (-1 , file,0 ); -spin_lock ( &active_lock ); +spin_lock_irqsave (&pc110_lock, flags);if (!--active_count)outb (0x30 , current_params.io+2 );/* switch off digitiser */ -spin_unlock ( &active_lock ); +spin_unlock_irqrestore (&active_lock, flags);return 0 ; }
@@ -610,16 +610,13 @@ {unsigned long flags; -spin_lock ( &active_lock ); +spin_lock_irqsave (&pc110_lock, flags);if (active_count++) { -spin_unlock ( &active_lock ); +spin_unlock_irqrestore (&pc110_lock, flags);return 0 ; } -spin_unlock ( &active_lock ); -save_flags (flags); -cli ();outb (0x30 , current_params.io+2 );/* switch off digitiser */ pad_irq (0 ,0 ,0 );/* read to flush any pending bytes */ pad_irq (0 ,0 ,0 );/* read to flush any pending bytes */
@@ -634,7 +631,7 @@ synthesize_tap=0 ;del_timer (&bounce_timer);del_timer (&tap_timer); -restore_flags (flags); +spin_unlock_irqrestore (&pc110_lock, flags);return 0 ; }
drivers/char/pc_keyb.c +15 -15
@@ -406,7 +406,7 @@if (rqst ==PM_RESUME ) {if (queue) {/* Aux port detected */ -spin_lock_irqsave ( &aux_count_lock, flags); +spin_lock_irqsave (&aux_count_lock, flags);if ( aux_count ==0 ) {/* Mouse not in use */ spin_lock (&kbd_controller_lock);/*
@@ -420,9 +420,9 @@kbd_write_command (KBD_CCMD_WRITE_MODE );kb_wait ();kbd_write_output (AUX_INTS_OFF ); - spin_unlock(&kbd_controller_lock, flags); + spin_unlock(&kbd_controller_lock); } -spin_unlock_irqrestore ( &aux_count_lock,flags ); +spin_unlock_irqrestore (&aux_count_lock, flags); } }#endif
@@ -433,7 +433,7 @@static inline void handle_mouse_event (unsigned char scancode) {#ifdef CONFIG_PSMOUSE -int flags; +unsigned long flags;static unsigned char prev_code;if (mouse_reply_expected) {if (scancode ==AUX_ACK ) {
@@ -452,7 +452,7 @@ prev_code = scancode;add_mouse_randomness (scancode); -spin_lock_irqsave ( &aux_count_lock, flags); +spin_lock_irqsave (&aux_count_lock, flags);if ( aux_count ) {int head = queue->head;
@@ -464,7 +464,7 @@ wake_up_interruptible(&queue->proc_list); } } -spin_unlock_irqrestore ( &aux_count_lock, flags); +spin_unlock_irqrestore (&aux_count_lock, flags);#endif }
@@ -1052,14 +1052,14 @@static int release_aux (struct inode * inode,struct file * file) { -int flags; +unsigned long flags;fasync_aux (-1 , file,0 ); -spin_lock_irqsave ( &aux_count, flags ); +spin_lock_irqsave (&aux_count, flags);if ( --aux_count ) { -spin_unlock_irqrestore ( &aux_count_lock ); +spin_unlock_irqrestore (&aux_count_lock, flags);return 0 ; } -spin_unlock_irqrestore ( &aux_count_lock, flags ); +spin_unlock_irqrestore (&aux_count_lock, flags);kbd_write_cmd (AUX_INTS_OFF );/* Disable controller ints */ kbd_write_command_w (KBD_CCMD_MOUSE_DISABLE );aux_free_irq (AUX_DEV );
@@ -1073,16 +1073,16 @@static int open_aux (struct inode * inode,struct file * file) { -int flags; -spin_lock_irqsave ( &aux_count_lock, flags ); +unsigned long flags; +spin_lock_irqsave (&aux_count_lock, flags);if ( aux_count++ ) { -spin_unlock_irqrestore ( &aux_count_lock ); +spin_unlock_irqrestore (&aux_count_lock, flags);return 0 ; } queue->head = queue->tail =0 ;/* Flush input queue */ if (aux_request_irq (keyboard_interrupt,AUX_DEV )) { aux_count--; -spin_unlock_irqrestore ( &aux_count_lock, flags ); +spin_unlock_irqrestore (&aux_count_lock, flags);return -EBUSY ; }kbd_write_command_w (KBD_CCMD_MOUSE_ENABLE );/* Enable the
@@ -1094,7 +1094,7 @@mdelay (2 );/* Ensure we follow the kbc access delay rules.. */ send_data (KBD_CMD_ENABLE );/* try to workaround toshiba4030cdt problem */ -spin_unlock_irqrestore ( &aux_count_lock, flags ); +spin_unlock_irqrestore (&aux_count_lock, flags);return 0 ; }
drivers/char/wdt.c +3 -4
@@ -50,7 +50,7 @@#include <linux/reboot.h> #include <linux/init.h> -static int wdt_is_open; +static unsigned long wdt_is_open;/* * You must set these - there is no sane way to probe for this board.
@@ -337,13 +337,12 @@switch (MINOR (inode->i_rdev)) {case WATCHDOG_MINOR : -if (wdt_is_open) +if (test_and_set_bit (0 , &wdt_is_open))return -EBUSY ;/* * Activate */ - wdt_is_open=1 ;inb_p (WDT_DC );/* Disable */ wdt_ctr_mode (0 ,3 );wdt_ctr_mode (1 ,2 );
@@ -380,7 +379,7 @@inb_p (WDT_DC );/* Disable counters */ wdt_ctr_load (2 ,0 );/* 0 length reset pulses now */ #endif - wdt_is_open=0 ; +clear_bit (0 , &wdt_is_open); }return 0 ; }
drivers/char/wdt_pci.c +1 -1
@@ -71,7 +71,7 @@#define PCI_DEVICE_ID_WDG_CSM 0x22c0#endif -static int wdt_is_open; +static unsigned long wdt_is_open;/* * You must set these - there is no sane way to probe for this board.
Quoted 30 lines · Dirk Pritsch
Hi,
just tried the new 2.5.1-pre3 and got the following oops when trying to burn a cd (ide-cd/rw with ide-scsi emulation).
I Hope this is some useful information.
____
ksymoops 2.4.3 on i586 2.5.1-pre3. Options used
-V (default)
-k/proc/ksyms(default)
-l/proc/modules(default)
-o/lib/modules/2.5.1-pre3/(default)
-m/boot/System.map-2.5.1-pre3(default)Warning: You did not tell me where to find
symbol information. I will
assume that the log matches the kernel and
modules that are running
right now and I'll use the default options
above for symbol resolution.
If the current kernel and/or modules do not
match the log, you can get
more accurate output by telling me the kernel
version and where to find
map, modules, ksyms etc. ksymoops -h explains
the options.
Quoted 7 lines
Unable to handle kernel NULL pointer dereference at virtual address 00000038 c01af582 *pde = 00000000 Oops: 0000 CPU: 0 EIP: 0010:[idescsi_queue+1158/1396] Not tainted
Hmm, I bet the problem is not really bio but the fact that someone is still sending down a scatterlist with ->address set instead of ->page/offset.
Let me hack a quick fix up for you to test... 2 minutes.
Signature · 1 line
Jens Axboe
Hi,
Quoted 11 lines · Slo Mo Snail
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Hi,
Have you applied any other patches than the 2.5.1-pre3? If/When not you'll probably get some data corruption :( Please apply the 2 Patches attatched and
http://kernel.org/pub/linux/kernel/people/axboe/patches/v2.5/2.5.1-pre3/bio-pre3-1.gz
Then recompile your kernel ;)
These patches were posted before by Alan Cox and Jens Axboe
Quoted 4 lines
CD burning works fine for me with this patches but I have compiled all SCSI and IDE stuff directly into the kernel... maybe this matters Bye
thanks for the info, the patch from Alan was applied, but not the one from Jens, I will try it again with both patches.
Cheers,
Dirk
Quoted 5 lines · Jens Axboe
Hmm, I bet the problem is not really bio but the fact that someone is still sending down a scatterlist with ->address set instead of ->page/offset.
Let me hack a quick fix up for you to test... 2 minutes.
Please try this, and check for oops and "jens was right" in dmesg. Let me know how it goes, thanks.
scsi/ide-scsi.c renamed from opt/kernel/linux-2.5.1-pre3/drivers/scsi/ide-scsi.c +18 -4
@@ -708,16 +708,30 @@printk ("ide-scsi: %s: building DMA table, %d segments, %dkB total\n" , drive->name, segments, pc->request_transfer >>10 );#endif /* IDESCSI_DEBUG_LOG */ while (segments--) { - bh->bi_io_vec[0 ].bv_page = sg->page; +struct page *page = sg->page; +int offset = sg->offset; +static int foo; + +if (!page) { +BUG_ON (!sg->address); +if (!foo) { +printk ("jens was right\n" ); + foo =1 ; + } + page =virt_to_page (sg->address); + offset = (unsigned long ) sg->address & ~PAGE_MASK ; + } + + bh->bi_io_vec[0 ].bv_page = page; bh->bi_io_vec[0 ].bv_len = sg->length; - bh->bi_io_vec[0 ].bv_offset = sg->offset; + bh->bi_io_vec[0 ].bv_offset = offset; bh->bi_size = sg->length; bh = bh->bi_next;/* * just until scsi_merge is fixed up... */ -BUG_ON (PageHighMem (sg->page)); - sg->address =page_address (sg->page) + sg->offset; +BUG_ON (PageHighMem (page)); + sg->address =page_address (page) + offset; sg++; } }else {
Signature · 1 line
Jens Axboe
Am Donnerstag, 29. November 2001 19:45 schrieben Sie:
Quoted 18 lines
Hi,
Quoted 11 lines · Slo Mo Snail
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Hi,
Have you applied any other patches than the 2.5.1-pre3? If/When not you'll probably get some data corruption :( Please apply the 2 Patches attatched and
http://kernel.org/pub/linux/kernel/people/axboe/patches/v2.5/2.5.1-pre3/b
io-pre3-1.gz Then recompile your kernel ;)
These patches were posted before by Alan Cox and Jens AxboeQuoted 3 lines
CD burning works fine for me with this patches but I have compiled all SCSI and IDE stuff directly into the kernel... maybe this matters Bye
Quoted 7 lines
thanks for the info, the patch from Alan was applied, but not the one
Quoted 1 line
from Jens, I will try it again with both patches.
Cheers,
Dirk
I've forgotten something...
You need first the bio-pre3-1.gz and then the one which was attatched The first fixes some things in the new block i/o architecture, the 2nd fixes the data corruption and fixes some things in the block i/o
Bye
Hi,
Quoted 11 lines · Jens Axboe
Quoted 5 lines · Jens Axboe
Hmm, I bet the problem is not really bio but the fact that someone is still sending down a scatterlist with ->address set instead of ->page/offset.
Let me hack a quick fix up for you to test... 2 minutes.
Please try this, and check for oops and "jens was right" in dmesg. Let me know how it goes, thanks.
Ok, applied the diff from Alan, and the two I got from you, and it seems to work (burning still in progress).
Instead of an oops, syslog now tells me:
Nov 29 20:32:49 enterprise kernel: jens was right
when loading the modules.
Thanks for the quick fix,
Cheers,
Dirk