]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.0-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Mar 2013 22:16:05 +0000 (15:16 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Mar 2013 22:16:05 +0000 (15:16 -0700)
added patches:
md-protect-against-crash-upon-fsync-on-ro-array.patch
revert-duplicated-perf-commit.patch

queue-3.0/md-protect-against-crash-upon-fsync-on-ro-array.patch [new file with mode: 0644]
queue-3.0/revert-duplicated-perf-commit.patch [new file with mode: 0644]
queue-3.0/series

diff --git a/queue-3.0/md-protect-against-crash-upon-fsync-on-ro-array.patch b/queue-3.0/md-protect-against-crash-upon-fsync-on-ro-array.patch
new file mode 100644 (file)
index 0000000..06fea0c
--- /dev/null
@@ -0,0 +1,40 @@
+From: Sebastian Riemer <sebastian.riemer@profitbricks.com>
+Date: Thu, 21 Feb 2013 13:28:09 +1100
+Subject: md: protect against crash upon fsync on ro array
+
+From: Sebastian Riemer <sebastian.riemer@profitbricks.com>
+
+commit bbfa57c0f2243a7c31fd248d22e9861a2802cad5 upstream.
+
+If an fsync occurs on a read-only array, we need to send a
+completion for the IO and may not increment the active IO count.
+Otherwise, we hit a bug trace and can't stop the MD array anymore.
+
+By advice of Christoph Hellwig we return success upon a flush
+request but we return -EROFS for other writes.
+We detect flush requests by checking if the bio has zero sectors.
+
+Signed-off-by: Sebastian Riemer <sebastian.riemer@profitbricks.com>
+Cc: Christoph Hellwig <hch@infradead.org>
+Cc: Ben Hutchings <ben@decadent.org.uk>
+Cc: NeilBrown <neilb@suse.de>
+Reported-by: Ben Hutchings <ben@decadent.org.uk>
+Acked-by: Paul Menzel <paulepanter@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/md/md.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/md/md.c
++++ b/drivers/md/md.c
+@@ -299,6 +299,10 @@ static int md_make_request(struct reques
+               bio_io_error(bio);
+               return 0;
+       }
++      if (mddev->ro == 1 && unlikely(rw == WRITE)) {
++              bio_endio(bio, bio_sectors(bio) == 0 ? 0 : -EROFS);
++              return 0;
++      }
+       smp_rmb(); /* Ensure implications of  'active' are visible */
+       rcu_read_lock();
+       if (mddev->suspended) {
diff --git a/queue-3.0/revert-duplicated-perf-commit.patch b/queue-3.0/revert-duplicated-perf-commit.patch
new file mode 100644 (file)
index 0000000..ca28e21
--- /dev/null
@@ -0,0 +1,31 @@
+From foo@baz Thu Mar 14 15:13:02 PDT 2013
+Date: Thu, 14 Mar 2013 15:13:02 -0700
+To: Greg KH <gregkh@linuxfoundation.org>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: Revert duplicated perf commit.
+
+This reverts commit 2431496fbdd142ccc83138d94f3f510a36ce9270 as it was
+applied incorrectly twice.
+
+Thanks to Jiri for pointing this out.
+
+Cc: Jiri Slaby <jslaby@suse.cz>
+Cc: Andrew Vagin <avagin@openvz.org>
+Cc: Steven Rostedt <rostedt@goodmis.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ tools/perf/util/trace-event-parse.c |    2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/tools/perf/util/trace-event-parse.c
++++ b/tools/perf/util/trace-event-parse.c
+@@ -1582,8 +1582,6 @@ process_symbols(struct event *event, str
+       field = malloc_or_die(sizeof(*field));
+       type = process_arg(event, field, &token);
+-      while (type == EVENT_OP)
+-              type = process_op(event, field, &token);
+       if (test_type_token(type, token, EVENT_DELIM, ","))
+               goto out_free;
index a614984a7f828c44a8ea45a44a04052e9cf4d009..1a5ae38d35d0d44245f7726028ceb8db83809bc3 100644 (file)
@@ -12,3 +12,5 @@ signal-always-clear-sa_restorer-on-execve.patch
 ext3-fix-format-string-issues.patch
 tty-serial-fix-typo-arch_s5p6450.patch
 tty-do-not-reset-master-s-packet-mode.patch
+md-protect-against-crash-upon-fsync-on-ro-array.patch
+revert-duplicated-perf-commit.patch