From: Christopher Oo Date: Thu, 25 Jun 2015 23:10:48 +0000 (-0700) Subject: cifs: Fix use-after-free on mid_q_entry X-Git-Tag: omap-for-v4.3/fixes-rc1~50^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5fb4e288a025af1abc5c67ecebf30fbf6b3edad1;p=pandora-kernel.git cifs: Fix use-after-free on mid_q_entry With CIFS_DEBUG_2 enabled, additional debug information is tracked inside each mid_q_entry struct, however cifs_save_when_sent may use the mid_q_entry after it has been freed from the appropriate callback if the transport layer has very low latency. Holding the srv_mutex fixes this use-after-free, as cifs_save_when_sent is called while the srv_mutex is held while the request is sent. Signed-off-by: Christopher Oo --- Reading git-diff-tree failed