Repository navigation
Commit f6ba8d3
netem: fix skb_orphan_partial()
I should have known that lowering skb->truesize was dangerous :/
In case packets are not leaving the host via a standard Ethernet device,
but looped back to local sockets, bad things can happen, as reported
by Michael Madsen ( https://bugzilla.kernel.org/show_bug.cgi?id=195713 )
So instead of tweaking skb->truesize, lets change skb->destructor
and keep a reference on the owner socket via its sk_refcnt.
Fixes: f2f872f ("netem: Introduce skb_orphan_partial() helper")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Michael Madsen <mkm@nabto.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 4e3c60e commit f6ba8d3
1 file changed
Lines changed: 8 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1803 | 1803 | | |
1804 | 1804 | | |
1805 | 1805 | | |
1806 | | - | |
1807 | | - | |
| 1806 | + | |
1808 | 1807 | | |
1809 | 1808 | | |
1810 | 1809 | | |
1811 | | - | |
1812 | | - | |
1813 | | - | |
1814 | | - | |
| 1810 | + | |
1815 | 1811 | | |
1816 | 1812 | | |
1817 | | - | |
1818 | | - | |
1819 | | - | |
1820 | | - | |
1821 | 1813 | | |
1822 | 1814 | | |
1823 | 1815 | | |
1824 | 1816 | | |
1825 | 1817 | | |
1826 | | - | |
1827 | | - | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
1828 | 1824 | | |
1829 | 1825 | | |
1830 | 1826 | | |
| |||
0 commit comments