From: Michal Januszewski Date: Mon, 2 Apr 2007 06:49:51 +0000 (-0700) Subject: [PATCH] vt: fix potential race in VT_WAITACTIVE handler X-Git-Tag: v2.6.21-rc6~25 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f991519c197534811046e5e47389b6fafcdf1e48;p=pandora-kernel.git [PATCH] vt: fix potential race in VT_WAITACTIVE handler On a multiprocessor machine the VT_WAITACTIVE ioctl call may return 0 if fg_console has already been updated in redraw_screen() but the console switch itself hasn't been completed. Fix this by checking fg_console in vt_waitactive() with the console sem held. Signed-off-by: Michal Januszewski Acked-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed