Chenyuan Yang 19e65c45a1 net: davicom: fix UAF in dm9000_drv_remove
dm is netdev private data and it cannot be
used after free_netdev() call. Using dm after free_netdev()
can cause UAF bug. Fix it by moving free_netdev() at the end of the
function.

This is similar to the issue fixed in commit
ad297cd2db89 ("net: qcom/emac: fix UAF in emac_remove").

This bug is detected by our static analysis tool.

Fixes: cf9e60aa69ae ("net: davicom: Fix regulator not turned off on driver removal")
Signed-off-by: Chenyuan Yang <chenyuan0y@gmail.com>
CC: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20250123214213.623518-1-chenyuan0y@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-01-27 15:05:37 -08:00
2025-01-22 08:28:57 -08:00
2025-01-20 20:27:33 -08:00
2025-01-21 20:03:04 -08:00
2025-01-21 17:48:03 -08:00
2025-01-20 20:27:33 -08:00
2025-01-22 08:28:57 -08:00
2025-01-22 08:28:57 -08:00
2024-09-01 20:43:24 -07:00
2025-01-22 08:28:57 -08:00
2025-01-21 17:48:03 -08:00
2025-01-22 08:28:57 -08:00
2025-01-21 20:09:14 -08:00
2025-01-21 16:09:47 -08:00
2024-11-27 12:57:03 -08:00
2025-01-22 08:28:57 -08:00
2022-10-10 12:00:45 -07:00
2025-01-22 08:28:57 -08:00
2024-03-18 03:36:32 -06:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the reStructuredText markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
Description
No description provided
Readme 7.9 GiB
Languages
C 97.5%
Assembly 1%
Shell 0.6%
Python 0.3%
Makefile 0.3%
Other 0.1%