From: Sasha Levin Date: Mon, 17 Oct 2022 09:35:05 +0000 (-0400) Subject: Drop genetlink-hold-read-cb_lock-during-iteration-of-genl.patch X-Git-Tag: v5.4.219~31^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=943f247168e7e238004e195996355b439f9de404;p=thirdparty%2Fkernel%2Fstable-queue.git Drop genetlink-hold-read-cb_lock-during-iteration-of-genl.patch Signed-off-by: Sasha Levin --- diff --git a/queue-5.15/genetlink-hold-read-cb_lock-during-iteration-of-genl.patch b/queue-5.15/genetlink-hold-read-cb_lock-during-iteration-of-genl.patch deleted file mode 100644 index 741b63233bc..00000000000 --- a/queue-5.15/genetlink-hold-read-cb_lock-during-iteration-of-genl.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 15530c236059ca932df86e1799a469325c9ae3b1 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 25 Aug 2022 10:19:40 +0200 -Subject: genetlink: hold read cb_lock during iteration of genl_fam_idr in - genl_bind() - -From: Jiri Pirko - -[ Upstream commit 8f1948bdcf2fb50e9092c0950c3c9ac591382101 ] - -In genl_bind(), currently genl_lock and write cb_lock are taken -for iteration of genl_fam_idr and processing of static values -stored in struct genl_family. Take just read cb_lock for this task -as it is sufficient to guard the idr and the struct against -concurrent genl_register/unregister_family() calls. - -This will allow to run genl command processing in genl_rcv() and -mnl_socket_setsockopt(.., NETLINK_ADD_MEMBERSHIP, ..) in parallel. - -Reported-by: Vikas Gupta -Signed-off-by: Jiri Pirko -Link: https://lore.kernel.org/r/20220825081940.1283335-1-jiri@resnulli.us -Signed-off-by: Jakub Kicinski -Signed-off-by: Sasha Levin ---- - net/netlink/genetlink.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c -index 57010927e20a..76aed0571e3a 100644 ---- a/net/netlink/genetlink.c -+++ b/net/netlink/genetlink.c -@@ -1362,7 +1362,7 @@ static int genl_bind(struct net *net, int group) - unsigned int id; - int ret = 0; - -- genl_lock_all(); -+ down_read(&cb_lock); - - idr_for_each_entry(&genl_fam_idr, family, id) { - const struct genl_multicast_group *grp; -@@ -1383,7 +1383,7 @@ static int genl_bind(struct net *net, int group) - break; - } - -- genl_unlock_all(); -+ up_read(&cb_lock); - return ret; - } - --- -2.35.1 - diff --git a/queue-5.15/series b/queue-5.15/series index 2380863122a..8574b989fd3 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -493,7 +493,6 @@ openvswitch-fix-double-reporting-of-drops-in-dropwat.patch openvswitch-fix-overreporting-of-drops-in-dropwatch.patch tcp-annotate-data-race-around-tcp_md5sig_pool_popula.patch micrel-ksz8851-fixes-struct-pointer-issue.patch -genetlink-hold-read-cb_lock-during-iteration-of-genl.patch x86-mce-retrieve-poison-range-from-hardware.patch wifi-ath9k-avoid-uninit-memory-read-in-ath9k_htc_rx_.patch thunderbolt-add-back-intel-falcon-ridge-end-to-end-f.patch