All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@eu.citrix.com>
To: Frediano Ziglio <frediano.ziglio@citrix.com>
Cc: Liu Jinsong <jinsong.liu@intel.com>,
	Christoph Egger <chegger@amazon.de>,
	David Vrabel <david.vrabel@citrix.com>,
	Jan Beulich <JBeulich@suse.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH v2] MCE: Fix race condition in mctelem_reserve
Date: Wed, 19 Feb 2014 10:35:26 +0000	[thread overview]
Message-ID: <530488EE.7050204@eu.citrix.com> (raw)
In-Reply-To: <1392803609.8843.3.camel@hamster.uk.xensource.com>

On 02/19/2014 09:53 AM, Frediano Ziglio wrote:
> On Tue, 2014-02-18 at 12:47 +0000, George Dunlap wrote:
>> On Wed, Jan 22, 2014 at 5:17 PM, Frediano Ziglio
>> <frediano.ziglio@citrix.com> wrote:
>>> These lines (in mctelem_reserve)
>>>
>>>          newhead = oldhead->mcte_next;
>>>          if (cmpxchgptr(freelp, oldhead, newhead) == oldhead) {
>>>
>>> are racy. After you read the newhead pointer it can happen that another
>>> flow (thread or recursive invocation) change all the list but set head
>>> with same value. So oldhead is the same as *freelp but you are setting
>>> a new head that could point to whatever element (even already used).
>>>
>>> This patch use instead a bit array and atomic bit operations.
>>>
>>> Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
>> What is this like from a release perspective?  When is this code run,
>> and how often is the bug triggered?
>>
>>   -George
> The code handle MCE situation. So if your hardware is good is not a big
> deal. If your hardware start to have some problems in some situation is
> possible that cpu raise a mce quite often causing the race to happen.
>
> I think that the probability is not that high. The test was finely
> tested (not that easy to do even now) and solve a real bug.

OK thanks -- at this point then, I think I'd just as soon hold this off 
until 4.4.1, unless we get some other blocking bugs, just so that we can 
minimize the changes.

  -George

  reply	other threads:[~2014-02-19 10:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-22 10:50 [PATCH] MCE: Fix race condition in mctelem_reserve Frediano Ziglio
2014-01-22 10:56 ` David Vrabel
2014-01-22 11:00   ` Frediano Ziglio
2014-01-22 13:05     ` David Vrabel
2014-01-22 12:21 ` Jan Beulich
2014-01-22 17:17   ` [PATCH v2] " Frediano Ziglio
2014-01-30  9:20     ` Frediano Ziglio
2014-01-30  9:55       ` Jan Beulich
2014-01-31 13:37     ` Frediano Ziglio
2014-02-14 16:23       ` Frediano Ziglio
2014-02-14 16:54         ` Jan Beulich
2014-02-16 14:44           ` Liu, Jinsong
2014-02-18 12:47     ` George Dunlap
2014-02-19  9:53       ` Frediano Ziglio
2014-02-19 10:35         ` George Dunlap [this message]
2014-02-18  8:42 ` [PATCH] " Liu, Jinsong
2014-02-18 11:10   ` Frediano Ziglio
2014-02-18 11:25     ` Liu, Jinsong

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=530488EE.7050204@eu.citrix.com \
    --to=george.dunlap@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=chegger@amazon.de \
    --cc=david.vrabel@citrix.com \
    --cc=frediano.ziglio@citrix.com \
    --cc=jinsong.liu@intel.com \
    --cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.