Linus Torvalds 10b1fbdb0a Make sure "user->sigpending" count is in sync
The previous commit (45c18b0bb579b5c1b89f8c99f1b6ffa4c586ba08, aka "Fix
unlikely (but possible) race condition on task->user access") fixed a
potential oops due to __sigqueue_alloc() getting its "user" pointer out
of sync with switch_user(), and accessing a user pointer that had been
de-allocated on another CPU.

It still left another (much less serious) problem, where a concurrent
__sigqueue_alloc and swich_user could cause sigqueue_alloc to do signal
pending reference counting for a _different_ user than the one it then
actually ended up using.  No oops, but we'd end up with the wrong signal
accounting.

Another case of Oleg's eagle-eyes picking up the problem.

This is trivially fixed by just making sure we load whichever "user"
structure we decide to use (it doesn't matter _which_ one we pick, we
just need to pick one) just once.

Acked-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Andrew Morton <akpm@osdl.org>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-04 13:03:00 -08:00
..
2006-11-03 12:27:58 -08:00
2006-10-06 08:53:39 -07:00
2006-10-04 08:31:21 -04:00
2006-09-29 09:18:12 -07:00
2006-10-10 15:37:23 -07:00
2006-10-03 08:03:41 -07:00
2006-10-28 11:30:54 -07:00
2006-11-03 12:27:58 -08:00
2006-09-29 09:18:15 -07:00
2006-10-02 07:57:23 -07:00
2006-09-30 01:47:55 +02:00
2006-11-03 12:27:58 -08:00
2006-09-29 09:18:12 -07:00
2006-10-20 10:26:38 -07:00
2006-10-01 00:39:27 -07:00