Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 15 Oct 2002 22:43:55 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 15 Oct 2002 22:43:55 -0400 Received: from dp.samba.org ([66.70.73.150]:10376 "EHLO lists.samba.org") by vger.kernel.org with ESMTP id ; Tue, 15 Oct 2002 22:43:54 -0400 From: Rusty Russell To: Ingo Molnar Cc: Linus Torvalds , linux-kernel@vger.kernel.org Subject: Re: [patch] futex-2.5.42-A2 In-reply-to: Your message of "Tue, 15 Oct 2002 22:17:11 +0200." Date: Wed, 16 Oct 2002 12:26:02 +1000 Message-Id: <20021016024951.490F42C0DE@lists.samba.org> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 986 Lines: 29 In message you write: > - simplified alignment check in sys_futex. (Martin Wirth) Um, this test existed for a reason: > - /* Must be "naturally" aligned, and not on page boundary. */ > - if ((pos_in_page % __alignof__(int)) != 0 > - || pos_in_page + sizeof(int) > PAGE_SIZE) > + /* Must be "naturally" aligned */ > + if (pos_in_page % sizeof(int)) > return -EINVAL; If you do this, *please* add: /* Above check not sufficient if align of int < size. Break link. */ if (__alignof__(int) < sizeof(int)) { extern void __error_small_int_align(); __error_small_int_align(); } Cheers, Rusty. -- Anyone who quotes me in their sig is an idiot. -- Rusty Russell. - 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/