Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756970AbaAHQfP (ORCPT ); Wed, 8 Jan 2014 11:35:15 -0500 Received: from merlin.infradead.org ([205.233.59.134]:35758 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756324AbaAHQfM (ORCPT ); Wed, 8 Jan 2014 11:35:12 -0500 Message-ID: <52CD7E0B.6020606@kernel.dk> Date: Wed, 08 Jan 2014 09:34:19 -0700 From: Jens Axboe User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Muthu Kumar , "linux-kernel@vger.kernel.org" Subject: Re: [block:for-3.14/core]: bio_endio: Warn and free bio if bi_end_io is not set. References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/07/2014 06:57 PM, Muthu Kumar wrote: > Jens, > In bio_endio if bio doesn't have bi_end_io (should be an error case), > we set bio to NULL and continue silently without freeing the bio. It > would be good to have a WARN and free the bio to avoid memory leak. > > If you agree, here is the patch. I don't remember off the top of my head if there are valid uses cases of it. But leaking it would definitely be problematic. So I think it's a good idea to queue it up, then we'll see if it triggers anything. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/