From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [PATCH] ecryptfs: Fix refcnt leak on ecryptfs_follow_link() error path Date: Thu, 14 Jan 2010 03:43:10 +0000 Message-ID: <20100114034310.GG19799@ZenIV.linux.org.uk> References: <87my0kjxpd.fsf@devron.myhome.or.jp> <20100113194458.GB4673@ZenIV.linux.org.uk> <87tyupfjk2.fsf@devron.myhome.or.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Tyler Hicks , Dustin Kirkland , ecryptfs-devel@lists.launchpad.net, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: OGAWA Hirofumi Return-path: Received: from zeniv.linux.org.uk ([195.92.253.2]:39363 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752646Ab0ANDnP (ORCPT ); Wed, 13 Jan 2010 22:43:15 -0500 Content-Disposition: inline In-Reply-To: <87tyupfjk2.fsf@devron.myhome.or.jp> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Jan 14, 2010 at 12:32:13PM +0900, OGAWA Hirofumi wrote: > Al Viro writes: > > > On Tue, Jan 12, 2010 at 03:36:14AM +0900, OGAWA Hirofumi wrote: > >> > >> If ->follow_link handler return the error, it should decrement > >> nd->path refcnt. But, ecryptfs_follow_link() doesn't decrement. > >> > >> This patch fix it by using usual nd_set_link() style error handling, > >> instead of playing with nd->path. > > > > Applied. > > Sigh, sorry. I introduced new bug by this patch. Please apply this too. I'll fold it. BTW, while we are at it, there's a leak in configfs/symlink.c get_target() as well ;-/