From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shaya Potter Subject: sys_uselib in exec.c Date: Tue, 23 Mar 2004 21:05:10 -0500 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <1080093909.2030.3.camel@zaphod> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: Received: from opus.cs.columbia.edu ([128.59.20.100]:59607 "EHLO opus.cs.columbia.edu") by vger.kernel.org with ESMTP id S262993AbUCXCFQ (ORCPT ); Tue, 23 Mar 2004 21:05:16 -0500 Received: from 6-allhosts (user-0ccem1d.cable.mindspring.com [24.199.88.45]) (authenticated bits=0) by opus.cs.columbia.edu (8.12.10/8.12.10) with ESMTP id i2O25FqK017451 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT) for ; Tue, 23 Mar 2004 21:05:16 -0500 (EST) To: linux-fsdevel@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org the code there is (2.6.1) 125 error = __user_walk(library, LOOKUP_FOLLOW|LOOKUP_OPEN, &nd); 126 if (error) 127 goto out; 128 129 error = -EINVAL; 130 if (!S_ISREG(nd.dentry->d_inode->i_mode)) 131 goto exit; 132 133 error = permission(nd.dentry->d_inode, MAY_READ | MAY_EXEC, &nd); 134 if (error) 135 goto exit; 136 137 file = dentry_open(nd.dentry, nd.mnt, O_RDONLY); 138 error = PTR_ERR(file); 139 if (IS_ERR(file)) 140 goto out; where exit does a path_release(&nd) and return's error while out just returns error. if dentry_open fails, we don't call path_release(&nd). Is this correct? thanks, shaya