From: Greg Kroah-Hartman Date: Tue, 10 Oct 2023 15:31:16 +0000 (+0200) Subject: drop btrfs-reject-unknown-mount-options-early.patch from everywhere X-Git-Tag: v4.14.327~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8102b0c2a805555ff0d7c6ecc570fd27e72d512c;p=thirdparty%2Fkernel%2Fstable-queue.git drop btrfs-reject-unknown-mount-options-early.patch from everywhere --- diff --git a/queue-4.14/btrfs-reject-unknown-mount-options-early.patch b/queue-4.14/btrfs-reject-unknown-mount-options-early.patch deleted file mode 100644 index fc24211016e..00000000000 --- a/queue-4.14/btrfs-reject-unknown-mount-options-early.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 5f521494cc73520ffac18ede0758883b9aedd018 Mon Sep 17 00:00:00 2001 -From: Qu Wenruo -Date: Wed, 27 Sep 2023 10:43:15 +0930 -Subject: btrfs: reject unknown mount options early - -From: Qu Wenruo - -commit 5f521494cc73520ffac18ede0758883b9aedd018 upstream. - -[BUG] -The following script would allow invalid mount options to be specified -(although such invalid options would just be ignored): - - # mkfs.btrfs -f $dev - # mount $dev $mnt1 <<< Successful mount expected - # mount $dev $mnt2 -o junk <<< Failed mount expected - # echo $? - 0 - -[CAUSE] -For the 2nd mount, since the fs is already mounted, we won't go through -open_ctree() thus no btrfs_parse_options(), but only through -btrfs_parse_subvol_options(). - -However we do not treat unrecognized options from valid but irrelevant -options, thus those invalid options would just be ignored by -btrfs_parse_subvol_options(). - -[FIX] -Add the handling for Opt_err to handle invalid options and error out, -while still ignore other valid options inside btrfs_parse_subvol_options(). - -Reported-by: Anand Jain -CC: stable@vger.kernel.org # 4.14+ -Signed-off-by: Qu Wenruo -Reviewed-by: David Sterba -Signed-off-by: David Sterba -Signed-off-by: Greg Kroah-Hartman ---- - fs/btrfs/super.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/fs/btrfs/super.c -+++ b/fs/btrfs/super.c -@@ -929,6 +929,10 @@ static int btrfs_parse_early_options(con - if (error) - goto out; - break; -+ case Opt_err: -+ btrfs_err(NULL, "unrecognized mount option '%s'", p); -+ error = -EINVAL; -+ goto out; - default: - break; - } diff --git a/queue-4.14/series b/queue-4.14/series index f3a623dd15b..9c49b7e6363 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -35,7 +35,6 @@ ata-libata-disallow-dev-initiated-lpm-transitions-to-unsupported-states.patch media-dvb-symbol-fixup-for-dvb_attach-again.patch scsi-zfcp-fix-a-double-put-in-zfcp_port_enqueue.patch wifi-mwifiex-fix-tlv_buf_left-calculation.patch -btrfs-reject-unknown-mount-options-early.patch ubi-refuse-attaching-if-mtd-s-erasesize-is-0.patch wifi-mwifiex-fix-oob-check-condition-in-mwifiex_proc.patch drivers-net-process-the-result-of-hdlc_open-and-add-.patch diff --git a/queue-4.19/btrfs-reject-unknown-mount-options-early.patch b/queue-4.19/btrfs-reject-unknown-mount-options-early.patch deleted file mode 100644 index bef0f3a604a..00000000000 --- a/queue-4.19/btrfs-reject-unknown-mount-options-early.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 5f521494cc73520ffac18ede0758883b9aedd018 Mon Sep 17 00:00:00 2001 -From: Qu Wenruo -Date: Wed, 27 Sep 2023 10:43:15 +0930 -Subject: btrfs: reject unknown mount options early - -From: Qu Wenruo - -commit 5f521494cc73520ffac18ede0758883b9aedd018 upstream. - -[BUG] -The following script would allow invalid mount options to be specified -(although such invalid options would just be ignored): - - # mkfs.btrfs -f $dev - # mount $dev $mnt1 <<< Successful mount expected - # mount $dev $mnt2 -o junk <<< Failed mount expected - # echo $? - 0 - -[CAUSE] -For the 2nd mount, since the fs is already mounted, we won't go through -open_ctree() thus no btrfs_parse_options(), but only through -btrfs_parse_subvol_options(). - -However we do not treat unrecognized options from valid but irrelevant -options, thus those invalid options would just be ignored by -btrfs_parse_subvol_options(). - -[FIX] -Add the handling for Opt_err to handle invalid options and error out, -while still ignore other valid options inside btrfs_parse_subvol_options(). - -Reported-by: Anand Jain -CC: stable@vger.kernel.org # 4.14+ -Signed-off-by: Qu Wenruo -Reviewed-by: David Sterba -Signed-off-by: David Sterba -Signed-off-by: Greg Kroah-Hartman ---- - fs/btrfs/super.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/fs/btrfs/super.c -+++ b/fs/btrfs/super.c -@@ -991,6 +991,10 @@ static int btrfs_parse_subvol_options(co - case Opt_subvolrootid: - pr_warn("BTRFS: 'subvolrootid' mount option is deprecated and has no effect\n"); - break; -+ case Opt_err: -+ btrfs_err(NULL, "unrecognized mount option '%s'", p); -+ error = -EINVAL; -+ goto out; - default: - break; - } diff --git a/queue-4.19/series b/queue-4.19/series index 1f376cc768a..c2fe26bd3a7 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -67,7 +67,6 @@ scsi-zfcp-fix-a-double-put-in-zfcp_port_enqueue.patch qed-red_ll2-fix-undefined-behavior-bug-in-struct-qed_ll2_info.patch wifi-mwifiex-fix-tlv_buf_left-calculation.patch net-replace-calls-to-sock-ops-connect-with-kernel_connect.patch -btrfs-reject-unknown-mount-options-early.patch ubi-refuse-attaching-if-mtd-s-erasesize-is-0.patch wifi-mwifiex-fix-oob-check-condition-in-mwifiex_proc.patch drivers-net-process-the-result-of-hdlc_open-and-add-.patch diff --git a/queue-5.10/btrfs-reject-unknown-mount-options-early.patch b/queue-5.10/btrfs-reject-unknown-mount-options-early.patch deleted file mode 100644 index 07511bdbfa4..00000000000 --- a/queue-5.10/btrfs-reject-unknown-mount-options-early.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 5f521494cc73520ffac18ede0758883b9aedd018 Mon Sep 17 00:00:00 2001 -From: Qu Wenruo -Date: Wed, 27 Sep 2023 10:43:15 +0930 -Subject: btrfs: reject unknown mount options early - -From: Qu Wenruo - -commit 5f521494cc73520ffac18ede0758883b9aedd018 upstream. - -[BUG] -The following script would allow invalid mount options to be specified -(although such invalid options would just be ignored): - - # mkfs.btrfs -f $dev - # mount $dev $mnt1 <<< Successful mount expected - # mount $dev $mnt2 -o junk <<< Failed mount expected - # echo $? - 0 - -[CAUSE] -For the 2nd mount, since the fs is already mounted, we won't go through -open_ctree() thus no btrfs_parse_options(), but only through -btrfs_parse_subvol_options(). - -However we do not treat unrecognized options from valid but irrelevant -options, thus those invalid options would just be ignored by -btrfs_parse_subvol_options(). - -[FIX] -Add the handling for Opt_err to handle invalid options and error out, -while still ignore other valid options inside btrfs_parse_subvol_options(). - -Reported-by: Anand Jain -CC: stable@vger.kernel.org # 4.14+ -Signed-off-by: Qu Wenruo -Reviewed-by: David Sterba -Signed-off-by: David Sterba -Signed-off-by: Greg Kroah-Hartman ---- - fs/btrfs/super.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/fs/btrfs/super.c -+++ b/fs/btrfs/super.c -@@ -1123,6 +1123,10 @@ static int btrfs_parse_subvol_options(co - - *subvol_objectid = subvolid; - break; -+ case Opt_err: -+ btrfs_err(NULL, "unrecognized mount option '%s'", p); -+ error = -EINVAL; -+ goto out; - default: - break; - } diff --git a/queue-5.10/series b/queue-5.10/series index 74073714066..f7b6081cd24 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -180,7 +180,6 @@ scsi-zfcp-fix-a-double-put-in-zfcp_port_enqueue.patch qed-red_ll2-fix-undefined-behavior-bug-in-struct-qed_ll2_info.patch wifi-mwifiex-fix-tlv_buf_left-calculation.patch net-replace-calls-to-sock-ops-connect-with-kernel_connect.patch -btrfs-reject-unknown-mount-options-early.patch net-prevent-rewrite-of-msg_name-in-sock_sendmsg.patch arm64-add-cortex-a520-cpu-part-definition.patch ubi-refuse-attaching-if-mtd-s-erasesize-is-0.patch diff --git a/queue-5.15/btrfs-reject-unknown-mount-options-early.patch b/queue-5.15/btrfs-reject-unknown-mount-options-early.patch deleted file mode 100644 index c1c4ca93552..00000000000 --- a/queue-5.15/btrfs-reject-unknown-mount-options-early.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 5f521494cc73520ffac18ede0758883b9aedd018 Mon Sep 17 00:00:00 2001 -From: Qu Wenruo -Date: Wed, 27 Sep 2023 10:43:15 +0930 -Subject: btrfs: reject unknown mount options early - -From: Qu Wenruo - -commit 5f521494cc73520ffac18ede0758883b9aedd018 upstream. - -[BUG] -The following script would allow invalid mount options to be specified -(although such invalid options would just be ignored): - - # mkfs.btrfs -f $dev - # mount $dev $mnt1 <<< Successful mount expected - # mount $dev $mnt2 -o junk <<< Failed mount expected - # echo $? - 0 - -[CAUSE] -For the 2nd mount, since the fs is already mounted, we won't go through -open_ctree() thus no btrfs_parse_options(), but only through -btrfs_parse_subvol_options(). - -However we do not treat unrecognized options from valid but irrelevant -options, thus those invalid options would just be ignored by -btrfs_parse_subvol_options(). - -[FIX] -Add the handling for Opt_err to handle invalid options and error out, -while still ignore other valid options inside btrfs_parse_subvol_options(). - -Reported-by: Anand Jain -CC: stable@vger.kernel.org # 4.14+ -Signed-off-by: Qu Wenruo -Reviewed-by: David Sterba -Signed-off-by: David Sterba -Signed-off-by: Greg Kroah-Hartman ---- - fs/btrfs/super.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/fs/btrfs/super.c -+++ b/fs/btrfs/super.c -@@ -1182,6 +1182,10 @@ static int btrfs_parse_subvol_options(co - - *subvol_objectid = subvolid; - break; -+ case Opt_err: -+ btrfs_err(NULL, "unrecognized mount option '%s'", p); -+ error = -EINVAL; -+ goto out; - default: - break; - } diff --git a/queue-5.15/series b/queue-5.15/series index ab316162bb5..0e71c9a4ff5 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -21,7 +21,6 @@ vringh-don-t-use-vringh_kiov_advance-in-vringh_iov_xfer.patch qed-red_ll2-fix-undefined-behavior-bug-in-struct-qed_ll2_info.patch wifi-mwifiex-fix-tlv_buf_left-calculation.patch net-replace-calls-to-sock-ops-connect-with-kernel_connect.patch -btrfs-reject-unknown-mount-options-early.patch net-prevent-rewrite-of-msg_name-in-sock_sendmsg.patch drm-amd-fix-detection-of-_pr3-on-the-pcie-root-port.patch arm64-add-cortex-a520-cpu-part-definition.patch diff --git a/queue-5.4/btrfs-reject-unknown-mount-options-early.patch b/queue-5.4/btrfs-reject-unknown-mount-options-early.patch deleted file mode 100644 index 007f7fcf474..00000000000 --- a/queue-5.4/btrfs-reject-unknown-mount-options-early.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 5f521494cc73520ffac18ede0758883b9aedd018 Mon Sep 17 00:00:00 2001 -From: Qu Wenruo -Date: Wed, 27 Sep 2023 10:43:15 +0930 -Subject: btrfs: reject unknown mount options early - -From: Qu Wenruo - -commit 5f521494cc73520ffac18ede0758883b9aedd018 upstream. - -[BUG] -The following script would allow invalid mount options to be specified -(although such invalid options would just be ignored): - - # mkfs.btrfs -f $dev - # mount $dev $mnt1 <<< Successful mount expected - # mount $dev $mnt2 -o junk <<< Failed mount expected - # echo $? - 0 - -[CAUSE] -For the 2nd mount, since the fs is already mounted, we won't go through -open_ctree() thus no btrfs_parse_options(), but only through -btrfs_parse_subvol_options(). - -However we do not treat unrecognized options from valid but irrelevant -options, thus those invalid options would just be ignored by -btrfs_parse_subvol_options(). - -[FIX] -Add the handling for Opt_err to handle invalid options and error out, -while still ignore other valid options inside btrfs_parse_subvol_options(). - -Reported-by: Anand Jain -CC: stable@vger.kernel.org # 4.14+ -Signed-off-by: Qu Wenruo -Reviewed-by: David Sterba -Signed-off-by: David Sterba -Signed-off-by: Greg Kroah-Hartman ---- - fs/btrfs/super.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/fs/btrfs/super.c -+++ b/fs/btrfs/super.c -@@ -1000,6 +1000,10 @@ static int btrfs_parse_subvol_options(co - case Opt_subvolrootid: - pr_warn("BTRFS: 'subvolrootid' mount option is deprecated and has no effect\n"); - break; -+ case Opt_err: -+ btrfs_err(NULL, "unrecognized mount option '%s'", p); -+ error = -EINVAL; -+ goto out; - default: - break; - } diff --git a/queue-5.4/series b/queue-5.4/series index 2b4382fc967..047beb29496 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -89,7 +89,6 @@ scsi-zfcp-fix-a-double-put-in-zfcp_port_enqueue.patch qed-red_ll2-fix-undefined-behavior-bug-in-struct-qed_ll2_info.patch wifi-mwifiex-fix-tlv_buf_left-calculation.patch net-replace-calls-to-sock-ops-connect-with-kernel_connect.patch -btrfs-reject-unknown-mount-options-early.patch net-prevent-rewrite-of-msg_name-in-sock_sendmsg.patch ubi-refuse-attaching-if-mtd-s-erasesize-is-0.patch wifi-iwlwifi-dbg_ini-fix-structure-packing.patch diff --git a/queue-6.1/btrfs-reject-unknown-mount-options-early.patch b/queue-6.1/btrfs-reject-unknown-mount-options-early.patch deleted file mode 100644 index 61ab3e4c4e4..00000000000 --- a/queue-6.1/btrfs-reject-unknown-mount-options-early.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 5f521494cc73520ffac18ede0758883b9aedd018 Mon Sep 17 00:00:00 2001 -From: Qu Wenruo -Date: Wed, 27 Sep 2023 10:43:15 +0930 -Subject: btrfs: reject unknown mount options early - -From: Qu Wenruo - -commit 5f521494cc73520ffac18ede0758883b9aedd018 upstream. - -[BUG] -The following script would allow invalid mount options to be specified -(although such invalid options would just be ignored): - - # mkfs.btrfs -f $dev - # mount $dev $mnt1 <<< Successful mount expected - # mount $dev $mnt2 -o junk <<< Failed mount expected - # echo $? - 0 - -[CAUSE] -For the 2nd mount, since the fs is already mounted, we won't go through -open_ctree() thus no btrfs_parse_options(), but only through -btrfs_parse_subvol_options(). - -However we do not treat unrecognized options from valid but irrelevant -options, thus those invalid options would just be ignored by -btrfs_parse_subvol_options(). - -[FIX] -Add the handling for Opt_err to handle invalid options and error out, -while still ignore other valid options inside btrfs_parse_subvol_options(). - -Reported-by: Anand Jain -CC: stable@vger.kernel.org # 4.14+ -Signed-off-by: Qu Wenruo -Reviewed-by: David Sterba -Signed-off-by: David Sterba -Signed-off-by: Greg Kroah-Hartman ---- - fs/btrfs/super.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/fs/btrfs/super.c -+++ b/fs/btrfs/super.c -@@ -1260,6 +1260,10 @@ static int btrfs_parse_subvol_options(co - - *subvol_objectid = subvolid; - break; -+ case Opt_err: -+ btrfs_err(NULL, "unrecognized mount option '%s'", p); -+ error = -EINVAL; -+ goto out; - default: - break; - } diff --git a/queue-6.1/series b/queue-6.1/series index 7a847932592..61ea34a623b 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -57,7 +57,6 @@ wifi-mwifiex-fix-tlv_buf_left-calculation.patch md-raid5-release-batch_last-before-waiting-for-another-stripe_head.patch pci-qcom-fix-ipq8074-enumeration.patch net-replace-calls-to-sock-ops-connect-with-kernel_connect.patch -btrfs-reject-unknown-mount-options-early.patch net-prevent-rewrite-of-msg_name-in-sock_sendmsg.patch drm-amd-fix-detection-of-_pr3-on-the-pcie-root-port.patch drm-amd-fix-logic-error-in-sienna_cichlid_update_pcie_parameters.patch diff --git a/queue-6.5/btrfs-reject-unknown-mount-options-early.patch b/queue-6.5/btrfs-reject-unknown-mount-options-early.patch deleted file mode 100644 index 4062ae9a46d..00000000000 --- a/queue-6.5/btrfs-reject-unknown-mount-options-early.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 5f521494cc73520ffac18ede0758883b9aedd018 Mon Sep 17 00:00:00 2001 -From: Qu Wenruo -Date: Wed, 27 Sep 2023 10:43:15 +0930 -Subject: btrfs: reject unknown mount options early - -From: Qu Wenruo - -commit 5f521494cc73520ffac18ede0758883b9aedd018 upstream. - -[BUG] -The following script would allow invalid mount options to be specified -(although such invalid options would just be ignored): - - # mkfs.btrfs -f $dev - # mount $dev $mnt1 <<< Successful mount expected - # mount $dev $mnt2 -o junk <<< Failed mount expected - # echo $? - 0 - -[CAUSE] -For the 2nd mount, since the fs is already mounted, we won't go through -open_ctree() thus no btrfs_parse_options(), but only through -btrfs_parse_subvol_options(). - -However we do not treat unrecognized options from valid but irrelevant -options, thus those invalid options would just be ignored by -btrfs_parse_subvol_options(). - -[FIX] -Add the handling for Opt_err to handle invalid options and error out, -while still ignore other valid options inside btrfs_parse_subvol_options(). - -Reported-by: Anand Jain -CC: stable@vger.kernel.org # 4.14+ -Signed-off-by: Qu Wenruo -Reviewed-by: David Sterba -Signed-off-by: David Sterba -Signed-off-by: Greg Kroah-Hartman ---- - fs/btrfs/super.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/fs/btrfs/super.c -+++ b/fs/btrfs/super.c -@@ -948,6 +948,10 @@ static int btrfs_parse_subvol_options(co - - *subvol_objectid = subvolid; - break; -+ case Opt_err: -+ btrfs_err(NULL, "unrecognized mount option '%s'", p); -+ error = -EINVAL; -+ goto out; - default: - break; - } diff --git a/queue-6.5/series b/queue-6.5/series index 5dc55c3a8a0..67713333743 100644 --- a/queue-6.5/series +++ b/queue-6.5/series @@ -41,7 +41,6 @@ net-replace-calls-to-sock-ops-connect-with-kernel_connect.patch io_uring-kbuf-don-t-allow-registered-buffer-rings-on-highmem-pages.patch io_uring-ensure-io_lockdep_assert_cq_locked-handles-disabled-rings.patch btrfs-always-print-transaction-aborted-messages-with-an-error-level.patch -btrfs-reject-unknown-mount-options-early.patch net-prevent-rewrite-of-msg_name-in-sock_sendmsg.patch drm-i915-don-t-set-pipe_control_flush_l3-for-aux-inval.patch drm-amd-fix-detection-of-_pr3-on-the-pcie-root-port.patch