[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <yq1prgqy8wc.fsf@sermon.lab.mkp.net>
Date: Mon, 09 Mar 2009 12:10:27 -0400
From: "Martin K. Petersen" <martin.petersen@...cle.com>
To: Jens Axboe <jens.axboe@...cle.com>
Cc: Li Zefan <lizf@...fujitsu.com>,
LKML <linux-kernel@...r.kernel.org>, martin.petersen@...cle.com
Subject: Re: [PATCH] block: fix memory leak in bio_clone()
>>>>> "Jens" == Jens Axboe <jens.axboe@...cle.com> writes:
Jens> So the leak will not occur, but it does mean that it isn't
Jens> honoring the gfp_mask passed in to bio_clone(), which is the first
Jens> bug.
bio_integrity_clone() had no mask because all callers of it used
GFP_NOIO explicitly.
But as you now recall there is a patch queued that adds the mask :)
Jens> The second bug is that it should be using its own bioset, as it is
Jens> illegal to do multiple __GFP_WAIT allocations on a single mempool
Jens> and always expect progress.
So how do you propose I go about this?
The original intent was to contain all the integrity blah inside the
bio_set to make it completely transparent to the caller. That's why the
bip mempool is hanging off of the bio_set. But obviously two bvecs are
needed per bio, one to describe data and to describe the integrity
buffer.
Having two bvec mempools per bio_set seems icky. I guess what you are
suggesting is that we could have a dedicated bio_integrity_set akin to
the bio_split_pool. That removes the caller's option of passing a
dedicated bio_set to the clone command, though. Will that have forward
progress implications for stacking drivers?
--
Martin K. Petersen Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists