From: Roger Pau Monne Date: Wed, 31 Jul 2013 15:00:42 +0000 (+0200) Subject: xen-gnt: prevent adding duplicate gnt callbacks X-Git-Tag: v3.2.52~132 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6722e140e6f8054f6a136dc3e3a281d16756a46;p=pandora-kernel.git xen-gnt: prevent adding duplicate gnt callbacks commit 5f338d9001094a56cf87bd8a280b4e7ff953bb59 upstream. With the current implementation, the callback in the tail of the list can be added twice, because the check done in gnttab_request_free_callback is bogus, callback->next can be NULL if it is the last callback in the list. If we add the same callback twice we end up with an infinite loop, were callback == callback->next. Replace this check with a proper one that iterates over the list to see if the callback has already been added. Signed-off-by: Roger Pau Monné Cc: Konrad Rzeszutek Wilk Cc: David Vrabel Signed-off-by: Konrad Rzeszutek Wilk Acked-by: Matt Wilson Reviewed-by: David Vrabel Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed