From: Dave Kleikamp Date: Mon, 31 Aug 2009 15:07:12 +0000 (-0400) Subject: cifs: Replace wrtPending with a real reference count X-Git-Tag: v2.6.32-rc1~701^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ab409b53dcaf28f83d518a6702f904b7cee3f41;p=pandora-kernel.git cifs: Replace wrtPending with a real reference count Currently, cifs_close() tries to wait until all I/O is complete and then frees the file private data. If I/O does not completely in a reasonable amount of time it frees the structure anyway, leaving a potential use- after-free situation. This patch changes the wrtPending counter to a complete reference count and lets the last user free the structure. Signed-off-by: Dave Kleikamp Reviewed-by: Jeff Layton Tested-by: Shirish Pargaonkar Signed-off-by: Steve French --- Reading git-diff-tree failed