diff options
| author | Denys Fedoryshchenko <denys.f@collabora.com> | 2026-11-03 00:10:58 +0200 |
|---|---|---|
| committer | Denys Fedoryshchenko <denys.f@collabora.com> | 2026-11-03 00:10:58 +0200 |
| commit | 0e4929acd386fd6911825b68d1791c2dd73d3d95 (patch) | |
| tree | 3a9bccecda3ea11087c61172c8a54dfc7d3f5a75 /kernel | |
| parent | d80cdc61e82f7beb578f6c8232644f508ec95bb5 (diff) | |
| download | accel-ppp-0e4929acd386fd6911825b68d1791c2dd73d3d95.tar.gz accel-ppp-0e4929acd386fd6911825b68d1791c2dd73d3d95.zip | |
session: read interface stats in the session's own netns
ap_session_read_stats() reached netlink through the thread-local "net".
Callers outside the session's context, such as "show sessions" with
rx-bytes/tx-bytes columns, run on an arbitrary triton thread where
"net" is NULL (never set on that thread) or still points at another
session's namespace: a NULL dereference in iplink_get_stats(), or
counters read from the wrong namespace.
Switch to ses->net around the query and restore it afterwards. Inside
the session's context net == ses->net already, so nothing changes there.
Why not the fixes suggested in the issue: a NULL check in
iplink_get_stats() or net = def_net in the CLI still queries the wrong
namespace for sessions outside the default netns, and reporting cached
counters would make "show sessions" stale.
Fixes #378
Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions
