From: Pavel Emelyanov Date: Mon, 26 Dec 2011 19:08:47 +0000 (-0500) Subject: unix_diag: Fix incoming connections nla length X-Git-Tag: v3.3-rc1~182^2~124 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3b0723c12e825e26aa5fc0c6970108425824b51d;p=profile%2Fcommon%2Fkernel-common.git unix_diag: Fix incoming connections nla length The NLA_PUT macro should accept the actual attribute length, not the amount of elements in array :( Signed-off-by: Pavel Emelyanov Signed-off-by: David S. Miller --- diff --git a/net/unix/diag.c b/net/unix/diag.c index 91d5782..39e44c9 100644 --- a/net/unix/diag.c +++ b/net/unix/diag.c @@ -72,7 +72,8 @@ static int sk_diag_dump_icons(struct sock *sk, struct sk_buff *nlskb) if (sk->sk_state == TCP_LISTEN) { spin_lock(&sk->sk_receive_queue.lock); - buf = UNIX_DIAG_PUT(nlskb, UNIX_DIAG_ICONS, sk->sk_receive_queue.qlen); + buf = UNIX_DIAG_PUT(nlskb, UNIX_DIAG_ICONS, + sk->sk_receive_queue.qlen * sizeof(u32)); i = 0; skb_queue_walk(&sk->sk_receive_queue, skb) { struct sock *req, *peer;