Commit 237c6c0
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 <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Stable-dep-of: 49c8d2c ("net: netpoll: fix incorrect refcount handling causing incorrect cleanup")
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
(cherry picked from commit f3c824361452fef1f810592bce33e4f64c48e377)
Signed-off-by: Wentao Guan <[email protected]>1 parent 4adb465 commit 237c6c0
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