From: Herbert Xu Date: Fri, 30 Jan 2009 22:12:06 +0000 (-0800) Subject: packet: Avoid lock_sock in mmap handler X-Git-Tag: v2.6.27.18~15 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce8b57d099ca4a831098f07e1308dbc23cb13b9f;p=pandora-kernel.git packet: Avoid lock_sock in mmap handler [ Upstream commit 905db44087855e3c1709f538ecdc22fd149cadd8 ] As the mmap handler gets called under mmap_sem, and we may grab mmap_sem elsewhere under the socket lock to access user data, we should avoid grabbing the socket lock in the mmap handler. Since the only thing we care about in the mmap handler is for pg_vec* to be invariant, i.e., to exclude packet_set_ring, we can achieve this by simply using a new mutex. Signed-off-by: Herbert Xu Tested-by: Martin MOKREJŠ Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed