Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759993Ab0FKApS (ORCPT ); Thu, 10 Jun 2010 20:45:18 -0400 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:52603 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754045Ab0FKApQ (ORCPT ); Thu, 10 Jun 2010 20:45:16 -0400 X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 Date: Fri, 11 Jun 2010 09:40:45 +0900 From: KAMEZAWA Hiroyuki To: Oleg Nesterov Cc: Andrew Morton , KOSAKI Motohiro , Roland McGrath , "Luis Claudio R. Goncalves" , LKML , linux-mm , David Rientjes , Nick Piggin , Minchan Kim Subject: Re: [PATCH 1/1] signals: introduce send_sigkill() helper Message-Id: <20100611094045.8f6e5218.kamezawa.hiroyu@jp.fujitsu.com> In-Reply-To: <20100610010023.GB4727@redhat.com> References: <20100608204621.767A.A69D9226@jp.fujitsu.com> <20100608210000.7692.A69D9226@jp.fujitsu.com> <20100608184144.GA5914@redhat.com> <20100610005937.GA4727@redhat.com> <20100610010023.GB4727@redhat.com> Organization: FUJITSU Co. LTD. X-Mailer: Sylpheed 3.0.2 (GTK+ 2.10.14; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1317 Lines: 31 On Thu, 10 Jun 2010 03:00:23 +0200 Oleg Nesterov wrote: > Cleanup, no functional changes. > > There are a lot of buggy SIGKILL users in kernel. For example, almost > every force_sig(SIGKILL) is wrong. force_sig() is not safe, it assumes > that the task has the valid ->sighand, and in general it should be used > only for synchronous signals. send_sig(SIGKILL, p, 1) or > send_xxx(SEND_SIG_FORCED/SEND_SIG_PRIV) is not right too but this is not > immediately obvious. > > The only way to correctly send SIGKILL is send_sig_info(SEND_SIG_NOINFO) > but we do not want to use this directly, because we can optimize this > case later. For example, zap_pid_ns_processes() allocates sigqueue for > each process in namespace, this is unneeded. > > Introduce the trivial send_sigkill() helper on top of send_sig_info() > and change zap_pid_ns_processes() as an example. > > Note: we need more cleanups here, this is only the first change. > > Signed-off-by: Oleg Nesterov Reviewed-by: KAMEZAWA Hiroyuki -- 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/