mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jia-Ju Bai <baijiaju1990@gmail.com>
To: Juergen Gross <jgross@suse.com>,
	boris.ostrovsky@oracle.com, simon@invisiblethingslab.com,
	joao.m.martins@oracle.com
Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] xen: xenbus: Fix a possible data race in xs_request_enter
Date: Tue, 8 May 2018 15:04:13 +0800	[thread overview]
Message-ID: <770bc26b-3819-2235-132f-55b0319955dd@gmail.com> (raw)
In-Reply-To: <ea5634a2-b0e2-0fac-e5ec-cef1083958fe@suse.com>



On 2018/5/8 15:02, Juergen Gross wrote:
> On 08/05/18 05:34, Jia-Ju Bai wrote:
>> The read operation to "req->type" is protected by
>> the lock on line 128, but the write operation to
>> this data on line 118 is not protected by the lock.
>> Thus, there may exist a data race for "req->type".
>>
>> To fix this data race, the write operation to "req->type"
>> should be also protected by the lock.
> No, xs_request_enter() is never called for a request already visible to
> another thread or processor. So no race exists.

Okay, thanks for your reply.


Best wishes,
Jia-Ju Bai

      reply	other threads:[~2018-05-08  7:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-08  3:34 Jia-Ju Bai
2018-05-08  7:02 ` Juergen Gross
2018-05-08  7:04   ` Jia-Ju Bai [this message]

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=770bc26b-3819-2235-132f-55b0319955dd@gmail.com \
    --to=baijiaju1990@gmail.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=jgross@suse.com \
    --cc=joao.m.martins@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=simon@invisiblethingslab.com \
    --cc=xen-devel@lists.xenproject.org \
    /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®