From: Jakub Kicinski Date: Thu, 22 Feb 2024 23:24:56 +0000 (-0800) Subject: Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=fecc51559a844b7f74119159c3cdb25b80b4e2c6;p=linux.git Merge git://git./linux/kernel/git/netdev/net Cross-merge networking fixes after downstream PR. Conflicts: net/ipv4/udp.c f796feabb9f5 ("udp: add local "peek offset enabled" flag") 56667da7399e ("net: implement lockless setsockopt(SO_PEEK_OFF)") Adjacent changes: net/unix/garbage.c aa82ac51d633 ("af_unix: Drop oob_skb ref before purging queue in GC.") 11498715f266 ("af_unix: Remove io_uring code for GC.") Signed-off-by: Jakub Kicinski --- fecc51559a844b7f74119159c3cdb25b80b4e2c6 diff --cc net/ipv4/udp.c index 38cce7cc51f65,e474b201900f9..a8acea17b4e53 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@@ -1589,12 -1589,7 +1589,8 @@@ int udp_init_sock(struct sock *sk void skb_consume_udp(struct sock *sk, struct sk_buff *skb, int len) { - if (unlikely(READ_ONCE(udp_sk(sk)->peeking_with_offset))) { - bool slow = lock_sock_fast(sk); - - sk_peek_offset_bwd(sk, len); ++ if (unlikely(READ_ONCE(udp_sk(sk)->peeking_with_offset))) + sk_peek_offset_bwd(sk, len); - unlock_sock_fast(sk, slow); - } if (!skb_unref(skb)) return; diff --cc net/unix/garbage.c index 51acf795f0960,2a81880dac7b7..fa39b62652385 --- a/net/unix/garbage.c +++ b/net/unix/garbage.c @@@ -339,22 -309,29 +347,10 @@@ static void __unix_gc(struct work_struc /* Here we are. Hitlist is filled. Die. */ __skb_queue_purge(&hitlist); - #if IS_ENABLED(CONFIG_AF_UNIX_OOB) - while (!list_empty(&gc_candidates)) { - u = list_entry(gc_candidates.next, struct unix_sock, link); - if (u->oob_skb) { - struct sk_buff *skb = u->oob_skb; - - u->oob_skb = NULL; - kfree_skb(skb); - } - } - #endif - spin_lock(&unix_gc_lock); - /* There could be io_uring registered files, just push them back to - * the inflight list - */ - list_for_each_entry_safe(u, next, &gc_candidates, link) - list_move_tail(&u->link, &gc_inflight_list); - /* All candidates should have been detached by now. */ - BUG_ON(!list_empty(&gc_candidates)); + WARN_ON_ONCE(!list_empty(&gc_candidates)); /* Paired with READ_ONCE() in wait_for_unix_gc(). */ WRITE_ONCE(gc_in_progress, false);