diff options
author | Paul Moore <pmoore@redhat.com> | 2015-02-11 20:46:37 +0100 |
---|---|---|
committer | Paul Moore <pmoore@redhat.com> | 2015-02-11 20:46:37 +0100 |
commit | 04f81f0154e4bf002be6f4d85668ce1257efa4d9 (patch) | |
tree | 6572c58a65fe65aa738419e43e45e59c32538357 /drivers/iio/accel | |
parent | SELinux: fix error code in policydb_init() (diff) | |
download | linux-04f81f0154e4bf002be6f4d85668ce1257efa4d9.tar.xz linux-04f81f0154e4bf002be6f4d85668ce1257efa4d9.zip |
cipso: don't use IPCB() to locate the CIPSO IP option
Using the IPCB() macro to get the IPv4 options is convenient, but
unfortunately NetLabel often needs to examine the CIPSO option outside
of the scope of the IP layer in the stack. While historically IPCB()
worked above the IP layer, due to the inclusion of the inet_skb_param
struct at the head of the {tcp,udp}_skb_cb structs, recent commit
971f10ec ("tcp: better TCP_SKB_CB layout to reduce cache line misses")
reordered the tcp_skb_cb struct and invalidated this IPCB() trick.
This patch fixes the problem by creating a new function,
cipso_v4_optptr(), which locates the CIPSO option inside the IP header
without calling IPCB(). Unfortunately, this isn't as fast as a simple
lookup so some additional tweaks were made to limit the use of this
new function.
Cc: <stable@vger.kernel.org> # 3.18
Reported-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Paul Moore <pmoore@redhat.com>
Tested-by: Casey Schaufler <casey@schaufler-ca.com>
Diffstat (limited to 'drivers/iio/accel')
0 files changed, 0 insertions, 0 deletions