Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965061Ab3E2Rke (ORCPT ); Wed, 29 May 2013 13:40:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:3898 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934751Ab3E2Rk2 (ORCPT ); Wed, 29 May 2013 13:40:28 -0400 Date: Wed, 29 May 2013 19:36:34 +0200 From: Oleg Nesterov To: David Daney Cc: James Hogan , linux-kernel@vger.kernel.org, linux-mips@linux-mips.org, Ralf Baechle , Al Viro , Andrew Morton , Kees Cook Subject: Re: [RFC PATCH] kernel/signal.c: avoid BUG_ON with SIG128 (MIPS) Message-ID: <20130529173634.GA2020@redhat.com> References: <1369846916-13202-1-git-send-email-james.hogan@imgtec.com> <51A638A4.2000705@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51A638A4.2000705@gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 980 Lines: 32 On 05/29, David Daney wrote: > > On 05/29/2013 10:01 AM, James Hogan wrote: >> MIPS has 128 signals, the highest of which has the number 128. The > > I wonder if we should change the ABI and reduce the number of signals to > 127 instead of this patch. Same thoughts... >> @@ -2366,8 +2366,12 @@ relock: >> >> /* >> * Death signals, no core dump. >> + * >> + * MIPS has a signal number 128 which clashes with the core dump >> + * bit. If this was the signal we still want to report a valid >> + * exit code, so round it down to 127. >> */ >> - do_group_exit(info->si_signo); >> + do_group_exit(min(info->si_signo, 127)); This avoids BUG_ON() but obviously fools WIFSIGNALED(), doesn't look very nice. Oleg. -- 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/