From: Pavel Emelyanov Date: Tue, 4 Dec 2007 08:45:06 +0000 (-0800) Subject: [IPVS]: Fix sched registration race when checking for name collision. X-Git-Tag: v2.6.24-rc5~64^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ac63ad6c52e9cdefbcb54ec4575ab12b78b49d9;p=pandora-kernel.git [IPVS]: Fix sched registration race when checking for name collision. The register_ip_vs_scheduler() checks for the scheduler with the same name under the read-locked __ip_vs_sched_lock, then drops, takes it for writing and puts the scheduler in list. This is racy, since we can have a race window between the lock being re-locked for writing. The fix is to search the scheduler with the given name right under the write-locked __ip_vs_sched_lock. Signed-off-by: Pavel Emelyanov Acked-by: Simon Horman Signed-off-by: David S. Miller --- Reading git-diff-tree failed