The former patch "defer 6pack kfree after unregister_netdev" reorders
the kfree of two buffer after the unregister_netdev to prevent the race
condition. It also adds free_netdev() function in sixpack_close(), which
is a direct copy from the similar code in mkiss_close().
However, in sixpack driver, the flag needs_free_netdev is set to true in
sp_setup(), hence the unregister_netdev() will free the netdev
automatically. Therefore, as the sp is netdev_priv, use-after-free
occurs.
This patch removes the needs_free_netdev = true and just let the
free_netdev to finish this deallocation task.
Fixes:
|
||
|---|---|---|
| .. | ||
| 6pack.c | ||
| baycom_epp.c | ||
| baycom_par.c | ||
| baycom_ser_fdx.c | ||
| baycom_ser_hdx.c | ||
| bpqether.c | ||
| dmascc.c | ||
| hdlcdrv.c | ||
| Kconfig | ||
| Makefile | ||
| mkiss.c | ||
| scc.c | ||
| yam.c | ||
| z8530.h | ||