public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Andrianov <andrianov@ispras.ru>
To: Kalle Valo <kvalo@codeaurora.org>
Cc: libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	vaishali.thakkar@oracle.com, LDV list <ldv-project@ispras.ru>
Subject: [ldv-project] [net] libertas: potential race condition
Date: Tue, 07 Jun 2016 13:30:12 +0400	[thread overview]
Message-ID: <57569424.9040906@ispras.ru> (raw)

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

             reply	other threads:[~2016-06-07 10:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-07  9:30 Pavel Andrianov [this message]
2016-06-07 14:39 ` [ldv-project] [net] libertas: potential race condition 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57569424.9040906@ispras.ru \
    --to=andrianov@ispras.ru \
    --cc=kvalo@codeaurora.org \
    --cc=ldv-project@ispras.ru \
    --cc=libertas-dev@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vaishali.thakkar@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox