From: Christoph Hellwig Date: Mon, 17 Oct 2011 17:56:45 +0000 (-0400) Subject: target: fix list walking in transport_free_dev_tasks X-Git-Tag: v3.2-rc1~24^2~36 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c2cfe5fe78e682d6235a1d32a363460b1c77528;p=pandora-kernel.git target: fix list walking in transport_free_dev_tasks list_for_each_entry_safe only protects against deletions from the list, but not against any concurrent modifications. Given that we drop t_state_lock inside the loop it is not safe in transport_free_dev_tasks. Instead of use a local dispose_list that we move all tasks that are to be deleted to. This is safe because we never do list_emptry checks on t_list to check if a command is on the list anywhere. Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- Reading git-diff-tree failed