diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-10-20 11:02:05 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-10-20 11:02:05 +0200 |
commit | ca4b9c3b743da39a6e0756a5c68edb35f6fc5e53 (patch) | |
tree | 95ce0819f92e25bc4d768ab13cee1f385a83a7b2 /net/tipc/msg.c | |
parent | a30b85df7d599f626973e9cd3056fe755bd778e0 (diff) | |
parent | 275d34b82561e695339b782950d49c386169dae3 (diff) | |
download | linux-ca4b9c3b743da39a6e0756a5c68edb35f6fc5e53.tar.bz2 |
Merge branch 'perf/urgent' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/tipc/msg.c')
-rw-r--r-- | net/tipc/msg.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/net/tipc/msg.c b/net/tipc/msg.c index 6ef379f004ac..17146c16ee2d 100644 --- a/net/tipc/msg.c +++ b/net/tipc/msg.c @@ -551,7 +551,7 @@ bool tipc_msg_lookup_dest(struct net *net, struct sk_buff *skb, int *err) return false; if (msg_errcode(msg)) return false; - *err = -TIPC_ERR_NO_NAME; + *err = TIPC_ERR_NO_NAME; if (skb_linearize(skb)) return false; msg = buf_msg(skb); @@ -568,6 +568,14 @@ bool tipc_msg_lookup_dest(struct net *net, struct sk_buff *skb, int *err) msg_set_destnode(msg, dnode); msg_set_destport(msg, dport); *err = TIPC_OK; + + if (!skb_cloned(skb)) + return true; + + /* Unclone buffer in case it was bundled */ + if (pskb_expand_head(skb, BUF_HEADROOM, BUF_TAILROOM, GFP_ATOMIC)) + return false; + return true; } |