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: <0E8BD1B8-4D60-4292-8694-CF0E988AA2BD@cumulusnetworks.com>
Date:	Mon, 6 Jan 2014 09:02:18 -0800
From:	Scott Feldman <sfeldma@...ulusnetworks.com>
To:	Veaceslav Falico <vfalico@...hat.com>
Cc:	Netdev <netdev@...r.kernel.org>, Jay Vosburgh <fubar@...ibm.com>,
	Andy Gospodarek <andy@...yhouse.net>
Subject: Re: [PATCH net-next] bonding: fix kstrtou8() return value verification in num_peer_notif

On Jan 6, 2014, at 2:54 AM, Veaceslav Falico <vfalico@...hat.com> wrote:

> It returns 0 in case of success, !0 error otherwise. Fix the improper error
> verification.
> 
> Fixes: 2c9839c143bbc ("bonding: add num_grat_arp attribute netlink support")
> CC: sfeldma@...ulusnetworks.com
> CC: Jay Vosburgh <fubar@...ibm.com>
> CC: Andy Gospodarek <andy@...yhouse.net>
> Signed-off-by: Veaceslav Falico <vfalico@...hat.com>
> ---
> drivers/net/bonding/bond_sysfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
> index 9a1ea4a..011f163 100644
> --- a/drivers/net/bonding/bond_sysfs.c
> +++ b/drivers/net/bonding/bond_sysfs.c
> @@ -776,7 +776,7 @@ static ssize_t bonding_store_num_peer_notif(struct device *d,
> 	int ret;
> 
> 	ret = kstrtou8(buf, 10, &new_value);
> -	if (!ret) {
> +	if (ret) {
> 		pr_err("%s: invalid value %s specified.\n",
> 		       bond->dev->name, buf);
> 		return ret;
> -- 
> 1.8.4

Thanks!

Acked-by: Scott Feldman <sfeldma@...ulusnetworks.com>--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ