]> www.infradead.org Git - users/dwmw2/linux.git/commit
sock: add sock_kmemdup helper
authorGeliang Tang <tanggeliang@kylinos.cn>
Fri, 28 Feb 2025 10:01:31 +0000 (18:01 +0800)
committerJakub Kicinski <kuba@kernel.org>
Tue, 4 Mar 2025 01:16:34 +0000 (17:16 -0800)
commit456cc675b6d4cadd4872a477d8976ff56eef4b6f
tree7b10478e9ac52fba8cf90a52f27bd5b3746e469e
parentb84c5239979f961a51c85441d6642f6256688dd8
sock: add sock_kmemdup helper

This patch adds the sock version of kmemdup() helper, named sock_kmemdup(),
to duplicate the input "src" memory block using the socket's option memory
buffer.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Acked-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/f828077394c7d1f3560123497348b438c875b510.1740735165.git.tanggeliang@kylinos.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/sock.h
net/core/sock.c