Merge "net: memset smsg to avoid the padding data"

This commit is contained in:
Linux Build Service Account 2018-08-28 04:02:56 -07:00 committed by Gerrit - the friendly Code Review server
commit c01343af9a

View file

@ -36,7 +36,6 @@ static struct netlink_kernel_cfg nlcfg = {
static void _sockev_event(unsigned long event, __u8 *evstr, int buflen)
{
memset(evstr, 0, buflen);
switch (event) {
case SOCKEV_SOCKET:
@ -99,6 +98,7 @@ static int sockev_client_cb(struct notifier_block *nb,
NETLINK_CB(skb).dst_group = SKNLGRP_SOCKEV;
smsg = nlmsg_data(nlh);
memset(smsg, 0, sizeof(struct sknlsockevmsg));
smsg->pid = current->pid;
_sockev_event(event, smsg->event, sizeof(smsg->event));
smsg->skfamily = sk->sk_family;