From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sc8-sf-mx2-b.sourceforge.net ([10.3.1.92] helo=mail.sourceforge.net) by sc8-sf-list1-new.sourceforge.net with esmtp (Exim 4.43) id 1GVayc-0006TD-NH for user-mode-linux-devel@lists.sourceforge.net; Thu, 05 Oct 2006 14:41:58 -0700 Received: from smtp007.mail.ukl.yahoo.com ([217.12.11.96]) by mail.sourceforge.net with smtp (Exim 4.44) id 1GVayb-0000Gk-5f for user-mode-linux-devel@lists.sourceforge.net; Thu, 05 Oct 2006 14:41:58 -0700 From: "Paolo 'Blaisorblade' Giarrusso" Date: Thu, 05 Oct 2006 23:38:52 +0200 Message-Id: <20061005213852.17268.13871.stgit@memento.home.lan> In-Reply-To: <20061005213212.17268.7409.stgit@memento.home.lan> References: <20061005213212.17268.7409.stgit@memento.home.lan> Subject: [uml-devel] [PATCH 06/14] uml: make UML_SETJMP always safe List-Id: The user-mode Linux development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: user-mode-linux-devel-bounces@lists.sourceforge.net Errors-To: user-mode-linux-devel-bounces@lists.sourceforge.net To: Andrew Morton Cc: Jeff Dike , linux-kernel@vger.kernel.org, user-mode-linux-devel@lists.sourceforge.net From: Paolo 'Blaisorblade' Giarrusso If enable is moved by GCC in a register its value may not be preserved after coming back there with longjmp(). So, mark it as volatile to prevent this; this is suggested (it seems) in info gcc, when it talks about -Wuninitialized. I re-read this and it seems to say something different, but I still believe this may be needed. Signed-off-by: Paolo 'Blaisorblade' Giarrusso --- arch/um/include/longjmp.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/um/include/longjmp.h b/arch/um/include/longjmp.h index e93c6d3..e860bc5 100644 --- a/arch/um/include/longjmp.h +++ b/arch/um/include/longjmp.h @@ -12,7 +12,8 @@ #define UML_LONGJMP(buf, val) do { \ } while(0) #define UML_SETJMP(buf) ({ \ - int n, enable; \ + int n; \ + volatile int enable; \ enable = get_signals(); \ n = setjmp(*buf); \ if(n != 0) \ Chiacchiera con i tuoi amici in tempo reale! http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel