Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755279AbbEKSSJ (ORCPT ); Mon, 11 May 2015 14:18:09 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:47465 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755025AbbEKSI2 (ORCPT ); Mon, 11 May 2015 14:08:28 -0400 From: Al Viro To: Linus Torvalds Cc: Neil Brown , Christoph Hellwig , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH v3 085/110] namei: may_follow_link() - lift terminate_walk() on failures into caller Date: Mon, 11 May 2015 19:07:45 +0100 Message-Id: <1431367690-5223-85-git-send-email-viro@ZenIV.linux.org.uk> X-Mailer: git-send-email 1.7.7.6 In-Reply-To: <20150511180650.GA4147@ZenIV.linux.org.uk> References: <20150511180650.GA4147@ZenIV.linux.org.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1017 Lines: 39 From: Al Viro Signed-off-by: Al Viro --- fs/namei.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index 6d4692d..51e2214 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -798,7 +798,6 @@ static inline int may_follow_link(struct nameidata *nd) return 0; audit_log_link_denied("follow_link", &nd->stack[0].link); - terminate_walk(nd); return -EACCES; } @@ -1980,8 +1979,10 @@ static int trailing_symlink(struct nameidata *nd) { const char *s; int error = may_follow_link(nd); - if (unlikely(error)) + if (unlikely(error)) { + terminate_walk(nd); return error; + } nd->flags |= LOOKUP_PARENT; nd->stack[0].name = NULL; s = get_link(nd); -- 2.1.4 -- 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/