From: Richard Alpe Date: Wed, 6 May 2015 11:58:56 +0000 (+0200) Subject: tipc: send explicit not supported error in nl compat X-Git-Tag: v4.9.8~4072^2~347 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b063bc5ea77b1c1c0e7798f641f53504d0f64bf8;p=platform%2Fkernel%2Flinux-rpi3.git tipc: send explicit not supported error in nl compat The legacy netlink API treated EPERM (permission denied) as "operation not supported". Reported-by: Tomi Ollila Signed-off-by: Richard Alpe Reviewed-by: Erik Hugne Reviewed-by: Ying Xue Signed-off-by: David S. Miller --- diff --git a/net/tipc/netlink_compat.c b/net/tipc/netlink_compat.c index 809aaf0..53e0fee 100644 --- a/net/tipc/netlink_compat.c +++ b/net/tipc/netlink_compat.c @@ -1121,7 +1121,7 @@ static int tipc_nl_compat_recv(struct sk_buff *skb, struct genl_info *info) } err = tipc_nl_compat_handle(&msg); - if (err == -EOPNOTSUPP) + if ((err == -EOPNOTSUPP) || (err == -EPERM)) msg.rep = tipc_get_err_tlv(TIPC_CFG_NOT_SUPPORTED); else if (err == -EINVAL) msg.rep = tipc_get_err_tlv(TIPC_CFG_TLV_ERROR);