Search Linux Wireless

Re: [PATCH v5 4/5] {nl,cfg,mac}80211: implement mesh channel switch userspace API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2013-10-14 at 19:08 -0700, Chun-Yeow Yeoh wrote:

> +int ieee80211_mesh_csa_beacon(struct ieee80211_sub_if_data *sdata,
> +			      struct cfg80211_csa_settings *csa_settings,
> +			      bool csa_action)
> +{
> +	struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
> +	struct mesh_csa_settings *tmp_csa_settings;
> +	int ret = 0;
> +
> +	if (csa_action)
> +		ieee80211_send_action_csa(sdata, csa_settings);
> +
> +	tmp_csa_settings = kmalloc(sizeof(*tmp_csa_settings),
> +				   GFP_ATOMIC);
> +	if (!tmp_csa_settings)
> +		return -ENOMEM;
> +
> +	memcpy(&tmp_csa_settings->settings, csa_settings,
> +	       sizeof(struct cfg80211_csa_settings));
> +
> +	rcu_assign_pointer(ifmsh->csa, tmp_csa_settings);
> +
> +	ret = ieee80211_mesh_rebuild_beacon(sdata);
> +	if (ret)
> +		return -EINVAL;

If this fails, do we leak the CSA settings?

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux