- security-keys-user-kmemdup.patch removed from -mm tree

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

 



The patch titled
     security/keys/*: user kmemdup()
has been removed from the -mm tree.  Its filename was
     security-keys-user-kmemdup.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: security/keys/*: user kmemdup()
From: Eric Sesterhenn <snakebyte@xxxxxx>

Signed-off-by: Eric Sesterhenn <snakebyte@xxxxxx>
Signed-off-by: Alexey Dobriyan <adobriyan@xxxxxxxxx>
Acked-By: David Howells <dhowells@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 security/keys/key.c     |    4 +---
 security/keys/keyring.c |    4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff -puN security/keys/key.c~security-keys-user-kmemdup security/keys/key.c
--- a/security/keys/key.c~security-keys-user-kmemdup
+++ a/security/keys/key.c
@@ -290,11 +290,9 @@ struct key *key_alloc(struct key_type *t
 		goto no_memory_2;
 
 	if (desc) {
-		key->description = kmalloc(desclen, GFP_KERNEL);
+		key->description = kmemdup(desc, desclen, GFP_KERNEL);
 		if (!key->description)
 			goto no_memory_3;
-
-		memcpy(key->description, desc, desclen);
 	}
 
 	atomic_set(&key->usage, 1);
diff -puN security/keys/keyring.c~security-keys-user-kmemdup security/keys/keyring.c
--- a/security/keys/keyring.c~security-keys-user-kmemdup
+++ a/security/keys/keyring.c
@@ -706,12 +706,10 @@ int __key_link(struct key *keyring, stru
 				BUG_ON(size > PAGE_SIZE);
 
 				ret = -ENOMEM;
-				nklist = kmalloc(size, GFP_KERNEL);
+				nklist = kmemdup(klist, size, GFP_KERNEL);
 				if (!nklist)
 					goto error2;
 
-				memcpy(nklist, klist, size);
-
 				/* replace matched key */
 				atomic_inc(&key->usage);
 				nklist->keys[loop] = key;
_

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

origin.patch
git-ieee1394.patch
remove-unnecessary-check-in-drivers-scsi-sgc.patch
drivers-video-use-kmemdup.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