+ autofs-clear-o_nonblock-on-the-pipe.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: autofs: clear O_NONBLOCK on the pipe
has been added to the -mm tree.  Its filename is
     autofs-clear-o_nonblock-on-the-pipe.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/autofs-clear-o_nonblock-on-the-pipe.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/autofs-clear-o_nonblock-on-the-pipe.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: NeilBrown <neilb@xxxxxxxx>
Subject: autofs: clear O_NONBLOCK on the pipe

autofs does not expect the pipe it is given to have O_NONBLOCK set -
specifically if __kernel_write() in autofs_write() returns -EAGAIN, this
is treated as a fatal error and the pipe is closed.

For safety autofs should, therefore, clear the O_NONBLOCK flag.

Releases of systemd prior to 8th February 2019 used
  pipe2(p, O_NONBLOCK|O_CLOEXEC)
and thus (inadvertently) set this flag.

Link: http://lkml.kernel.org/r/154993550902.3321.1183632970046073478.stgit@pluto-themaw-net
Signed-off-by: NeilBrown <neilb@xxxxxxxx>
Signed-off-by: Ian Kent <raven@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/autofs/autofs_i.h |    2 ++
 1 file changed, 2 insertions(+)

--- a/fs/autofs/autofs_i.h~autofs-clear-o_nonblock-on-the-pipe
+++ a/fs/autofs/autofs_i.h
@@ -216,6 +216,8 @@ static inline int autofs_prepare_pipe(st
 		return -EINVAL;
 	/* We want a packet pipe */
 	pipe->f_flags |= O_DIRECT;
+	/* We don't expect -EAGAIN */
+	pipe->f_flags &= ~O_NONBLOCK;
 	return 0;
 }
 
_

Patches currently in -mm which might be from neilb@xxxxxxxx are

autofs-clear-o_nonblock-on-the-pipe.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux