Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756394AbcCBUh5 (ORCPT ); Wed, 2 Mar 2016 15:37:57 -0500 Received: from casper.infradead.org ([85.118.1.10]:46662 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756065AbcCBUhz (ORCPT ); Wed, 2 Mar 2016 15:37:55 -0500 Date: Wed, 2 Mar 2016 21:37:48 +0100 From: Peter Zijlstra To: Chris Metcalf Cc: Gilad Ben Yossef , Steven Rostedt , Ingo Molnar , Andrew Morton , Rik van Riel , Tejun Heo , Frederic Weisbecker , Thomas Gleixner , "Paul E. McKenney" , Christoph Lameter , Viresh Kumar , Catalin Marinas , Will Deacon , Andy Lutomirski , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Oleg Nesterov Subject: Re: [PATCH v10 07/12] task_isolation: add debug boot flag Message-ID: <20160302203748.GH6356@twins.programming.kicks-ass.net> References: <1456949376-4910-1-git-send-email-cmetcalf@ezchip.com> <1456949376-4910-8-git-send-email-cmetcalf@ezchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1456949376-4910-8-git-send-email-cmetcalf@ezchip.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 431 Lines: 19 On Wed, Mar 02, 2016 at 03:09:31PM -0500, Chris Metcalf wrote: > +void task_isolation_debug(int cpu) > +{ > + struct task_struct *p; > + > + if (!task_isolation_possible(cpu)) > + return; > + > + rcu_read_lock(); > + p = cpu_curr(cpu); > + get_task_struct(p); As I think Oleg keeps reminding me, this is not actually a safe thing to do. > + rcu_read_unlock(); > + task_isolation_debug_task(cpu, p); > + put_task_struct(p); > +}