lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56CE8A35.4090503@cumulusnetworks.com>
Date:	Wed, 24 Feb 2016 20:59:33 -0800
From:	roopa <roopa@...ulusnetworks.com>
To:	"Rosen, Rami" <rami.rosen@...el.com>
CC:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"jhs@...atatu.com" <jhs@...atatu.com>
Subject: Re: [PATCH net-next RFC] rtnetlink: add new RTM_GETSTATS to dump
 link stats

On 2/23/16, 1:26 AM, Rosen, Rami wrote:
> Hi,
>
> +	if (!dev)
> +		return -ENODEV;
> +
> +	nskb = nlmsg_new(if_nlmsg_stats_size(dev), GFP_KERNEL);
> +	if (!nskb)
> +		return -ENOBUFS;
> +
> +	err = rtnl_fill_statsinfo(nskb, dev, RTM_NEWSTATS,
> +				  NETLINK_CB(skb).portid, nlh->nlmsg_seq, 0, 0);
> +	if (err < 0) {
>
> It should be here:  -EMSGSIZE implies BUG in if_nlmsg_stats_size  (instead of if_nlmsg_size)
>
> +		/* -EMSGSIZE implies BUG in if_nlmsg_size */
> +		WARN_ON(err == -EMSGSIZE);
> +		kfree_skb(nskb);
> +	} else {
> +		err = rtnl_unicast(nskb, net, NETLINK_CB(skb).portid);
> +	}
>
>
> Other than that, it seems ok, thanks for this patch!
>
>
will fix it, thanks for the review.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ