[PATCH] kmemdup: some users

Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Alexey Dobriyan 2006-09-30 23:27:21 -07:00 • committed by Linus Torvalds
commit 52978be636
7 changed files with 13 additions and 22 deletions

View file

@ -381,11 +381,10 @@ static int rxrpc_incoming_msg(struct rxrpc_transport *trans,
/* allocate a new message record */
ret = -ENOMEM;
msg = kmalloc(sizeof(struct rxrpc_message), GFP_KERNEL);
msg = kmemdup(jumbomsg, sizeof(struct rxrpc_message), GFP_KERNEL);
if (!msg)
goto error;
memcpy(msg, jumbomsg, sizeof(*msg));
list_add_tail(&msg->link, msgq);
/* adjust the jumbo packet */