ipv4: ensure rcu_read_lock() in cipso_v4_error()
authorMatteo Croce <mcroce@redhat.com>
Fri, 21 Feb 2020 11:28:38 +0000 (12:28 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Mar 2020 08:07:58 +0000 (09:07 +0100)
commit0bde22da659c98a693e54d6ddaf88113953c00b5
tree218e91c9c08189a176ec4375d2993a779d5e25c9
parentff58bb340c430da021875283f8bf251630c61183
ipv4: ensure rcu_read_lock() in cipso_v4_error()

commit 3e72dfdf8227b052393f71d820ec7599909dddc2 upstream.

Similarly to commit c543cb4a5f07 ("ipv4: ensure rcu_read_lock() in
ipv4_link_failure()"), __ip_options_compile() must be called under rcu
protection.

Fixes: 3da1ed7ac398 ("net: avoid use IPCB in cipso_v4_error")
Suggested-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: Matteo Croce <mcroce@redhat.com>
Acked-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/cipso_ipv4.c