Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751618AbbEBQdi (ORCPT ); Sat, 2 May 2015 12:33:38 -0400 Received: from mail-vn0-f43.google.com ([209.85.216.43]:37928 "EHLO mail-vn0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751149AbbEBQdg (ORCPT ); Sat, 2 May 2015 12:33:36 -0400 MIME-Version: 1.0 In-Reply-To: <20150501193813.GA2812@gmail.com> References: <1430502057.4472.255.camel@redhat.com> <20150501193813.GA2812@gmail.com> Date: Sat, 2 May 2015 18:33:36 +0200 Message-ID: Subject: Re: [PATCH] signals: Generate warning when flush_signals() is called from non-kthread context From: Richard Weinberger To: Ingo Molnar Cc: Linus Torvalds , Neil Brown , Evgeniy Polyakov , Stephen Smalley , Alex Williamson , Oleg Nesterov , linux-kernel , kvm Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 731 Lines: 22 On Fri, May 1, 2015 at 9:38 PM, Ingo Molnar wrote: > diff --git a/kernel/signal.c b/kernel/signal.c > index d51c5ddd855c..100e30afe5d2 100644 > --- a/kernel/signal.c > +++ b/kernel/signal.c > @@ -427,6 +427,10 @@ void flush_signals(struct task_struct *t) > { > unsigned long flags; > > + /* Only kthreads are allowed to destroy signals: */ > + if (WARN_ON_ONCE(!(current->flags & PF_KTHREAD))) Shouldn't this be t->flags? -- Thanks, //richard -- 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/