From: Oleg Nesterov Date: Tue, 30 Apr 2013 22:28:17 +0000 (-0700) Subject: coredump: change wait_for_dump_helpers() to use wait_event_interruptible() X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~88^2~38 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc7ee2aac830e5423f41de87d50441f138f648da;p=pandora-kernel.git coredump: change wait_for_dump_helpers() to use wait_event_interruptible() wait_for_dump_helpers() calls wake_up/kill_fasync from inside the wait_event-like loop. This is not needed and in fact this is not strictly correct, we can/should do this only once after we change pipe->writers. We could even check if it becomes zero. Change this code to use use wait_event_interruptible(), this can also help to make this wait freezable. With this patch we check pipe->readers without pipe_lock(), this is fine. Once we see pipe->readers == 1 we know that the handler decremented the counter, this is all we need. Signed-off-by: Oleg Nesterov Acked-by: Mandeep Singh Baines Cc: Neil Horman Cc: "Rafael J. Wysocki" Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed