From: Gao feng Date: Tue, 17 Dec 2013 03:10:42 +0000 (+0800) Subject: audit: fix incorrect set of audit_sock X-Git-Tag: v3.14-rc1~118^2~16 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de92fc97e12d4b9170d1ab3dbccbdcb8c56add31;p=pandora-kernel.git audit: fix incorrect set of audit_sock NETLINK_CB(skb).sk is the socket of user space process, netlink_unicast in kauditd_send_skb wants the kernel side socket. Since the sk_state of audit netlink socket is not NETLINK_CONNECTED, so the netlink_getsockbyportid doesn't return -ECONNREFUSED. And the socket of userspace process can be released anytime, so the audit_sock may point to invalid socket. this patch sets the audit_sock to the kernel side audit netlink socket. Signed-off-by: Gao feng Acked-by: Eric Paris Signed-off-by: Richard Guy Briggs Signed-off-by: Eric Paris --- Reading git-diff-tree failed