<div dir="ltr"><div><div><div><div><div>Hi All,<br></div>I am facing one issue with Linux kernel 4.0.4. <br><br><br><i>CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.0.4+ #19</i><br><br></div>This issue i am facing with below mentioned two scenario<br><br>First Scenario:<br><br>At the time when I start using PCIe based Atheros wifi card along with my Ethernet controller. If I am using both standalone then I am not facing this issue.<br></div><div>(I think this is not hardware related issue as with the same combination of h/w but on different linux kernel version (3.4), I am not facing this issue.)<br></div><div><br></div><div>Second Scenario:<br><br>This issue also repeated if I keep on executing below mentioned command:<br></div><div><br></div># hostapd -B /etc/hostapd.conf<br><br></div>My main focus is on first scenario.<br><br></div>I googled it this issue and found that few people also faced this issue previously on Linux kernel 3.1/3.2/3.3 . Some people are saying that disabling IPv6 support from kernel configuration will resolve this issue but I need IPv6 support in my kernel due to project specific task.<br><div><br></div><div>By digging out into Linux kernel and observing dump stack log(at the time CPU STALL), I found culprit function &#39;ieee80211_wake_queues_by_reason&#39;.<br></div><div>I go through the series of functions calling by this function, and stuck at one point. I found there are two  &#39;rcu_read_lock();&#39; in sequence.<br><br><br><br><b> So my question is can we call rcu_read_lock() function is sequence(two times) and later call   rcu_read_unlock() one by one;??</b><br><br></div><div>Please look into the pictorial representation of my question:<br></div><div><br></div><div>ieee80211_wake_queues_by_reason --<br>                                                        |----&gt; __ieee80211_wake_queue ---&gt;              if (skb_queue_empty(&amp;local-&gt;pending[queue])) {<br>                                                                                                                         rcu_read_lock();<br>                                                                                                                         ieee80211_propagate_queue_wake(local, queue);<br>                                                                                                                         rcu_read_unlock();<br>                                                                                                                         }<br><br><br>ieee80211_propagate_queue_wake(local, queue)<br>                                                                        | --&gt; netif_wake_subqueue(sdata-&gt;dev, ac)<br>                                                                                                                                       | --&gt;                rcu_read_lock();<br>                                                                                                                                                             q = rcu_dereference(txq-&gt;qdisc);<br>                                                                                                                                                             __netif_schedule(q);<br>                                                                                                                                                             rcu_read_unlock();<br><br><br><br>                                                                                                      <br><br></div><div>My Approach:<br></div><div>I increased RCU stall time from 21 jiffies to 60 jiffies.<br><br>--   CONFIG_RCU_CPU_STALL_TIMEOUT=21<br>++ CONFIG_RCU_CPU_STALL_TIMEOUT=60<br><br><br></div><div>But this does not solve my problem.<br><br><br><br></div><div>Please suggest me any approach to solve this problem.<br><br><br></div><div>Thanks,<br></div><div>Amit Gupta<br></div><div><br></div><div><br><br></div></div>