]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tipc: use only positive error codes in messages
authorParthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
Fri, 29 Sep 2017 08:02:54 +0000 (10:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Oct 2017 09:56:07 +0000 (11:56 +0200)
commitcd6d6bd72cc19117c79a229a44094b007b0fd369
treea031d51d6d5a1a9141ac690d7e90720116267f4c
parent7059b304902b1fb45df29b5d1d5e1ea3f5fa4efa
tipc: use only positive error codes in messages

[ Upstream commit aad06212d36cf34859428a0a279e5c14ee5c9e26 ]

In commit e3a77561e7d32 ("tipc: split up function tipc_msg_eval()"),
we have updated the function tipc_msg_lookup_dest() to set the error
codes to negative values at destination lookup failures. Thus when
the function sets the error code to -TIPC_ERR_NO_NAME, its inserted
into the 4 bit error field of the message header as 0xf instead of
TIPC_ERR_NO_NAME (1). The value 0xf is an unknown error code.

In this commit, we set only positive error code.

Fixes: e3a77561e7d32 ("tipc: split up function tipc_msg_eval()")
Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/tipc/msg.c