linux_dsm_epyc7002/fs/affs
Mikulas Patocka 01d6e08711 affs: fix remount failure when there are no options changed
Commit c8f33d0bec ("affs: kstrdup() memory handling") checks if the
kstrdup function returns NULL due to out-of-memory condition.

However, if we are remounting a filesystem with no change to
filesystem-specific options, the parameter data is NULL.  In this case,
kstrdup returns NULL (because it was passed NULL parameter), although no
out of memory condition exists.  The mount syscall then fails with
ENOMEM.

This patch fixes the bug.  We fail with ENOMEM only if data is non-NULL.

The patch also changes the call to replace_mount_options - if we didn't
pass any filesystem-specific options, we don't call
replace_mount_options (thus we don't erase existing reported options).

Fixes: c8f33d0bec ("affs: kstrdup() memory handling")
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org	# v4.1+
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-05-28 16:50:24 -07:00
..
affs.h fs:affs:Replace time_t with time64_t 2016-01-09 02:59:19 -05:00
amigaffs.c fs:affs:Replace time_t with time64_t 2016-01-09 02:59:19 -05:00
bitmap.c fs/affs/bitmap.c: remove unnecessary return 2015-02-17 14:34:52 -08:00
Changes remove obsolete references to powertweak 2013-11-27 20:34:32 -08:00
dir.c simple local filesystems: switch to ->iterate_shared() 2016-05-02 19:49:32 -04:00
file.c direct-io: eliminate the offset argument to ->direct_IO 2016-05-01 19:58:39 -04:00
inode.c don't put symlink bodies in pagecache into highmem 2015-12-08 22:41:36 -05:00
Kconfig
Makefile
namei.c don't put symlink bodies in pagecache into highmem 2015-12-08 22:41:36 -05:00
super.c affs: fix remount failure when there are no options changed 2016-05-28 16:50:24 -07:00
symlink.c switch ->get_link() to delayed_call, kill ->put_link() 2015-12-30 13:01:03 -05:00