rps: Handle double list_add at __napi_schedule
When enqueue_to_backlog() fails to check NAPI_STATE_SCHED state, an ipi will be triggered adding the backlog queue to the list while a packet added by RPS onto the core could add a new packet which would add the NAPI backlog struct to the backlog queue. Fix this race for double addition to list. Change-Id: Ib9d088113622eb1638aacfb0bfb43c8258b6c55e Acked-by: Sharat Masetty <smasetty@qti.qualcomm.com> Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
This commit is contained in:
parent
02d2dcb23f
commit
ee2f1bdbef
|
@ -3077,7 +3077,8 @@ static void rps_trigger_softirq(void *data)
|
|||
{
|
||||
struct softnet_data *sd = data;
|
||||
|
||||
____napi_schedule(sd, &sd->backlog);
|
||||
if (!test_bit(NAPI_STATE_SCHED, &sd->backlog.state))
|
||||
____napi_schedule(sd, &sd->backlog);
|
||||
sd->received_rps++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue