Skip to content
Commit 6ab409b5 authored by Dave Kleikamp's avatar Dave Kleikamp Committed by Steve French
Browse files

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: default avatarDave Kleikamp <shaggy@linux.vnet.ibm.com>
Reviewed-by: default avatarJeff Layton <jlayton@redhat.com>
Tested-by: default avatarShirish Pargaonkar <shirishp@us.ibm.com>
Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
parent 1b49c556
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment