<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/net/openvswitch, branch v3.14.3</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>openvswitch: fix a possible deadlock and lockdep warning</title>
<updated>2014-03-28T20:41:53+00:00</updated>
<author>
<name>Flavio Leitner</name>
<email>fbl@redhat.com</email>
</author>
<published>2014-03-27T14:05:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4f647e0a3c37b8d5086214128614a136064110c3'/>
<id>4f647e0a3c37b8d5086214128614a136064110c3</id>
<content type='text'>
There are two problematic situations.

A deadlock can happen when is_percpu is false because it can get
interrupted while holding the spinlock. Then it executes
ovs_flow_stats_update() in softirq context which tries to get
the same lock.

The second sitation is that when is_percpu is true, the code
correctly disables BH but only for the local CPU, so the
following can happen when locking the remote CPU without
disabling BH:

       CPU#0                            CPU#1
  ovs_flow_stats_get()
   stats_read()
 +-&gt;spin_lock remote CPU#1        ovs_flow_stats_get()
 |  &lt;interrupted&gt;                  stats_read()
 |  ...                       +--&gt;  spin_lock remote CPU#0
 |                            |     &lt;interrupted&gt;
 |  ovs_flow_stats_update()   |     ...
 |   spin_lock local CPU#0 &lt;--+     ovs_flow_stats_update()
 +---------------------------------- spin_lock local CPU#1

This patch disables BH for both cases fixing the deadlocks.
Acked-by: Jesse Gross &lt;jesse@nicira.com&gt;

=================================
[ INFO: inconsistent lock state ]
3.14.0-rc8-00007-g632b06a #1 Tainted: G          I
---------------------------------
inconsistent {SOFTIRQ-ON-W} -&gt; {IN-SOFTIRQ-W} usage.
swapper/0/0 [HC0[0]:SC1[5]:HE1:SE0] takes:
(&amp;(&amp;cpu_stats-&gt;lock)-&gt;rlock){+.?...}, at: [&lt;ffffffffa05dd8a1&gt;] ovs_flow_stats_update+0x51/0xd0 [openvswitch]
{SOFTIRQ-ON-W} state was registered at:
[&lt;ffffffff810f973f&gt;] __lock_acquire+0x68f/0x1c40
[&lt;ffffffff810fb4e2&gt;] lock_acquire+0xa2/0x1d0
[&lt;ffffffff817d8d9e&gt;] _raw_spin_lock+0x3e/0x80
[&lt;ffffffffa05dd9e4&gt;] ovs_flow_stats_get+0xc4/0x1e0 [openvswitch]
[&lt;ffffffffa05da855&gt;] ovs_flow_cmd_fill_info+0x185/0x360 [openvswitch]
[&lt;ffffffffa05daf05&gt;] ovs_flow_cmd_build_info.constprop.27+0x55/0x90 [openvswitch]
[&lt;ffffffffa05db41d&gt;] ovs_flow_cmd_new_or_set+0x4dd/0x570 [openvswitch]
[&lt;ffffffff816c245d&gt;] genl_family_rcv_msg+0x1cd/0x3f0
[&lt;ffffffff816c270e&gt;] genl_rcv_msg+0x8e/0xd0
[&lt;ffffffff816c0239&gt;] netlink_rcv_skb+0xa9/0xc0
[&lt;ffffffff816c0798&gt;] genl_rcv+0x28/0x40
[&lt;ffffffff816bf830&gt;] netlink_unicast+0x100/0x1e0
[&lt;ffffffff816bfc57&gt;] netlink_sendmsg+0x347/0x770
[&lt;ffffffff81668e9c&gt;] sock_sendmsg+0x9c/0xe0
[&lt;ffffffff816692d9&gt;] ___sys_sendmsg+0x3a9/0x3c0
[&lt;ffffffff8166a911&gt;] __sys_sendmsg+0x51/0x90
[&lt;ffffffff8166a962&gt;] SyS_sendmsg+0x12/0x20
[&lt;ffffffff817e3ce9&gt;] system_call_fastpath+0x16/0x1b
irq event stamp: 1740726
hardirqs last  enabled at (1740726): [&lt;ffffffff8175d5e0&gt;] ip6_finish_output2+0x4f0/0x840
hardirqs last disabled at (1740725): [&lt;ffffffff8175d59b&gt;] ip6_finish_output2+0x4ab/0x840
softirqs last  enabled at (1740674): [&lt;ffffffff8109be12&gt;] _local_bh_enable+0x22/0x50
softirqs last disabled at (1740675): [&lt;ffffffff8109db05&gt;] irq_exit+0xc5/0xd0

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&amp;(&amp;cpu_stats-&gt;lock)-&gt;rlock);
  &lt;Interrupt&gt;
    lock(&amp;(&amp;cpu_stats-&gt;lock)-&gt;rlock);

 *** DEADLOCK ***

5 locks held by swapper/0/0:
 #0:  (((&amp;ifa-&gt;dad_timer))){+.-...}, at: [&lt;ffffffff810a7155&gt;] call_timer_fn+0x5/0x320
 #1:  (rcu_read_lock){.+.+..}, at: [&lt;ffffffff81788a55&gt;] mld_sendpack+0x5/0x4a0
 #2:  (rcu_read_lock_bh){.+....}, at: [&lt;ffffffff8175d149&gt;] ip6_finish_output2+0x59/0x840
 #3:  (rcu_read_lock_bh){.+....}, at: [&lt;ffffffff8168ba75&gt;] __dev_queue_xmit+0x5/0x9b0
 #4:  (rcu_read_lock){.+.+..}, at: [&lt;ffffffffa05e41b5&gt;] internal_dev_xmit+0x5/0x110 [openvswitch]

stack backtrace:
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G          I  3.14.0-rc8-00007-g632b06a #1
Hardware name:                  /DX58SO, BIOS SOX5810J.86A.5599.2012.0529.2218 05/29/2012
 0000000000000000 0fcf20709903df0c ffff88042d603808 ffffffff817cfe3c
 ffffffff81c134c0 ffff88042d603858 ffffffff817cb6da 0000000000000005
 ffffffff00000001 ffff880400000000 0000000000000006 ffffffff81c134c0
Call Trace:
 &lt;IRQ&gt;  [&lt;ffffffff817cfe3c&gt;] dump_stack+0x4d/0x66
 [&lt;ffffffff817cb6da&gt;] print_usage_bug+0x1f4/0x205
 [&lt;ffffffff810f7f10&gt;] ? check_usage_backwards+0x180/0x180
 [&lt;ffffffff810f8963&gt;] mark_lock+0x223/0x2b0
 [&lt;ffffffff810f96d3&gt;] __lock_acquire+0x623/0x1c40
 [&lt;ffffffff810f5707&gt;] ? __lock_is_held+0x57/0x80
 [&lt;ffffffffa05e26c6&gt;] ? masked_flow_lookup+0x236/0x250 [openvswitch]
 [&lt;ffffffff810fb4e2&gt;] lock_acquire+0xa2/0x1d0
 [&lt;ffffffffa05dd8a1&gt;] ? ovs_flow_stats_update+0x51/0xd0 [openvswitch]
 [&lt;ffffffff817d8d9e&gt;] _raw_spin_lock+0x3e/0x80
 [&lt;ffffffffa05dd8a1&gt;] ? ovs_flow_stats_update+0x51/0xd0 [openvswitch]
 [&lt;ffffffffa05dd8a1&gt;] ovs_flow_stats_update+0x51/0xd0 [openvswitch]
 [&lt;ffffffffa05dcc64&gt;] ovs_dp_process_received_packet+0x84/0x120 [openvswitch]
 [&lt;ffffffff810f93f7&gt;] ? __lock_acquire+0x347/0x1c40
 [&lt;ffffffffa05e3bea&gt;] ovs_vport_receive+0x2a/0x30 [openvswitch]
 [&lt;ffffffffa05e4218&gt;] internal_dev_xmit+0x68/0x110 [openvswitch]
 [&lt;ffffffffa05e41b5&gt;] ? internal_dev_xmit+0x5/0x110 [openvswitch]
 [&lt;ffffffff8168b4a6&gt;] dev_hard_start_xmit+0x2e6/0x8b0
 [&lt;ffffffff8168be87&gt;] __dev_queue_xmit+0x417/0x9b0
 [&lt;ffffffff8168ba75&gt;] ? __dev_queue_xmit+0x5/0x9b0
 [&lt;ffffffff8175d5e0&gt;] ? ip6_finish_output2+0x4f0/0x840
 [&lt;ffffffff8168c430&gt;] dev_queue_xmit+0x10/0x20
 [&lt;ffffffff8175d641&gt;] ip6_finish_output2+0x551/0x840
 [&lt;ffffffff8176128a&gt;] ? ip6_finish_output+0x9a/0x220
 [&lt;ffffffff8176128a&gt;] ip6_finish_output+0x9a/0x220
 [&lt;ffffffff8176145f&gt;] ip6_output+0x4f/0x1f0
 [&lt;ffffffff81788c29&gt;] mld_sendpack+0x1d9/0x4a0
 [&lt;ffffffff817895b8&gt;] mld_send_initial_cr.part.32+0x88/0xa0
 [&lt;ffffffff817691b0&gt;] ? addrconf_dad_completed+0x220/0x220
 [&lt;ffffffff8178e301&gt;] ipv6_mc_dad_complete+0x31/0x50
 [&lt;ffffffff817690d7&gt;] addrconf_dad_completed+0x147/0x220
 [&lt;ffffffff817691b0&gt;] ? addrconf_dad_completed+0x220/0x220
 [&lt;ffffffff8176934f&gt;] addrconf_dad_timer+0x19f/0x1c0
 [&lt;ffffffff810a71e9&gt;] call_timer_fn+0x99/0x320
 [&lt;ffffffff810a7155&gt;] ? call_timer_fn+0x5/0x320
 [&lt;ffffffff817691b0&gt;] ? addrconf_dad_completed+0x220/0x220
 [&lt;ffffffff810a76c4&gt;] run_timer_softirq+0x254/0x3b0
 [&lt;ffffffff8109d47d&gt;] __do_softirq+0x12d/0x480

Signed-off-by: Flavio Leitner &lt;fbl@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are two problematic situations.

A deadlock can happen when is_percpu is false because it can get
interrupted while holding the spinlock. Then it executes
ovs_flow_stats_update() in softirq context which tries to get
the same lock.

The second sitation is that when is_percpu is true, the code
correctly disables BH but only for the local CPU, so the
following can happen when locking the remote CPU without
disabling BH:

       CPU#0                            CPU#1
  ovs_flow_stats_get()
   stats_read()
 +-&gt;spin_lock remote CPU#1        ovs_flow_stats_get()
 |  &lt;interrupted&gt;                  stats_read()
 |  ...                       +--&gt;  spin_lock remote CPU#0
 |                            |     &lt;interrupted&gt;
 |  ovs_flow_stats_update()   |     ...
 |   spin_lock local CPU#0 &lt;--+     ovs_flow_stats_update()
 +---------------------------------- spin_lock local CPU#1

This patch disables BH for both cases fixing the deadlocks.
Acked-by: Jesse Gross &lt;jesse@nicira.com&gt;

=================================
[ INFO: inconsistent lock state ]
3.14.0-rc8-00007-g632b06a #1 Tainted: G          I
---------------------------------
inconsistent {SOFTIRQ-ON-W} -&gt; {IN-SOFTIRQ-W} usage.
swapper/0/0 [HC0[0]:SC1[5]:HE1:SE0] takes:
(&amp;(&amp;cpu_stats-&gt;lock)-&gt;rlock){+.?...}, at: [&lt;ffffffffa05dd8a1&gt;] ovs_flow_stats_update+0x51/0xd0 [openvswitch]
{SOFTIRQ-ON-W} state was registered at:
[&lt;ffffffff810f973f&gt;] __lock_acquire+0x68f/0x1c40
[&lt;ffffffff810fb4e2&gt;] lock_acquire+0xa2/0x1d0
[&lt;ffffffff817d8d9e&gt;] _raw_spin_lock+0x3e/0x80
[&lt;ffffffffa05dd9e4&gt;] ovs_flow_stats_get+0xc4/0x1e0 [openvswitch]
[&lt;ffffffffa05da855&gt;] ovs_flow_cmd_fill_info+0x185/0x360 [openvswitch]
[&lt;ffffffffa05daf05&gt;] ovs_flow_cmd_build_info.constprop.27+0x55/0x90 [openvswitch]
[&lt;ffffffffa05db41d&gt;] ovs_flow_cmd_new_or_set+0x4dd/0x570 [openvswitch]
[&lt;ffffffff816c245d&gt;] genl_family_rcv_msg+0x1cd/0x3f0
[&lt;ffffffff816c270e&gt;] genl_rcv_msg+0x8e/0xd0
[&lt;ffffffff816c0239&gt;] netlink_rcv_skb+0xa9/0xc0
[&lt;ffffffff816c0798&gt;] genl_rcv+0x28/0x40
[&lt;ffffffff816bf830&gt;] netlink_unicast+0x100/0x1e0
[&lt;ffffffff816bfc57&gt;] netlink_sendmsg+0x347/0x770
[&lt;ffffffff81668e9c&gt;] sock_sendmsg+0x9c/0xe0
[&lt;ffffffff816692d9&gt;] ___sys_sendmsg+0x3a9/0x3c0
[&lt;ffffffff8166a911&gt;] __sys_sendmsg+0x51/0x90
[&lt;ffffffff8166a962&gt;] SyS_sendmsg+0x12/0x20
[&lt;ffffffff817e3ce9&gt;] system_call_fastpath+0x16/0x1b
irq event stamp: 1740726
hardirqs last  enabled at (1740726): [&lt;ffffffff8175d5e0&gt;] ip6_finish_output2+0x4f0/0x840
hardirqs last disabled at (1740725): [&lt;ffffffff8175d59b&gt;] ip6_finish_output2+0x4ab/0x840
softirqs last  enabled at (1740674): [&lt;ffffffff8109be12&gt;] _local_bh_enable+0x22/0x50
softirqs last disabled at (1740675): [&lt;ffffffff8109db05&gt;] irq_exit+0xc5/0xd0

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&amp;(&amp;cpu_stats-&gt;lock)-&gt;rlock);
  &lt;Interrupt&gt;
    lock(&amp;(&amp;cpu_stats-&gt;lock)-&gt;rlock);

 *** DEADLOCK ***

5 locks held by swapper/0/0:
 #0:  (((&amp;ifa-&gt;dad_timer))){+.-...}, at: [&lt;ffffffff810a7155&gt;] call_timer_fn+0x5/0x320
 #1:  (rcu_read_lock){.+.+..}, at: [&lt;ffffffff81788a55&gt;] mld_sendpack+0x5/0x4a0
 #2:  (rcu_read_lock_bh){.+....}, at: [&lt;ffffffff8175d149&gt;] ip6_finish_output2+0x59/0x840
 #3:  (rcu_read_lock_bh){.+....}, at: [&lt;ffffffff8168ba75&gt;] __dev_queue_xmit+0x5/0x9b0
 #4:  (rcu_read_lock){.+.+..}, at: [&lt;ffffffffa05e41b5&gt;] internal_dev_xmit+0x5/0x110 [openvswitch]

stack backtrace:
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G          I  3.14.0-rc8-00007-g632b06a #1
Hardware name:                  /DX58SO, BIOS SOX5810J.86A.5599.2012.0529.2218 05/29/2012
 0000000000000000 0fcf20709903df0c ffff88042d603808 ffffffff817cfe3c
 ffffffff81c134c0 ffff88042d603858 ffffffff817cb6da 0000000000000005
 ffffffff00000001 ffff880400000000 0000000000000006 ffffffff81c134c0
Call Trace:
 &lt;IRQ&gt;  [&lt;ffffffff817cfe3c&gt;] dump_stack+0x4d/0x66
 [&lt;ffffffff817cb6da&gt;] print_usage_bug+0x1f4/0x205
 [&lt;ffffffff810f7f10&gt;] ? check_usage_backwards+0x180/0x180
 [&lt;ffffffff810f8963&gt;] mark_lock+0x223/0x2b0
 [&lt;ffffffff810f96d3&gt;] __lock_acquire+0x623/0x1c40
 [&lt;ffffffff810f5707&gt;] ? __lock_is_held+0x57/0x80
 [&lt;ffffffffa05e26c6&gt;] ? masked_flow_lookup+0x236/0x250 [openvswitch]
 [&lt;ffffffff810fb4e2&gt;] lock_acquire+0xa2/0x1d0
 [&lt;ffffffffa05dd8a1&gt;] ? ovs_flow_stats_update+0x51/0xd0 [openvswitch]
 [&lt;ffffffff817d8d9e&gt;] _raw_spin_lock+0x3e/0x80
 [&lt;ffffffffa05dd8a1&gt;] ? ovs_flow_stats_update+0x51/0xd0 [openvswitch]
 [&lt;ffffffffa05dd8a1&gt;] ovs_flow_stats_update+0x51/0xd0 [openvswitch]
 [&lt;ffffffffa05dcc64&gt;] ovs_dp_process_received_packet+0x84/0x120 [openvswitch]
 [&lt;ffffffff810f93f7&gt;] ? __lock_acquire+0x347/0x1c40
 [&lt;ffffffffa05e3bea&gt;] ovs_vport_receive+0x2a/0x30 [openvswitch]
 [&lt;ffffffffa05e4218&gt;] internal_dev_xmit+0x68/0x110 [openvswitch]
 [&lt;ffffffffa05e41b5&gt;] ? internal_dev_xmit+0x5/0x110 [openvswitch]
 [&lt;ffffffff8168b4a6&gt;] dev_hard_start_xmit+0x2e6/0x8b0
 [&lt;ffffffff8168be87&gt;] __dev_queue_xmit+0x417/0x9b0
 [&lt;ffffffff8168ba75&gt;] ? __dev_queue_xmit+0x5/0x9b0
 [&lt;ffffffff8175d5e0&gt;] ? ip6_finish_output2+0x4f0/0x840
 [&lt;ffffffff8168c430&gt;] dev_queue_xmit+0x10/0x20
 [&lt;ffffffff8175d641&gt;] ip6_finish_output2+0x551/0x840
 [&lt;ffffffff8176128a&gt;] ? ip6_finish_output+0x9a/0x220
 [&lt;ffffffff8176128a&gt;] ip6_finish_output+0x9a/0x220
 [&lt;ffffffff8176145f&gt;] ip6_output+0x4f/0x1f0
 [&lt;ffffffff81788c29&gt;] mld_sendpack+0x1d9/0x4a0
 [&lt;ffffffff817895b8&gt;] mld_send_initial_cr.part.32+0x88/0xa0
 [&lt;ffffffff817691b0&gt;] ? addrconf_dad_completed+0x220/0x220
 [&lt;ffffffff8178e301&gt;] ipv6_mc_dad_complete+0x31/0x50
 [&lt;ffffffff817690d7&gt;] addrconf_dad_completed+0x147/0x220
 [&lt;ffffffff817691b0&gt;] ? addrconf_dad_completed+0x220/0x220
 [&lt;ffffffff8176934f&gt;] addrconf_dad_timer+0x19f/0x1c0
 [&lt;ffffffff810a71e9&gt;] call_timer_fn+0x99/0x320
 [&lt;ffffffff810a7155&gt;] ? call_timer_fn+0x5/0x320
 [&lt;ffffffff817691b0&gt;] ? addrconf_dad_completed+0x220/0x220
 [&lt;ffffffff810a76c4&gt;] run_timer_softirq+0x254/0x3b0
 [&lt;ffffffff8109d47d&gt;] __do_softirq+0x12d/0x480

Signed-off-by: Flavio Leitner &lt;fbl@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors</title>
<updated>2014-03-27T19:29:38+00:00</updated>
<author>
<name>Zoltan Kiss</name>
<email>zoltan.kiss@citrix.com</email>
</author>
<published>2014-03-26T22:37:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=36d5fe6a000790f56039afe26834265db0a3ad4c'/>
<id>36d5fe6a000790f56039afe26834265db0a3ad4c</id>
<content type='text'>
skb_zerocopy can copy elements of the frags array between skbs, but it doesn't
orphan them. Also, it doesn't handle errors, so this patch takes care of that
as well, and modify the callers accordingly. skb_tx_error() is also added to
the callers so they will signal the failed delivery towards the creator of the
skb.

Signed-off-by: Zoltan Kiss &lt;zoltan.kiss@citrix.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
skb_zerocopy can copy elements of the frags array between skbs, but it doesn't
orphan them. Also, it doesn't handle errors, so this patch takes care of that
as well, and modify the callers accordingly. skb_tx_error() is also added to
the callers so they will signal the failed delivery towards the creator of the
skb.

Signed-off-by: Zoltan Kiss &lt;zoltan.kiss@citrix.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>openvswitch: Correctly report flow used times for first 5 minutes after boot.</title>
<updated>2014-03-20T17:45:21+00:00</updated>
<author>
<name>Ben Pfaff</name>
<email>blp@nicira.com</email>
</author>
<published>2014-03-20T17:45:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f9b8c4c8baded129535d82d74df8e87a7a369f54'/>
<id>f9b8c4c8baded129535d82d74df8e87a7a369f54</id>
<content type='text'>
The kernel starts out its "jiffies" timer as 5 minutes below zero, as
shown in include/linux/jiffies.h:

  /*
   * Have the 32 bit jiffies value wrap 5 minutes after boot
   * so jiffies wrap bugs show up earlier.
   */
  #define INITIAL_JIFFIES ((unsigned long)(unsigned int) (-300*HZ))

The loop in ovs_flow_stats_get() starts out with 'used' set to 0, then
takes any "later" time.  This means that for the first five minutes after
boot, flows will always be reported as never used, since 0 is greater than
any time already seen.

Signed-off-by: Ben Pfaff &lt;blp@nicira.com&gt;
Acked-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
Signed-off-by: Jesse Gross &lt;jesse@nicira.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The kernel starts out its "jiffies" timer as 5 minutes below zero, as
shown in include/linux/jiffies.h:

  /*
   * Have the 32 bit jiffies value wrap 5 minutes after boot
   * so jiffies wrap bugs show up earlier.
   */
  #define INITIAL_JIFFIES ((unsigned long)(unsigned int) (-300*HZ))

The loop in ovs_flow_stats_get() starts out with 'used' set to 0, then
takes any "later" time.  This means that for the first five minutes after
boot, flows will always be reported as never used, since 0 is greater than
any time already seen.

Signed-off-by: Ben Pfaff &lt;blp@nicira.com&gt;
Acked-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
Signed-off-by: Jesse Gross &lt;jesse@nicira.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>openvswitch: Fix race.</title>
<updated>2014-02-16T01:42:29+00:00</updated>
<author>
<name>Jarno Rajahalme</name>
<email>jrajahalme@nicira.com</email>
</author>
<published>2014-02-16T01:42:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=42ee19e2939277a5277c307e517ce2d7ba5f0703'/>
<id>42ee19e2939277a5277c307e517ce2d7ba5f0703</id>
<content type='text'>
ovs_vport_cmd_dump() did rcu_read_lock() only after getting the
datapath, which could have been deleted in between.  Resolved by
taking rcu_read_lock() before the get_dp() call.

Signed-off-by: Jarno Rajahalme &lt;jrajahalme@nicira.com&gt;
Signed-off-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ovs_vport_cmd_dump() did rcu_read_lock() only after getting the
datapath, which could have been deleted in between.  Resolved by
taking rcu_read_lock() before the get_dp() call.

Signed-off-by: Jarno Rajahalme &lt;jrajahalme@nicira.com&gt;
Signed-off-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>openvswitch: Read tcp flags only then the tranport header is present.</title>
<updated>2014-02-16T01:37:45+00:00</updated>
<author>
<name>Jarno Rajahalme</name>
<email>jrajahalme@nicira.com</email>
</author>
<published>2014-02-16T01:37:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=04382a3303c22b0c536fbd0c94c1f012f2b8ed60'/>
<id>04382a3303c22b0c536fbd0c94c1f012f2b8ed60</id>
<content type='text'>
Only the first IP fragment can have a TCP header, check for this.

Signed-off-by: Jarno Rajahalme &lt;jrajahalme@nicira.com&gt;
Signed-off-by: Jesse Gross &lt;jesse@nicira.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only the first IP fragment can have a TCP header, check for this.

Signed-off-by: Jarno Rajahalme &lt;jrajahalme@nicira.com&gt;
Signed-off-by: Jesse Gross &lt;jesse@nicira.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ovs: fix dp check in ovs_dp_reset_user_features</title>
<updated>2014-02-16T01:24:19+00:00</updated>
<author>
<name>Jiri Pirko</name>
<email>jiri@resnulli.us</email>
</author>
<published>2014-02-14T10:42:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3c7eacfc8a9a4c2bd48e0093c4f43cf69afd5210'/>
<id>3c7eacfc8a9a4c2bd48e0093c4f43cf69afd5210</id>
<content type='text'>
This fixes crash when userspace does "ovs-dpctl add-dp dev" where dev is
existing non-dp netdevice.

Introduced by:
commit 44da5ae5fbea4686f667dc854e5ea16814e44c59
"openvswitch: Drop user features if old user space attempted to create datapath"

Signed-off-by: Jiri Pirko &lt;jiri@resnulli.us&gt;
Signed-off-by: Jesse Gross &lt;jesse@nicira.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes crash when userspace does "ovs-dpctl add-dp dev" where dev is
existing non-dp netdevice.

Introduced by:
commit 44da5ae5fbea4686f667dc854e5ea16814e44c59
"openvswitch: Drop user features if old user space attempted to create datapath"

Signed-off-by: Jiri Pirko &lt;jiri@resnulli.us&gt;
Signed-off-by: Jesse Gross &lt;jesse@nicira.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>openvswitch: Suppress error messages on megaflow updates</title>
<updated>2014-02-05T06:32:38+00:00</updated>
<author>
<name>Andy Zhou</name>
<email>azhou@nicira.com</email>
</author>
<published>2014-02-03T01:08:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c14e0953ca51dbcb8d1ac92acbdcff23d0caa158'/>
<id>c14e0953ca51dbcb8d1ac92acbdcff23d0caa158</id>
<content type='text'>
With subfacets, we'd expect megaflow updates message to carry
the original micro flow. If not, EINVAL is returned and kernel
logs an error message.  Now that the user space subfacet layer is
removed, it is expected that flow updates can arrive with a
micro flow other than the original. Change the return code to
EEXIST and remove the kernel error log message.

Reported-by: Ben Pfaff &lt;blp@nicira.com&gt;
Signed-off-by: Andy Zhou &lt;azhou@nicira.com&gt;
Signed-off-by: Jesse Gross &lt;jesse@nicira.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With subfacets, we'd expect megaflow updates message to carry
the original micro flow. If not, EINVAL is returned and kernel
logs an error message.  Now that the user space subfacet layer is
removed, it is expected that flow updates can arrive with a
micro flow other than the original. Change the return code to
EEXIST and remove the kernel error log message.

Reported-by: Ben Pfaff &lt;blp@nicira.com&gt;
Signed-off-by: Andy Zhou &lt;azhou@nicira.com&gt;
Signed-off-by: Jesse Gross &lt;jesse@nicira.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>openvswitch: Fix ovs_flow_free() ovs-lock assert.</title>
<updated>2014-02-05T06:21:45+00:00</updated>
<author>
<name>Pravin B Shelar</name>
<email>pshelar@nicira.com</email>
</author>
<published>2014-01-31T17:43:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e4c6d7595403e943a3afc334eb8c0efcd840043a'/>
<id>e4c6d7595403e943a3afc334eb8c0efcd840043a</id>
<content type='text'>
ovs_flow_free() is not called under ovs-lock during packet
execute path (ovs_packet_cmd_execute()). Since packet execute
does not touch flow-&gt;mask, there is no need to take that
lock either. So move assert in case where flow-&gt;mask is checked.

Found by code inspection.

Signed-off-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
Signed-off-by: Jesse Gross &lt;jesse@nicira.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ovs_flow_free() is not called under ovs-lock during packet
execute path (ovs_packet_cmd_execute()). Since packet execute
does not touch flow-&gt;mask, there is no need to take that
lock either. So move assert in case where flow-&gt;mask is checked.

Found by code inspection.

Signed-off-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
Signed-off-by: Jesse Gross &lt;jesse@nicira.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>openvswitch: Fix ovs_dp_cmd_msg_size()</title>
<updated>2014-02-05T06:21:23+00:00</updated>
<author>
<name>Daniele Di Proietto</name>
<email>daniele.di.proietto@gmail.com</email>
</author>
<published>2014-01-23T18:47:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=45fb9c35b27c9982e9a55d04ed0a5230a2d0b306'/>
<id>45fb9c35b27c9982e9a55d04ed0a5230a2d0b306</id>
<content type='text'>
commit 43d4be9cb55f3bac5253e9289996fd9d735531db (openvswitch: Allow user space
to announce ability to accept unaligned Netlink messages) introduced
OVS_DP_ATTR_USER_FEATURES netlink attribute in datapath responses,
but the attribute size was not taken into account in ovs_dp_cmd_msg_size().

Signed-off-by: Daniele Di Proietto &lt;daniele.di.proietto@gmail.com&gt;
Signed-off-by: Jesse Gross &lt;jesse@nicira.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 43d4be9cb55f3bac5253e9289996fd9d735531db (openvswitch: Allow user space
to announce ability to accept unaligned Netlink messages) introduced
OVS_DP_ATTR_USER_FEATURES netlink attribute in datapath responses,
but the attribute size was not taken into account in ovs_dp_cmd_msg_size().

Signed-off-by: Daniele Di Proietto &lt;daniele.di.proietto@gmail.com&gt;
Signed-off-by: Jesse Gross &lt;jesse@nicira.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>openvswitch: Fix kernel panic on ovs_flow_free</title>
<updated>2014-02-05T06:21:17+00:00</updated>
<author>
<name>Andy Zhou</name>
<email>azhou@nicira.com</email>
</author>
<published>2014-01-21T17:31:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e80857cce82da31e41a6599fc888dfc92e0167cc'/>
<id>e80857cce82da31e41a6599fc888dfc92e0167cc</id>
<content type='text'>
Both mega flow mask's reference counter and per flow table mask list
should only be accessed when holding ovs_mutex() lock. However
this is not true with ovs_flow_table_flush(). The patch fixes this bug.

Reported-by: Joe Stringer &lt;joestringer@nicira.com&gt;
Signed-off-by: Andy Zhou &lt;azhou@nicira.com&gt;
Signed-off-by: Jesse Gross &lt;jesse@nicira.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Both mega flow mask's reference counter and per flow table mask list
should only be accessed when holding ovs_mutex() lock. However
this is not true with ovs_flow_table_flush(). The patch fixes this bug.

Reported-by: Joe Stringer &lt;joestringer@nicira.com&gt;
Signed-off-by: Andy Zhou &lt;azhou@nicira.com&gt;
Signed-off-by: Jesse Gross &lt;jesse@nicira.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
