All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Ingo Molnar <mingo@elte.hu>
Cc: Linus Torvalds <torvalds@transmeta.com>, linux-kernel@vger.kernel.org
Subject: Re: [patch] futex-2.5.42-A2
Date: Wed, 16 Oct 2002 12:26:02 +1000	[thread overview]
Message-ID: <20021016024951.490F42C0DE@lists.samba.org> (raw)
In-Reply-To: Your message of "Tue, 15 Oct 2002 22:17:11 +0200." <Pine.LNX.4.44.0210152157001.21066-100000@localhost.localdomain>

In message <Pine.LNX.4.44.0210152157001.21066-100000@localhost.localdomain> 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.

  reply	other threads:[~2002-10-16  2:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-15 20:17 [patch] futex-2.5.42-A2 Ingo Molnar
2002-10-16  2:26 ` Rusty Russell [this message]
2002-10-16  8:17   ` Ingo Molnar
2002-10-18  8:39     ` Rusty Russell
  -- strict thread matches above, loose matches on Subject: below --
2002-10-16  7:58 Martin Wirth
2002-10-16  8:23 ` Ingo Molnar
2002-10-16 14:32 Oleg Nesterov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021016024951.490F42C0DE@lists.samba.org \
    --to=rusty@rustcorp.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.