From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752544AbdJ0LU0 (ORCPT ); Fri, 27 Oct 2017 07:20:26 -0400 Received: from mx2.suse.de ([195.135.220.15]:40016 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752489AbdJ0LUZ (ORCPT ); Fri, 27 Oct 2017 07:20:25 -0400 Date: Fri, 27 Oct 2017 13:15:27 +0200 From: Borislav Petkov To: Zhou Chengming Cc: mhiramat@kernel.org, ananth@linux.vnet.ibm.com, anil.s.keshavamurthy@intel.com, davem@davemloft.net, hpa@zytor.com, tglx@linutronix.de, peterz@infradead.org, jkosina@suse.cz, rostedt@goodmis.org, mjurczyk@google.com, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] kprobes, x86/alternatives: use text_mutex to protect smp_alt_modules Message-ID: <20171027111527.GD1305@nazgul.tnic> References: <1509096884-22993-1-git-send-email-zhouchengming1@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1509096884-22993-1-git-send-email-zhouchengming1@huawei.com> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 27, 2017 at 05:34:44PM +0800, Zhou Chengming wrote: > Fixes: 2cfa197 "ftrace/alternatives: Introducing *_text_reserved > functions" > > We use alternatives_text_reserved() to check if the address is in > the fixed pieces of alternative reserved, but the problem is that > we don't hold the smp_alt mutex when call this function. So the list > traversal may encounter a deleted list_head if another path is doing > alternatives_smp_module_del(). Is this something you've triggered on a real machine or is this just from code staring? -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --