<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/net/ipv4/ip_fragment.c, branch linux-4.16.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.16.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.16.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2017-11-04T00:26:51+00:00</updated>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2017-11-04T00:26:51+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2017-11-04T00:26:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2a171788ba7bb61995e98e8163204fc7880f63b2'/>
<id>urn:sha1:2a171788ba7bb61995e98e8163204fc7880f63b2</id>
<content type='text'>
Files removed in 'net-next' had their license header updated
in 'net'.  We take the remove from 'net-next'.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>License cleanup: add SPDX GPL-2.0 license identifier to files with no license</title>
<updated>2017-11-02T10:10:55+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2017-11-01T14:07:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b24413180f5600bcb3bb70fbed5cf186b60864bd'/>
<id>urn:sha1:b24413180f5600bcb3bb70fbed5cf186b60864bd</id>
<content type='text'>
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.

By default all files without license information are under the default
license of the kernel, which is GPL version 2.

Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier.  The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.

This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.

How this work was done:

Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
 - file had no licensing information it it.
 - file was a */uapi/* one with no licensing information in it,
 - file was a */uapi/* one with existing licensing information,

Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.

The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode &amp; Windriver) producing SPDX
tag:value files created by Philippe Ombredanne.  Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.

The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed.  Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.

Criteria used to select files for SPDX license identifier tagging was:
 - Files considered eligible had to be source code files.
 - Make and config files were included as candidates if they contained &gt;5
   lines of source
 - File already had some variant of a license header in it (even if &lt;5
   lines).

All documentation files were explicitly excluded.

The following heuristics were used to determine which SPDX license
identifiers to apply.

 - when both scanners couldn't find any license traces, file was
   considered to have no license information in it, and the top level
   COPYING file license applied.

   For non */uapi/* files that summary was:

   SPDX license identifier                            # files
   ---------------------------------------------------|-------
   GPL-2.0                                              11139

   and resulted in the first patch in this series.

   If that file was a */uapi/* path one, it was "GPL-2.0 WITH
   Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:

   SPDX license identifier                            # files
   ---------------------------------------------------|-------
   GPL-2.0 WITH Linux-syscall-note                        930

   and resulted in the second patch in this series.

 - if a file had some form of licensing information in it, and was one
   of the */uapi/* ones, it was denoted with the Linux-syscall-note if
   any GPL family license was found in the file or had no licensing in
   it (per prior point).  Results summary:

   SPDX license identifier                            # files
   ---------------------------------------------------|------
   GPL-2.0 WITH Linux-syscall-note                       270
   GPL-2.0+ WITH Linux-syscall-note                      169
   ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
   ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
   LGPL-2.1+ WITH Linux-syscall-note                      15
   GPL-1.0+ WITH Linux-syscall-note                       14
   ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
   LGPL-2.0+ WITH Linux-syscall-note                       4
   LGPL-2.1 WITH Linux-syscall-note                        3
   ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
   ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1

   and that resulted in the third patch in this series.

 - when the two scanners agreed on the detected license(s), that became
   the concluded license(s).

 - when there was disagreement between the two scanners (one detected a
   license but the other didn't, or they both detected different
   licenses) a manual inspection of the file occurred.

 - In most cases a manual inspection of the information in the file
   resulted in a clear resolution of the license that should apply (and
   which scanner probably needed to revisit its heuristics).

 - When it was not immediately clear, the license identifier was
   confirmed with lawyers working with the Linux Foundation.

 - If there was any question as to the appropriate license identifier,
   the file was flagged for further research and to be revisited later
   in time.

In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.

Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights.  The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.

Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.

In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.

Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
 - a full scancode scan run, collecting the matched texts, detected
   license ids and scores
 - reviewing anything where there was a license detected (about 500+
   files) to ensure that the applied SPDX license was correct
 - reviewing anything where there was no detection but the patch license
   was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
   SPDX license was correct

This produced a worksheet with 20 files needing minor correction.  This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.

These .csv files were then reviewed by Greg.  Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected.  This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.)  Finally Greg ran the script using the .csv files to
generate the patches.

Reviewed-by: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Reviewed-by: Philippe Ombredanne &lt;pombredanne@nexb.com&gt;
Reviewed-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>inet: frags: Convert timers to use timer_setup()</title>
<updated>2017-10-18T11:39:55+00:00</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2017-10-17T00:29:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=78802011fbe34331bdef6f2dfb1634011f0e4c32'/>
<id>urn:sha1:78802011fbe34331bdef6f2dfb1634011f0e4c32</id>
<content type='text'>
In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.

Cc: Alexander Aring &lt;alex.aring@gmail.com&gt;
Cc: Stefan Schmidt &lt;stefan@osg.samsung.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Alexey Kuznetsov &lt;kuznet@ms2.inr.ac.ru&gt;
Cc: Hideaki YOSHIFUJI &lt;yoshfuji@linux-ipv6.org&gt;
Cc: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
Cc: Jozsef Kadlecsik &lt;kadlec@blackhole.kfki.hu&gt;
Cc: Florian Westphal &lt;fw@strlen.de&gt;
Cc: linux-wpan@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: netfilter-devel@vger.kernel.org
Cc: coreteam@netfilter.org
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Acked-by: Stefan Schmidt &lt;stefan@osg.samsung.com&gt; # for ieee802154
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Revert "net: fix percpu memory leaks"</title>
<updated>2017-09-03T18:01:05+00:00</updated>
<author>
<name>Jesper Dangaard Brouer</name>
<email>brouer@redhat.com</email>
</author>
<published>2017-09-01T09:26:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5a63643e583b6a9789d7a225ae076fb4e603991c'/>
<id>urn:sha1:5a63643e583b6a9789d7a225ae076fb4e603991c</id>
<content type='text'>
This reverts commit 1d6119baf0610f813eb9d9580eb4fd16de5b4ceb.

After reverting commit 6d7b857d541e ("net: use lib/percpu_counter API
for fragmentation mem accounting") then here is no need for this
fix-up patch.  As percpu_counter is no longer used, it cannot
memory leak it any-longer.

Fixes: 6d7b857d541e ("net: use lib/percpu_counter API for fragmentation mem accounting")
Fixes: 1d6119baf061 ("net: fix percpu memory leaks")
Signed-off-by: Jesper Dangaard Brouer &lt;brouer@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: convert inet_frag_queue.refcnt from atomic_t to refcount_t</title>
<updated>2017-07-01T14:39:09+00:00</updated>
<author>
<name>Reshetova, Elena</name>
<email>elena.reshetova@intel.com</email>
</author>
<published>2017-06-30T10:08:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=edcb691871b27c3cc463b7291afe75f1c3423406'/>
<id>urn:sha1:edcb691871b27c3cc463b7291afe75f1c3423406</id>
<content type='text'>
refcount_t type and corresponding API should be
used instead of atomic_t when the variable is used as
a reference counter. This allows to avoid accidental
refcounter overflows that might lead to use-after-free
situations.

Signed-off-by: Elena Reshetova &lt;elena.reshetova@intel.com&gt;
Signed-off-by: Hans Liljestrand &lt;ishkamiel@gmail.com&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: David Windsor &lt;dwindsor@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>inet: frag: release spinlock before calling icmp_send()</title>
<updated>2017-03-22T22:40:45+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2017-03-22T15:57:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ec4fbd64751de18729eaa816ec69e4b504b5a7a2'/>
<id>urn:sha1:ec4fbd64751de18729eaa816ec69e4b504b5a7a2</id>
<content type='text'>
Dmitry reported a lockdep splat [1] (false positive) that we can fix
by releasing the spinlock before calling icmp_send() from ip_expire()

This is a false positive because sending an ICMP message can not
possibly re-enter the IP frag engine.

[1]
[ INFO: possible circular locking dependency detected ]
4.10.0+ #29 Not tainted
-------------------------------------------------------
modprobe/12392 is trying to acquire lock:
 (_xmit_ETHER#2){+.-...}, at: [&lt;ffffffff837a8182&gt;] spin_lock
include/linux/spinlock.h:299 [inline]
 (_xmit_ETHER#2){+.-...}, at: [&lt;ffffffff837a8182&gt;] __netif_tx_lock
include/linux/netdevice.h:3486 [inline]
 (_xmit_ETHER#2){+.-...}, at: [&lt;ffffffff837a8182&gt;]
sch_direct_xmit+0x282/0x6d0 net/sched/sch_generic.c:180

but task is already holding lock:
 (&amp;(&amp;q-&gt;lock)-&gt;rlock){+.-...}, at: [&lt;ffffffff8389a4d1&gt;] spin_lock
include/linux/spinlock.h:299 [inline]
 (&amp;(&amp;q-&gt;lock)-&gt;rlock){+.-...}, at: [&lt;ffffffff8389a4d1&gt;]
ip_expire+0x51/0x6c0 net/ipv4/ip_fragment.c:201

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-&gt; #1 (&amp;(&amp;q-&gt;lock)-&gt;rlock){+.-...}:
       validate_chain kernel/locking/lockdep.c:2267 [inline]
       __lock_acquire+0x2149/0x3430 kernel/locking/lockdep.c:3340
       lock_acquire+0x2a1/0x630 kernel/locking/lockdep.c:3755
       __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
       _raw_spin_lock+0x33/0x50 kernel/locking/spinlock.c:151
       spin_lock include/linux/spinlock.h:299 [inline]
       ip_defrag+0x3a2/0x4130 net/ipv4/ip_fragment.c:669
       ip_check_defrag+0x4e3/0x8b0 net/ipv4/ip_fragment.c:713
       packet_rcv_fanout+0x282/0x800 net/packet/af_packet.c:1459
       deliver_skb net/core/dev.c:1834 [inline]
       dev_queue_xmit_nit+0x294/0xa90 net/core/dev.c:1890
       xmit_one net/core/dev.c:2903 [inline]
       dev_hard_start_xmit+0x16b/0xab0 net/core/dev.c:2923
       sch_direct_xmit+0x31f/0x6d0 net/sched/sch_generic.c:182
       __dev_xmit_skb net/core/dev.c:3092 [inline]
       __dev_queue_xmit+0x13e5/0x1e60 net/core/dev.c:3358
       dev_queue_xmit+0x17/0x20 net/core/dev.c:3423
       neigh_resolve_output+0x6b9/0xb10 net/core/neighbour.c:1308
       neigh_output include/net/neighbour.h:478 [inline]
       ip_finish_output2+0x8b8/0x15a0 net/ipv4/ip_output.c:228
       ip_do_fragment+0x1d93/0x2720 net/ipv4/ip_output.c:672
       ip_fragment.constprop.54+0x145/0x200 net/ipv4/ip_output.c:545
       ip_finish_output+0x82d/0xe10 net/ipv4/ip_output.c:314
       NF_HOOK_COND include/linux/netfilter.h:246 [inline]
       ip_output+0x1f0/0x7a0 net/ipv4/ip_output.c:404
       dst_output include/net/dst.h:486 [inline]
       ip_local_out+0x95/0x170 net/ipv4/ip_output.c:124
       ip_send_skb+0x3c/0xc0 net/ipv4/ip_output.c:1492
       ip_push_pending_frames+0x64/0x80 net/ipv4/ip_output.c:1512
       raw_sendmsg+0x26de/0x3a00 net/ipv4/raw.c:655
       inet_sendmsg+0x164/0x5b0 net/ipv4/af_inet.c:761
       sock_sendmsg_nosec net/socket.c:633 [inline]
       sock_sendmsg+0xca/0x110 net/socket.c:643
       ___sys_sendmsg+0x4a3/0x9f0 net/socket.c:1985
       __sys_sendmmsg+0x25c/0x750 net/socket.c:2075
       SYSC_sendmmsg net/socket.c:2106 [inline]
       SyS_sendmmsg+0x35/0x60 net/socket.c:2101
       do_syscall_64+0x2e8/0x930 arch/x86/entry/common.c:281
       return_from_SYSCALL_64+0x0/0x7a

-&gt; #0 (_xmit_ETHER#2){+.-...}:
       check_prev_add kernel/locking/lockdep.c:1830 [inline]
       check_prevs_add+0xa8f/0x19f0 kernel/locking/lockdep.c:1940
       validate_chain kernel/locking/lockdep.c:2267 [inline]
       __lock_acquire+0x2149/0x3430 kernel/locking/lockdep.c:3340
       lock_acquire+0x2a1/0x630 kernel/locking/lockdep.c:3755
       __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
       _raw_spin_lock+0x33/0x50 kernel/locking/spinlock.c:151
       spin_lock include/linux/spinlock.h:299 [inline]
       __netif_tx_lock include/linux/netdevice.h:3486 [inline]
       sch_direct_xmit+0x282/0x6d0 net/sched/sch_generic.c:180
       __dev_xmit_skb net/core/dev.c:3092 [inline]
       __dev_queue_xmit+0x13e5/0x1e60 net/core/dev.c:3358
       dev_queue_xmit+0x17/0x20 net/core/dev.c:3423
       neigh_hh_output include/net/neighbour.h:468 [inline]
       neigh_output include/net/neighbour.h:476 [inline]
       ip_finish_output2+0xf6c/0x15a0 net/ipv4/ip_output.c:228
       ip_finish_output+0xa29/0xe10 net/ipv4/ip_output.c:316
       NF_HOOK_COND include/linux/netfilter.h:246 [inline]
       ip_output+0x1f0/0x7a0 net/ipv4/ip_output.c:404
       dst_output include/net/dst.h:486 [inline]
       ip_local_out+0x95/0x170 net/ipv4/ip_output.c:124
       ip_send_skb+0x3c/0xc0 net/ipv4/ip_output.c:1492
       ip_push_pending_frames+0x64/0x80 net/ipv4/ip_output.c:1512
       icmp_push_reply+0x372/0x4d0 net/ipv4/icmp.c:394
       icmp_send+0x156c/0x1c80 net/ipv4/icmp.c:754
       ip_expire+0x40e/0x6c0 net/ipv4/ip_fragment.c:239
       call_timer_fn+0x241/0x820 kernel/time/timer.c:1268
       expire_timers kernel/time/timer.c:1307 [inline]
       __run_timers+0x960/0xcf0 kernel/time/timer.c:1601
       run_timer_softirq+0x21/0x80 kernel/time/timer.c:1614
       __do_softirq+0x31f/0xbe7 kernel/softirq.c:284
       invoke_softirq kernel/softirq.c:364 [inline]
       irq_exit+0x1cc/0x200 kernel/softirq.c:405
       exiting_irq arch/x86/include/asm/apic.h:657 [inline]
       smp_apic_timer_interrupt+0x76/0xa0 arch/x86/kernel/apic/apic.c:962
       apic_timer_interrupt+0x93/0xa0 arch/x86/entry/entry_64.S:707
       __read_once_size include/linux/compiler.h:254 [inline]
       atomic_read arch/x86/include/asm/atomic.h:26 [inline]
       rcu_dynticks_curr_cpu_in_eqs kernel/rcu/tree.c:350 [inline]
       __rcu_is_watching kernel/rcu/tree.c:1133 [inline]
       rcu_is_watching+0x83/0x110 kernel/rcu/tree.c:1147
       rcu_read_lock_held+0x87/0xc0 kernel/rcu/update.c:293
       radix_tree_deref_slot include/linux/radix-tree.h:238 [inline]
       filemap_map_pages+0x6d4/0x1570 mm/filemap.c:2335
       do_fault_around mm/memory.c:3231 [inline]
       do_read_fault mm/memory.c:3265 [inline]
       do_fault+0xbd5/0x2080 mm/memory.c:3370
       handle_pte_fault mm/memory.c:3600 [inline]
       __handle_mm_fault+0x1062/0x2cb0 mm/memory.c:3714
       handle_mm_fault+0x1e2/0x480 mm/memory.c:3751
       __do_page_fault+0x4f6/0xb60 arch/x86/mm/fault.c:1397
       do_page_fault+0x54/0x70 arch/x86/mm/fault.c:1460
       page_fault+0x28/0x30 arch/x86/entry/entry_64.S:1011

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&amp;(&amp;q-&gt;lock)-&gt;rlock);
                               lock(_xmit_ETHER#2);
                               lock(&amp;(&amp;q-&gt;lock)-&gt;rlock);
  lock(_xmit_ETHER#2);

 *** DEADLOCK ***

10 locks held by modprobe/12392:
 #0:  (&amp;mm-&gt;mmap_sem){++++++}, at: [&lt;ffffffff81329758&gt;]
__do_page_fault+0x2b8/0xb60 arch/x86/mm/fault.c:1336
 #1:  (rcu_read_lock){......}, at: [&lt;ffffffff8188cab6&gt;]
filemap_map_pages+0x1e6/0x1570 mm/filemap.c:2324
 #2:  (&amp;(ptlock_ptr(page))-&gt;rlock#2){+.+...}, at: [&lt;ffffffff81984a78&gt;]
spin_lock include/linux/spinlock.h:299 [inline]
 #2:  (&amp;(ptlock_ptr(page))-&gt;rlock#2){+.+...}, at: [&lt;ffffffff81984a78&gt;]
pte_alloc_one_map mm/memory.c:2944 [inline]
 #2:  (&amp;(ptlock_ptr(page))-&gt;rlock#2){+.+...}, at: [&lt;ffffffff81984a78&gt;]
alloc_set_pte+0x13b8/0x1b90 mm/memory.c:3072
 #3:  (((&amp;q-&gt;timer))){+.-...}, at: [&lt;ffffffff81627e72&gt;]
lockdep_copy_map include/linux/lockdep.h:175 [inline]
 #3:  (((&amp;q-&gt;timer))){+.-...}, at: [&lt;ffffffff81627e72&gt;]
call_timer_fn+0x1c2/0x820 kernel/time/timer.c:1258
 #4:  (&amp;(&amp;q-&gt;lock)-&gt;rlock){+.-...}, at: [&lt;ffffffff8389a4d1&gt;] spin_lock
include/linux/spinlock.h:299 [inline]
 #4:  (&amp;(&amp;q-&gt;lock)-&gt;rlock){+.-...}, at: [&lt;ffffffff8389a4d1&gt;]
ip_expire+0x51/0x6c0 net/ipv4/ip_fragment.c:201
 #5:  (rcu_read_lock){......}, at: [&lt;ffffffff8389a633&gt;]
ip_expire+0x1b3/0x6c0 net/ipv4/ip_fragment.c:216
 #6:  (slock-AF_INET){+.-...}, at: [&lt;ffffffff839b3313&gt;] spin_trylock
include/linux/spinlock.h:309 [inline]
 #6:  (slock-AF_INET){+.-...}, at: [&lt;ffffffff839b3313&gt;] icmp_xmit_lock
net/ipv4/icmp.c:219 [inline]
 #6:  (slock-AF_INET){+.-...}, at: [&lt;ffffffff839b3313&gt;]
icmp_send+0x803/0x1c80 net/ipv4/icmp.c:681
 #7:  (rcu_read_lock_bh){......}, at: [&lt;ffffffff838ab9a1&gt;]
ip_finish_output2+0x2c1/0x15a0 net/ipv4/ip_output.c:198
 #8:  (rcu_read_lock_bh){......}, at: [&lt;ffffffff836d1dee&gt;]
__dev_queue_xmit+0x23e/0x1e60 net/core/dev.c:3324
 #9:  (dev-&gt;qdisc_running_key ?: &amp;qdisc_running_key){+.....}, at:
[&lt;ffffffff836d3a27&gt;] dev_queue_xmit+0x17/0x20 net/core/dev.c:3423

stack backtrace:
CPU: 0 PID: 12392 Comm: modprobe Not tainted 4.10.0+ #29
Hardware name: Google Google Compute Engine/Google Compute Engine,
BIOS Google 01/01/2011
Call Trace:
 &lt;IRQ&gt;
 __dump_stack lib/dump_stack.c:16 [inline]
 dump_stack+0x2ee/0x3ef lib/dump_stack.c:52
 print_circular_bug+0x307/0x3b0 kernel/locking/lockdep.c:1204
 check_prev_add kernel/locking/lockdep.c:1830 [inline]
 check_prevs_add+0xa8f/0x19f0 kernel/locking/lockdep.c:1940
 validate_chain kernel/locking/lockdep.c:2267 [inline]
 __lock_acquire+0x2149/0x3430 kernel/locking/lockdep.c:3340
 lock_acquire+0x2a1/0x630 kernel/locking/lockdep.c:3755
 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
 _raw_spin_lock+0x33/0x50 kernel/locking/spinlock.c:151
 spin_lock include/linux/spinlock.h:299 [inline]
 __netif_tx_lock include/linux/netdevice.h:3486 [inline]
 sch_direct_xmit+0x282/0x6d0 net/sched/sch_generic.c:180
 __dev_xmit_skb net/core/dev.c:3092 [inline]
 __dev_queue_xmit+0x13e5/0x1e60 net/core/dev.c:3358
 dev_queue_xmit+0x17/0x20 net/core/dev.c:3423
 neigh_hh_output include/net/neighbour.h:468 [inline]
 neigh_output include/net/neighbour.h:476 [inline]
 ip_finish_output2+0xf6c/0x15a0 net/ipv4/ip_output.c:228
 ip_finish_output+0xa29/0xe10 net/ipv4/ip_output.c:316
 NF_HOOK_COND include/linux/netfilter.h:246 [inline]
 ip_output+0x1f0/0x7a0 net/ipv4/ip_output.c:404
 dst_output include/net/dst.h:486 [inline]
 ip_local_out+0x95/0x170 net/ipv4/ip_output.c:124
 ip_send_skb+0x3c/0xc0 net/ipv4/ip_output.c:1492
 ip_push_pending_frames+0x64/0x80 net/ipv4/ip_output.c:1512
 icmp_push_reply+0x372/0x4d0 net/ipv4/icmp.c:394
 icmp_send+0x156c/0x1c80 net/ipv4/icmp.c:754
 ip_expire+0x40e/0x6c0 net/ipv4/ip_fragment.c:239
 call_timer_fn+0x241/0x820 kernel/time/timer.c:1268
 expire_timers kernel/time/timer.c:1307 [inline]
 __run_timers+0x960/0xcf0 kernel/time/timer.c:1601
 run_timer_softirq+0x21/0x80 kernel/time/timer.c:1614
 __do_softirq+0x31f/0xbe7 kernel/softirq.c:284
 invoke_softirq kernel/softirq.c:364 [inline]
 irq_exit+0x1cc/0x200 kernel/softirq.c:405
 exiting_irq arch/x86/include/asm/apic.h:657 [inline]
 smp_apic_timer_interrupt+0x76/0xa0 arch/x86/kernel/apic/apic.c:962
 apic_timer_interrupt+0x93/0xa0 arch/x86/entry/entry_64.S:707
RIP: 0010:__read_once_size include/linux/compiler.h:254 [inline]
RIP: 0010:atomic_read arch/x86/include/asm/atomic.h:26 [inline]
RIP: 0010:rcu_dynticks_curr_cpu_in_eqs kernel/rcu/tree.c:350 [inline]
RIP: 0010:__rcu_is_watching kernel/rcu/tree.c:1133 [inline]
RIP: 0010:rcu_is_watching+0x83/0x110 kernel/rcu/tree.c:1147
RSP: 0000:ffff8801c391f120 EFLAGS: 00000a03 ORIG_RAX: ffffffffffffff10
RAX: dffffc0000000000 RBX: ffff8801c391f148 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 000055edd4374000 RDI: ffff8801dbe1ae0c
RBP: ffff8801c391f1a0 R08: 0000000000000002 R09: 0000000000000000
R10: dffffc0000000000 R11: 0000000000000002 R12: 1ffff10038723e25
R13: ffff8801dbe1ae00 R14: ffff8801c391f680 R15: dffffc0000000000
 &lt;/IRQ&gt;
 rcu_read_lock_held+0x87/0xc0 kernel/rcu/update.c:293
 radix_tree_deref_slot include/linux/radix-tree.h:238 [inline]
 filemap_map_pages+0x6d4/0x1570 mm/filemap.c:2335
 do_fault_around mm/memory.c:3231 [inline]
 do_read_fault mm/memory.c:3265 [inline]
 do_fault+0xbd5/0x2080 mm/memory.c:3370
 handle_pte_fault mm/memory.c:3600 [inline]
 __handle_mm_fault+0x1062/0x2cb0 mm/memory.c:3714
 handle_mm_fault+0x1e2/0x480 mm/memory.c:3751
 __do_page_fault+0x4f6/0xb60 arch/x86/mm/fault.c:1397
 do_page_fault+0x54/0x70 arch/x86/mm/fault.c:1460
 page_fault+0x28/0x30 arch/x86/entry/entry_64.S:1011
RIP: 0033:0x7f83172f2786
RSP: 002b:00007fffe859ae80 EFLAGS: 00010293
RAX: 000055edd4373040 RBX: 00007f83175111c8 RCX: 000055edd4373238
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00007f8317510970
RBP: 00007fffe859afd0 R08: 0000000000000009 R09: 0000000000000000
R10: 0000000000000064 R11: 0000000000000000 R12: 000055edd4373040
R13: 0000000000000000 R14: 00007fffe859afe8 R15: 0000000000000000

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: rename IP_INC_STATS_BH()</title>
<updated>2016-04-28T02:48:23+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2016-04-27T23:44:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b45386efa2ec4533196a24d397ec5f9f0a42abc4'/>
<id>urn:sha1:b45386efa2ec4533196a24d397ec5f9f0a42abc4</id>
<content type='text'>
Rename IP_INC_STATS_BH() to __IP_INC_STATS(), to
better express this is used in non preemptible context.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Export ip fragment sysctl to unprivileged users</title>
<updated>2016-02-17T01:42:54+00:00</updated>
<author>
<name>Nikolay Borisov</name>
<email>kernel@kyup.com</email>
</author>
<published>2016-02-15T10:11:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=52a773d645e95515016b9d896ba8e323e0aaa57b'/>
<id>urn:sha1:52a773d645e95515016b9d896ba8e323e0aaa57b</id>
<content type='text'>
Now that all the ip fragmentation related sysctls are namespaceified
there is no reason to hide them anymore from "root" users inside
containers.

Signed-off-by: Nikolay Borisov &lt;kernel@kyup.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4: namespacify ip fragment max dist sysctl knob</title>
<updated>2016-02-17T01:42:54+00:00</updated>
<author>
<name>Nikolay Borisov</name>
<email>kernel@kyup.com</email>
</author>
<published>2016-02-15T10:11:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0fbf4cb27e061204c8cee8e7eb2870416bdf30fd'/>
<id>urn:sha1:0fbf4cb27e061204c8cee8e7eb2870416bdf30fd</id>
<content type='text'>
Signed-off-by: Nikolay Borisov &lt;kernel@kyup.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>inet: frag: Always orphan skbs inside ip_defrag()</title>
<updated>2016-01-29T00:00:46+00:00</updated>
<author>
<name>Joe Stringer</name>
<email>joe@ovn.org</email>
</author>
<published>2016-01-22T23:49:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8282f27449bf15548cb82c77b6e04ee0ab827bdc'/>
<id>urn:sha1:8282f27449bf15548cb82c77b6e04ee0ab827bdc</id>
<content type='text'>
Later parts of the stack (including fragmentation) expect that there is
never a socket attached to frag in a frag_list, however this invariant
was not enforced on all defrag paths. This could lead to the
BUG_ON(skb-&gt;sk) during ip_do_fragment(), as per the call stack at the
end of this commit message.

While the call could be added to openvswitch to fix this particular
error, the head and tail of the frags list are already orphaned
indirectly inside ip_defrag(), so it seems like the remaining fragments
should all be orphaned in all circumstances.

kernel BUG at net/ipv4/ip_output.c:586!
[...]
Call Trace:
 &lt;IRQ&gt;
 [&lt;ffffffffa0205270&gt;] ? do_output.isra.29+0x1b0/0x1b0 [openvswitch]
 [&lt;ffffffffa02167a7&gt;] ovs_fragment+0xcc/0x214 [openvswitch]
 [&lt;ffffffff81667830&gt;] ? dst_discard_out+0x20/0x20
 [&lt;ffffffff81667810&gt;] ? dst_ifdown+0x80/0x80
 [&lt;ffffffffa0212072&gt;] ? find_bucket.isra.2+0x62/0x70 [openvswitch]
 [&lt;ffffffff810e0ba5&gt;] ? mod_timer_pending+0x65/0x210
 [&lt;ffffffff810b732b&gt;] ? __lock_acquire+0x3db/0x1b90
 [&lt;ffffffffa03205a2&gt;] ? nf_conntrack_in+0x252/0x500 [nf_conntrack]
 [&lt;ffffffff810b63c4&gt;] ? __lock_is_held+0x54/0x70
 [&lt;ffffffffa02051a3&gt;] do_output.isra.29+0xe3/0x1b0 [openvswitch]
 [&lt;ffffffffa0206411&gt;] do_execute_actions+0xe11/0x11f0 [openvswitch]
 [&lt;ffffffff810b63c4&gt;] ? __lock_is_held+0x54/0x70
 [&lt;ffffffffa0206822&gt;] ovs_execute_actions+0x32/0xd0 [openvswitch]
 [&lt;ffffffffa020b505&gt;] ovs_dp_process_packet+0x85/0x140 [openvswitch]
 [&lt;ffffffff810b63c4&gt;] ? __lock_is_held+0x54/0x70
 [&lt;ffffffffa02068a2&gt;] ovs_execute_actions+0xb2/0xd0 [openvswitch]
 [&lt;ffffffffa020b505&gt;] ovs_dp_process_packet+0x85/0x140 [openvswitch]
 [&lt;ffffffffa0215019&gt;] ? ovs_ct_get_labels+0x49/0x80 [openvswitch]
 [&lt;ffffffffa0213a1d&gt;] ovs_vport_receive+0x5d/0xa0 [openvswitch]
 [&lt;ffffffff810b732b&gt;] ? __lock_acquire+0x3db/0x1b90
 [&lt;ffffffff810b732b&gt;] ? __lock_acquire+0x3db/0x1b90
 [&lt;ffffffff810b732b&gt;] ? __lock_acquire+0x3db/0x1b90
 [&lt;ffffffffa0214895&gt;] ? internal_dev_xmit+0x5/0x140 [openvswitch]
 [&lt;ffffffffa02148fc&gt;] internal_dev_xmit+0x6c/0x140 [openvswitch]
 [&lt;ffffffffa0214895&gt;] ? internal_dev_xmit+0x5/0x140 [openvswitch]
 [&lt;ffffffff81660299&gt;] dev_hard_start_xmit+0x2b9/0x5e0
 [&lt;ffffffff8165fc21&gt;] ? netif_skb_features+0xd1/0x1f0
 [&lt;ffffffff81660f20&gt;] __dev_queue_xmit+0x800/0x930
 [&lt;ffffffff81660770&gt;] ? __dev_queue_xmit+0x50/0x930
 [&lt;ffffffff810b53f1&gt;] ? mark_held_locks+0x71/0x90
 [&lt;ffffffff81669876&gt;] ? neigh_resolve_output+0x106/0x220
 [&lt;ffffffff81661060&gt;] dev_queue_xmit+0x10/0x20
 [&lt;ffffffff816698e8&gt;] neigh_resolve_output+0x178/0x220
 [&lt;ffffffff816a8e6f&gt;] ? ip_finish_output2+0x1ff/0x590
 [&lt;ffffffff816a8e6f&gt;] ip_finish_output2+0x1ff/0x590
 [&lt;ffffffff816a8cee&gt;] ? ip_finish_output2+0x7e/0x590
 [&lt;ffffffff816a9a31&gt;] ip_do_fragment+0x831/0x8a0
 [&lt;ffffffff816a8c70&gt;] ? ip_copy_metadata+0x1b0/0x1b0
 [&lt;ffffffff816a9ae3&gt;] ip_fragment.constprop.49+0x43/0x80
 [&lt;ffffffff816a9c9c&gt;] ip_finish_output+0x17c/0x340
 [&lt;ffffffff8169a6f4&gt;] ? nf_hook_slow+0xe4/0x190
 [&lt;ffffffff816ab4c0&gt;] ip_output+0x70/0x110
 [&lt;ffffffff816a9b20&gt;] ? ip_fragment.constprop.49+0x80/0x80
 [&lt;ffffffff816aa9f9&gt;] ip_local_out+0x39/0x70
 [&lt;ffffffff816abf89&gt;] ip_send_skb+0x19/0x40
 [&lt;ffffffff816abfe3&gt;] ip_push_pending_frames+0x33/0x40
 [&lt;ffffffff816df21a&gt;] icmp_push_reply+0xea/0x120
 [&lt;ffffffff816df93d&gt;] icmp_reply.constprop.23+0x1ed/0x230
 [&lt;ffffffff816df9ce&gt;] icmp_echo.part.21+0x4e/0x50
 [&lt;ffffffff810b63c4&gt;] ? __lock_is_held+0x54/0x70
 [&lt;ffffffff810d5f9e&gt;] ? rcu_read_lock_held+0x5e/0x70
 [&lt;ffffffff816dfa06&gt;] icmp_echo+0x36/0x70
 [&lt;ffffffff816e0d11&gt;] icmp_rcv+0x271/0x450
 [&lt;ffffffff816a4ca7&gt;] ip_local_deliver_finish+0x127/0x3a0
 [&lt;ffffffff816a4bc1&gt;] ? ip_local_deliver_finish+0x41/0x3a0
 [&lt;ffffffff816a5160&gt;] ip_local_deliver+0x60/0xd0
 [&lt;ffffffff816a4b80&gt;] ? ip_rcv_finish+0x560/0x560
 [&lt;ffffffff816a46fd&gt;] ip_rcv_finish+0xdd/0x560
 [&lt;ffffffff816a5453&gt;] ip_rcv+0x283/0x3e0
 [&lt;ffffffff810b6302&gt;] ? match_held_lock+0x192/0x200
 [&lt;ffffffff816a4620&gt;] ? inet_del_offload+0x40/0x40
 [&lt;ffffffff8165d062&gt;] __netif_receive_skb_core+0x392/0xae0
 [&lt;ffffffff8165e68e&gt;] ? process_backlog+0x8e/0x230
 [&lt;ffffffff810b53f1&gt;] ? mark_held_locks+0x71/0x90
 [&lt;ffffffff8165d7c8&gt;] __netif_receive_skb+0x18/0x60
 [&lt;ffffffff8165e678&gt;] process_backlog+0x78/0x230
 [&lt;ffffffff8165e6dd&gt;] ? process_backlog+0xdd/0x230
 [&lt;ffffffff8165e355&gt;] net_rx_action+0x155/0x400
 [&lt;ffffffff8106b48c&gt;] __do_softirq+0xcc/0x420
 [&lt;ffffffff816a8e87&gt;] ? ip_finish_output2+0x217/0x590
 [&lt;ffffffff8178e78c&gt;] do_softirq_own_stack+0x1c/0x30
 &lt;EOI&gt;
 [&lt;ffffffff8106b88e&gt;] do_softirq+0x4e/0x60
 [&lt;ffffffff8106b948&gt;] __local_bh_enable_ip+0xa8/0xb0
 [&lt;ffffffff816a8eb0&gt;] ip_finish_output2+0x240/0x590
 [&lt;ffffffff816a9a31&gt;] ? ip_do_fragment+0x831/0x8a0
 [&lt;ffffffff816a9a31&gt;] ip_do_fragment+0x831/0x8a0
 [&lt;ffffffff816a8c70&gt;] ? ip_copy_metadata+0x1b0/0x1b0
 [&lt;ffffffff816a9ae3&gt;] ip_fragment.constprop.49+0x43/0x80
 [&lt;ffffffff816a9c9c&gt;] ip_finish_output+0x17c/0x340
 [&lt;ffffffff8169a6f4&gt;] ? nf_hook_slow+0xe4/0x190
 [&lt;ffffffff816ab4c0&gt;] ip_output+0x70/0x110
 [&lt;ffffffff816a9b20&gt;] ? ip_fragment.constprop.49+0x80/0x80
 [&lt;ffffffff816aa9f9&gt;] ip_local_out+0x39/0x70
 [&lt;ffffffff816abf89&gt;] ip_send_skb+0x19/0x40
 [&lt;ffffffff816abfe3&gt;] ip_push_pending_frames+0x33/0x40
 [&lt;ffffffff816d55d3&gt;] raw_sendmsg+0x7d3/0xc30
 [&lt;ffffffff810b732b&gt;] ? __lock_acquire+0x3db/0x1b90
 [&lt;ffffffff816e7557&gt;] ? inet_sendmsg+0xc7/0x1d0
 [&lt;ffffffff810b63c4&gt;] ? __lock_is_held+0x54/0x70
 [&lt;ffffffff816e759a&gt;] inet_sendmsg+0x10a/0x1d0
 [&lt;ffffffff816e7495&gt;] ? inet_sendmsg+0x5/0x1d0
 [&lt;ffffffff8163e398&gt;] sock_sendmsg+0x38/0x50
 [&lt;ffffffff8163ec5f&gt;] ___sys_sendmsg+0x25f/0x270
 [&lt;ffffffff811aadad&gt;] ? handle_mm_fault+0x8dd/0x1320
 [&lt;ffffffff8178c147&gt;] ? _raw_spin_unlock+0x27/0x40
 [&lt;ffffffff810529b2&gt;] ? __do_page_fault+0x1e2/0x460
 [&lt;ffffffff81204886&gt;] ? __fget_light+0x66/0x90
 [&lt;ffffffff8163f8e2&gt;] __sys_sendmsg+0x42/0x80
 [&lt;ffffffff8163f932&gt;] SyS_sendmsg+0x12/0x20
 [&lt;ffffffff8178cb17&gt;] entry_SYSCALL_64_fastpath+0x12/0x6f
Code: 00 00 44 89 e0 e9 7c fb ff ff 4c 89 ff e8 e7 e7 ff ff 41 8b 9d 80 00 00 00 2b 5d d4 89 d8 c1 f8 03 0f b7 c0 e9 33 ff ff f
 66 66 66 2e 0f 1f 84 00 00 00 00 00 66 66 66 66 90 55 48
RIP  [&lt;ffffffff816a9a92&gt;] ip_do_fragment+0x892/0x8a0
 RSP &lt;ffff88006d603170&gt;

Fixes: 7f8a436eaa2c ("openvswitch: Add conntrack action")
Signed-off-by: Joe Stringer &lt;joe@ovn.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
