soc: qcom: Fix recursive spinlock in rmnet TX context
rtnl_lock() should not be called from TX context even if
rtnl_trylock() is used since TX path may operate in
softirq NET_TX context.
This patch fixes the recursive spinlock which could occur
with the following call stack. A new worker thread is
spawned if the grant is 0. The bearer is also passed
along to this work queue so that the exact queue operation
is performed depending on the instantaneous limits rather
than explicitly disabling the flow.
The workqueue is also converted to type high priority.
000|arch_counter_get_cntvct(inline)
-000|__delay(cycles = 19200)
-001|__const_udelay(?)
-002|msm_trigger_wdog_bite()
-003|spin_dump(inline)
-003|spin_bug(lock, msg)
-004|debug_spin_lock_before(inline)
-004|do_raw_spin_lock(lock)
-005|raw_spin_lock(?)
-006|__mutex_unlock_slowpath(?)
-007|mutex_unlock(lock)
-008|__rtnl_unlock()
-009|__read_once_size(inline)
-009|list_empty(inline)
-009|netdev_run_todo()
-010|rtnl_unlock()
-011|dfc_qmi_burst_check(dev, qos, skb)
-012|qmi_rmnet_burst_fc_check(dev, skb)
-013|rmnet_vnd_start_xmit(skb, dev)
-014|__netdev_start_xmit(inline)
-014|netdev_start_xmit(inline)
-014|xmit_one(inline)
-014|dev_hard_start_xmit(first, dev, txq)
-015|sch_direct_xmit(skb, q, dev, txq)
-016|__qdisc_run(q)
-017|__dev_xmit_skb(inline)
-017|__dev_queue_xmit(skb, ?)
-018|dev_queue_xmit(?)
-019|neigh_direct_output(?, ?)
-020|neigh_output(inline)
-020|ip6_finish_output2(net, ?, skb)
-021|ip6_finish_output(net, sk, skb)
-022|NF_HOOK_COND(inline)
-022|ip6_output(net, sk, skb)
-023|dst_output(inline)
-023|NF_HOOK(inline)
-023|mld_sendpack(skb)
-024|mld_ifc_timer_expire(data)
-025|__read_once_size(inline)
-025|static_key_count(inline)
-025|static_key_false(inline)
-025|trace_timer_expire_exit(inline)
-025|call_timer_fn()
-026|expire_timers(inline)
-026|__run_timers(inline)
-026|run_timer_softirq(?)
-027|__read_once_size(inline)
-027|static_key_count(inline)
-027|static_key_false(inline)
-027|trace_softirq_exit(inline)
-027|__softirqentry_text_start()
-028|do_softirq_own_stack(inline)
-028|invoke_softirq(inline)
-028|irq_exit()
-029|set_irq_regs(inline)
-029|__handle_domain_irq(domain, ?, lookup, regs)
-030|gic_handle_irq()
-031|el1_irq(asm)
-->|exception
-032|__mutex_unlock_slowpath(?)
-033|mutex_unlock(lock)
-034|__rtnl_unlock()
-035|__read_once_size(inline)
-035|list_empty(inline)
-035|netdev_run_todo()
-036|rtnl_unlock(inline)
-036|rtnetlink_rcv_msg(sk, ?, extack)
-037|netlink_rcv_skb(skb, cb)
-038|rtnetlink_rcv(?)
-039|netlink_unicast_kernel(inline)
-039|netlink_unicast(ssk, skb, portid, ?)
-040|netlink_sendmsg(?, msg, ?)
-041|sock_sendmsg_nosec(inline)
-041|sock_sendmsg(sock, msg)
-042|SYSC_sendto(inline)
-042|sys_sendto(?, buff, ?, flags, ?, ?)
-043|el0_svc_naked(asm)
-->|exception
-044|NUX:0x759BCC4AAC(asm)
---|end of frame
CRs-Fixed: 2292152
Change-Id: I340aa3989e085338cb768785f1f632c0a9ea11e0
Signed-off-by:
Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Loading
Please register or sign in to comment