From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756644Ab1GJVIm (ORCPT ); Sun, 10 Jul 2011 17:08:42 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:54199 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756120Ab1GJVIk (ORCPT ); Sun, 10 Jul 2011 17:08:40 -0400 Date: Sun, 10 Jul 2011 22:08:33 +0100 From: Al Viro To: Oleg Nesterov Cc: Andrew Morton , David Howells , David Woodhouse , Ingo Molnar , linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86: do_signal: simplify the TS_RESTORE_SIGMASK logic Message-ID: <20110710210833.GH11013@ZenIV.linux.org.uk> References: <20110710182203.GA27979@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110710182203.GA27979@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 10, 2011 at 08:22:03PM +0200, Oleg Nesterov wrote: > 2. do_signal() also clears TS_RESTORE_SIGMASK if handle_signal() > succeeds. > > We can move this to setup_rt_frame() as well, this avoids the > unnecessary checks and makes the logic more clear. > + current_thread_info()->status &= ~TS_RESTORE_SIGMASK; > return ret; This is broken. If setup_rt_frame() fails, you don't want to do that.