Skip to content

Commit 50eab05

Browse files
Li RongQingdavem330
authored andcommitted
net: fix the use of this_cpu_ptr
flush_tasklet is not percpu var, and percpu is percpu var, and this_cpu_ptr(&info->cache->percpu->flush_tasklet) is not equal to &this_cpu_ptr(info->cache->percpu)->flush_tasklet 1f743b0(use this_cpu_ptr per-cpu helper) introduced this bug. Signed-off-by: Li RongQing <roy.qing.li@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 1bc7db1 commit 50eab05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/core/flow.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ static void flow_cache_flush_per_cpu(void *data)
328328
struct flow_flush_info *info = data;
329329
struct tasklet_struct *tasklet;
330330

331-
tasklet = this_cpu_ptr(&info->cache->percpu->flush_tasklet);
331+
tasklet = &this_cpu_ptr(info->cache->percpu)->flush_tasklet;
332332
tasklet->data = (unsigned long)info;
333333
tasklet_schedule(tasklet);
334334
}

0 commit comments

Comments
 (0)