]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: Specify cmsgbuf is user pointer for receive zerocopy.
authorArjun Roy <arjunroy@google.com>
Thu, 6 May 2021 22:35:30 +0000 (15:35 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 7 May 2021 01:05:35 +0000 (18:05 -0700)
commit5025c70b06f495b95b4d0786f6f3c64950f3a50c
treeaec7b0174d722130592496eba7eace14321c633f
parent6e28fb8e290094e7691abce8acc473f09c01e983
tcp: Specify cmsgbuf is user pointer for receive zerocopy.

A prior change (4126eac58915) introduces separate handling for
->msg_control depending on whether the pointer is a kernel or user
pointer. However, while tcp receive zerocopy is using this field, it
is not properly annotating that the buffer in this case is a user
pointer. This can cause faults when the improper mechanism is used
within put_cmsg().

This patch simply annotates tcp receive zerocopy's use as explicitly
being a user pointer.

Fixes: 123d42faa54f ("tcp: Add receive timestamp support for receive zerocopy.")
Signed-off-by: Arjun Roy <arjunroy@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20210506223530.2266456-1-arjunroy.kdev@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/tcp.c