netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/3] netconsole: Fix potential race condition and improve code clarity
@ 2024-07-09 14:43 Breno Leitao
  2024-07-09 14:43 ` [PATCH net-next 1/3] net: netconsole: Remove unnecessary cast from bool Breno Leitao
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Breno Leitao @ 2024-07-09 14:43 UTC (permalink / raw)
  To: davem, edumazet, pabeni; +Cc: thepacketgeek, riel, horms, netdev, linux-kernel

This patchset addresses a potential bug in netconsole where the netconsole
target is cleaned up before it is disabled. This sequence could lead to a
situation where an enabled target has an uninitialized netpoll structure,
potentially causing undefined behavior.

The main goals of this patchset are:

1. Correct the order of operations:
   - First, disable the netconsole target
   - Then, clean up the netpoll structure

2. Improve code readability:
   - Remove unnecessary casts
   - Eliminate redundant operations

These changes aim to enhance the reliability of netconsole by
eliminating the potential race condition and improve maintainability by
making the code more straightforward to understand and modify.

Breno Leitao (3):
  net: netconsole: Remove unnecessary cast from bool
  net: netconsole: Eliminate redundant setting of enabled field
  net: netconsole: Disable target before netpoll cleanup

 drivers/net/netconsole.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-07-12  2:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-09 14:43 [PATCH net-next 0/3] netconsole: Fix potential race condition and improve code clarity Breno Leitao
2024-07-09 14:43 ` [PATCH net-next 1/3] net: netconsole: Remove unnecessary cast from bool Breno Leitao
2024-07-09 14:44 ` [PATCH net-next 2/3] net: netconsole: Eliminate redundant setting of enabled field Breno Leitao
2024-07-09 14:44 ` [PATCH net-next 3/3] net: netconsole: Disable target before netpoll cleanup Breno Leitao
2024-07-12  1:32   ` Jakub Kicinski
2024-07-12  2:00 ` [PATCH net-next 0/3] netconsole: Fix potential race condition and improve code clarity patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).