--- /dev/null
+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) {
--- /dev/null
+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;
+
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