diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/rxrpc/transport.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/rxrpc/transport.c b/net/rxrpc/transport.c index 465efc86fccf..94b2e2fe6fdb 100644 --- a/net/rxrpc/transport.c +++ b/net/rxrpc/transport.c | |||
@@ -381,11 +381,10 @@ static int rxrpc_incoming_msg(struct rxrpc_transport *trans, | |||
381 | 381 | ||
382 | /* allocate a new message record */ | 382 | /* allocate a new message record */ |
383 | ret = -ENOMEM; | 383 | ret = -ENOMEM; |
384 | msg = kmalloc(sizeof(struct rxrpc_message), GFP_KERNEL); | 384 | msg = kmemdup(jumbomsg, sizeof(struct rxrpc_message), GFP_KERNEL); |
385 | if (!msg) | 385 | if (!msg) |
386 | goto error; | 386 | goto error; |
387 | 387 | ||
388 | memcpy(msg, jumbomsg, sizeof(*msg)); | ||
389 | list_add_tail(&msg->link, msgq); | 388 | list_add_tail(&msg->link, msgq); |
390 | 389 | ||
391 | /* adjust the jumbo packet */ | 390 | /* adjust the jumbo packet */ |