CIPSO: Fix unaligned memory access in cipso_v4_gentag_hdr
authorSergey Nazarov <s-nazarov@yandex.ru>
Fri, 5 Mar 2021 08:05:54 +0000 (11:05 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 5 Mar 2021 21:00:38 +0000 (13:00 -0800)
commite233febda6ebab750e30662a7cc9b9efad127685
tree41e2255035768e8841c14c0dae428409e643f994
parent8eb37ab7cc045ec6305a6a1a9c32374695a1a977
CIPSO: Fix unaligned memory access in cipso_v4_gentag_hdr

We need to use put_unaligned when writing 32-bit DOI value
in cipso_v4_gentag_hdr to avoid unaligned memory access.

v2: unneeded type cast removed as Ondrej Mosnacek suggested.

Signed-off-by: Sergey Nazarov <s-nazarov@yandex.ru>
Acked-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/cipso_ipv4.c