public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* kern_path() returns error in kernel 4.4
@ 2016-06-13  9:12 dongke di
  2016-06-13 15:40 ` Al Viro
  0 siblings, 1 reply; 2+ messages in thread
From: dongke di @ 2016-06-13  9:12 UTC (permalink / raw)
  To: linux-kernel

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 ?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: kern_path() returns error in kernel 4.4
  2016-06-13  9:12 kern_path() returns error in kernel 4.4 dongke di
@ 2016-06-13 15:40 ` Al Viro
  0 siblings, 0 replies; 2+ messages in thread
From: Al Viro @ 2016-06-13 15:40 UTC (permalink / raw)
  To: dongke di; +Cc: linux-kernel

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...

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-13 15:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-13  9:12 kern_path() returns error in kernel 4.4 dongke di
2016-06-13 15:40 ` Al Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox