<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic network deadlock in Linux kernel 4.9 (IPSEC) in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/network-deadlock-in-Linux-kernel-4-9-IPSEC/m-p/1267308#M173118</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using Linux kernel 4.9 on the i.MX6 series.&lt;/P&gt;&lt;P&gt;If using ethernet MAC and IPSEC (for VPN), sometimes the system goes into deadlock.&lt;/P&gt;&lt;P&gt;The problem is in xfrm_input.c, in the&amp;nbsp;&amp;nbsp;&lt;SPAN class="p_context"&gt;xfrm_input() function.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="p_context"&gt;This function is called for each incomming network packet, and also for each decrypted packet.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="p_context"&gt;Both calls came from (different) soft irqs, and as the resources were protected with spin_lock(), there will be a deadlock if both calls came at the same time.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="p_context"&gt;The solution is to convert all spinlock functions in&amp;nbsp;&amp;nbsp;xfrm_input() to use spinlock_bh() funktions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="p_context"&gt;Look at this patch:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="p_context"&gt;&lt;A href="https://patchwork.ozlabs.org/project/netdev/patch/20090511184739.6e497f29@penta.localdomain/" target="_blank"&gt;https://patchwork.ozlabs.org/project/netdev/patch/20090511184739.6e497f29@penta.localdomain/&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="p_context"&gt;regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="p_context"&gt;Wolfgang&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 23 Apr 2021 14:19:12 GMT</pubDate>
    <dc:creator>wolfgang_muees</dc:creator>
    <dc:date>2021-04-23T14:19:12Z</dc:date>
    <item>
      <title>network deadlock in Linux kernel 4.9 (IPSEC)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/network-deadlock-in-Linux-kernel-4-9-IPSEC/m-p/1267308#M173118</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using Linux kernel 4.9 on the i.MX6 series.&lt;/P&gt;&lt;P&gt;If using ethernet MAC and IPSEC (for VPN), sometimes the system goes into deadlock.&lt;/P&gt;&lt;P&gt;The problem is in xfrm_input.c, in the&amp;nbsp;&amp;nbsp;&lt;SPAN class="p_context"&gt;xfrm_input() function.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="p_context"&gt;This function is called for each incomming network packet, and also for each decrypted packet.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="p_context"&gt;Both calls came from (different) soft irqs, and as the resources were protected with spin_lock(), there will be a deadlock if both calls came at the same time.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="p_context"&gt;The solution is to convert all spinlock functions in&amp;nbsp;&amp;nbsp;xfrm_input() to use spinlock_bh() funktions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="p_context"&gt;Look at this patch:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="p_context"&gt;&lt;A href="https://patchwork.ozlabs.org/project/netdev/patch/20090511184739.6e497f29@penta.localdomain/" target="_blank"&gt;https://patchwork.ozlabs.org/project/netdev/patch/20090511184739.6e497f29@penta.localdomain/&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="p_context"&gt;regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="p_context"&gt;Wolfgang&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 14:19:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/network-deadlock-in-Linux-kernel-4-9-IPSEC/m-p/1267308#M173118</guid>
      <dc:creator>wolfgang_muees</dc:creator>
      <dc:date>2021-04-23T14:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: network deadlock in Linux kernel 4.9 (IPSEC)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/network-deadlock-in-Linux-kernel-4-9-IPSEC/m-p/1270330#M173412</link>
      <description>&lt;P&gt;Hello wolfgang,&lt;/P&gt;
&lt;P&gt;You should try one of the latest BSP 5.4.47 or 5.9 since it has more stable network, and must include the ethernet bug patch.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 12:58:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/network-deadlock-in-Linux-kernel-4-9-IPSEC/m-p/1270330#M173412</guid>
      <dc:creator>Bio_TICFSL</dc:creator>
      <dc:date>2021-04-29T12:58:18Z</dc:date>
    </item>
  </channel>
</rss>

