Re: [PATCH] m68k: fix assembler constraint to prevent overeager gcc optimisation

Geert Uytterhoeven
2012-01-22T10:53:33Z

On Sun, Jan 22, 2012 at 11:15, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Mon, Jan 9, 2012 at 15:10, Andreas Schwab <schwab@linux-m68k.org> wrote:
>> Passing the address of a variable as an operand to an asm statement
>> doesn't mark the value of this variable as used, so gcc may optimize its
>> initialisation away.  Fix this by using the "m" constraint instead.
>
> Thanks! I'll apply and queue for -stable.

BTW, is it reasonable to assume we never saw the problem before because
there used to be a set_fs() call in flush_thread()?
Cfr. commit b7de110044b4e26adcb7b278d14da93133692ed7 ("m68k, exec:
remove redundant set_fs(USER_DS)"),
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=b7de110044b4e26adcb7b278d14da93133692ed7

That would mean it happens in 3.1 and later only.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds