summaryrefslogtreecommitdiffstats
path: root/kernel/kheaders.c
diff options
context:
space:
mode:
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>2020-05-26 12:56:15 -0600
committerDavid S. Miller <davem@davemloft.net>2020-05-26 16:06:06 -0700
commit90f33bffa382598a32cc82abfeb20adc92d041b6 (patch)
tree0dfe49406024d9c4bbc3ad76c5c2d8a6527bd65f /kernel/kheaders.c
parentac21753a5c2c9a6a2019997481a2ac12bbde48c8 (diff)
downloadlinux-stable-90f33bffa382598a32cc82abfeb20adc92d041b6.tar.gz
linux-stable-90f33bffa382598a32cc82abfeb20adc92d041b6.tar.bz2
linux-stable-90f33bffa382598a32cc82abfeb20adc92d041b6.zip
nexthops: don't modify published nexthop groups
We must avoid modifying published nexthop groups while they might be in use, otherwise we might see NULL ptr dereferences. In order to do that we allocate 2 nexthoup group structures upon nexthop creation and swap between them when we have to delete an entry. The reason is that we can't fail nexthop group removal, so we can't handle allocation failure thus we move the extra allocation on creation where we can safely fail and return ENOMEM. Fixes: 430a049190de ("nexthop: Add support for nexthop groups") Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel/kheaders.c')
0 files changed, 0 insertions, 0 deletions