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
_______________________________________________
Devel mailing list
[email protected]
http://lists.open80211s.org/cgi-bin/mailman/listinfo/devel