All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Borislav Petkov <bp@alien8.de>
Cc: tony.luck@intel.com, linux-kernel@vger.kernel.org,
	linux-edac@vger.kernel.org, mattieu.souchaud@free.fr
Subject: Re: [PATCH] x86/mce: Don't unregister CPU hotplug notifier in error path
Date: Fri, 20 Jun 2014 12:16:39 -0400	[thread overview]
Message-ID: <53A45E67.7070000@oracle.com> (raw)
In-Reply-To: <20140620155845.GC11391@pd.tnic>

On 06/20/2014 11:58 AM, Borislav Petkov wrote:
> On Fri, Jun 20, 2014 at 11:41:27AM -0400, Boris Ostrovsky wrote:
>> Only in the sense that on Xen misc_register() often fails. But any
>> failure on baremetal will result in the same behavior.
> Ok, thanks for explaining the details.
>
>> Right. And I think we shouldn't because we leave undeleted timers.
> I wonder if we could simply move the oneliner:
>
> 	__register_hotcpu_notifier(&mce_cpu_notifier);
>
> to mcheck_init()? We don't need any locking there because we're pre-SMP
> then and from looking at notifier_chain_register(), it seems there's
> nothing special that needs initializing for the call to be too early -
> we're simply adding the callback to a list...
>
> Hmm, because if that would work, the fix is almost trivial. :)

That's cleaner than what I had in mcheck_cpu_init() (checking for 
boot_cpu_data).

But I think you still need to do the dance in the notifier to make sure 
you are not trying to add/remove device if mcheck_init_device() had 
failed earlier.

-boris


  reply	other threads:[~2014-06-20 16:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-20 14:28 [PATCH] x86/mce: Don't unregister CPU hotplug notifier in error path Boris Ostrovsky
2014-06-20 15:23 ` Borislav Petkov
2014-06-20 15:41   ` Boris Ostrovsky
2014-06-20 15:58     ` Borislav Petkov
2014-06-20 16:16       ` Boris Ostrovsky [this message]
2014-06-20 17:52         ` Borislav Petkov
2014-06-20 19:39           ` Boris Ostrovsky
2014-06-20 20:03             ` Borislav Petkov
2014-06-20 20:16               ` Boris Ostrovsky
2014-06-20 20:29                 ` Borislav Petkov
2014-06-20 20:43                   ` Boris Ostrovsky
2014-06-20 21:11                     ` Borislav Petkov
2014-06-21  2:04                       ` Boris Ostrovsky
2014-06-21 10:08                         ` Borislav Petkov
2014-07-24 23:36 ` [tip:x86/urgent] x86, MCE: Robustify mcheck_init_device tip-bot for Borislav Petkov
  -- strict thread matches above, loose matches on Subject: below --
2014-06-22 17:25 [PATCH] x86/mce: Don't unregister CPU hotplug notifier in error path Boris Ostrovsky
2014-06-24 10:25 ` Borislav Petkov

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=53A45E67.7070000@oracle.com \
    --to=boris.ostrovsky@oracle.com \
    --cc=bp@alien8.de \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mattieu.souchaud@free.fr \
    --cc=tony.luck@intel.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 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.