Re: [PATCH] net: add missing ref_tracker_dir_exit() to alloc_netdev_mqs()
Eric Dumazet <[email protected]>
| Newsgroups | gmane.linux.network |
|---|---|
| Message-ID | <CANn89iJQdMF1hDPAJib2rW8Pf72vQ_x5hZMFNO1Y-kcq19beGA@mail.gmail.com> |
On Sat, Aug 15, 2026 at 8:50 AM Tetsuo Handa <[email protected]> wrote: > > sashiko is reporting that trying to read /sys/kernel/debug/ref_tracker/* > causes use-afer-free crash when either alloc_percpu() or dev_addr_init() > in alloc_netdev_mqs() failed, for commit 4d92b95ff2f9 ("net: add net device > refcount tracker infrastructure") added ref_tracker_dir_exit() to only > free_netdev() path. > > Reported-by: sashiko.dev (no mail address) > Closes: https://sashiko.dev/#/patchset/56c707e7-1fb0-43ec-b8fb-cf6f451e513e%40I-love.SAKURA.ne.jp > Fixes: 4d92b95ff2f9 ("net: add net device refcount tracker infrastructure") > Signed-off-by: Tetsuo Handa <[email protected]> I have the same remark. Fixes: 4d92b95ff2f9 ("net: add net device refcount tracker infrastructure") is where the omission originated in Linux 5.18, though it was benign until debugfs registration was added to ref_tracker. Reviewed-by: Eric Dumazet <[email protected]>