Commit f3c8243
net: netpoll: flush skb pool during cleanup
[ Upstream commit 6c59f16 ]
The netpoll subsystem maintains a pool of 32 pre-allocated SKBs per
instance, but these SKBs are not freed when the netpoll user is brought
down. This leads to memory waste as these buffers remain allocated but
unused.
Add skb_pool_flush() to properly clean up these SKBs when netconsole is
terminated, improving memory efficiency.
Signed-off-by: Breno Leitao <leitao@debian.org>
Link: https://patch.msgid.link/20241114-skb_buffers_v2-v3-2-9be9f52a8b69@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: 49c8d2c ("net: netpoll: fix incorrect refcount handling causing incorrect cleanup")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 1652fbe commit f3c8243
1 file changed
+13
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
536 | 536 | | |
537 | 537 | | |
538 | 538 | | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
539 | 547 | | |
540 | 548 | | |
541 | 549 | | |
| |||
784 | 792 | | |
785 | 793 | | |
786 | 794 | | |
787 | | - | |
| 795 | + | |
788 | 796 | | |
789 | 797 | | |
790 | 798 | | |
| |||
795 | 803 | | |
796 | 804 | | |
797 | 805 | | |
| 806 | + | |
| 807 | + | |
798 | 808 | | |
799 | 809 | | |
800 | 810 | | |
| |||
842 | 852 | | |
843 | 853 | | |
844 | 854 | | |
| 855 | + | |
| 856 | + | |
845 | 857 | | |
846 | 858 | | |
847 | 859 | | |
| |||
0 commit comments