Re: [PATCH] laptop-mode-2.6.0 version 5

From: Jens Axboe
Date: Fri Jan 02 2004 - 07:06:31 EST


On Fri, Jan 02 2004, Hugang wrote:
> On Fri, 2 Jan 2004 12:27:33 +0100
> Jens Axboe <axboe@xxxxxxx> wrote:
>
> > I dunno, I can't possibly tell since you haven't given any info about
> > this crash. Where does it crash, do you have an oops? All I could say
> > from your report + patch is that it wasn't valid. There's just no way
> > for current->comm to be NULL, so your patch couldn't possibly have made
> > a difference.
>
> Attached file is the crashed dmesg, When I disable CONFIG_LBD, the
> problem not found any more.

Ah there you go, then it's just the missing cast to u64. It has nothing
to do with current->comm at all. The compiler should have warned you
about this error, did it not?

The dump printk() needs to be changed anyways, the rw deciphering is not
correct. Something like this is more appropriate:

if (unlikely(block_dump)) {
char b[BDEVNAME_SIZE];

printk("%s(%d): %s block %Lu on %s\n", current->comm,
current->pid, (rw & WRITE) ? "WRITE" : "READ",
(u64) bio->bi_sector, bdevname(bio->bi_bdev, b));
}

--
Jens Axboe

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