NeilBrown b95aa98e77 autofs: sanity check status reported with AUTOFS_DEV_IOCTL_FAIL
commit 9fa4eb8e490a28de40964b1b0e583d8db4c7e57c upstream.

If a positive status is passed with the AUTOFS_DEV_IOCTL_FAIL ioctl,
autofs4_d_automount() will return

   ERR_PTR(status)

with that status to follow_automount(), which will then dereference an
invalid pointer.

So treat a positive status the same as zero, and map to ENOENT.

See comment in systemd src/core/automount.c::automount_send_ready().

Link: http://lkml.kernel.org/r/871sqwczx5.fsf@notabene.neil.brown.name
Signed-off-by: NeilBrown <neilb@suse.com>
Cc: Ian Kent <raven@themaw.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-29 12:48:50 +02:00
..
2017-05-14 13:32:54 +02:00
2017-06-14 13:16:24 +02:00
2017-06-14 13:16:24 +02:00
2017-03-12 06:37:28 +01:00
2017-06-14 13:16:24 +02:00
2017-06-14 13:16:24 +02:00
2017-06-14 13:16:24 +02:00
2017-06-14 13:16:24 +02:00
2016-11-10 16:36:34 +01:00
2017-06-14 13:16:24 +02:00
2015-11-13 20:34:33 -05:00
2015-11-23 21:11:08 -05:00
2017-06-14 13:16:24 +02:00
2016-10-07 15:23:47 +02:00
2015-11-10 12:07:22 -08:00
2017-06-14 13:16:24 +02:00
2015-11-16 23:54:45 -08:00
2017-06-14 13:16:24 +02:00
2015-11-16 23:54:45 -08:00
2015-08-12 15:28:45 -05:00
2016-08-10 11:49:27 +02:00
2017-06-14 13:16:24 +02:00
2016-05-18 17:06:48 -07:00
2016-09-07 08:32:43 +02:00
2017-06-14 13:16:24 +02:00