Commit cc086fcf authored by Ying Xue's avatar Ying Xue Committed by David S. Miller
Browse files

tipc: fix a potential oops

Commit 6c9808ce

 ("tipc: remove port_lock") accidentally involves
a potential bug: when tipc socket instance(tsk) is not got with given
reference number in tipc_sk_get(), tsk is set to NULL. Subsequently
we jump to exit label where to decrease socket reference counter
pointed by tsk pointer in tipc_sk_put(). However, As now tsk is NULL,
oops may happen because of touching a NULL pointer.
Signed-off-by: default avatarYing Xue <>
Acked-by: default avatarErik Hugne <>
Acked-by: default avatarJon Maloy <>
Signed-off-by: default avatarDavid S. Miller <>
parent 574746dd
......@@ -2118,9 +2118,9 @@ static void tipc_sk_timeout(unsigned long ref)
tsk = tipc_sk_get(ref);
if (!tsk)
goto exit;
sk = &tsk->sk;
sk = &tsk->sk;
if (!tsk->connected) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment