[ 3.8.y.z extended stable ] Patch "CIFS: Fix a memory leak when a lease break comes" has been added to staging queue

Kamal Mostafa kamal at canonical.com
Fri Sep 20 00:36:28 UTC 2013


This is a note to let you know that I have just added a patch titled

    CIFS: Fix a memory leak when a lease break comes

to the linux-3.8.y-queue branch of the 3.8.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.8.y-queue

This patch is scheduled to be released in version 3.8.13.10.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.8.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

------

>From e2325d8d4d61d8be3bf0569e3f2fd37d8d37680e Mon Sep 17 00:00:00 2001
From: Pavel Shilovsky <pshilovsky at samba.org>
Date: Thu, 5 Sep 2013 15:04:04 +0400
Subject: CIFS: Fix a memory leak when a lease break comes

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 at samba.org>
Signed-off-by: Steve French <smfrench at gmail.com>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
 fs/cifs/smb2misc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/cifs/smb2misc.c b/fs/cifs/smb2misc.c
index 7b1c5e3..a27f337 100644
--- a/fs/cifs/smb2misc.c
+++ b/fs/cifs/smb2misc.c
@@ -469,6 +469,7 @@ smb2_is_valid_lease_break(char *buffer, struct TCP_Server_Info *server)

 				queue_work(cifsiod_wq, &cfile->oplock_break);

+				kfree(lw);
 				spin_unlock(&cifs_file_list_lock);
 				spin_unlock(&cifs_tcp_ses_lock);
 				return true;
--
1.8.1.2





More information about the kernel-team mailing list