From: Greg Kroah-Hartman Date: Thu, 18 Oct 2012 17:12:36 +0000 (-0700) Subject: 3.0-stable patches X-Git-Tag: v3.0.47~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4d59d84344adea5918b691a312ea7b8fb05c6d52;p=thirdparty%2Fkernel%2Fstable-queue.git 3.0-stable patches added patches: udf-fix-retun-value-on-error-path-in-udf_load_logicalvol.patch --- diff --git a/queue-3.0/series b/queue-3.0/series index faba33a5cb0..9051129cada 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -32,3 +32,4 @@ jbd-fix-assertion-failure-in-commit-code-due-to-lacking-transaction-credits.patc x86-random-architectural-inlines-to-get-random-integers-with-rdrand.patch x86-random-verify-rdrand-functionality-and-allow-it-to-be-disabled.patch tpm-propagate-error-from-tpm_transmit-to-fix-a-timeout-hang.patch +udf-fix-retun-value-on-error-path-in-udf_load_logicalvol.patch diff --git a/queue-3.0/udf-fix-retun-value-on-error-path-in-udf_load_logicalvol.patch b/queue-3.0/udf-fix-retun-value-on-error-path-in-udf_load_logicalvol.patch new file mode 100644 index 00000000000..af38f7ddb78 --- /dev/null +++ b/queue-3.0/udf-fix-retun-value-on-error-path-in-udf_load_logicalvol.patch @@ -0,0 +1,42 @@ +From 68766a2edcd5cd744262a70a2f67a320ac944760 Mon Sep 17 00:00:00 2001 +From: Nikola Pajkovsky +Date: Wed, 15 Aug 2012 00:38:08 +0200 +Subject: udf: fix retun value on error path in udf_load_logicalvol + +From: Nikola Pajkovsky + +commit 68766a2edcd5cd744262a70a2f67a320ac944760 upstream. + +In case we detect a problem and bail out, we fail to set "ret" to a +nonzero value, and udf_load_logicalvol will mistakenly report success. + +Signed-off-by: Nikola Pajkovsky +Signed-off-by: Jan Kara +Signed-off-by: Greg Kroah-Hartman + +--- + fs/udf/super.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/fs/udf/super.c ++++ b/fs/udf/super.c +@@ -1316,6 +1316,7 @@ static int udf_load_logicalvol(struct su + udf_error(sb, __func__, "error loading logical volume descriptor: " + "Partition table too long (%u > %lu)\n", table_len, + sb->s_blocksize - sizeof(*lvd)); ++ ret = 1; + goto out_bh; + } + +@@ -1360,8 +1361,10 @@ static int udf_load_logicalvol(struct su + UDF_ID_SPARABLE, + strlen(UDF_ID_SPARABLE))) { + if (udf_load_sparable_map(sb, map, +- (struct sparablePartitionMap *)gpm) < 0) ++ (struct sparablePartitionMap *)gpm) < 0) { ++ ret = 1; + goto out_bh; ++ } + } else if (!strncmp(upm2->partIdent.ident, + UDF_ID_METADATA, + strlen(UDF_ID_METADATA))) {