lkml.org 
[lkml]   [2003]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[Patch 1/8] 2.4: Fix ext3 panic due to ll_rw_block behaviour after illegal block access.
It is really rude to clear all the buffer state bits on an access
beyond end-of-device. It can panic filesystems which have internal
state bits, for example. Just clear the dirty flag instead, and leave
the others intact.

--- linux-2.4-ext3push/drivers/block/ll_rw_blk.c.=K0000=.orig 2003-03-25 10:59:15.000000000 +0000
+++ linux-2.4-ext3push/drivers/block/ll_rw_blk.c 2003-03-25 10:59:15.000000000 +0000
@@ -1129,7 +1129,7 @@ void generic_make_request (int rw, struc

if (maxsector < count || maxsector - count < sector) {
/* Yecch */
- bh->b_state &= (1 << BH_Lock) | (1 << BH_Mapped);
+ bh->b_state &= ~(1 << BH_Dirty);

/* This may well happen - the kernel calls bread()
without checking the size of the device, e.g.,
@@ -1140,7 +1140,6 @@ void generic_make_request (int rw, struc
kdevname(bh->b_rdev), rw,
(sector + count)>>1, minorsize);

- /* Yecch again */
bh->b_end_io(bh, 0);
return;
}
-
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/
\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.020 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site