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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 30 Aug 2013 15:54:15 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	arvid.brodin@...n.com
Cc:	netdev@...r.kernel.org, shemminger@...tta.com, joe@...ches.com,
	jboticario@...il.com, balferreira@...glemail.com
Subject: Re: [PATCH v3] net/hsr: Add support for the High-availability
 Seamless Redundancy protocol (HSRv0)

From: Arvid Brodin <arvid.brodin@...n.com>
Date: Wed, 21 Aug 2013 20:20:17 +0200

> This is a patch against net-next (2013-08-21).

First of all, your email client corrupted the patch, chopping up long lines
and making whitespace changes to the content of the patch.  Please fix this
before resubmitting, and do so by first sending a test patch to yourself
and making sure you can apply the patch you receive in that email.  Do not
use attachments to deal with this issue.

> +	if (dev->operstate != transition) {
> +		write_lock_bh(&dev_base_lock);
> +		dev->operstate = transition;
> +		write_unlock_bh(&dev_base_lock);
> +		netdev_state_change(dev);
> +	}

This is racy.  And it appears that set_operstate() in net/core/rtnetlink.c
has the same bug, I guess that's what you used as a guide.

Any "test and set" sequence must be guarded completely by the lock, it
doesn't make any sense to only guard the change of the value.
--
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