https://github.com/torvalds/linux
Revision ef45cb624b9517f71ad6c61299478c2cc08e4d98 authored by Pete Zaitcev on 09 April 2008, 00:41:51 UTC, committed by Linus Torvalds on 09 April 2008, 01:25:52 UTC
When __blk_end_request returns nonzero, it means that the request was
not completely processed and some BIOs are still attached. Since we
have dequeued it by that time, it means leaking requests and hanging
processes, which is why BUG() was in there. In ub this happens if
a packet request ends normally, but with residue (e.g. when scsi_id
issues INQUIRY).

The fix is to make sure that arguments passed to __blk_end_request
are correct: the full request length and not just transferred length.
The transferred length is indicated to applications by adjusting
rq->data_len with old, unchanged code outside of this patch.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Cc: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Cc: Greg KH <greg@kroah.com>
Cc: Boaz Harrosh <bharrosh@panasas.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 7180c4c
History
Tip revision: ef45cb624b9517f71ad6c61299478c2cc08e4d98 authored by Pete Zaitcev on 09 April 2008, 00:41:51 UTC
ub: remove BUG() after __blk_end_request and fix the condition causing it
Tip revision: ef45cb6

back to top