diff options
author | Subash Abhinov Kasiviswanathan <subashab@codeaurora.org> | 2019-09-30 14:56:48 -0700 |
---|---|---|
committer | Subash Abhinov Kasiviswanathan <subashab@codeaurora.org> | 2019-10-01 11:17:52 -0700 |
commit | 4d10bfccf039244bcc3a02c7fafacad498b4c6d3 (patch) | |
tree | 21356148584818ca99d6fe10bb3073082008e616 | |
parent | 7d824227d4cb1c0cc433c8d78bfe5d07a33e9bc6 (diff) | |
download | data-kernel-4d10bfccf039244bcc3a02c7fafacad498b4c6d3.tar.gz |
drivers: rmnet_shs: Remove netdev dereference
Previously there was a dereference of RPS CPU
when updating flows in rmnet_shs_wq. After changing
logic to handle change of RPS mask net_rx is responsible
for catching changes in a flow's CPU. This leaves this
dereference unessesary.
This change removes that dereference and relies on the
trustworthy saved CPU of the flow.
<6> Unable to handle kernel NULL pointer dereference at virtual address 00000000
<6> Mem abort info:
<6> Exception class = DABT (current EL), IL = 32 bits
<6> SET = 0, FnV = 0
<6> EA = 0, S1PTW = 0
<6> FSC = 6
<6> Data abort info:
<6> ISV = 0, ISS = 0x00000006
<6> CM = 0, WnR = 0
<6> user pgtable: 4k pages, 39-bit VAs, pgd = 0000000019917200
<6> [0000000000000000] *pgd=0000000000000000, *pud=0000000000000000
<6> Internal error: Oops: 96000006 [#1] PREEMPT SMP
<2> pc : rmnet_shs_wq_update_cpu_rx_tbl+0x44/0x224 [rmnet_shs]
<2> lr : rmnet_shs_wq_update_cpu_rx_tbl+0x3c/0x224 [rmnet_shs]
<2> Call trace:
<2> rmnet_shs_wq_update_cpu_rx_tbl+0x44/0x224 [rmnet_shs]
<2> rmnet_shs_wq_process_wq+0x184/0x83c [rmnet_shs]
<2> process_one_work+0x1e0/0x410
<2> worker_thread+0x27c/0x38c
<2> kthread+0x12c/0x13c
<2> ret_from_fork+0x10/0x18
<6> Code: f9401274 94000ed6 f9400a88 f9419508 (f9400108)
Change-Id: Id50a7da2cccccacf4694a1bb43d62ec28e2b4462
Acked-by: Raul Martinez <mraul@qti.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org
-rw-r--r-- | drivers/rmnet/shs/rmnet_shs_wq.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/rmnet/shs/rmnet_shs_wq.c b/drivers/rmnet/shs/rmnet_shs_wq.c index 19a78c9..6c61dfa 100644 --- a/drivers/rmnet/shs/rmnet_shs_wq.c +++ b/drivers/rmnet/shs/rmnet_shs_wq.c @@ -669,32 +669,24 @@ static void rmnet_shs_wq_refresh_all_cpu_stats(void) void rmnet_shs_wq_update_cpu_rx_tbl(struct rmnet_shs_wq_hstat_s *hstat_p) { - struct rps_map *map; + struct rmnet_shs_wq_rx_flow_s *tbl_p = &rmnet_shs_rx_flow_tbl; struct rmnet_shs_skbn_s *node_p; - int cpu_num; - u16 map_idx; u64 skb_diff, byte_diff; - struct rmnet_shs_wq_rx_flow_s *tbl_p = &rmnet_shs_rx_flow_tbl; + u16 cpu_num; node_p = hstat_p->node; if (hstat_p->inactive_duration > 0) return; - rcu_read_lock(); - map = rcu_dereference(node_p->dev->_rx->rps_map); + cpu_num = node_p->map_cpu; - if (!map || node_p->map_index > map->len || !map->len) { - rcu_read_unlock(); + if (cpu_num >= MAX_CPUS) { + rmnet_shs_crit_err[RMNET_SHS_INVALID_CPU_ERR]++; return; } - - map_idx = node_p->map_index; - cpu_num = map->cpus[map_idx]; - skb_diff = hstat_p->rx_skb - hstat_p->last_rx_skb; byte_diff = hstat_p->rx_bytes - hstat_p->last_rx_bytes; - rcu_read_unlock(); if (hstat_p->is_new_flow) { rmnet_shs_wq_cpu_list_add(hstat_p, |