From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756150AbdDRL2D (ORCPT ); Tue, 18 Apr 2017 07:28:03 -0400 Received: from mail.skyhub.de ([5.9.137.197]:50378 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754708AbdDRL2B (ORCPT ); Tue, 18 Apr 2017 07:28:01 -0400 Date: Tue, 18 Apr 2017 13:27:51 +0200 From: Borislav Petkov To: Thomas Gleixner Cc: LKML , Peter Zijlstra , Ingo Molnar , Steven Rostedt , Sebastian Siewior , x86@kernel.org Subject: Re: [patch 16/20] perf/x86/intel: Drop get_online_cpus() in intel_snb_check_microcode() Message-ID: <20170418112751.kwuiplly3assmo3j@pd.tnic> References: <20170415170107.643253702@linutronix.de> <20170415171652.582131508@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170415171652.582131508@linutronix.de> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 15, 2017 at 07:01:23PM +0200, Thomas Gleixner wrote: > From: Sebastian Andrzej Siewior > > If intel_snb_check_microcode() is invoked via > microcode_init -> perf_check_microcode -> intel_snb_check_microcode > > then get_online_cpus() is invoked nested. This works with the current > implementation of get_online_cpus() but prevents converting it to a percpu > rwsem. > > intel_snb_check_microcode() is also invoked from intel_sandybridge_quirk() > unprotected. > > Drop get_online_cpus() from intel_snb_check_microcode() and add it to > intel_sandybridge_quirk() so both call sites are protected. > > Signed-off-by: Sebastian Andrzej Siewior > Signed-off-by: Thomas Gleixner > Cc: Peter Zijlstra > Cc: Borislav Petkov > Cc: x86@kernel.org Acked-by: Borislav Petkov -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.