]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Sep 2015 03:48:24 +0000 (20:48 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Sep 2015 03:48:24 +0000 (20:48 -0700)
added patches:
nfsv4-don-t-set-setattr-for-o_rdonly-o_excl.patch
rc-core-fix-remove-uevent-generation.patch

queue-3.10/nfsv4-don-t-set-setattr-for-o_rdonly-o_excl.patch [new file with mode: 0644]
queue-3.10/rc-core-fix-remove-uevent-generation.patch [new file with mode: 0644]
queue-3.10/series

diff --git a/queue-3.10/nfsv4-don-t-set-setattr-for-o_rdonly-o_excl.patch b/queue-3.10/nfsv4-don-t-set-setattr-for-o_rdonly-o_excl.patch
new file mode 100644 (file)
index 0000000..28e37f5
--- /dev/null
@@ -0,0 +1,50 @@
+From efcbc04e16dfa95fef76309f89710dd1d99a5453 Mon Sep 17 00:00:00 2001
+From: NeilBrown <neilb@suse.com>
+Date: Thu, 30 Jul 2015 13:00:56 +1000
+Subject: NFSv4: don't set SETATTR for O_RDONLY|O_EXCL
+
+From: NeilBrown <neilb@suse.com>
+
+commit efcbc04e16dfa95fef76309f89710dd1d99a5453 upstream.
+
+It is unusual to combine the open flags O_RDONLY and O_EXCL, but
+it appears that libre-office does just that.
+
+[pid  3250] stat("/home/USER/.config", {st_mode=S_IFDIR|0700, st_size=8192, ...}) = 0
+[pid  3250] open("/home/USER/.config/libreoffice/4-suse/user/extensions/buildid", O_RDONLY|O_EXCL <unfinished ...>
+
+NFSv4 takes O_EXCL as a sign that a setattr command should be sent,
+probably to reset the timestamps.
+
+When it was an O_RDONLY open, the SETATTR command does not
+identify any actual attributes to change.
+If no delegation was provided to the open, the SETATTR uses the
+all-zeros stateid and the request is accepted (at least by the
+Linux NFS server - no harm, no foul).
+
+If a read-delegation was provided, this is used in the SETATTR
+request, and a Netapp filer will justifiably claim
+NFS4ERR_BAD_STATEID, which the Linux client takes as a sign
+to retry - indefinitely.
+
+So only treat O_EXCL specially if O_CREAT was also given.
+
+Signed-off-by: NeilBrown <neilb@suse.com>
+Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/nfs/nfs4proc.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/nfs/nfs4proc.c
++++ b/fs/nfs/nfs4proc.c
+@@ -2043,7 +2043,7 @@ static int _nfs4_do_open(struct inode *d
+       if (status != 0)
+               goto err_opendata_put;
+-      if ((opendata->o_arg.open_flags & O_EXCL) &&
++      if ((opendata->o_arg.open_flags & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL) &&
+           (opendata->o_arg.createmode != NFS4_CREATE_GUARDED)) {
+               nfs4_exclusive_attrset(opendata, sattr);
diff --git a/queue-3.10/rc-core-fix-remove-uevent-generation.patch b/queue-3.10/rc-core-fix-remove-uevent-generation.patch
new file mode 100644 (file)
index 0000000..0f37bb9
--- /dev/null
@@ -0,0 +1,36 @@
+From a66b0c41ad277ae62a3ae6ac430a71882f899557 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?David=20H=C3=A4rdeman?= <david@hardeman.nu>
+Date: Tue, 19 May 2015 19:03:12 -0300
+Subject: [media] rc-core: fix remove uevent generation
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: =?UTF-8?q?David=20H=C3=A4rdeman?= <david@hardeman.nu>
+
+commit a66b0c41ad277ae62a3ae6ac430a71882f899557 upstream.
+
+The input_dev is already gone when the rc device is being unregistered
+so checking for its presence only means that no remove uevent will be
+generated.
+
+Signed-off-by: David Härdeman <david@hardeman.nu>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/media/rc/rc-main.c |    3 ---
+ 1 file changed, 3 deletions(-)
+
+--- a/drivers/media/rc/rc-main.c
++++ b/drivers/media/rc/rc-main.c
+@@ -943,9 +943,6 @@ static int rc_dev_uevent(struct device *
+ {
+       struct rc_dev *dev = to_rc_dev(device);
+-      if (!dev || !dev->input_dev)
+-              return -ENODEV;
+-
+       if (dev->rc_map.name)
+               ADD_HOTPLUG_VAR("NAME=%s", dev->rc_map.name);
+       if (dev->driver_name)
index 8d3ed1cb3b7c1dfa7d8447dea84c5e728b4e6b01..a449b0da99328a5ecc7c5551447f5a222dc7dde8 100644 (file)
@@ -12,3 +12,5 @@ powerpc-mm-fix-pte_pagesize_index-crash-on-4k-w-64k-hash.patch
 powerpc-rtas-introduce-rtas_get_sensor_fast-for-irq-handlers.patch
 add-radeon-suspend-resume-quirk-for-hp-compaq-dc5750.patch
 x86-mm-initialize-pmd_idx-in-page_table_range_init_count.patch
+rc-core-fix-remove-uevent-generation.patch
+nfsv4-don-t-set-setattr-for-o_rdonly-o_excl.patch