]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rtase: Avoid sleeping in get_stats64()
authorJustin Lai <justinlai0215@realtek.com>
Wed, 3 Jun 2026 06:18:16 +0000 (14:18 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 4 Jun 2026 15:52:24 +0000 (08:52 -0700)
commit9fc237f8d49f06d05f0f8e80361047b718894e81
treeab50391bb55c0f30956fffb9c55b680a71df4640
parent3a5f3f7aff18bcc36a57839cf50cf0cc8de707f3
rtase: Avoid sleeping in get_stats64()

The .ndo_get_stats64 callback must not sleep because it can be
called when reading /proc/net/dev.

rtase_get_stats64() calls rtase_dump_tally_counter(), which polls
the tally counter dump bit with read_poll_timeout(). This may
sleep while waiting for the hardware counter dump to complete.

Use read_poll_timeout_atomic() instead to avoid sleeping in the
get_stats64() path.

Fixes: 079600489960 ("rtase: Implement net_device_ops")
Cc: stable@vger.kernel.org
Signed-off-by: Justin Lai <justinlai0215@realtek.com>
Link: https://patch.msgid.link/20260603061816.31356-1-justinlai0215@realtek.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/realtek/rtase/rtase_main.c