diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-06-01 17:54:55 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-06-01 17:54:55 +0200 |
| commit | d0acb5202d0e33d23cbe6994424587fbb05a5360 (patch) | |
| tree | 4b7fd07149896994fb739e1cbb5d65f2e47cd6d7 /net/phonet/pep.c | |
| parent | 55f3722fc694d6478eca3020b12a4d6a79b06f27 (diff) | |
| parent | bb532bfaf7919c7c98caab81864e9ce2646e11e3 (diff) | |
Merge v7.0.11linux-rolling-stable
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/phonet/pep.c')
| -rw-r--r-- | net/phonet/pep.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/net/phonet/pep.c b/net/phonet/pep.c index 120e711ea78c..2c7bad24d7c9 100644 --- a/net/phonet/pep.c +++ b/net/phonet/pep.c @@ -671,8 +671,23 @@ static int pep_do_rcv(struct sock *sk, struct sk_buff *skb) /* Look for an existing pipe handle */ sknode = pep_find_pipe(&pn->hlist, &dst, pipe_handle); - if (sknode) - return sk_receive_skb(sknode, skb, 1); + if (sknode) { + int rc; + + /* pep_do_rcv() runs from two contexts: from softirq via + * phonet_rcv() -> __sk_receive_skb() with BH disabled, + * and from process context via + * release_sock() -> __release_sock(), which drops + * the listener slock with spin_unlock_bh() before draining + * the backlog. The child pipe slock is taken below via + * bh_lock_sock_nested(), which does not itself disable BH, so + * disable BH here to keep both acquire contexts consistent. + */ + local_bh_disable(); + rc = sk_receive_skb(sknode, skb, 1); + local_bh_enable(); + return rc; + } switch (hdr->message_id) { case PNS_PEP_CONNECT_REQ: |
