Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751440AbbL3GYm (ORCPT ); Wed, 30 Dec 2015 01:24:42 -0500 Received: from mail-pf0-f175.google.com ([209.85.192.175]:33287 "EHLO mail-pf0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751043AbbL3GYg (ORCPT ); Wed, 30 Dec 2015 01:24:36 -0500 Date: Wed, 30 Dec 2015 15:25:42 +0900 From: Sergey Senozhatsky To: Oleg Nesterov Cc: Peter Zijlstra , Andrew Morton , Richard Guy Briggs , "Eric W. Biederman" , "Serge E. Hallyn" , linux-kernel@vger.kernel.org, Sergey Senozhatsky , Sergey Senozhatsky Subject: [RFC] is_global_init() called on global init sub-thread Message-ID: <20151230062542.GA605@swordfish> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 922 Lines: 28 Hello, re-upping https://www.redhat.com/archives/linux-audit/2013-December/msg00086.html Oleg Nesterov wrote: :Because is_global_init() is only true for the main thread of /sbin/init. : :Just look at oom_unkillable_task(). It tries to not kill init. But, say, :select_bad_process() can happily find a sub-thread of is_global_init() :and still kill it. this is still the case, isn't it? at least in some -stable kernels. is there (or was there) any reason this change has never been committed? (I'm particularly interested in is_global_init()). static inline int is_global_init(struct task_struct *tsk) { - return tsk->pid == 1; + return task_tgid_nr(tsk) == 1; } -ss -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/