Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

packet: fix error handling

The packet driver is assuming (reasonably) that the (undocumented)
request.errors is an errno. But it is in fact some mysterious bitfield. When
things go wrong we return weird positive numbers to the VFS as pointers and it
goes oops.

Thanks to William Heimbigner for reporting and diagnosis.

(It doesn't oops, but this driver still doesn't work for William)

Cc: William Heimbigner <icxcnika@mar.tar.cc>
Cc: Peter Osterlund <petero2@telia.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Andrew Morton and committed by
Linus Torvalds
cbc31a47 5044eed4

+2 -1
+2 -1
drivers/block/pktcdvd.c
··· 777 777 rq->cmd_flags |= REQ_QUIET; 778 778 779 779 blk_execute_rq(rq->q, pd->bdev->bd_disk, rq, 0); 780 - ret = rq->errors; 780 + if (rq->errors) 781 + ret = -EIO; 781 782 out: 782 783 blk_put_request(rq); 783 784 return ret;