projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
078be02
)
aoe: replace kmalloc and then memcpy with kmemdup
author
Mihnea Dobrescu-Balaur
<mihneadb@gmail.com>
Tue, 30 Apr 2013 22:28:29 +0000
(15:28 -0700)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Wed, 1 May 2013 00:04:08 +0000
(17:04 -0700)
Signed-off-by: Mihnea Dobrescu-Balaur <mihneadb@gmail.com>
Cc: Ed Cashin <ecashin@coraid.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/block/aoe/aoechr.c
patch
|
blob
|
history
diff --git
a/drivers/block/aoe/aoechr.c
b/drivers/block/aoe/aoechr.c
index
42e67ad
..
ab41be6
100644
(file)
--- a/
drivers/block/aoe/aoechr.c
+++ b/
drivers/block/aoe/aoechr.c
@@
-139,13
+139,12
@@
bail: spin_unlock_irqrestore(&emsgs_lock, flags);
return;
}
- mp = km
alloc(
n, GFP_ATOMIC);
+ mp = km
emdup(msg,
n, GFP_ATOMIC);
if (mp == NULL) {
printk(KERN_ERR "aoe: allocation failure, len=%ld\n", n);
goto bail;
}
- memcpy(mp, msg, n);
em->msg = mp;
em->flags |= EMFL_VALID;
em->len = n;