From: Abhijith Das Date: Wed, 19 Dec 2012 15:48:01 +0000 (-0500) Subject: GFS2: Fix race in gfs2_rs_alloc X-Git-Tag: v3.8-rc3~27^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1213cacc7ffc7d4cdef3692f22b28a2df3216f5;p=pandora-kernel.git GFS2: Fix race in gfs2_rs_alloc QE aio tests uncovered a race condition in gfs2_rs_alloc where it's possible to come out of the function with a valid ip->i_res allocation but it gets freed before use resulting in a NULL ptr dereference. This patch envelopes the initial short-circuit check for non-NULL ip->i_res into the mutex lock. With this patch, I was able to successfully run the reproducer test multiple times. Resolves: rhbz#878476 Signed-off-by: Abhi Das Signed-off-by: Steven Whitehouse --- Reading git-diff-tree failed