Netdev List
 help / color / mirror / Atom feed
From: Zhenghang Xiao <kipreyyy@gmail.com>
To: Chas Williams <3chas3@gmail.com>
Cc: netdev@vger.kernel.org, Zhenghang Xiao <kipreyyy@gmail.com>
Subject: [PATCH net] atm: br2684: restore VCC push/pop handlers on close
Date: Tue, 26 May 2026 18:55:23 +0800	[thread overview]
Message-ID: <20260526105523.99216-1-kipreyyy@gmail.com> (raw)

br2684_close_vcc() frees the br2684_vcc and NULLs atmvcc->user_back but
leaves atmvcc->push and atmvcc->pop pointing to br2684_push/br2684_pop.
If the ATM driver completes a TX after the close (delayed pop callback),
br2684_pop() dereferences the NULL user_back at offset 0x18, causing a
kernel panic.

Restore push and pop on the atmvcc before clearing user_back, matching
the pattern in pppoatm_unassign_vcc().

Fixes: 137742cf9738 ("atm/br2684: netif_stop_queue() when atm device busy and netif_wake_queue() when we can send packets again.")
Signed-off-by: Zhenghang Xiao <kipreyyy@gmail.com>
---
 net/atm/br2684.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/atm/br2684.c b/net/atm/br2684.c
index 6580d67c3456..dbdc31ce5c53 100644
--- a/net/atm/br2684.c
+++ b/net/atm/br2684.c
@@ -412,6 +412,8 @@ static void br2684_close_vcc(struct br2684_vcc *brvcc)
 	write_lock_irq(&devs_lock);
 	list_del(&brvcc->brvccs);
 	write_unlock_irq(&devs_lock);
+	brvcc->atmvcc->push = brvcc->old_push;
+	brvcc->atmvcc->pop = brvcc->old_pop;
 	brvcc->atmvcc->user_back = NULL;	/* what about vcc->recvq ??? */
 	brvcc->atmvcc->release_cb = brvcc->old_release_cb;
 	brvcc->old_push(brvcc->atmvcc, NULL);	/* pass on the bad news */
-- 
2.50.1 (Apple Git-155)


                 reply	other threads:[~2026-05-26 10:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260526105523.99216-1-kipreyyy@gmail.com \
    --to=kipreyyy@gmail.com \
    --cc=3chas3@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox