]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Jan 2020 07:49:10 +0000 (08:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Jan 2020 07:49:10 +0000 (08:49 +0100)
added patches:
reiserfs-fix-handling-of-eopnotsupp-in-reiserfs_for_each_xattr.patch

queue-4.9/reiserfs-fix-handling-of-eopnotsupp-in-reiserfs_for_each_xattr.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/reiserfs-fix-handling-of-eopnotsupp-in-reiserfs_for_each_xattr.patch b/queue-4.9/reiserfs-fix-handling-of-eopnotsupp-in-reiserfs_for_each_xattr.patch
new file mode 100644 (file)
index 0000000..157b043
--- /dev/null
@@ -0,0 +1,51 @@
+From 394440d469413fa9b74f88a11f144d76017221f2 Mon Sep 17 00:00:00 2001
+From: Jeff Mahoney <jeffm@suse.com>
+Date: Wed, 15 Jan 2020 13:00:59 -0500
+Subject: reiserfs: fix handling of -EOPNOTSUPP in reiserfs_for_each_xattr
+
+From: Jeff Mahoney <jeffm@suse.com>
+
+commit 394440d469413fa9b74f88a11f144d76017221f2 upstream.
+
+Commit 60e4cf67a58 (reiserfs: fix extended attributes on the root
+directory) introduced a regression open_xa_root started returning
+-EOPNOTSUPP but it was not handled properly in reiserfs_for_each_xattr.
+
+When the reiserfs module is built without CONFIG_REISERFS_FS_XATTR,
+deleting an inode would result in a warning and chowning an inode
+would also result in a warning and then fail to complete.
+
+With CONFIG_REISERFS_FS_XATTR enabled, the xattr root would always be
+present for read-write operations.
+
+This commit handles -EOPNOSUPP in the same way -ENODATA is handled.
+
+Fixes: 60e4cf67a582 ("reiserfs: fix extended attributes on the root directory")
+CC: stable@vger.kernel.org     # Commit 60e4cf67a58 was picked up by stable
+Link: https://lore.kernel.org/r/20200115180059.6935-1-jeffm@suse.com
+Reported-by: Michael Brunnbauer <brunni@netestate.de>
+Signed-off-by: Jeff Mahoney <jeffm@suse.com>
+Signed-off-by: Jan Kara <jack@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/reiserfs/xattr.c |    8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/fs/reiserfs/xattr.c
++++ b/fs/reiserfs/xattr.c
+@@ -318,8 +318,12 @@ static int reiserfs_for_each_xattr(struc
+ out_dir:
+       dput(dir);
+ out:
+-      /* -ENODATA isn't an error */
+-      if (err == -ENODATA)
++      /*
++       * -ENODATA: this object doesn't have any xattrs
++       * -EOPNOTSUPP: this file system doesn't have xattrs enabled on disk.
++       * Neither are errors
++       */
++      if (err == -ENODATA || err == -EOPNOTSUPP)
+               err = 0;
+       return err;
+ }
index d28a818b30fe09ed26e96c37752d0529cf4a09e4..ee0fe9d89adc163a4a5a0ae96d923756c401e8bc 100644 (file)
@@ -87,3 +87,4 @@ net-usb-lan78xx-limit-size-of-local-tso-packets.patch
 xen-blkfront-adjust-indentation-in-xlvbd_alloc_gendisk.patch
 cw1200-fix-a-signedness-bug-in-cw1200_load_firmware.patch
 cfg80211-check-for-set_wiphy_params.patch
+reiserfs-fix-handling-of-eopnotsupp-in-reiserfs_for_each_xattr.patch