]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop nfc-netlink-fix-sleep-in-atomic-bug-when-firmware-do.patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 May 2022 12:44:06 +0000 (14:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 May 2022 12:44:06 +0000 (14:44 +0200)
It was a duplicate and backported incorrectly :(

14 files changed:
queue-4.14/nfc-netlink-fix-sleep-in-atomic-bug-when-firmware-do.patch [deleted file]
queue-4.14/series
queue-4.19/nfc-netlink-fix-sleep-in-atomic-bug-when-firmware-do.patch [deleted file]
queue-4.19/series
queue-4.9/nfc-netlink-fix-sleep-in-atomic-bug-when-firmware-do.patch [deleted file]
queue-4.9/series
queue-5.10/nfc-netlink-fix-sleep-in-atomic-bug-when-firmware-do.patch [deleted file]
queue-5.10/series
queue-5.15/nfc-netlink-fix-sleep-in-atomic-bug-when-firmware-do.patch [deleted file]
queue-5.15/series
queue-5.17/nfc-netlink-fix-sleep-in-atomic-bug-when-firmware-do.patch [deleted file]
queue-5.17/series
queue-5.4/nfc-netlink-fix-sleep-in-atomic-bug-when-firmware-do.patch [deleted file]
queue-5.4/series

diff --git a/queue-4.14/nfc-netlink-fix-sleep-in-atomic-bug-when-firmware-do.patch b/queue-4.14/nfc-netlink-fix-sleep-in-atomic-bug-when-firmware-do.patch
deleted file mode 100644 (file)
index 8936cfb..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-From 9e3510559a02578231d6e72715848b45139ce331 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 4 May 2022 13:58:47 +0800
-Subject: NFC: netlink: fix sleep in atomic bug when firmware download timeout
-
-From: Duoming Zhou <duoming@zju.edu.cn>
-
-[ Upstream commit 4071bf121d59944d5cd2238de0642f3d7995a997 ]
-
-There are sleep in atomic bug that could cause kernel panic during
-firmware download process. The root cause is that nlmsg_new with
-GFP_KERNEL parameter is called in fw_dnld_timeout which is a timer
-handler. The call trace is shown below:
-
-BUG: sleeping function called from invalid context at include/linux/sched/mm.h:265
-Call Trace:
-kmem_cache_alloc_node
-__alloc_skb
-nfc_genl_fw_download_done
-call_timer_fn
-__run_timers.part.0
-run_timer_softirq
-__do_softirq
-...
-
-The nlmsg_new with GFP_KERNEL parameter may sleep during memory
-allocation process, and the timer handler is run as the result of
-a "software interrupt" that should not call any other function
-that could sleep.
-
-This patch changes allocation mode of netlink message from GFP_KERNEL
-to GFP_ATOMIC in order to prevent sleep in atomic bug. The GFP_ATOMIC
-flag makes memory allocation operation could be used in atomic context.
-
-Fixes: 9674da8759df ("NFC: Add firmware upload netlink command")
-Fixes: 9ea7187c53f6 ("NFC: netlink: Rename CMD_FW_UPLOAD to CMD_FW_DOWNLOAD")
-Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
-Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
-Link: https://lore.kernel.org/r/20220504055847.38026-1-duoming@zju.edu.cn
-Signed-off-by: Paolo Abeni <pabeni@redhat.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- net/nfc/netlink.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c
-index 0320ae7560ad..c7f28e9e18c4 100644
---- a/net/nfc/netlink.c
-+++ b/net/nfc/netlink.c
-@@ -563,7 +563,7 @@ int nfc_genl_se_connectivity(struct nfc_dev *dev, u8 se_idx)
-       struct sk_buff *msg;
-       void *hdr;
--      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
-+      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_ATOMIC);
-       if (!msg)
-               return -ENOMEM;
-@@ -583,7 +583,7 @@ int nfc_genl_se_connectivity(struct nfc_dev *dev, u8 se_idx)
-       genlmsg_end(msg, hdr);
--      genlmsg_multicast(&nfc_genl_family, msg, 0, 0, GFP_KERNEL);
-+      genlmsg_multicast(&nfc_genl_family, msg, 0, 0, GFP_ATOMIC);
-       return 0;
--- 
-2.35.1
-
index ab87c0632ebea745784df0be7d57e34372d6f7a8..d73c7d813ff4e890b2ce620231a7f2b6ba242999 100644 (file)
@@ -72,7 +72,6 @@ btrfs-always-log-symlinks-in-full-mode.patch
 net-igmp-respect-rcu-rules-in-ip_mc_source-and-ip_mc_msfilter.patch
 hwmon-adt7470-fix-warning-on-module-removal.patch-27384
 kvm-x86-cpuid-only-provide-cpuid-leaf-0xa-if-host-ha.patch
-nfc-netlink-fix-sleep-in-atomic-bug-when-firmware-do.patch
 net-ipv6-ensure-we-call-ipv6_mc_down-at-most-once.patch
 dm-fix-mempool-null-pointer-race-when-completing-io.patch
 dm-interlock-pending-dm_io-and-dm_wait_for_bios_completion.patch
diff --git a/queue-4.19/nfc-netlink-fix-sleep-in-atomic-bug-when-firmware-do.patch b/queue-4.19/nfc-netlink-fix-sleep-in-atomic-bug-when-firmware-do.patch
deleted file mode 100644 (file)
index 3a8d60f..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-From 5fac379a2acd53149359847192889908c132cc46 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 4 May 2022 13:58:47 +0800
-Subject: NFC: netlink: fix sleep in atomic bug when firmware download timeout
-
-From: Duoming Zhou <duoming@zju.edu.cn>
-
-[ Upstream commit 4071bf121d59944d5cd2238de0642f3d7995a997 ]
-
-There are sleep in atomic bug that could cause kernel panic during
-firmware download process. The root cause is that nlmsg_new with
-GFP_KERNEL parameter is called in fw_dnld_timeout which is a timer
-handler. The call trace is shown below:
-
-BUG: sleeping function called from invalid context at include/linux/sched/mm.h:265
-Call Trace:
-kmem_cache_alloc_node
-__alloc_skb
-nfc_genl_fw_download_done
-call_timer_fn
-__run_timers.part.0
-run_timer_softirq
-__do_softirq
-...
-
-The nlmsg_new with GFP_KERNEL parameter may sleep during memory
-allocation process, and the timer handler is run as the result of
-a "software interrupt" that should not call any other function
-that could sleep.
-
-This patch changes allocation mode of netlink message from GFP_KERNEL
-to GFP_ATOMIC in order to prevent sleep in atomic bug. The GFP_ATOMIC
-flag makes memory allocation operation could be used in atomic context.
-
-Fixes: 9674da8759df ("NFC: Add firmware upload netlink command")
-Fixes: 9ea7187c53f6 ("NFC: netlink: Rename CMD_FW_UPLOAD to CMD_FW_DOWNLOAD")
-Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
-Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
-Link: https://lore.kernel.org/r/20220504055847.38026-1-duoming@zju.edu.cn
-Signed-off-by: Paolo Abeni <pabeni@redhat.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- net/nfc/netlink.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c
-index 39fb01ee9222..c88a32b8d15e 100644
---- a/net/nfc/netlink.c
-+++ b/net/nfc/netlink.c
-@@ -553,7 +553,7 @@ int nfc_genl_se_connectivity(struct nfc_dev *dev, u8 se_idx)
-       struct sk_buff *msg;
-       void *hdr;
--      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
-+      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_ATOMIC);
-       if (!msg)
-               return -ENOMEM;
-@@ -573,7 +573,7 @@ int nfc_genl_se_connectivity(struct nfc_dev *dev, u8 se_idx)
-       genlmsg_end(msg, hdr);
--      genlmsg_multicast(&nfc_genl_family, msg, 0, 0, GFP_KERNEL);
-+      genlmsg_multicast(&nfc_genl_family, msg, 0, 0, GFP_ATOMIC);
-       return 0;
--- 
-2.35.1
-
index 2207c56824b830bb23b2029dc423706d09f56076..b9b0ac9c813a542a89d91156fbcc988615705b7c 100644 (file)
@@ -80,7 +80,6 @@ btrfs-always-log-symlinks-in-full-mode.patch
 net-igmp-respect-rcu-rules-in-ip_mc_source-and-ip_mc_msfilter.patch
 hwmon-adt7470-fix-warning-on-module-removal.patch-23920
 kvm-x86-cpuid-only-provide-cpuid-leaf-0xa-if-host-ha.patch
-nfc-netlink-fix-sleep-in-atomic-bug-when-firmware-do.patch
 mm-fix-unexpected-zeroed-page-mapping-with-zram-swap.patch
 tcp-make-sure-treq-af_specific-is-initialized.patch
 dm-fix-mempool-null-pointer-race-when-completing-io.patch
diff --git a/queue-4.9/nfc-netlink-fix-sleep-in-atomic-bug-when-firmware-do.patch b/queue-4.9/nfc-netlink-fix-sleep-in-atomic-bug-when-firmware-do.patch
deleted file mode 100644 (file)
index 2b27fb1..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-From 997abf8969dd31ed3aa7bfa962e36790cafa6e82 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 4 May 2022 13:58:47 +0800
-Subject: NFC: netlink: fix sleep in atomic bug when firmware download timeout
-
-From: Duoming Zhou <duoming@zju.edu.cn>
-
-[ Upstream commit 4071bf121d59944d5cd2238de0642f3d7995a997 ]
-
-There are sleep in atomic bug that could cause kernel panic during
-firmware download process. The root cause is that nlmsg_new with
-GFP_KERNEL parameter is called in fw_dnld_timeout which is a timer
-handler. The call trace is shown below:
-
-BUG: sleeping function called from invalid context at include/linux/sched/mm.h:265
-Call Trace:
-kmem_cache_alloc_node
-__alloc_skb
-nfc_genl_fw_download_done
-call_timer_fn
-__run_timers.part.0
-run_timer_softirq
-__do_softirq
-...
-
-The nlmsg_new with GFP_KERNEL parameter may sleep during memory
-allocation process, and the timer handler is run as the result of
-a "software interrupt" that should not call any other function
-that could sleep.
-
-This patch changes allocation mode of netlink message from GFP_KERNEL
-to GFP_ATOMIC in order to prevent sleep in atomic bug. The GFP_ATOMIC
-flag makes memory allocation operation could be used in atomic context.
-
-Fixes: 9674da8759df ("NFC: Add firmware upload netlink command")
-Fixes: 9ea7187c53f6 ("NFC: netlink: Rename CMD_FW_UPLOAD to CMD_FW_DOWNLOAD")
-Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
-Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
-Link: https://lore.kernel.org/r/20220504055847.38026-1-duoming@zju.edu.cn
-Signed-off-by: Paolo Abeni <pabeni@redhat.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- net/nfc/netlink.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c
-index 9750997643bb..420023025e5d 100644
---- a/net/nfc/netlink.c
-+++ b/net/nfc/netlink.c
-@@ -562,7 +562,7 @@ int nfc_genl_se_connectivity(struct nfc_dev *dev, u8 se_idx)
-       struct sk_buff *msg;
-       void *hdr;
--      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
-+      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_ATOMIC);
-       if (!msg)
-               return -ENOMEM;
-@@ -582,7 +582,7 @@ int nfc_genl_se_connectivity(struct nfc_dev *dev, u8 se_idx)
-       genlmsg_end(msg, hdr);
--      genlmsg_multicast(&nfc_genl_family, msg, 0, 0, GFP_KERNEL);
-+      genlmsg_multicast(&nfc_genl_family, msg, 0, 0, GFP_ATOMIC);
-       return 0;
--- 
-2.35.1
-
index 2d2e93e9d49c1e8cdfecd361a013f8f7f16fd333..5f5a84cd6dc754e02f04f3133e4fddf8a6717d8a 100644 (file)
@@ -61,7 +61,6 @@ btrfs-always-log-symlinks-in-full-mode.patch
 net-igmp-respect-rcu-rules-in-ip_mc_source-and-ip_mc_msfilter.patch
 hwmon-adt7470-fix-warning-on-module-removal.patch-27037
 kvm-x86-cpuid-only-provide-cpuid-leaf-0xa-if-host-ha.patch
-nfc-netlink-fix-sleep-in-atomic-bug-when-firmware-do.patch
 net-sched-prevent-uaf-on-tc_ctl_tfilter-when-temporarily-dropping-rtnl_lock.patch
 net-ipv6-ensure-we-call-ipv6_mc_down-at-most-once.patch
 dm-fix-mempool-null-pointer-race-when-completing-io.patch
diff --git a/queue-5.10/nfc-netlink-fix-sleep-in-atomic-bug-when-firmware-do.patch b/queue-5.10/nfc-netlink-fix-sleep-in-atomic-bug-when-firmware-do.patch
deleted file mode 100644 (file)
index f81aa69..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-From 75cf9d713983e059a99996bad911f3a495a32a4f Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 4 May 2022 13:58:47 +0800
-Subject: NFC: netlink: fix sleep in atomic bug when firmware download timeout
-
-From: Duoming Zhou <duoming@zju.edu.cn>
-
-[ Upstream commit 4071bf121d59944d5cd2238de0642f3d7995a997 ]
-
-There are sleep in atomic bug that could cause kernel panic during
-firmware download process. The root cause is that nlmsg_new with
-GFP_KERNEL parameter is called in fw_dnld_timeout which is a timer
-handler. The call trace is shown below:
-
-BUG: sleeping function called from invalid context at include/linux/sched/mm.h:265
-Call Trace:
-kmem_cache_alloc_node
-__alloc_skb
-nfc_genl_fw_download_done
-call_timer_fn
-__run_timers.part.0
-run_timer_softirq
-__do_softirq
-...
-
-The nlmsg_new with GFP_KERNEL parameter may sleep during memory
-allocation process, and the timer handler is run as the result of
-a "software interrupt" that should not call any other function
-that could sleep.
-
-This patch changes allocation mode of netlink message from GFP_KERNEL
-to GFP_ATOMIC in order to prevent sleep in atomic bug. The GFP_ATOMIC
-flag makes memory allocation operation could be used in atomic context.
-
-Fixes: 9674da8759df ("NFC: Add firmware upload netlink command")
-Fixes: 9ea7187c53f6 ("NFC: netlink: Rename CMD_FW_UPLOAD to CMD_FW_DOWNLOAD")
-Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
-Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
-Link: https://lore.kernel.org/r/20220504055847.38026-1-duoming@zju.edu.cn
-Signed-off-by: Paolo Abeni <pabeni@redhat.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- net/nfc/netlink.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c
-index b8939ebaa6d3..c86e4b95f61b 100644
---- a/net/nfc/netlink.c
-+++ b/net/nfc/netlink.c
-@@ -534,7 +534,7 @@ int nfc_genl_se_connectivity(struct nfc_dev *dev, u8 se_idx)
-       struct sk_buff *msg;
-       void *hdr;
--      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
-+      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_ATOMIC);
-       if (!msg)
-               return -ENOMEM;
-@@ -554,7 +554,7 @@ int nfc_genl_se_connectivity(struct nfc_dev *dev, u8 se_idx)
-       genlmsg_end(msg, hdr);
--      genlmsg_multicast(&nfc_genl_family, msg, 0, 0, GFP_KERNEL);
-+      genlmsg_multicast(&nfc_genl_family, msg, 0, 0, GFP_ATOMIC);
-       return 0;
--- 
-2.35.1
-
index b564b6aca35a8354d8f259561dfa65a9f038ed9a..53795b4d0c95bfc294c9a0f2adfd713e9a4062df 100644 (file)
@@ -58,7 +58,6 @@ net-igmp-respect-rcu-rules-in-ip_mc_source-and-ip_mc_msfilter.patch
 hwmon-adt7470-fix-warning-on-module-removal.patch-3384
 kvm-x86-cpuid-only-provide-cpuid-leaf-0xa-if-host-ha.patch
 net-mlx5-fix-slab-out-of-bounds-while-reading-resour.patch
-nfc-netlink-fix-sleep-in-atomic-bug-when-firmware-do.patch
 x86-kvm-preserve-bsp-msr_kvm_poll_control-across-sus.patch
 kvm-x86-do-not-change-icr-on-write-to-apic_self_ipi.patch
 kvm-x86-mmu-avoid-null-pointer-dereference-on-page-f.patch
diff --git a/queue-5.15/nfc-netlink-fix-sleep-in-atomic-bug-when-firmware-do.patch b/queue-5.15/nfc-netlink-fix-sleep-in-atomic-bug-when-firmware-do.patch
deleted file mode 100644 (file)
index f5dbc1b..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-From 27a214b70554e2dea2d36d8b6344d681049d826e Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 4 May 2022 13:58:47 +0800
-Subject: NFC: netlink: fix sleep in atomic bug when firmware download timeout
-
-From: Duoming Zhou <duoming@zju.edu.cn>
-
-[ Upstream commit 4071bf121d59944d5cd2238de0642f3d7995a997 ]
-
-There are sleep in atomic bug that could cause kernel panic during
-firmware download process. The root cause is that nlmsg_new with
-GFP_KERNEL parameter is called in fw_dnld_timeout which is a timer
-handler. The call trace is shown below:
-
-BUG: sleeping function called from invalid context at include/linux/sched/mm.h:265
-Call Trace:
-kmem_cache_alloc_node
-__alloc_skb
-nfc_genl_fw_download_done
-call_timer_fn
-__run_timers.part.0
-run_timer_softirq
-__do_softirq
-...
-
-The nlmsg_new with GFP_KERNEL parameter may sleep during memory
-allocation process, and the timer handler is run as the result of
-a "software interrupt" that should not call any other function
-that could sleep.
-
-This patch changes allocation mode of netlink message from GFP_KERNEL
-to GFP_ATOMIC in order to prevent sleep in atomic bug. The GFP_ATOMIC
-flag makes memory allocation operation could be used in atomic context.
-
-Fixes: 9674da8759df ("NFC: Add firmware upload netlink command")
-Fixes: 9ea7187c53f6 ("NFC: netlink: Rename CMD_FW_UPLOAD to CMD_FW_DOWNLOAD")
-Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
-Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
-Link: https://lore.kernel.org/r/20220504055847.38026-1-duoming@zju.edu.cn
-Signed-off-by: Paolo Abeni <pabeni@redhat.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- net/nfc/netlink.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c
-index a207f0b8137b..60fc85781373 100644
---- a/net/nfc/netlink.c
-+++ b/net/nfc/netlink.c
-@@ -534,7 +534,7 @@ int nfc_genl_se_connectivity(struct nfc_dev *dev, u8 se_idx)
-       struct sk_buff *msg;
-       void *hdr;
--      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
-+      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_ATOMIC);
-       if (!msg)
-               return -ENOMEM;
-@@ -554,7 +554,7 @@ int nfc_genl_se_connectivity(struct nfc_dev *dev, u8 se_idx)
-       genlmsg_end(msg, hdr);
--      genlmsg_multicast(&nfc_genl_family, msg, 0, 0, GFP_KERNEL);
-+      genlmsg_multicast(&nfc_genl_family, msg, 0, 0, GFP_ATOMIC);
-       return 0;
--- 
-2.35.1
-
index 9df23588d3532b992d93281804def426e612b0a3..e49fdc6f2e59d9c23ff7fe96088366fdd8ef201e 100644 (file)
@@ -91,7 +91,6 @@ net-mlx5e-lag-fix-use-after-free-in-fib-event-handle.patch
 net-mlx5e-lag-fix-fib_info-pointer-assignment.patch
 net-mlx5e-lag-don-t-skip-fib-events-on-current-dst.patch
 iommu-dart-add-missing-module-owner-to-ops-structure.patch
-nfc-netlink-fix-sleep-in-atomic-bug-when-firmware-do.patch
 kvm-selftests-do-not-use-bitfields-larger-than-32-bi.patch
 kvm-selftests-silence-compiler-warning-in-the-kvm_pa.patch
 x86-kvm-preserve-bsp-msr_kvm_poll_control-across-sus.patch
diff --git a/queue-5.17/nfc-netlink-fix-sleep-in-atomic-bug-when-firmware-do.patch b/queue-5.17/nfc-netlink-fix-sleep-in-atomic-bug-when-firmware-do.patch
deleted file mode 100644 (file)
index 31aa2d8..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-From 3704254200cd569167a7c4f81923cb6be71901ef Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 4 May 2022 13:58:47 +0800
-Subject: NFC: netlink: fix sleep in atomic bug when firmware download timeout
-
-From: Duoming Zhou <duoming@zju.edu.cn>
-
-[ Upstream commit 4071bf121d59944d5cd2238de0642f3d7995a997 ]
-
-There are sleep in atomic bug that could cause kernel panic during
-firmware download process. The root cause is that nlmsg_new with
-GFP_KERNEL parameter is called in fw_dnld_timeout which is a timer
-handler. The call trace is shown below:
-
-BUG: sleeping function called from invalid context at include/linux/sched/mm.h:265
-Call Trace:
-kmem_cache_alloc_node
-__alloc_skb
-nfc_genl_fw_download_done
-call_timer_fn
-__run_timers.part.0
-run_timer_softirq
-__do_softirq
-...
-
-The nlmsg_new with GFP_KERNEL parameter may sleep during memory
-allocation process, and the timer handler is run as the result of
-a "software interrupt" that should not call any other function
-that could sleep.
-
-This patch changes allocation mode of netlink message from GFP_KERNEL
-to GFP_ATOMIC in order to prevent sleep in atomic bug. The GFP_ATOMIC
-flag makes memory allocation operation could be used in atomic context.
-
-Fixes: 9674da8759df ("NFC: Add firmware upload netlink command")
-Fixes: 9ea7187c53f6 ("NFC: netlink: Rename CMD_FW_UPLOAD to CMD_FW_DOWNLOAD")
-Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
-Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
-Link: https://lore.kernel.org/r/20220504055847.38026-1-duoming@zju.edu.cn
-Signed-off-by: Paolo Abeni <pabeni@redhat.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- net/nfc/netlink.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c
-index 7c62417ccfd7..5c429e25bcf7 100644
---- a/net/nfc/netlink.c
-+++ b/net/nfc/netlink.c
-@@ -534,7 +534,7 @@ int nfc_genl_se_connectivity(struct nfc_dev *dev, u8 se_idx)
-       struct sk_buff *msg;
-       void *hdr;
--      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
-+      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_ATOMIC);
-       if (!msg)
-               return -ENOMEM;
-@@ -554,7 +554,7 @@ int nfc_genl_se_connectivity(struct nfc_dev *dev, u8 se_idx)
-       genlmsg_end(msg, hdr);
--      genlmsg_multicast(&nfc_genl_family, msg, 0, 0, GFP_KERNEL);
-+      genlmsg_multicast(&nfc_genl_family, msg, 0, 0, GFP_ATOMIC);
-       return 0;
--- 
-2.35.1
-
index 3345d05e524c7cedc6787e12f876a984bbadc07f..82cc9c46988b6caba601441768acc3f961b21d47 100644 (file)
@@ -108,7 +108,6 @@ net-rds-acquire-refcount-on-tcp-sockets.patch
 kvm-x86-cpuid-only-provide-cpuid-leaf-0xa-if-host-ha.patch
 fbdev-make-fb_release-return-enodev-if-fbdev-was-unr.patch
 iommu-dart-add-missing-module-owner-to-ops-structure.patch
-nfc-netlink-fix-sleep-in-atomic-bug-when-firmware-do.patch
 kvm-sev-mark-nested-locking-of-vcpu-lock.patch
 kvm-vmx-exit-to-userspace-if-vcpu-has-injected-excep.patch
 kvm-selftests-do-not-use-bitfields-larger-than-32-bi.patch
diff --git a/queue-5.4/nfc-netlink-fix-sleep-in-atomic-bug-when-firmware-do.patch b/queue-5.4/nfc-netlink-fix-sleep-in-atomic-bug-when-firmware-do.patch
deleted file mode 100644 (file)
index 9612864..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-From eb97b9f8bfb9bed63c50821b17f83e052dfb0a86 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 4 May 2022 13:58:47 +0800
-Subject: NFC: netlink: fix sleep in atomic bug when firmware download timeout
-
-From: Duoming Zhou <duoming@zju.edu.cn>
-
-[ Upstream commit 4071bf121d59944d5cd2238de0642f3d7995a997 ]
-
-There are sleep in atomic bug that could cause kernel panic during
-firmware download process. The root cause is that nlmsg_new with
-GFP_KERNEL parameter is called in fw_dnld_timeout which is a timer
-handler. The call trace is shown below:
-
-BUG: sleeping function called from invalid context at include/linux/sched/mm.h:265
-Call Trace:
-kmem_cache_alloc_node
-__alloc_skb
-nfc_genl_fw_download_done
-call_timer_fn
-__run_timers.part.0
-run_timer_softirq
-__do_softirq
-...
-
-The nlmsg_new with GFP_KERNEL parameter may sleep during memory
-allocation process, and the timer handler is run as the result of
-a "software interrupt" that should not call any other function
-that could sleep.
-
-This patch changes allocation mode of netlink message from GFP_KERNEL
-to GFP_ATOMIC in order to prevent sleep in atomic bug. The GFP_ATOMIC
-flag makes memory allocation operation could be used in atomic context.
-
-Fixes: 9674da8759df ("NFC: Add firmware upload netlink command")
-Fixes: 9ea7187c53f6 ("NFC: netlink: Rename CMD_FW_UPLOAD to CMD_FW_DOWNLOAD")
-Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
-Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
-Link: https://lore.kernel.org/r/20220504055847.38026-1-duoming@zju.edu.cn
-Signed-off-by: Paolo Abeni <pabeni@redhat.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- net/nfc/netlink.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c
-index 9e94f732e717..a5d8f87c3763 100644
---- a/net/nfc/netlink.c
-+++ b/net/nfc/netlink.c
-@@ -542,7 +542,7 @@ int nfc_genl_se_connectivity(struct nfc_dev *dev, u8 se_idx)
-       struct sk_buff *msg;
-       void *hdr;
--      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
-+      msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_ATOMIC);
-       if (!msg)
-               return -ENOMEM;
-@@ -562,7 +562,7 @@ int nfc_genl_se_connectivity(struct nfc_dev *dev, u8 se_idx)
-       genlmsg_end(msg, hdr);
--      genlmsg_multicast(&nfc_genl_family, msg, 0, 0, GFP_KERNEL);
-+      genlmsg_multicast(&nfc_genl_family, msg, 0, 0, GFP_ATOMIC);
-       return 0;
--- 
-2.35.1
-
index 36a7ed7984772ae69967fdeb19428c7b76ca1519..28e71ded7cc928923b41f39853d8e47bb37c2fc7 100644 (file)
@@ -35,7 +35,6 @@ drm-amdkfd-use-drm_priv-to-pass-vm-from-kfd-to-amdgpu.patch
 hwmon-adt7470-fix-warning-on-module-removal.patch-15216
 nfsv4-don-t-invalidate-inode-attributes-on-delegatio.patch
 kvm-x86-cpuid-only-provide-cpuid-leaf-0xa-if-host-ha.patch
-nfc-netlink-fix-sleep-in-atomic-bug-when-firmware-do.patch
 x86-kvm-preserve-bsp-msr_kvm_poll_control-across-sus.patch
 kvm-lapic-enable-timer-posted-interrupt-only-when-mw.patch
 net-ipv6-ensure-we-call-ipv6_mc_down-at-most-once.patch