diff options
| author | Richard Alpe <[email protected]> | 2016-03-03 13:20:41 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2016-03-07 03:54:56 +0000 |
| commit | 2837f39c7cdbd209ab04d1c1f4eca015a40d5cd6 (patch) | |
| tree | 53bce102b87f076951c45814b6871b3cbd172c78 /net/tipc | |
| parent | tipc: add net device to skb before UDP xmit (diff) | |
| download | kernel-2837f39c7cdbd209ab04d1c1f4eca015a40d5cd6.tar.gz kernel-2837f39c7cdbd209ab04d1c1f4eca015a40d5cd6.zip | |
tipc: don't check link reset on non existing link
Make sure we have a link before checking if it has been reset or not.
Prior to this patch tipc_link_is_reset() could be called with a non
existing link, resulting in a null pointer dereference.
Signed-off-by: Richard Alpe <[email protected]>
Acked-by: Jon Maloy <[email protected]>
Reviewed-by: Erik Hugne <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/tipc')
| -rw-r--r-- | net/tipc/node.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c index cdb79503d890..590d597589cf 100644 --- a/net/tipc/node.c +++ b/net/tipc/node.c @@ -843,7 +843,7 @@ void tipc_node_check_dest(struct net *net, u32 onode, memcpy(&le->maddr, maddr, sizeof(*maddr)); exit: tipc_node_write_unlock(n); - if (reset && !tipc_link_is_reset(l)) + if (reset && l && !tipc_link_is_reset(l)) tipc_node_link_down(n, b->identity, false); tipc_node_put(n); } |
