mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Andrianov <andrianov@ispras.ru>
To: Samuel Thibault <samuel.thibault@ens-lyon.org>,
	William Hubbs <w.d.hubbs@gmail.com>,
	Chris Brannon <chris@the-brannons.com>,
	Kirk Reiser <kirk@reisers.ca>,
	speakup@linux-speakup.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org,
	Vaishali Thakkar <vaishali.thakkar@oracle.com>,
	ldv-project@linuxtesting.org
Subject: Re: A potential race in drivers/staging/speakup/speakup.ko
Date: Mon, 5 Sep 2016 12:54:10 +0300	[thread overview]
Message-ID: <58cca2ca-e73c-b7ae-9da9-36be6084caf4@ispras.ru> (raw)
In-Reply-To: <20160905094317.GB15376@var.bordeaux.inria.fr>

05.09.2016 12:43, Samuel Thibault пишет:
> Hello,
>
> Pavel Andrianov, on Mon 05 Sep 2016 11:51:50 +0300, wrote:
>> There is a potential race in drivers/staging/speakup/speakup.ko.
>> All operations with global pointers buff_in and buff_out are performed
>> without any locks. Thus, a simultaneous write (via synth_buffer_clear or
>> synth_buffer_add) to the pointers may lead to inconsistent data.
>>
>> Should a local lock be used here?
>
> AIUI, all callers of these functions have speakup_info.spinlock held.
>
> Samuel
>

Regard a call stack

-> synth_direct_store
   -> synth_printf
     -> synth_buffer_add

The functions have not held speakup_info.spinlock.

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

  reply	other threads:[~2016-09-05  9:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-05  8:51 Pavel Andrianov
2016-09-05  9:43 ` Samuel Thibault
2016-09-05  9:54   ` Pavel Andrianov [this message]
2016-09-05  9:56     ` Samuel Thibault
2016-09-05 10:33       ` Pavel Andrianov
2016-09-05 10:38         ` Samuel Thibault

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=58cca2ca-e73c-b7ae-9da9-36be6084caf4@ispras.ru \
    --to=andrianov@ispras.ru \
    --cc=chris@the-brannons.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=kirk@reisers.ca \
    --cc=ldv-project@linuxtesting.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=speakup@linux-speakup.org \
    --cc=vaishali.thakkar@oracle.com \
    --cc=w.d.hubbs@gmail.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

all inboxes | Powered by JetHome®