From: Jack Steiner Date: Wed, 17 Jun 2009 23:28:33 +0000 (-0700) Subject: gru: fix potential use-after-free when purging GRU tlbs X-Git-Tag: v2.6.31-rc1~150 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1926ee85a903d189c5702eed6531be321e33eb47;p=pandora-kernel.git gru: fix potential use-after-free when purging GRU tlbs Fix potential SGI GRU bug that could cause a use-after-free. If one thread in a task is flushing the GRU and another thread destroys the GRU context, there is the potential to access a table after it has been freed. Copy the gms pointer to a local variable before unlocking the gts table. Note that no refcnt is needed for the gms - the reference is held indirectly by the task's mm_struct. Signed-off-by: Jack Steiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed