From: Nicholas Bellinger Date: Mon, 12 May 2014 19:18:32 +0000 (-0700) Subject: tcm_fc: Fix free-after-use regression in ft_free_cmd X-Git-Tag: omap-for-v3.16/fixes-against-rc1~172^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed8ec8f707ed4760c124d47b27c93df8ec5b1eba;p=pandora-kernel.git tcm_fc: Fix free-after-use regression in ft_free_cmd This patch fixes a free-after-use regression in ft_free_cmd(), where ft_sess_put() is called with cmd->sess after percpu_ida_free() has already released the tag. Fix this bug by saving the ft_sess pointer ahead of percpu_ida_free(), and pass it directly to ft_sess_put(). The regression was originally introduced in v3.13-rc1 commit: commit 5f544cfac956971099e906f94568bc3fd1a7108a Author: Nicholas Bellinger Date: Mon Sep 23 12:12:42 2013 -0700 tcm_fc: Convert to per-cpu command map pre-allocation of ft_cmd Reported-by: Jun Wu Cc: Mark Rustad Cc: Robert Love Cc: #3.13+ Signed-off-by: Nicholas Bellinger --- Reading git-diff-tree failed