From: Greg Kroah-Hartman Date: Thu, 14 Mar 2013 22:16:05 +0000 (-0700) Subject: 3.0-stable patches X-Git-Tag: v3.0.70~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d78b4dc50b24c41bd3a25b3dbf97a4d3d0bc60f0;p=thirdparty%2Fkernel%2Fstable-queue.git 3.0-stable patches added patches: md-protect-against-crash-upon-fsync-on-ro-array.patch revert-duplicated-perf-commit.patch --- 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 index 00000000000..06fea0c6376 --- /dev/null +++ b/queue-3.0/md-protect-against-crash-upon-fsync-on-ro-array.patch @@ -0,0 +1,40 @@ +From: Sebastian Riemer +Date: Thu, 21 Feb 2013 13:28:09 +1100 +Subject: md: protect against crash upon fsync on ro array + +From: Sebastian Riemer + +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 +Cc: Christoph Hellwig +Cc: Ben Hutchings +Cc: NeilBrown +Reported-by: Ben Hutchings +Acked-by: Paul Menzel +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..ca28e212e7b --- /dev/null +++ b/queue-3.0/revert-duplicated-perf-commit.patch @@ -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 +From: Greg Kroah-Hartman +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 +Cc: Andrew Vagin +Cc: Steven Rostedt +Signed-off-by: Greg Kroah-Hartman + +--- + 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; + diff --git a/queue-3.0/series b/queue-3.0/series index a614984a7f8..1a5ae38d35d 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -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