From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932503AbYECRxT (ORCPT ); Sat, 3 May 2008 13:53:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757580AbYECRxF (ORCPT ); Sat, 3 May 2008 13:53:05 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:41404 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757553AbYECRxD (ORCPT ); Sat, 3 May 2008 13:53:03 -0400 Date: Sat, 3 May 2008 10:51:47 -0700 (PDT) From: Linus Torvalds To: Oleg Nesterov cc: Andrew Morton , Austin Clements , Ingo Molnar , john stultz , Michael Kerrisk , Roland McGrath , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/4] posix timers: sigqueue_free: don't free sigqueue if it is queued In-Reply-To: <20080503173553.GA8106@tv-sign.ru> Message-ID: References: <20080503173553.GA8106@tv-sign.ru> User-Agent: Alpine 1.10 (LFD 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 3 May 2008, Oleg Nesterov wrote: > > Note: I am not sure we shouldn't do the opposite, free sigqueue + cancel the > pending signal, but this needs some ugly changes. Perhaps we should reconsider > this change later. See also http://bugzilla.kernel.org/show_bug.cgi?id=10460 You know what, I think there might be an even simple solution. How about just setting a bit saying it is canceled - and nothing more. Then, the dequeue logic can be just taught to ignore those things. Doesn't that sound like the simple way to cancel signals? Make collect_signal() just do a "return 0" if the signal has been flushed.. Linus