[ 031/117] CIFS: Fix a memory leak when a lease break comes

From: Greg Kroah-Hartman
Date: Tue Sep 24 2013 - 20:45:31 EST

3.11-stable review patch. If anyone has any objections, please let me know.


From: Pavel Shilovsky <pshilovsky@xxxxxxxxx>

commit 1a05096de82f3cd672c76389f63964952678506f upstream.

This happens when we receive a lease break from a server, then
find an appropriate lease key in opened files and schedule the
oplock_break slow work. lw pointer isn't freed in this case.

Signed-off-by: Pavel Shilovsky <pshilovsky@xxxxxxxxx>
Signed-off-by: Steve French <smfrench@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

fs/cifs/smb2misc.c | 1 +
1 file changed, 1 insertion(+)

--- a/fs/cifs/smb2misc.c
+++ b/fs/cifs/smb2misc.c
@@ -473,6 +473,7 @@ smb2_is_valid_lease_break(char *buffer,

queue_work(cifsiod_wq, &cfile->oplock_break);

+ kfree(lw);
return true;

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/