]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
fix siglock
authorTony Luck <tony.luck@intel.com>
Thu, 9 Sep 2010 22:16:56 +0000 (15:16 -0700)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Thu, 6 Jan 2011 23:08:01 +0000 (18:08 -0500)
commiteb0f785b8ced780e22ad2cd742b3b420574e1d1d
tree6ab46f17352fa0240c24b8e3a79b51a69109ea1e
parent47ffb4116368cdb4c9225611725e5182dfcb4dcc
fix siglock

commit f574c843191728d9407b766a027f779dcd27b272 upstream.

When ia64 converted to using ticket locks, an inline implementation
of trylock/unlock in fsys.S was missed.  This was not noticed because
in most circumstances it simply resulted in using the slow path because
the siglock was apparently not available (under old spinlock rules).

Problems occur when the ticket spinlock has value 0x0 (when first
initialised, or when it wraps around). At this point the fsys.S
code acquires the lock (changing the 0x0 to 0x1. If another process
attempts to get the lock at this point, it will change the value from
0x1 to 0x2 (using new ticket lock rules). Then the fsys.S code will
free the lock using old spinlock rules by writing 0x0 to it. From
here a variety of bad things can happen.

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
arch/ia64/kernel/fsys.S