When skb_zerocopy() copies devmem payload fragments, it fails to update the target skb's unreadable flag. This causes the target to appear as readable memory. Propagate the unreadable flag if any devmem fragments were copied from the source. Fixes: 65249feb6b3d ("net: add support for skbs with unreadable frags") Cc: Pavel Begunkov Cc: Stanislav Fomichev Cc: Bobby Eshleman Cc: Florian Westphal Signed-off-by: Mina Almasry --- net/core/skbuff.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index ba3dbac80fb49..aebe8ea74776a 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -3928,6 +3928,9 @@ skb_zerocopy(struct sk_buff *to, struct sk_buff *from, int len, int hlen) } skb_shinfo(to)->nr_frags = j; + if (i > 0 && from->unreadable) + to->unreadable = 1; + return 0; } EXPORT_SYMBOL_GPL(skb_zerocopy); -- 2.55.0.571.g244d577d93-goog