From mboxrd@z Thu Jan 1 00:00:00 1970 From: "J. Bruce Fields" Subject: Re: Leak in nlmsvc_testlock for async GETFL case Date: Thu, 29 Nov 2007 14:08:48 -0500 Message-ID: <20071129190848.GA17907@fieldses.org> References: <48611B2F-1587-48C5-9F30-8DCFA1121CF6@Sun.COM> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org To: Oleg Drokin Return-path: Received: from mail.fieldses.org ([66.93.2.214]:59455 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759006AbXK2TIt (ORCPT ); Thu, 29 Nov 2007 14:08:49 -0500 Content-Disposition: inline In-Reply-To: <48611B2F-1587-48C5-9F30-8DCFA1121CF6@Sun.COM> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu, Nov 29, 2007 at 01:46:04PM -0500, Oleg Drokin wrote: > Hello! > > Per our discussion, I am resending this patch that fixes a leak in > nlmsvc_testlock. It is addition to another leak fixing patch you > already have. Without the patch, there is a leakage of nlmblock > structure refcount that holds a reference nlmfile structure, that > holds a reference to struct file, when async GETFL is used > (-EINPROGRESS return from file_ops->lock()), and also in some error > cases. Thanks for the fix! Looks right to me. Yes, somehow I missed this one when you sent it privately. Applied and pushed out to git://linux-nfs.org/~bfields/linux.git nfs-server-stable and I'll submit it for 2.6.25. Minor nit: your editor is messing up the whitespace; keep the indents all tabs. Also, for future patches, could you see Documentation/SubmittingPatches? In particular, see "12) Sign your work". And it'd be better to inline the patch if at all possible. Thanks again. --b.