[ldv-project] [net] libertas: potential race condition
dcbw at redhat.com
Tue Jun 7 07:39:55 PDT 2016
On Tue, 2016-06-07 at 13:30 +0400, Pavel Andrianov wrote:
> There is a potential race condition in
> In the function lbs_hard_start_xmit(..), line 159, a socket buffer
> written to priv->current_skb with a spin_lock protection.
> In the function lbs_mac_event_disconnected(..), lines 50-51, the
> current_skb is cleaned. There is no protection used. The
> handlers are activated at the same time in lbs_start_card(..) and
> may be executed simultaneously. Note, there are two structures
> lbs_netdev_ops and mesh_netdev_ops, which have the target handler
> Is it a real race or I have missed something?
Yeah, it looks like it should be grabbing priv->driver_lock before
clearing priv->currenttxskb in lbs_mac_event_disconnected(). Care to
submit a patch after testing? Do you have any of that hardware?
More information about the libertas-dev