]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: invert flowlabel sharing check in process and user mode
authorWillem de Bruijn <willemb@google.com>
Thu, 25 Apr 2019 16:06:54 +0000 (12:06 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Apr 2019 22:22:56 +0000 (18:22 -0400)
commitedd1a4cd80be1dde8dd6cadcc64acf92e3dd2033
tree9fb129a84de34397caabc0694dc1c2e6f953c7fc
parent8bf0846718e7a8d876bcdf5e03d6f52ed150497c
ipv6: invert flowlabel sharing check in process and user mode

A request for a flowlabel fails in process or user exclusive mode must
fail if the caller pid or uid does not match. Invert the test.

Previously, the test was unsafe wrt PID recycling, but indeed tested
for inequality: fl1->owner != fl->owner

Fixes: 73d4e05dd73f2 ("net ip6 flowlabel: Make owner a union of struct pid* and kuid_t")
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_flowlabel.c