From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1424781AbcFMPkz (ORCPT ); Mon, 13 Jun 2016 11:40:55 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:43294 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1424217AbcFMPkw (ORCPT ); Mon, 13 Jun 2016 11:40:52 -0400 Date: Mon, 13 Jun 2016 16:40:51 +0100 From: Al Viro To: dongke di Cc: linux-kernel@vger.kernel.org Subject: Re: kern_path() returns error in kernel 4.4 Message-ID: <20160613154050.GV14480@ZenIV.linux.org.uk> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 13, 2016 at 05:12:27PM +0800, dongke di wrote: > struct path path; > int r = kern_path( "/tmp/abc.txt", LOOKUP_FOLLOW | LOOKUP_PARENT, &path ); > > The file abc.txt does not exist. > > On Ubuntu 14.04 ( kernel 3.13 ), r is zero (succed). > On Ubuntu 16.04 ( kernel 4.4 ), r is -2 ( fail). > > Is it a bug or other else ? It is - in the code that passes LOOKUP_PARENT to kern_path(). What are is it trying to do there? Need more context...