lkml.org 
[lkml]   [2000]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: attempt to access beyond end of device
On Thu, Dec 07, 2000 at 04:56:59PM +0100, Jan Niehusmann wrote:
> ll_rw_blk.c: generic_make_request() contains the following code:
>
> if (maxsector < count || maxsector - count < sector) {
> bh->b_state &= (1 << BH_Lock) | (1 << BH_Mapped);
> if (blk_size[major][MINOR(bh->b_rdev)]) {
>
> /* This may well happen - the kernel calls bread()
> without checking the size of the device, e.g.,
> when mounting a device. */
> printk(KERN_INFO
> "attempt to access beyond end of device\n");
> printk(KERN_INFO "%s: rw=%d, want=%d, limit=%d\n",
> kdevname(bh->b_rdev), rw,
> (sector + count)>>1,
> blk_size[major][MINOR(bh->b_rdev)]);
> }
> bh->b_end_io(bh, 0);
> return;
> }
>
>
> That means that if blk_size[major][MINOR(bh->b_rdev)] == 0, the request
> is canceled but no message is printed. Shouldn't there be a warning message?

Maybe that code fragment is mine. If so, then at some point
in time I decided that the answer to your question is no.

Andries
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:51    [W:0.040 / U:0.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site