From be83daa8bfb50a6c54eb42dd3f9611fbc6312d1c Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 25 Feb 2013 16:42:53 -0800 Subject: [PATCH] 3.0-stable patches added patches: sunvdc-fix-off-by-one-in-generic_request.patch --- queue-3.0/series | 1 + ...dc-fix-off-by-one-in-generic_request.patch | 31 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 queue-3.0/sunvdc-fix-off-by-one-in-generic_request.patch diff --git a/queue-3.0/series b/queue-3.0/series index 7c6dc98df56..3f1a87b63a2 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -26,3 +26,4 @@ alsa-usb-audio-fix-roland-a-pro-support.patch alsa-usb-fix-processing-unit-descriptor-parsers.patch ext4-free-resources-in-some-error-path-in-ext4_fill_super.patch ext4-add-missing-kfree-on-error-return-path-in-add_new_gdb.patch +sunvdc-fix-off-by-one-in-generic_request.patch diff --git a/queue-3.0/sunvdc-fix-off-by-one-in-generic_request.patch b/queue-3.0/sunvdc-fix-off-by-one-in-generic_request.patch new file mode 100644 index 00000000000..8897037c25c --- /dev/null +++ b/queue-3.0/sunvdc-fix-off-by-one-in-generic_request.patch @@ -0,0 +1,31 @@ +From 58e64b7e661116ea2e9989f43777e4a47319065c Mon Sep 17 00:00:00 2001 +From: "David S. Miller" +Date: Thu, 14 Feb 2013 11:49:01 -0800 +Subject: sunvdc: Fix off-by-one in generic_request(). + + +From: "David S. Miller" + +[ Upstream commit f4d9605434c0fd4cc8639bf25cfc043418c52362 ] + +The 'operations' bitmap corresponds one-for-one with the operation +codes, no adjustment is necessary. + +Reported-by: Mark Kettenis +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + drivers/block/sunvdc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/block/sunvdc.c ++++ b/drivers/block/sunvdc.c +@@ -461,7 +461,7 @@ static int generic_request(struct vdc_po + int op_len, err; + void *req_buf; + +- if (!(((u64)1 << ((u64)op - 1)) & port->operations)) ++ if (!(((u64)1 << (u64)op) & port->operations)) + return -EOPNOTSUPP; + + switch (op) { -- 2.47.3