diff options
author | Breno Leitao <leitao@debian.org> | 2024-08-22 13:10:47 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-08-26 18:25:44 +0200 |
commit | ae5a0456e0b4cfd7e61619e55251ffdf1bc7adfb (patch) | |
tree | f6ffe56e12f7d3b4579f858fa7f63d9af872d99a /scripts/markup_oops.pl | |
parent | Merge branch 'adds-support-for-lan887x-phy' (diff) | |
download | linux-ae5a0456e0b4cfd7e61619e55251ffdf1bc7adfb.tar.xz linux-ae5a0456e0b4cfd7e61619e55251ffdf1bc7adfb.zip |
netpoll: Ensure clean state on setup failures
Modify netpoll_setup() and __netpoll_setup() to ensure that the netpoll
structure (np) is left in a clean state if setup fails for any reason.
This prevents carrying over misconfigured fields in case of partial
setup success.
Key changes:
- np->dev is now set only after successful setup, ensuring it's always
NULL if netpoll is not configured or if netpoll_setup() fails.
- np->local_ip is zeroed if netpoll setup doesn't complete successfully.
- Added DEBUG_NET_WARN_ON_ONCE() checks to catch unexpected states.
- Reordered some operations in __netpoll_setup() for better logical flow.
These changes improve the reliability of netpoll configuration, since it
assures that the structure is fully initialized or totally unset.
Suggested-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Breno Leitao <leitao@debian.org>
Link: https://patch.msgid.link/20240822111051.179850-2-leitao@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/markup_oops.pl')
0 files changed, 0 insertions, 0 deletions