]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
ref_tracker: implement use-after-free detection
authorEric Dumazet <edumazet@google.com>
Fri, 4 Feb 2022 22:42:35 +0000 (14:42 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 5 Feb 2022 15:22:44 +0000 (15:22 +0000)
commite3ececfe668facd87d920b608349a32607060e66
tree99cee105c8bf97b641e5d1121e8a778c0c5149d3
parentcc3063502e0893c491ff83b61f43d402c144857d
ref_tracker: implement use-after-free detection

Whenever ref_tracker_dir_init() is called, mark the struct ref_tracker_dir
as dead.

Test the dead status from ref_tracker_alloc() and ref_tracker_free()

This should detect buggy dev_put()/dev_hold() happening too late
in netdevice dismantle process.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/ref_tracker.h
lib/ref_tracker.c