All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [RFT net-next PATCH RESEND 0/2] ethernet: intel: fix freeing uninitialized pointers with __free
@ 2025-11-24  7:40 ` Ally Heev
  0 siblings, 0 replies; 18+ messages in thread
From: Ally Heev @ 2025-11-24  7:40 UTC (permalink / raw)
  To: Tony Nguyen, Przemek Kitszel, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: intel-wired-lan, netdev, linux-kernel, Ally Heev, Simon Horman,
	Dan Carpenter

Uninitialized pointers with `__free` attribute can cause undefined
behavior as the memory assigned randomly to the pointer is freed
automatically when the pointer goes out of scope.

We could just fix it by initializing the pointer to NULL, but, as usage of
cleanup attributes is discouraged in net [1], trying to achieve cleanup
using goto

[1] https://docs.kernel.org/process/maintainer-netdev.html#using-device-managed-and-cleanup-h-constructs

Signed-off-by: Ally Heev <allyheev@gmail.com>
---
Ally Heev (2):
      ice: remove __free usage in ice_flow
      idpf: remove __free usage in idpf_virtchnl

 drivers/net/ethernet/intel/ice/ice_flow.c       |  6 ++++--
 drivers/net/ethernet/intel/idpf/idpf_virtchnl.c | 28 +++++++++++++++++--------
 2 files changed, 23 insertions(+), 11 deletions(-)
---
base-commit: 24598358a1b4ca1d596b8e7b34a7bc76f54e630f
change-id: 20251113-aheev-fix-free-uninitialized-ptrs-ethernet-intel-abc0cc9278d8

Best regards,
-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQQBFRpOLrIakF7DYvaWPaLUP9d7HAUCaRn0WAAKCRCWPaLUP9d7
HPCSAP4tu8ld+4Og65tjSYNChRqIR4Gn8C546JFeozyQW6uj3wD/SQEPIidSAYbb
klXrZrKIBOc/avt55S2+krl241aNJA8=
=guHM
-----END PGP SIGNATURE-----
-- 
Ally Heev <allyheev@gmail.com>


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

end of thread, other threads:[~2025-12-08  3:07 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-24  7:40 [Intel-wired-lan] [RFT net-next PATCH RESEND 0/2] ethernet: intel: fix freeing uninitialized pointers with __free Ally Heev
2025-11-24  7:40 ` Ally Heev
2025-11-24  7:40 ` [Intel-wired-lan] [PATCH RESEND RFT net-next 1/2] ice: remove __free usage in ice_flow Ally Heev
2025-11-24  7:40   ` Ally Heev
2025-11-24 10:00   ` [Intel-wired-lan] " Loktionov, Aleksandr
2025-11-24 10:00     ` Loktionov, Aleksandr
2025-11-24  7:40 ` [Intel-wired-lan] [PATCH RESEND RFT net-next 2/2] idpf: remove __free usage in idpf_virtchnl Ally Heev
2025-11-24  7:40   ` Ally Heev
2025-11-24  9:59   ` [Intel-wired-lan] " Loktionov, Aleksandr
2025-11-24  9:59     ` Loktionov, Aleksandr
2025-12-01 21:40 ` [Intel-wired-lan] [RFT net-next PATCH RESEND 0/2] ethernet: intel: fix freeing uninitialized pointers with __free Tony Nguyen
2025-12-01 21:40   ` Tony Nguyen
2025-12-02 19:47   ` [Intel-wired-lan] " ally heev
2025-12-02 19:47     ` ally heev
2025-12-02 18:17     ` [Intel-wired-lan] " Tony Nguyen
2025-12-03  8:09       ` ally heev
2025-12-03  8:45         ` Przemek Kitszel
2025-12-08  3:07           ` ally heev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.