+++ /dev/null
-From 5f521494cc73520ffac18ede0758883b9aedd018 Mon Sep 17 00:00:00 2001
-From: Qu Wenruo <wqu@suse.com>
-Date: Wed, 27 Sep 2023 10:43:15 +0930
-Subject: btrfs: reject unknown mount options early
-
-From: Qu Wenruo <wqu@suse.com>
-
-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 <anand.jain@oracle.com>
-CC: stable@vger.kernel.org # 4.14+
-Signed-off-by: Qu Wenruo <wqu@suse.com>
-Reviewed-by: David Sterba <dsterba@suse.com>
-Signed-off-by: David Sterba <dsterba@suse.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- 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;
- }
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
+++ /dev/null
-From 5f521494cc73520ffac18ede0758883b9aedd018 Mon Sep 17 00:00:00 2001
-From: Qu Wenruo <wqu@suse.com>
-Date: Wed, 27 Sep 2023 10:43:15 +0930
-Subject: btrfs: reject unknown mount options early
-
-From: Qu Wenruo <wqu@suse.com>
-
-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 <anand.jain@oracle.com>
-CC: stable@vger.kernel.org # 4.14+
-Signed-off-by: Qu Wenruo <wqu@suse.com>
-Reviewed-by: David Sterba <dsterba@suse.com>
-Signed-off-by: David Sterba <dsterba@suse.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- 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;
- }
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
+++ /dev/null
-From 5f521494cc73520ffac18ede0758883b9aedd018 Mon Sep 17 00:00:00 2001
-From: Qu Wenruo <wqu@suse.com>
-Date: Wed, 27 Sep 2023 10:43:15 +0930
-Subject: btrfs: reject unknown mount options early
-
-From: Qu Wenruo <wqu@suse.com>
-
-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 <anand.jain@oracle.com>
-CC: stable@vger.kernel.org # 4.14+
-Signed-off-by: Qu Wenruo <wqu@suse.com>
-Reviewed-by: David Sterba <dsterba@suse.com>
-Signed-off-by: David Sterba <dsterba@suse.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- 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;
- }
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
+++ /dev/null
-From 5f521494cc73520ffac18ede0758883b9aedd018 Mon Sep 17 00:00:00 2001
-From: Qu Wenruo <wqu@suse.com>
-Date: Wed, 27 Sep 2023 10:43:15 +0930
-Subject: btrfs: reject unknown mount options early
-
-From: Qu Wenruo <wqu@suse.com>
-
-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 <anand.jain@oracle.com>
-CC: stable@vger.kernel.org # 4.14+
-Signed-off-by: Qu Wenruo <wqu@suse.com>
-Reviewed-by: David Sterba <dsterba@suse.com>
-Signed-off-by: David Sterba <dsterba@suse.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- 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;
- }
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
+++ /dev/null
-From 5f521494cc73520ffac18ede0758883b9aedd018 Mon Sep 17 00:00:00 2001
-From: Qu Wenruo <wqu@suse.com>
-Date: Wed, 27 Sep 2023 10:43:15 +0930
-Subject: btrfs: reject unknown mount options early
-
-From: Qu Wenruo <wqu@suse.com>
-
-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 <anand.jain@oracle.com>
-CC: stable@vger.kernel.org # 4.14+
-Signed-off-by: Qu Wenruo <wqu@suse.com>
-Reviewed-by: David Sterba <dsterba@suse.com>
-Signed-off-by: David Sterba <dsterba@suse.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- 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;
- }
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
+++ /dev/null
-From 5f521494cc73520ffac18ede0758883b9aedd018 Mon Sep 17 00:00:00 2001
-From: Qu Wenruo <wqu@suse.com>
-Date: Wed, 27 Sep 2023 10:43:15 +0930
-Subject: btrfs: reject unknown mount options early
-
-From: Qu Wenruo <wqu@suse.com>
-
-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 <anand.jain@oracle.com>
-CC: stable@vger.kernel.org # 4.14+
-Signed-off-by: Qu Wenruo <wqu@suse.com>
-Reviewed-by: David Sterba <dsterba@suse.com>
-Signed-off-by: David Sterba <dsterba@suse.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- 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;
- }
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
+++ /dev/null
-From 5f521494cc73520ffac18ede0758883b9aedd018 Mon Sep 17 00:00:00 2001
-From: Qu Wenruo <wqu@suse.com>
-Date: Wed, 27 Sep 2023 10:43:15 +0930
-Subject: btrfs: reject unknown mount options early
-
-From: Qu Wenruo <wqu@suse.com>
-
-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 <anand.jain@oracle.com>
-CC: stable@vger.kernel.org # 4.14+
-Signed-off-by: Qu Wenruo <wqu@suse.com>
-Reviewed-by: David Sterba <dsterba@suse.com>
-Signed-off-by: David Sterba <dsterba@suse.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- 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;
- }
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