From 85f3536846adb8da882227b40ddbe0bc91f3ce71 Mon Sep 17 00:00:00 2001 From: Vadim Kochan Date: Sun, 17 Dec 2017 23:25:40 +0200 Subject: flowtop: Use RCU flow deletion from process entry Use cds_list_del_rcu for safer deletion flow from the process flow list to prevent possible use-after-free by UI thread when it is refreshing the processes. It may fix the #183 issue. Signed-off-by: Vadim Kochan Signed-off-by: Tobias Klauser --- flowtop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flowtop.c b/flowtop.c index 0a3c514..8b69d65 100644 --- a/flowtop.c +++ b/flowtop.c @@ -477,7 +477,7 @@ static int flow_list_del_entry(struct flow_list *fl, const struct nf_conntrack * n = flow_list_find_id(fl, nfct_get_attr_u32(ct, ATTR_ID)); if (n) { if (n->proc) { - cds_list_del(&n->proc_head); + cds_list_del_rcu(&n->proc_head); n->proc->flows_count--; } -- cgit v1.2.3-54-g00ecf orm'>
net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-07-23 11:22:37 +0900
committerLinus Torvalds <torvalds@linux-foundation.org>2016-07-23 11:22:37 +0900
commitff8d6facda455c129357e891e31dd0aa21a96ed0 (patch)
tree04890c770e0429cb08313fc6c99657436099889c
parent47ef4ad2684d380dd6d596140fb79395115c3950 (diff)
parent32f0c4afb4363e31dad49202f1554ba591d649f2 (diff)
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull NVMe fix from Jens Axboe: "Late addition here, it's basically a revert of a patch that was added in this merge window, but has proven to cause problems. This is swapping out the RCU based namespace protection with a good old mutex instead" * 'for-linus' of git://git.kernel.dk/linux-block: nvme: Remove RCU namespace protection