]> git.baikalelectronics.ru Git - kernel.git/commit
net: make sockptr_is_null strict aliasing safe
authorChristoph Hellwig <hch@lst.de>
Tue, 28 Jul 2020 16:38:34 +0000 (18:38 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Jul 2020 20:43:40 +0000 (13:43 -0700)
commit35b649196b6874dab51c242b6561b8843f1ff4b9
treeb943278a8688f27ae44d0e6e18d6fcde385afaa9
parent512523f09828f9e3f924f2f722c8c077968516c6
net: make sockptr_is_null strict aliasing safe

While the kernel in general is not strict aliasing safe we can trivially
do that in sockptr_is_null without affecting code generation, so always
check the actually assigned union member.

Reported-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/sockptr.h