linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [ldv-project] [net] libertas: potential race condition
@ 2016-06-07  9:30 Pavel Andrianov
  2016-06-07 14:39 ` Dan Williams
  0 siblings, 1 reply; 6+ messages in thread
From: Pavel Andrianov @ 2016-06-07  9:30 UTC (permalink / raw)
  To: Kalle Valo
  Cc: libertas-dev, linux-wireless, netdev, linux-kernel,
	vaishali.thakkar, LDV list

Hi!

There is a potential race condition in 
drivers/net/wireless/libertas/libertas.ko.
In the function lbs_hard_start_xmit(..), line 159, a socket buffer is 
written to priv->current_skb with a spin_lock protection.
In the function lbs_mac_event_disconnected(..), lines 50-51, the field 
current_skb is cleaned. There is no protection used. The corresponding 
handlers are activated at the same time in lbs_start_card(..) and then 
may be executed simultaneously. Note, there are two structures 
lbs_netdev_ops and mesh_netdev_ops, which have the target handler 
lbs_hard_start_xmit.
Is it a real race or I have missed something?

-- 
Pavel Andrianov
Linux Verification Center, ISPRAS
web: http://linuxtesting.org
e-mail: andrianov@ispras.ru

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-06-15  0:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-07  9:30 [ldv-project] [net] libertas: potential race condition Pavel Andrianov
2016-06-07 14:39 ` Dan Williams
2016-06-07 14:54   ` Pavel Andrianov
2016-06-07 22:51   ` James Cameron
2016-06-14 13:16     ` Pavel Andrianov
2016-06-15  0:46       ` James Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).