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]
Date:   Sun, 14 Jan 2018 23:40:47 +0100
From:   Johannes Berg <johannes@...solutions.net>
To:     Dominik Brodowski <linux@...inikbrodowski.net>
Cc:     regressions@...mhuis.info, netdev@...r.kernel.org,
        linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] nl80211: take RCU read lock when calling
 ieee80211_bss_get_ie()

On Sun, 2018-01-14 at 23:22 +0100, Dominik Brodowski wrote:
> 
> +		rcu_read_lock();
>  		ssid_ie = ieee80211_bss_get_ie(&wdev->current_bss->pub,
>  					       WLAN_EID_SSID);
>  		if (!ssid_ie)
> -			break;

nit-picking now: that "break" here may have been easier before these
changes

> +			goto nla_rcu_unlock;
>  		if (nla_put(msg, NL80211_ATTR_SSID, ssid_ie[1], ssid_ie + 2))
> -			goto nla_put_failure_locked;
> +			goto nla_put_failure_rcu_locked;
> + nla_rcu_unlock:
> +		rcu_read_unlock();
>  		break;

but after, perhaps it's easier to just do

		if (ssid_ie &&
		    nla_put(...)
			goto nla_put_failure_rcu_locked;

and avoid the extra label (but yeah, it's getting late)

johannes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ