[wrecked] w1-fix-refcount-leak-in-netlink-connector.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Subject: [wrecked] w1-fix-refcount-leak-in-netlink-connector.patch removed from -mm tree
To: richard@xxxxxx,greg@xxxxxxxxx,zbr@xxxxxxxxxxx,mm-commits@xxxxxxxxxxxxxxx
From: akpm@xxxxxxxxxxxxxxxxxxxx
Date: Mon, 10 Mar 2014 13:55:24 -0700


The patch titled
     Subject: drivers/w1/w1_netlink.c: fix refcount leak in netlink connector
has been removed from the -mm tree.  Its filename was
     w1-fix-refcount-leak-in-netlink-connector.patch

This patch was dropped because other changes were merged, which wrecked this patch

------------------------------------------------------
From: Richard Weinberger <richard@xxxxxx>
Subject: drivers/w1/w1_netlink.c: fix refcount leak in netlink connector

If userspace sends a w1 message of length 0 we leak the refcount.

Signed-off-by: Richard Weinberger <richard@xxxxxx>
Cc: Evgeniy Polyakov <zbr@xxxxxxxxxxx>
Cc: Greg KH <greg@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/w1/w1_netlink.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff -puN drivers/w1/w1_netlink.c~w1-fix-refcount-leak-in-netlink-connector drivers/w1/w1_netlink.c
--- a/drivers/w1/w1_netlink.c~w1-fix-refcount-leak-in-netlink-connector
+++ a/drivers/w1/w1_netlink.c
@@ -355,7 +355,7 @@ static void w1_cn_callback(struct cn_msg
 
 		err = 0;
 		if (!mlen)
-			goto out_cont;
+			goto out_dec;
 
 		mutex_lock(&dev->mutex);
 
@@ -384,10 +384,11 @@ static void w1_cn_callback(struct cn_msg
 			mlen -= cmd->len + sizeof(struct w1_netlink_cmd);
 		}
 out_up:
+		mutex_unlock(&dev->mutex);
+out_dec:
 		atomic_dec(&dev->refcnt);
 		if (sl)
 			atomic_dec(&sl->refcnt);
-		mutex_unlock(&dev->mutex);
 out_cont:
 		if (!cmd || err)
 			w1_netlink_send_error(msg, m, cmd, err);
_

Patches currently in -mm which might be from richard@xxxxxx are

linux-next.patch
asm-systemh-um-arch_align_stack-moved-to-asm-exech.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux