linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* {put,get}_user() side effects
@ 2004-04-06 10:03 Geert Uytterhoeven
  2004-04-06 10:10 ` Russell King
  0 siblings, 1 reply; 11+ messages in thread
From: Geert Uytterhoeven @ 2004-04-06 10:03 UTC (permalink / raw)
  To: Linux Kernel Development


On most (all?) architectures {get,put}_user() has side effects:

#define put_user(x,ptr)                                                 \
  __put_user_check((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))


E.g. drivers/char/ip2main.c seems to be completely broken due to constructs
like:

    rc = put_user(i2Input, pIndex++ );

I only noticed these because the compiler gave some warnings due to other
reasons.

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2004-04-06 22:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1HVGV-1Wl-21@gated-at.bofh.it>
2004-04-06 11:32 ` {put,get}_user() side effects Andi Kleen
2004-04-06 11:46   ` Geert Uytterhoeven
2004-04-06 20:53     ` Horst von Brand
2004-04-06 22:53       ` Andreas Schwab
2004-04-06 11:50   ` Xavier Bestel
2004-04-06 12:17     ` Wichert Akkerman
2004-04-06 14:28   ` Xavier Bestel
2004-04-06 15:30     ` Kevin P. Fleming
2004-04-06 15:47       ` Xavier Bestel
2004-04-06 10:03 Geert Uytterhoeven
2004-04-06 10:10 ` Russell King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).