From: Boaz Harrosh <bharrosh@panasas.com>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: linux-scsi <linux-scsi@vger.kernel.org>, Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH] WARN_ON if blk_put_request leaks BIOs
Date: Sun, 22 Mar 2009 10:51:21 +0200 [thread overview]
Message-ID: <49C5FC09.7050502@panasas.com> (raw)
In-Reply-To: <20090320204543.GE27476@kernel.dk>
Jens Axboe wrote:
> On Thu, Mar 19 2009, Boaz Harrosh wrote:
>> Put a WARN_ON in __blk_put_request if it is about to
>> leak bio(s). This is a serious bug that can happen in error
>> handling code paths.
>>
>> For this to work I have fixed a couple of places in block/ where
>> request->bio != NULL ownership was not honored. And a small cleanup
>> at sg_io() while at it.
>
> Ho humm, not sure what to do about this. Honestly, in all the time that
> I have been doing this, this would have found about zero bugs. And now
> enforces a rule that ->bio must be cleared. Normal bio completion does
> that automatically, so it's not a problem there, but it's still a new
> rule just to satisfy this questionable debug mechanism.
>
> But what the hell, it's simple enough. Kill the totally unrelated
> scsi_ioctl.c change, and I'll toss it in for a spin.
>
The scsi_ioctl.c is related. It sets req->bio back from some internal
held value just to carry it across a static function call, all the while
when the function is not needed, totally bogus in the error handling check
of an hard-coded 0, and a call sight that is bigger then the actual function.
So it was better to fix it then, go around the problem of the code putting
some private data on req->bio.
I thought the all patch is worth it just for that bit
Thanks
Boaz
prev parent reply other threads:[~2009-03-22 8:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-19 10:20 [PATCHSET 0/2] Don't let blk_put_request leak BIOs Boaz Harrosh
2009-03-19 10:24 ` [PATCH 1/2] TESTING: " Boaz Harrosh
2009-03-19 10:26 ` [PATCH 2/2] libosd: Don't let osd abuse block internals, now that it's fixed Boaz Harrosh
2009-03-19 11:33 ` [PATCHSET 0/2] Don't let blk_put_request leak BIOs Jens Axboe
2009-03-19 13:40 ` Boaz Harrosh
2009-03-19 13:45 ` Jens Axboe
2009-03-19 13:48 ` Boaz Harrosh
2009-03-19 13:56 ` Jens Axboe
2009-03-19 14:18 ` Boaz Harrosh
2009-03-19 14:24 ` Jens Axboe
2009-03-19 14:50 ` Boaz Harrosh
2009-03-19 16:29 ` [PATCH] WARN_ON if blk_put_request leaks BIOs Boaz Harrosh
2009-03-20 20:45 ` Jens Axboe
2009-03-22 8:51 ` Boaz Harrosh [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49C5FC09.7050502@panasas.com \
--to=bharrosh@panasas.com \
--cc=jens.axboe@oracle.com \
--cc=linux-scsi@vger.kernel.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.