lkml.org 
[lkml]   [2015]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[Linux 4.2-rc8+...v4.3-rc2] REGRESSION: ppp: circular locking dependency detected: [pppd] ppp_dev_uninit() | rtnl_lock()
From
On Mon, Sep 21, 2015 at 12:56 AM, Sedat Dilek <sedat.dilek@gmail.com> wrote:
> On Sun, Sep 13, 2015 at 9:19 AM, Sedat Dilek <sedat.dilek@gmail.com> wrote:
>> On Fri, Sep 4, 2015 at 10:32 PM, Sedat Dilek <sedat.dilek@gmail.com> wrote:
>>>> Could this be caused by this commit...?
>>>>
>>>> commit 8cb775bc0a34dc596837e7da03fd22c747be618b
>>>> "ppp: fix device unregistration upon netns deletion"
>>>>
>>>
>>> With the Revert "ppp: fix device unregistration upon netns deletion" I
>>> do not see any lockdep issues.
>>>
>>
>> I still see this issue with Linux v4.3-rc1.
>>
>> [ TEST-CASE (reproducible) ]
>>
>> root# stop network-manager
>>
>> root# modprobe -r -v ppp_deflate
>>
>> [ /TEST-CASE ]
>>
>
> Still seeing this with v4.3-rc2 and above test-case.
>

[ EDIT: Add "REGRESSION" to email-subject ]

Ping! Peng! Pong!

I pulled in net.git/master up to commit
fbd03513bf36c4e5c2942f436f05c8eb99a3cc9e ("net: dsa: Fix Marvell
Egress Trailer check") on top of Linux v4.3-rc2 and still see this.

I am using a 3G/3.5G (UMTS/HSPA) modem to connect to the Internet
(more details see dmesg-log and my kernel-config)

Without reverting the below culprit ppp patch...

commit/?id=8cb775bc0a34dc596837e7da03fd22c747be618b
("ppp: fix device unregistration upon netns deletion")

...I have an unstable Internet connection via Network-Manager/ModemManager.

First I saw this with Linux v4.2.

Please, take care of this issue.

Thanks.

- Sedat -
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 4.3.0-rc2-4-iniza-small (sedat.dilek@gmail.com@fambox) (gcc version 4.9.2 (Ubuntu 4.9.2-0ubuntu1~12.04) ) #1 SMP Wed Sep 23 07:46:11 CEST 2015
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.3.0-rc2-4-iniza-small root=UUID=001AADA61AAD9964 loop=/ubuntu/disks/root.disk ro
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Centaur CentaurHauls
[ 0.000000] Disabled fast string operations
[ 0.000000] x86/fpu: xstate_offset[2]: 0240, xstate_sizes[2]: 0100
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x01: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x02: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x04: 'AVX registers'
[ 0.000000] x86/fpu: Enabled xstate features 0x7, context size is 0x340 bytes, using 'standard' format.
[ 0.000000] x86/fpu: Using 'eager' FPU context switches.
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009d7ff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000009d800-0x000000000009ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000001fffffff] usable
[ 0.000000] BIOS-e820: [mem 0x0000000020000000-0x00000000201fffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000020200000-0x000000003fffffff] usable
[ 0.000000] BIOS-e820: [mem 0x0000000040000000-0x00000000401fffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000040200000-0x00000000d9c9efff] usable
[ 0.000000] BIOS-e820: [mem 0x00000000d9c9f000-0x00000000dae7efff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000dae7f000-0x00000000daf9efff] ACPI NVS
[ 0.000000] BIOS-e820: [mem 0x00000000daf9f000-0x00000000daffefff] ACPI data
[ 0.000000] BIOS-e820: [mem 0x00000000dafff000-0x00000000daffffff] usable
[ 0.000000] BIOS-e820: [mem 0x00000000db000000-0x00000000df9fffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000f8000000-0x00000000fbffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fed08000-0x00000000fed08fff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fed10000-0x00000000fed19fff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fed1c000-0x00000000fed1ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fee00000-0x00000000fee00fff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000ffd80000-0x00000000ffffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000011fdfffff] usable
[ 0.000000] NX (Execute Disable) protection: active
[ 0.000000] SMBIOS 2.6 present.
[ 0.000000] DMI: SAMSUNG ELECTRONICS CO., LTD. 530U3BI/530U4BI/530U4BH/530U3BI/530U4BI/530U4BH, BIOS 13XK 03/28/2013
[ 0.000000] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
[ 0.000000] e820: remove [mem 0x000a0000-0x000fffff] usable
[ 0.000000] e820: last_pfn = 0x11fe00 max_arch_pfn = 0x400000000
[ 0.000000] MTRR default type: uncachable
[ 0.000000] MTRR fixed ranges enabled:
[ 0.000000] 00000-9FFFF write-back
[ 0.000000] A0000-BFFFF uncachable
[ 0.000000] C0000-FFFFF write-protect
[ 0.000000] MTRR variable ranges enabled:
[ 0.000000] 0 base 000000000 mask F80000000 write-back
[ 0.000000] 1 base 080000000 mask FC0000000 write-back
[ 0.000000] 2 base 0C0000000 mask FE0000000 write-back
[ 0.000000] 3 base 0DC000000 mask FFC000000 uncachable
[ 0.000000] 4 base 0DB000000 mask FFF000000 uncachable
[ 0.000000] 5 base 100000000 mask FE0000000 write-back
[ 0.000000] 6 base 11FE00000 mask FFFE00000 uncachable
[ 0.000000] 7 base 0FFC00000 mask FFFC00000 write-protect
[ 0.000000] 8 disabled
[ 0.000000] 9 disabled
[ 0.000000] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WC UC- WT
[ 0.000000] e820: last_pfn = 0xdb000 max_arch_pfn = 0x400000000
[ 0.000000] found SMP MP-table at [mem 0x000f00e0-0x000f00ef] mapped at [ffff8800000f00e0]
[ 0.000000] Scanning 1 areas for low memory corruption
[ 0.000000] Base memory trampoline at [ffff880000097000] 97000 size 24576
[ 0.000000] reserving inaccessible SNB gfx pages
[ 0.000000] init_memory_mapping: [mem 0x00000000-0x000fffff]
[ 0.000000] [mem 0x00000000-0x000fffff] page 4k
[ 0.000000] BRK [0x02ccc000, 0x02cccfff] PGTABLE
[ 0.000000] BRK [0x02ccd000, 0x02ccdfff] PGTABLE
[ 0.000000] BRK [0x02cce000, 0x02ccefff] PGTABLE
[ 0.000000] init_memory_mapping: [mem 0x11fc00000-0x11fdfffff]
[ 0.000000] [mem 0x11fc00000-0x11fdfffff] page 2M
[ 0.000000] BRK [0x02ccf000, 0x02ccffff] PGTABLE
[ 0.000000] init_memory_mapping: [mem 0x100000000-0x11fbfffff]
[ 0.000000] [mem 0x100000000-0x11fbfffff] page 2M
[ 0.000000] init_memory_mapping: [mem 0xc0000000-0xd9c9efff]
[ 0.000000] [mem 0xc0000000-0xd9bfffff] page 2M
[ 0.000000] [mem 0xd9c00000-0xd9c9efff] page 4k
[ 0.000000] BRK [0x02cd0000, 0x02cd0fff] PGTABLE
[ 0.000000] BRK [0x02cd1000, 0x02cd1fff] PGTABLE
[ 0.000000] init_memory_mapping: [mem 0xdafff000-0xdaffffff]
[ 0.000000] [mem 0xdafff000-0xdaffffff] page 4k
[ 0.000000] init_memory_mapping: [mem 0x00100000-0x1fffffff]
[ 0.000000] [mem 0x00100000-0x001fffff] page 4k
[ 0.000000] [mem 0x00200000-0x1fffffff] page 2M
[ 0.000000] init_memory_mapping: [mem 0x20200000-0x3fffffff]
[ 0.000000] [mem 0x20200000-0x3fffffff] page 2M
[ 0.000000] init_memory_mapping: [mem 0x40200000-0xbfffffff]
[ 0.000000] [mem 0x40200000-0xbfffffff] page 2M
[ 0.000000] RAMDISK: [mem 0x3790e000-0x37c7efff]
[ 0.000000] ACPI: Early table checksum verification disabled
[ 0.000000] ACPI: RSDP 0x00000000000F0100 000024 (v02 SECCSD)
[ 0.000000] ACPI: XSDT 0x00000000DAFFE170 00008C (v01 SECCSD LH43STAR 00000002 PTEC 00000002)
[ 0.000000] ACPI: FACP 0x00000000DAFEF000 00010C (v05 SECCSD LH43STAR 00000002 PTL 00000002)
[ 0.000000] ACPI: DSDT 0x00000000DAFF2000 0083AC (v02 SECCSD SNB-CPT 00000000 INTL 20061109)
[ 0.000000] ACPI: FACS 0x00000000DAF47000 000040
[ 0.000000] ACPI: SLIC 0x00000000DAFFD000 000176 (v01 SECCSD LH43STAR 00000002 PTEC 00000001)
[ 0.000000] ACPI: SSDT 0x00000000DAFFB000 001068 (v01 SECCSD PtidDevc 00001000 INTL 20061109)
[ 0.000000] ACPI: ASF! 0x00000000DAFF1000 0000A5 (v32 SECCSD LH43STAR 00000002 PTL 00000002)
[ 0.000000] ACPI: HPET 0x00000000DAFEE000 000038 (v01 SECCSD LH43STAR 00000002 PTL 00000002)
[ 0.000000] ACPI: APIC 0x00000000DAFED000 000098 (v03 SECCSD LH43STAR 00000002 PTL 00000002)
[ 0.000000] ACPI: MCFG 0x00000000DAFEC000 00003C (v01 SECCSD LH43STAR 00000002 PTL 00000002)
[ 0.000000] ACPI: SSDT 0x00000000DAFEB000 000804 (v01 PmRef Cpu0Ist 00003000 INTL 20061109)
[ 0.000000] ACPI: SSDT 0x00000000DAFEA000 000996 (v01 PmRef CpuPm 00003000 INTL 20061109)
[ 0.000000] ACPI: UEFI 0x00000000DAFE9000 00003E (v01 SECCSD LH43STAR 00000002 PTL 00000002)
[ 0.000000] ACPI: UEFI 0x00000000DAFE8000 000042 (v01 PTL COMBUF 00000001 PTL 00000001)
[ 0.000000] ACPI: UEFI 0x00000000DAFE7000 00026A (v01 SECCSD LH43STAR 00000002 PTL 00000002)
[ 0.000000] ACPI: SSDT 0x00000000DAFE6000 0000D0 (v01 Iffs IffsAsl 00003000 INTL 20061109)
[ 0.000000] ACPI: Local APIC address 0xfee00000
[ 0.000000] No NUMA configuration found
[ 0.000000] Faking a node at [mem 0x0000000000000000-0x000000011fdfffff]
[ 0.000000] NODE_DATA(0) allocated [mem 0x11fdf8000-0x11fdfcfff]
[ 0.000000] [ffffea0000000000-ffffea00047fffff] PMD -> [ffff88011b400000-ffff88011f3fffff] on node 0
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000001000-0x0000000000ffffff]
[ 0.000000] DMA32 [mem 0x0000000001000000-0x00000000ffffffff]
[ 0.000000] Normal [mem 0x0000000100000000-0x000000011fdfffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000001000-0x000000000009cfff]
[ 0.000000] node 0: [mem 0x0000000000100000-0x000000001fffffff]
[ 0.000000] node 0: [mem 0x0000000020200000-0x000000003fffffff]
[ 0.000000] node 0: [mem 0x0000000040200000-0x00000000d9c9efff]
[ 0.000000] node 0: [mem 0x00000000dafff000-0x00000000daffffff]
[ 0.000000] node 0: [mem 0x0000000100000000-0x000000011fdfffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000001000-0x000000011fdfffff]
[ 0.000000] On node 0 totalpages: 1021500
[ 0.000000] DMA zone: 64 pages used for memmap
[ 0.000000] DMA zone: 156 pages reserved
[ 0.000000] DMA zone: 3996 pages, LIFO batch:0
[ 0.000000] DMA32 zone: 13859 pages used for memmap
[ 0.000000] DMA32 zone: 886944 pages, LIFO batch:31
[ 0.000000] Normal zone: 2040 pages used for memmap
[ 0.000000] Normal zone: 130560 pages, LIFO batch:31
[ 0.000000] Reserving Intel graphics stolen memory at 0xdba00000-0xdf9fffff
[ 0.000000] ACPI: PM-Timer IO Port: 0x408
[ 0.000000] ACPI: Local APIC address 0xfee00000
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1])
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
[ 0.000000] IOAPIC[0]: apic_id 14, version 32, address 0xfec00000, GSI 0-23
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[ 0.000000] ACPI: IRQ0 used by override.
[ 0.000000] ACPI: IRQ9 used by override.
[ 0.000000] Using ACPI (MADT) for SMP configuration information
[ 0.000000] ACPI: HPET id: 0x8086a301 base: 0xfed00000
[ 0.000000] smpboot: Allowing 8 CPUs, 4 hotplug CPUs
[ 0.000000] PM: Registered nosave memory: [mem 0x00000000-0x00000fff]
[ 0.000000] PM: Registered nosave memory: [mem 0x0009d000-0x0009dfff]
[ 0.000000] PM: Registered nosave memory: [mem 0x0009e000-0x0009ffff]
[ 0.000000] PM: Registered nosave memory: [mem 0x000a0000-0x000dffff]
[ 0.000000] PM: Registered nosave memory: [mem 0x000e0000-0x000fffff]
[ 0.000000] PM: Registered nosave memory: [mem 0x20000000-0x201fffff]
[ 0.000000] PM: Registered nosave memory: [mem 0x40000000-0x401fffff]
[ 0.000000] PM: Registered nosave memory: [mem 0xd9c9f000-0xdae7efff]
[ 0.000000] PM: Registered nosave memory: [mem 0xdae7f000-0xdaf9efff]
[ 0.000000] PM: Registered nosave memory: [mem 0xdaf9f000-0xdaffefff]
[ 0.000000] PM: Registered nosave memory: [mem 0xdb000000-0xdf9fffff]
[ 0.000000] PM: Registered nosave memory: [mem 0xdfa00000-0xf7ffffff]
[ 0.000000] PM: Registered nosave memory: [mem 0xf8000000-0xfbffffff]
[ 0.000000] PM: Registered nosave memory: [mem 0xfc000000-0xfebfffff]
[ 0.000000] PM: Registered nosave memory: [mem 0xfec00000-0xfec00fff]
[ 0.000000] PM: Registered nosave memory: [mem 0xfec01000-0xfed07fff]
[ 0.000000] PM: Registered nosave memory: [mem 0xfed08000-0xfed08fff]
[ 0.000000] PM: Registered nosave memory: [mem 0xfed09000-0xfed0ffff]
[ 0.000000] PM: Registered nosave memory: [mem 0xfed10000-0xfed19fff]
[ 0.000000] PM: Registered nosave memory: [mem 0xfed1a000-0xfed1bfff]
[ 0.000000] PM: Registered nosave memory: [mem 0xfed1c000-0xfed1ffff]
[ 0.000000] PM: Registered nosave memory: [mem 0xfed20000-0xfedfffff]
[ 0.000000] PM: Registered nosave memory: [mem 0xfee00000-0xfee00fff]
[ 0.000000] PM: Registered nosave memory: [mem 0xfee01000-0xffd7ffff]
[ 0.000000] PM: Registered nosave memory: [mem 0xffd80000-0xffffffff]
[ 0.000000] e820: [mem 0xdfa00000-0xf7ffffff] available for PCI devices
[ 0.000000] Booting paravirtualized kernel on bare hardware
[ 0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645519600211568 ns
[ 0.000000] setup_percpu: NR_CPUS:256 nr_cpumask_bits:256 nr_cpu_ids:8 nr_node_ids:1
[ 0.000000] PERCPU: Embedded 34 pages/cpu @ffff88011fa00000 s101576 r8192 d29496 u262144
[ 0.000000] pcpu-alloc: s101576 r8192 d29496 u262144 alloc=1*2097152
[ 0.000000] pcpu-alloc: [0] 0 1 2 3 4 5 6 7
[ 0.000000] Built 1 zonelists in Node order, mobility grouping on. Total pages: 1005381
[ 0.000000] Policy zone: Normal
[ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.3.0-rc2-4-iniza-small root=UUID=001AADA61AAD9964 loop=/ubuntu/disks/root.disk ro
[ 0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.000000] Calgary: detecting Calgary via BIOS EBDA area
[ 0.000000] Calgary: Unable to locate Rio Grande table in EBDA - bailing!
[ 0.000000] Memory: 3918804K/4086000K available (7958K kernel code, 1377K rwdata, 3500K rodata, 1408K init, 14376K bss, 167196K reserved, 0K cma-reserved)
[ 0.000000] Running RCU self tests
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU lockdep checking is enabled.
[ 0.000000] Build-time adjustment of leaf fanout to 64.
[ 0.000000] RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=8.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=8
[ 0.000000] NR_IRQS:16640 nr_irqs:488 16
[ 0.000000] Console: colour dummy device 80x25
[ 0.000000] console [tty0] enabled
[ 0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[ 0.000000] ... MAX_LOCKDEP_SUBCLASSES: 8
[ 0.000000] ... MAX_LOCK_DEPTH: 48
[ 0.000000] ... MAX_LOCKDEP_KEYS: 8191
[ 0.000000] ... CLASSHASH_SIZE: 4096
[ 0.000000] ... MAX_LOCKDEP_ENTRIES: 32768
[ 0.000000] ... MAX_LOCKDEP_CHAINS: 65536
[ 0.000000] ... CHAINHASH_SIZE: 32768
[ 0.000000] memory used by lock dependency info: 8159 kB
[ 0.000000] per task-struct memory footprint: 1920 bytes
[ 0.000000] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 133484882848 ns
[ 0.000000] hpet clockevent registered
[ 0.000000] tsc: Fast TSC calibration using PIT
[ 0.000000] tsc: Detected 1596.456 MHz processor
[ 0.000073] Calibrating delay loop (skipped), value calculated using timer frequency.. 3192.91 BogoMIPS (lpj=6385824)
[ 0.000086] pid_max: default: 32768 minimum: 301
[ 0.000110] ACPI: Core revision 20150818
[ 0.018760] ACPI: 5 ACPI AML tables successfully acquired and loaded
[ 0.018939] Security Framework initialized
[ 0.018946] Yama: becoming mindful.
[ 0.018979] AppArmor: AppArmor initialized
[ 0.019834] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
[ 0.021145] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
[ 0.021622] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.021644] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.022721] Initializing cgroup subsys io
[ 0.022761] Initializing cgroup subsys memory
[ 0.022785] Initializing cgroup subsys devices
[ 0.022815] Initializing cgroup subsys freezer
[ 0.022845] Initializing cgroup subsys perf_event
[ 0.022857] Initializing cgroup subsys hugetlb
[ 0.022909] Disabled fast string operations
[ 0.022915] CPU: Physical Processor ID: 0
[ 0.022920] CPU: Processor Core ID: 0
[ 0.022929] ENERGY_PERF_BIAS: Set to 'normal', was 'performance'
[ 0.022935] ENERGY_PERF_BIAS: View and update with x86_energy_perf_policy(8)
[ 0.022943] mce: CPU supports 7 MCE banks
[ 0.022980] CPU0: Thermal monitoring enabled (TM1)
[ 0.022999] process: using mwait in idle threads
[ 0.023008] Last level iTLB entries: 4KB 512, 2MB 8, 4MB 8
[ 0.023014] Last level dTLB entries: 4KB 512, 2MB 32, 4MB 32, 1GB 0
[ 0.023649] Freeing SMP alternatives memory: 24K (ffffffff81eba000 - ffffffff81ec0000)
[ 0.039596] ftrace: allocating 29346 entries in 115 pages
[ 0.056049] x2apic: IRQ remapping doesn't support X2APIC mode
[ 0.056709] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[ 0.096380] TSC deadline timer enabled
[ 0.096386] smpboot: CPU0: Intel(R) Core(TM) i5-2467M CPU @ 1.60GHz (family: 0x6, model: 0x2a, stepping: 0x7)
[ 0.096440] Performance Events: PEBS fmt1+, 16-deep LBR, SandyBridge events, full-width counters, Intel PMU driver.
[ 0.096482] ... version: 3
[ 0.096488] ... bit width: 48
[ 0.096492] ... generic registers: 4
[ 0.096497] ... value mask: 0000ffffffffffff
[ 0.096503] ... max period: 0000ffffffffffff
[ 0.096508] ... fixed-purpose events: 3
[ 0.096513] ... event mask: 000000070000000f
[ 0.098418] x86: Booting SMP configuration:
[ 0.098425] .... node #0, CPUs: #1
[ 0.098759] Disabled fast string operations
[ 0.101301] NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter.
[ 0.101834] #2
[ 0.102140] Disabled fast string operations
[ 0.104688] #3<6>[ 0.104998] Disabled fast string operations
[ 0.107128] x86: Booted up 1 node, 4 CPUs
[ 0.107142] smpboot: Total of 4 processors activated (12771.64 BogoMIPS)
[ 0.111796] devtmpfs: initialized
[ 0.116592] evm: security.selinux
[ 0.116599] evm: security.SMACK64
[ 0.116603] evm: security.capability
[ 0.116795] PM: Registering ACPI NVS region [mem 0xdae7f000-0xdaf9efff] (1179648 bytes)
[ 0.117146] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.118585] NET: Registered protocol family 16
[ 0.130900] cpuidle: using governor ladder
[ 0.146826] cpuidle: using governor menu
[ 0.147041] ACPI: bus type PCI registered
[ 0.147339] PCI: MMCONFIG for domain 0000 [bus 00-3f] at [mem 0xf8000000-0xfbffffff] (base 0xf8000000)
[ 0.147351] PCI: MMCONFIG at [mem 0xf8000000-0xfbffffff] reserved in E820
[ 0.147365] PCI: Using configuration type 1 for base access
[ 0.148011] perf_event_intel: PMU erratum BJ122, BV98, HSD29 worked around, HT is on
[ 0.164398] ACPI: Added _OSI(Module Device)
[ 0.164406] ACPI: Added _OSI(Processor Device)
[ 0.164412] ACPI: Added _OSI(3.0 _SCP Extensions)
[ 0.164418] ACPI: Added _OSI(Processor Aggregator Device)
[ 0.176286] ACPI: Executed 1 blocks of module-level executable AML code
[ 0.184803] [Firmware Bug]: ACPI: BIOS _OSI(Linux) query ignored
[ 0.186615] ACPI: Dynamic OEM Table Load:
[ 0.186644] ACPI: SSDT 0xFFFF88011B0A7800 000688 (v01 PmRef Cpu0Cst 00003001 INTL 20061109)
[ 0.188815] ACPI: Dynamic OEM Table Load:
[ 0.188841] ACPI: SSDT 0xFFFF88011A012800 000303 (v01 PmRef ApIst 00003000 INTL 20061109)
[ 0.190815] ACPI: Dynamic OEM Table Load:
[ 0.190840] ACPI: SSDT 0xFFFF88011A015C00 000119 (v01 PmRef ApCst 00003000 INTL 20061109)
[ 0.194177] ACPI : EC: EC started
[ 0.195781] ACPI: Interpreter enabled
[ 0.195805] ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S2_] (20150818/hwxface-580)
[ 0.195863] ACPI: (supports S0 S1 S3 S4 S5)
[ 0.195869] ACPI: Using IOAPIC for interrupt routing
[ 0.195945] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[ 0.217008] ACPI: Power Resource [FN00] (off)
[ 0.217441] ACPI: Power Resource [FN01] (off)
[ 0.217771] ACPI: Power Resource [FN02] (off)
[ 0.218101] ACPI: Power Resource [FN03] (off)
[ 0.218428] ACPI: Power Resource [FN04] (off)
[ 0.220755] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-3e])
[ 0.220769] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI]
[ 0.221394] \_SB_.PCI0:_OSC invalid UUID
[ 0.221396] _OSC request data:1 1f 0
[ 0.221402] acpi PNP0A08:00: _OSC failed (AE_ERROR); disabling ASPM
[ 0.222276] PCI host bridge to bus 0000:00
[ 0.222284] pci_bus 0000:00: root bus resource [bus 00-3e]
[ 0.222292] pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7 window]
[ 0.222299] pci_bus 0000:00: root bus resource [io 0x0d00-0xffff window]
[ 0.222306] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
[ 0.222315] pci_bus 0000:00: root bus resource [mem 0xdfa00000-0xfeafffff window]
[ 0.222325] pci_bus 0000:00: root bus resource [mem 0xfed40000-0xfed44fff window]
[ 0.222412] pci 0000:00:00.0: [8086:0104] type 00 class 0x060000
[ 0.222785] pci 0000:00:02.0: [8086:0116] type 00 class 0x030000
[ 0.222812] pci 0000:00:02.0: reg 0x10: [mem 0xf0000000-0xf03fffff 64bit]
[ 0.222823] pci 0000:00:02.0: reg 0x18: [mem 0xe0000000-0xefffffff 64bit pref]
[ 0.222832] pci 0000:00:02.0: reg 0x20: [io 0x3000-0x303f]
[ 0.223277] pci 0000:00:16.0: [8086:1c3a] type 00 class 0x078000
[ 0.223338] pci 0000:00:16.0: reg 0x10: [mem 0xf0705000-0xf070500f 64bit]
[ 0.223454] pci 0000:00:16.0: PME# supported from D0 D3hot D3cold
[ 0.223796] pci 0000:00:1a.0: [8086:1c2d] type 00 class 0x0c0320
[ 0.223849] pci 0000:00:1a.0: reg 0x10: [mem 0xf070a000-0xf070a3ff]
[ 0.223982] pci 0000:00:1a.0: PME# supported from D0 D3hot D3cold
[ 0.224286] pci 0000:00:1b.0: [8086:1c20] type 00 class 0x040300
[ 0.224346] pci 0000:00:1b.0: reg 0x10: [mem 0xf0700000-0xf0703fff 64bit]
[ 0.224480] pci 0000:00:1b.0: PME# supported from D0 D3hot D3cold
[ 0.224662] pci 0000:00:1b.0: System wakeup disabled by ACPI
[ 0.224824] pci 0000:00:1c.0: [8086:1c10] type 01 class 0x060400
[ 0.224971] pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold
[ 0.225131] pci 0000:00:1c.0: System wakeup disabled by ACPI
[ 0.225299] pci 0000:00:1c.3: [8086:1c16] type 01 class 0x060400
[ 0.225443] pci 0000:00:1c.3: PME# supported from D0 D3hot D3cold
[ 0.225605] pci 0000:00:1c.3: System wakeup disabled by ACPI
[ 0.225766] pci 0000:00:1c.4: [8086:1c18] type 01 class 0x060400
[ 0.225912] pci 0000:00:1c.4: PME# supported from D0 D3hot D3cold
[ 0.226225] pci 0000:00:1d.0: [8086:1c26] type 00 class 0x0c0320
[ 0.226279] pci 0000:00:1d.0: reg 0x10: [mem 0xf0709000-0xf07093ff]
[ 0.226412] pci 0000:00:1d.0: PME# supported from D0 D3hot D3cold
[ 0.226721] pci 0000:00:1f.0: [8086:1c49] type 00 class 0x060100
[ 0.227180] pci 0000:00:1f.2: [8086:1c03] type 00 class 0x010601
[ 0.227238] pci 0000:00:1f.2: reg 0x10: [io 0x3088-0x308f]
[ 0.227255] pci 0000:00:1f.2: reg 0x14: [io 0x3094-0x3097]
[ 0.227271] pci 0000:00:1f.2: reg 0x18: [io 0x3080-0x3087]
[ 0.227288] pci 0000:00:1f.2: reg 0x1c: [io 0x3090-0x3093]
[ 0.227305] pci 0000:00:1f.2: reg 0x20: [io 0x3060-0x307f]
[ 0.227322] pci 0000:00:1f.2: reg 0x24: [mem 0xf0708000-0xf07087ff]
[ 0.227386] pci 0000:00:1f.2: PME# supported from D3hot
[ 0.227679] pci 0000:00:1f.3: [8086:1c22] type 00 class 0x0c0500
[ 0.227716] pci 0000:00:1f.3: reg 0x10: [mem 0xf0704000-0xf07040ff 64bit]
[ 0.227762] pci 0000:00:1f.3: reg 0x20: [io 0xefa0-0xefbf]
[ 0.228177] pci 0000:00:1c.0: PCI bridge to [bus 01]
[ 0.228193] pci 0000:00:1c.0: bridge window [mem 0xf0600000-0xf06fffff]
[ 0.228460] pci 0000:01:00.0: [8086:0091] type 00 class 0x028000
[ 0.229098] pci 0000:01:00.0: reg 0x10: [mem 0xf0600000-0xf0601fff 64bit]
[ 0.230489] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[ 0.230795] pci 0000:01:00.0: System wakeup disabled by ACPI
[ 0.239323] pci 0000:00:1c.3: PCI bridge to [bus 02]
[ 0.239335] pci 0000:00:1c.3: bridge window [io 0x2000-0x2fff]
[ 0.239350] pci 0000:00:1c.3: bridge window [mem 0xf0400000-0xf04fffff 64bit pref]
[ 0.239430] pci 0000:02:00.0: [10ec:8168] type 00 class 0x020000
[ 0.239628] pci 0000:02:00.0: reg 0x10: [io 0x2000-0x20ff]
[ 0.239765] pci 0000:02:00.0: reg 0x18: [mem 0xf0404000-0xf0404fff 64bit pref]
[ 0.239849] pci 0000:02:00.0: reg 0x20: [mem 0xf0400000-0xf0403fff 64bit pref]
[ 0.240148] pci 0000:02:00.0: supports D1 D2
[ 0.240150] pci 0000:02:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[ 0.240307] pci 0000:02:00.0: System wakeup disabled by ACPI
[ 0.247229] pci 0000:00:1c.4: PCI bridge to [bus 03]
[ 0.247245] pci 0000:00:1c.4: bridge window [mem 0xf0500000-0xf05fffff]
[ 0.247290] pci 0000:03:00.0: [1b21:1042] type 00 class 0x0c0330
[ 0.247371] pci 0000:03:00.0: reg 0x10: [mem 0xf0500000-0xf0507fff 64bit]
[ 0.247568] pci 0000:03:00.0: PME# supported from D3hot D3cold
[ 0.249872] ACPI: PCI Interrupt Link [LNKA] (IRQs 1 3 4 5 6 10 *11 12 14 15)
[ 0.250050] ACPI: PCI Interrupt Link [LNKB] (IRQs 1 3 4 5 6 10 11 12 14 15) *0, disabled.
[ 0.250230] ACPI: PCI Interrupt Link [LNKC] (IRQs 1 3 4 5 6 *10 11 12 14 15)
[ 0.250405] ACPI: PCI Interrupt Link [LNKD] (IRQs 1 3 4 5 6 *10 11 12 14 15)
[ 0.250579] ACPI: PCI Interrupt Link [LNKE] (IRQs 1 3 4 5 6 10 11 12 14 15) *9
[ 0.250762] ACPI: PCI Interrupt Link [LNKF] (IRQs 1 3 4 5 6 10 11 12 14 15) *0, disabled.
[ 0.250941] ACPI: PCI Interrupt Link [LNKG] (IRQs 1 3 4 5 6 10 *11 12 14 15)
[ 0.251157] ACPI: PCI Interrupt Link [LNKH] (IRQs 1 3 4 5 6 10 11 12 14 15) *9
[ 0.252514] ACPI: Enabled 4 GPEs in block 00 to 3F
[ 0.252656] ACPI : EC: GPE = 0x17, I/O: command/status = 0x66, data = 0x62
[ 0.253187] ACPI : EC: 0 stale EC events cleared
[ 0.253926] vgaarb: setting as boot device: PCI:0000:00:02.0
[ 0.253934] vgaarb: device added: PCI:0000:00:02.0,decodes=io+mem,owns=io+mem,locks=none
[ 0.253949] vgaarb: loaded
[ 0.253954] vgaarb: bridge control possible 0000:00:02.0
[ 0.254677] SCSI subsystem initialized
[ 0.254838] libata version 3.00 loaded.
[ 0.254925] ACPI: bus type USB registered
[ 0.255020] usbcore: registered new interface driver usbfs
[ 0.255059] usbcore: registered new interface driver hub
[ 0.255146] usbcore: registered new device driver usb
[ 0.255628] PCI: Using ACPI for IRQ routing
[ 0.259230] PCI: pci_cache_line_size set to 64 bytes
[ 0.259359] e820: reserve RAM buffer [mem 0x0009d800-0x0009ffff]
[ 0.259368] e820: reserve RAM buffer [mem 0xd9c9f000-0xdbffffff]
[ 0.259371] e820: reserve RAM buffer [mem 0xdb000000-0xdbffffff]
[ 0.259373] e820: reserve RAM buffer [mem 0x11fe00000-0x11fffffff]
[ 0.260093] NetLabel: Initializing
[ 0.260100] NetLabel: domain hash size = 128
[ 0.260105] NetLabel: protocols = UNLABELED CIPSOv4
[ 0.260160] NetLabel: unlabeled traffic allowed by default
[ 0.260380] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0, 0, 0, 0, 0, 0
[ 0.260394] hpet0: 8 comparators, 64-bit 14.318180 MHz counter
[ 0.262488] clocksource: Switched to clocksource hpet
[ 0.303347] AppArmor: AppArmor Filesystem Enabled
[ 0.303604] pnp: PnP ACPI init
[ 0.304299] system 00:00: [io 0x0680-0x069f] has been reserved
[ 0.304310] system 00:00: [io 0x1000-0x100f] has been reserved
[ 0.304317] system 00:00: [io 0x5000-0x5003] has been reserved
[ 0.304325] system 00:00: [io 0xffff] has been reserved
[ 0.304333] system 00:00: [io 0x0400-0x0453] could not be reserved
[ 0.304341] system 00:00: [io 0x0458-0x047f] has been reserved
[ 0.304348] system 00:00: [io 0x0500-0x057f] has been reserved
[ 0.304356] system 00:00: [io 0x0a00-0x0a0f] has been reserved
[ 0.304363] system 00:00: [io 0x164e-0x164f] has been reserved
[ 0.304371] system 00:00: [io 0x5000-0x500f] could not be reserved
[ 0.304409] system 00:00: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.304501] pnp 00:01: Plug and Play ACPI device, IDs PNP0b00 (active)
[ 0.304655] system 00:02: [io 0x0454-0x0457] has been reserved
[ 0.304668] system 00:02: Plug and Play ACPI device, IDs INT3f0d PNP0c02 (active)
[ 0.304766] pnp 00:03: Plug and Play ACPI device, IDs PNP0303 (active)
[ 0.304889] pnp 00:04: Plug and Play ACPI device, IDs ETD0b00 SYN0002 PNP0f13 (active)
[ 0.305331] system 00:05: [mem 0xfed1c000-0xfed1ffff] has been reserved
[ 0.305340] system 00:05: [mem 0xfed10000-0xfed17fff] has been reserved
[ 0.305348] system 00:05: [mem 0xfed18000-0xfed18fff] has been reserved
[ 0.305356] system 00:05: [mem 0xfed19000-0xfed19fff] has been reserved
[ 0.305364] system 00:05: [mem 0xf8000000-0xfbffffff] has been reserved
[ 0.305372] system 00:05: [mem 0xfed20000-0xfed3ffff] has been reserved
[ 0.305379] system 00:05: [mem 0xfed90000-0xfed93fff] has been reserved
[ 0.305387] system 00:05: [mem 0xfed45000-0xfed8ffff] has been reserved
[ 0.305395] system 00:05: [mem 0xff000000-0xffffffff] could not be reserved
[ 0.305404] system 00:05: [mem 0xfee00000-0xfeefffff] could not be reserved
[ 0.305415] system 00:05: Plug and Play ACPI device, IDs PNP0c02 (active)
[ 0.306276] system 00:06: Plug and Play ACPI device, IDs PNP0c01 (active)
[ 0.306333] pnp: PnP ACPI: found 7 devices
[ 0.317506] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
[ 0.317572] pci 0000:00:1c.0: PCI bridge to [bus 01]
[ 0.317587] pci 0000:00:1c.0: bridge window [mem 0xf0600000-0xf06fffff]
[ 0.317606] pci 0000:00:1c.3: PCI bridge to [bus 02]
[ 0.317615] pci 0000:00:1c.3: bridge window [io 0x2000-0x2fff]
[ 0.317632] pci 0000:00:1c.3: bridge window [mem 0xf0400000-0xf04fffff 64bit pref]
[ 0.317650] pci 0000:00:1c.4: PCI bridge to [bus 03]
[ 0.317662] pci 0000:00:1c.4: bridge window [mem 0xf0500000-0xf05fffff]
[ 0.317682] pci_bus 0000:00: resource 4 [io 0x0000-0x0cf7 window]
[ 0.317685] pci_bus 0000:00: resource 5 [io 0x0d00-0xffff window]
[ 0.317687] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff window]
[ 0.317689] pci_bus 0000:00: resource 7 [mem 0xdfa00000-0xfeafffff window]
[ 0.317691] pci_bus 0000:00: resource 8 [mem 0xfed40000-0xfed44fff window]
[ 0.317693] pci_bus 0000:01: resource 1 [mem 0xf0600000-0xf06fffff]
[ 0.317695] pci_bus 0000:02: resource 0 [io 0x2000-0x2fff]
[ 0.317697] pci_bus 0000:02: resource 2 [mem 0xf0400000-0xf04fffff 64bit pref]
[ 0.317700] pci_bus 0000:03: resource 1 [mem 0xf0500000-0xf05fffff]
[ 0.317829] NET: Registered protocol family 2
[ 0.318488] TCP established hash table entries: 32768 (order: 6, 262144 bytes)
[ 0.318965] TCP bind hash table entries: 32768 (order: 9, 2097152 bytes)
[ 0.321230] TCP: Hash tables configured (established 32768 bind 32768)
[ 0.321384] UDP hash table entries: 2048 (order: 6, 327680 bytes)
[ 0.321739] UDP-Lite hash table entries: 2048 (order: 6, 327680 bytes)
[ 0.322303] NET: Registered protocol family 1
[ 0.322338] pci 0000:00:02.0: Video device with shadowed ROM
[ 0.322561] PCI: CLS 64 bytes, default 64
[ 0.322823] Trying to unpack rootfs image as initramfs...
[ 0.407484] Freeing initrd memory: 3524K (ffff88003790e000 - ffff880037c7f000)
[ 0.407583] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[ 0.407591] software IO TLB [mem 0xd5c9f000-0xd9c9f000] (64MB) mapped at [ffff8800d5c9f000-ffff8800d9c9efff]
[ 0.407767] RAPL PMU detected, API unit is 2^-32 Joules, 3 fixed counters 163840 ms ovfl timer
[ 0.407778] hw unit of domain pp0-core 2^-16 Joules
[ 0.407783] hw unit of domain package 2^-16 Joules
[ 0.407788] hw unit of domain pp1-gpu 2^-16 Joules
[ 0.408076] microcode: CPU0 sig=0x206a7, pf=0x10, revision=0x28
[ 0.408100] microcode: CPU1 sig=0x206a7, pf=0x10, revision=0x28
[ 0.408125] microcode: CPU2 sig=0x206a7, pf=0x10, revision=0x28
[ 0.408151] microcode: CPU3 sig=0x206a7, pf=0x10, revision=0x28
[ 0.408339] microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba
[ 0.408417] Scanning for low memory corruption every 60 seconds
[ 0.409751] futex hash table entries: 2048 (order: 6, 262144 bytes)
[ 0.409962] audit: initializing netlink subsys (disabled)
[ 0.410052] audit: type=2000 audit(1442994791.396:1): initialized
[ 0.411043] Initialise system trusted keyring
[ 0.411353] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[ 0.411951] VFS: Disk quotas dquot_6.6.0
[ 0.411995] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.412833] fuse init (API version 7.23)
[ 0.415157] Key type asymmetric registered
[ 0.415182] Asymmetric key parser 'x509' registered
[ 0.415242] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[ 0.415408] io scheduler noop registered
[ 0.415418] io scheduler deadline registered (default)
[ 0.415462] io scheduler cfq registered
[ 0.415470] start plist test
[ 0.418087] end plist test
[ 0.419533] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[ 0.419560] pciehp: PCI Express Hot Plug Controller Driver version: 0.4
[ 0.419787] intel_idle: MWAIT substates: 0x21120
[ 0.419789] intel_idle: v0.4 model 0x2A
[ 0.419790] intel_idle: lapic_timer_reliable_states 0xffffffff
[ 0.421186] ACPI: AC Adapter [ADP1] (on-line)
[ 0.421439] input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input0
[ 0.421495] ACPI: Lid Switch [LID0]
[ 0.421637] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input1
[ 0.421686] ACPI: Power Button [PWRB]
[ 0.421838] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input2
[ 0.421850] ACPI: Power Button [PWRF]
[ 0.426582] thermal LNXTHERM:00: registered as thermal_zone0
[ 0.426590] ACPI: Thermal Zone [TZ00] (65 C)
[ 0.427170] thermal LNXTHERM:01: registered as thermal_zone1
[ 0.427177] ACPI: Thermal Zone [TZ01] (30 C)
[ 0.427293] GHES: HEST is not enabled!
[ 0.427656] Serial: 8250/16550 driver, 32 ports, IRQ sharing enabled
[ 0.434723] ACPI: Battery Slot [BAT1] (battery present)
[ 0.437605] Linux agpgart interface v0.103
[ 0.448131] brd: module loaded
[ 0.453933] loop: module loaded
[ 0.459137] ahci 0000:00:1f.2: version 3.0
[ 0.459562] ahci 0000:00:1f.2: SSS flag set, parallel bus scan disabled
[ 0.474520] ahci 0000:00:1f.2: AHCI 0001.0300 32 slots 6 ports 6 Gbps 0x1b impl SATA mode
[ 0.474535] ahci 0000:00:1f.2: flags: 64bit ncq sntf ilck stag pm led clo pio slum part ems sxs apst
[ 0.500712] scsi host0: ahci
[ 0.501391] scsi host1: ahci
[ 0.501866] scsi host2: ahci
[ 0.502340] scsi host3: ahci
[ 0.502834] scsi host4: ahci
[ 0.503308] scsi host5: ahci
[ 0.503525] ata1: SATA max UDMA/133 abar m2048@0xf0708000 port 0xf0708100 irq 25
[ 0.503536] ata2: SATA max UDMA/133 abar m2048@0xf0708000 port 0xf0708180 irq 25
[ 0.503545] ata3: DUMMY
[ 0.503551] ata4: SATA max UDMA/133 abar m2048@0xf0708000 port 0xf0708280 irq 25
[ 0.503561] ata5: SATA max UDMA/133 abar m2048@0xf0708000 port 0xf0708300 irq 25
[ 0.503569] ata6: DUMMY
[ 0.505083] libphy: Fixed MDIO Bus: probed
[ 0.505470] tun: Universal TUN/TAP device driver, 1.6
[ 0.505477] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[ 0.505661] PPP generic driver version 2.4.2
[ 0.506049] xhci_hcd 0000:03:00.0: xHCI Host Controller
[ 0.506235] xhci_hcd 0000:03:00.0: new USB bus registered, assigned bus number 1
[ 0.516069] xhci_hcd 0000:03:00.0: hcc params 0x0200f180 hci version 0x96 quirks 0x00080000
[ 0.516952] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 0.516960] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.516970] usb usb1: Product: xHCI Host Controller
[ 0.516975] usb usb1: Manufacturer: Linux 4.3.0-rc2-4-iniza-small xhci-hcd
[ 0.516982] usb usb1: SerialNumber: 0000:03:00.0
[ 0.517884] hub 1-0:1.0: USB hub found
[ 0.517969] hub 1-0:1.0: 2 ports detected
[ 0.518922] xhci_hcd 0000:03:00.0: xHCI Host Controller
[ 0.518938] xhci_hcd 0000:03:00.0: new USB bus registered, assigned bus number 2
[ 0.519097] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[ 0.519219] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[ 0.519226] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.519235] usb usb2: Product: xHCI Host Controller
[ 0.519241] usb usb2: Manufacturer: Linux 4.3.0-rc2-4-iniza-small xhci-hcd
[ 0.519247] usb usb2: SerialNumber: 0000:03:00.0
[ 0.519789] hub 2-0:1.0: USB hub found
[ 0.519854] hub 2-0:1.0: 2 ports detected
[ 0.520400] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.520409] ehci-pci: EHCI PCI platform driver
[ 0.520756] ehci-pci 0000:00:1a.0: EHCI Host Controller
[ 0.520793] ehci-pci 0000:00:1a.0: new USB bus registered, assigned bus number 3
[ 0.520823] ehci-pci 0000:00:1a.0: debug port 2
[ 0.524787] ehci-pci 0000:00:1a.0: cache line size of 64 is not supported
[ 0.524818] ehci-pci 0000:00:1a.0: irq 16, io mem 0xf070a000
[ 0.534358] ehci-pci 0000:00:1a.0: USB 2.0 started, EHCI 1.00
[ 0.534525] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002
[ 0.534533] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.534542] usb usb3: Product: EHCI Host Controller
[ 0.534547] usb usb3: Manufacturer: Linux 4.3.0-rc2-4-iniza-small ehci_hcd
[ 0.534554] usb usb3: SerialNumber: 0000:00:1a.0
[ 0.535052] hub 3-0:1.0: USB hub found
[ 0.535083] hub 3-0:1.0: 2 ports detected
[ 0.535900] ehci-pci 0000:00:1d.0: EHCI Host Controller
[ 0.535922] ehci-pci 0000:00:1d.0: new USB bus registered, assigned bus number 4
[ 0.535949] ehci-pci 0000:00:1d.0: debug port 2
[ 0.539853] ehci-pci 0000:00:1d.0: cache line size of 64 is not supported
[ 0.539880] ehci-pci 0000:00:1d.0: irq 23, io mem 0xf0709000
[ 0.550305] ehci-pci 0000:00:1d.0: USB 2.0 started, EHCI 1.00
[ 0.550459] usb usb4: New USB device found, idVendor=1d6b, idProduct=0002
[ 0.550467] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.550475] usb usb4: Product: EHCI Host Controller
[ 0.550481] usb usb4: Manufacturer: Linux 4.3.0-rc2-4-iniza-small ehci_hcd
[ 0.550488] usb usb4: SerialNumber: 0000:00:1d.0
[ 0.550926] hub 4-0:1.0: USB hub found
[ 0.550955] hub 4-0:1.0: 2 ports detected
[ 0.551406] ehci-platform: EHCI generic platform driver
[ 0.551441] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.551460] ohci-pci: OHCI PCI platform driver
[ 0.551498] ohci-platform: OHCI generic platform driver
[ 0.551533] uhci_hcd: USB Universal Host Controller Interface driver
[ 0.551672] i8042: PNP: PS/2 Controller [PNP0303:PS2K,PNP0f13:EPAD] at 0x60,0x64 irq 1,12
[ 0.557805] serio: i8042 KBD port at 0x60,0x64 irq 1
[ 0.557868] serio: i8042 AUX port at 0x60,0x64 irq 12
[ 0.558665] mousedev: PS/2 mouse device common for all mice
[ 0.559946] rtc_cmos 00:01: rtc core: registered rtc_cmos as rtc0
[ 0.559988] rtc_cmos 00:01: alarms up to one month, y3k, 242 bytes nvram, hpet irqs
[ 0.560070] device-mapper: uevent: version 1.0.3
[ 0.560254] device-mapper: ioctl: 4.33.0-ioctl (2015-8-18) initialised: dm-devel@redhat.com
[ 0.560299] Intel P-state driver initializing.
[ 0.561270] ledtrig-cpu: registered to indicate activity on CPUs
[ 0.561961] NET: Registered protocol family 10
[ 0.564389] NET: Registered protocol family 17
[ 0.564586] Key type dns_resolver registered
[ 0.566807] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input3
[ 0.568229] registered taskstats version 1
[ 0.568242] Loading compiled-in X.509 certificates
[ 0.569348] Loaded X.509 cert 'Build time autogenerated kernel key: d861534734a1854c045ffb7a95ace7fffd94d654'
[ 0.576082] Key type trusted registered
[ 0.585962] Key type encrypted registered
[ 0.585986] AppArmor: AppArmor sha1 policy hashing enabled
[ 0.585994] evm: HMAC attrs: 0x1
[ 0.587015] rtc_cmos 00:01: setting system clock to 2015-09-23 07:53:11 UTC (1442994791)
[ 0.587250] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found
[ 0.587257] EDD information not available.
[ 0.822262] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 0.823551] ata1.00: ATA-8: Hitachi HTS545050A7E380, GG2OA6C0, max UDMA/133
[ 0.823581] ata1.00: 976773168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[ 0.824939] ata1.00: configured for UDMA/133
[ 0.826223] scsi 0:0:0:0: Direct-Access ATA Hitachi HTS54505 A6C0 PQ: 0 ANSI: 5
[ 0.827441] sd 0:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/465 GiB)
[ 0.827454] sd 0:0:0:0: [sda] 4096-byte physical blocks
[ 0.827712] sd 0:0:0:0: [sda] Write Protect is off
[ 0.827721] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 0.827816] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 0.827893] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 0.846101] usb 3-1: new high-speed USB device number 2 using ehci-pci
[ 0.862076] usb 4-1: new high-speed USB device number 2 using ehci-pci
[ 0.871008] sda: sda1 sda2 sda3
[ 0.872557] sd 0:0:0:0: [sda] Attached SCSI disk
[ 0.886062] usb 1-1: new low-speed USB device number 2 using xhci_hcd
[ 0.978301] usb 3-1: New USB device found, idVendor=8087, idProduct=0024
[ 0.978309] usb 3-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 0.978971] hub 3-1:1.0: USB hub found
[ 0.979072] hub 3-1:1.0: 6 ports detected
[ 0.994643] usb 4-1: New USB device found, idVendor=8087, idProduct=0024
[ 0.994678] usb 4-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 0.995396] hub 4-1:1.0: USB hub found
[ 0.995631] hub 4-1:1.0: 6 ports detected
[ 1.080088] usb 1-1: New USB device found, idVendor=046d, idProduct=c00e
[ 1.080098] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1.080105] usb 1-1: Product: USB-PS/2 Optical Mouse
[ 1.080110] usb 1-1: Manufacturer: Logitech
[ 1.080490] usb 1-1: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
[ 1.146030] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 1.146892] ata2.00: ATA-8: SanDisk iSSD P4 16GB, SSD 9.14, max UDMA/133
[ 1.146923] ata2.00: 31277232 sectors, multi 1: LBA48
[ 1.147644] ata2.00: configured for UDMA/133
[ 1.148249] scsi 1:0:0:0: Direct-Access ATA SanDisk iSSD P4 9.14 PQ: 0 ANSI: 5
[ 1.148936] sd 1:0:0:0: [sdb] 31277232 512-byte logical blocks: (16.0 GB/14.9 GiB)
[ 1.149105] sd 1:0:0:0: Attached scsi generic sg1 type 0
[ 1.149161] sd 1:0:0:0: [sdb] Write Protect is off
[ 1.149170] sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[ 1.149240] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 1.150477] sdb: sdb1 sdb2
[ 1.151374] sd 1:0:0:0: [sdb] Attached SCSI disk
[ 1.249955] usb 3-1.4: new high-speed USB device number 3 using ehci-pci
[ 1.265941] usb 4-1.5: new full-speed USB device number 3 using ehci-pci
[ 1.363213] usb 4-1.5: New USB device found, idVendor=8086, idProduct=0189
[ 1.363224] usb 4-1.5: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 1.405973] tsc: Refined TSC clocksource calibration: 1596.374 MHz
[ 1.405984] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x1702c3a922f, max_idle_ns: 440795242034 ns
[ 1.465806] ata4: SATA link down (SStatus 0 SControl 300)
[ 1.502217] usb 3-1.4: New USB device found, idVendor=2232, idProduct=1018
[ 1.502229] usb 3-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1.502238] usb 3-1.4: Product: WebCam SC-13HDL11431N
[ 1.502244] usb 3-1.4: Manufacturer: 123
[ 1.785578] ata5: SATA link down (SStatus 0 SControl 300)
[ 1.786497] Freeing unused kernel memory: 1408K (ffffffff81d5a000 - ffffffff81eba000)
[ 1.786508] Write protecting the kernel read-only data: 12288k
[ 1.787110] Freeing unused kernel memory: 220K (ffff8800017c9000 - ffff880001800000)
[ 1.787512] Freeing unused kernel memory: 596K (ffff880001b6b000 - ffff880001c00000)
[ 1.826944] udevd[161]: starting version 175
[ 2.155400] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[ 2.155431] r8169 0000:02:00.0: can't disable ASPM; OS doesn't have ASPM control
[ 2.163217] r8169 0000:02:00.0 eth0: RTL8168evl/8111evl at 0xffffc900009b0000, e8:03:9a:36:17:a9, XID 0c900800 IRQ 31
[ 2.163242] r8169 0000:02:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
[ 2.182563] usbcore: registered new interface driver usbhid
[ 2.182574] usbhid: USB HID core driver
[ 2.258212] input: Logitech USB-PS/2 Optical Mouse as /devices/pci0000:00/0000:00:1c.4/0000:03:00.0/usb1/1-1/1-1:1.0/0003:046D:C00E.0001/input/input5
[ 2.258812] hid-generic 0003:046D:C00E.0001: input: USB HID v1.10 Mouse [Logitech USB-PS/2 Optical Mouse] on usb-0000:03:00.0-1/input0
[ 2.405485] clocksource: Switched to clocksource tsc
[ 2.867871] EXT4-fs (loop0): mounted filesystem with ordered data mode. Opts: (null)
[ 3.636471] random: nonblocking pool is initialized
[ 4.051829] usb 3-1.2: new high-speed USB device number 4 using ehci-pci
[ 4.150809] usb 3-1.2: New USB device found, idVendor=12d1, idProduct=1446
[ 4.150836] usb 3-1.2: New USB device strings: Mfr=3, Product=2, SerialNumber=0
[ 4.150860] usb 3-1.2: Product: HUAWEI Mobile
[ 4.150874] usb 3-1.2: Manufacturer: HUAWEI Technology
[ 5.207474] init: ureadahead main process (469) terminated with status 5
[ 9.592793] Adding 262140k swap on /host/ubuntu/disks/swap.disk. Priority:-1 extents:1 across:262140k FS
[ 9.839968] EXT4-fs (loop0): re-mounted. Opts: errors=remount-ro
[ 9.951079] udevd[704]: starting version 175
[ 11.382363] lp: driver loaded but no devices found
[ 13.259623] wmi: Mapper loaded
[ 13.370802] ACPI Warning: SystemIO range 0x0000000000000428-0x000000000000042F conflicts with OpRegion 0x0000000000000400-0x000000000000047F (\PMIO) (20150818/utaddress-254)
[ 13.370817] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[ 13.370825] ACPI Warning: SystemIO range 0x0000000000000540-0x000000000000054F conflicts with OpRegion 0x0000000000000500-0x0000000000000563 (\GPIO) (20150818/utaddress-254)
[ 13.370834] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[ 13.370838] ACPI Warning: SystemIO range 0x0000000000000530-0x000000000000053F conflicts with OpRegion 0x0000000000000500-0x0000000000000563 (\GPIO) (20150818/utaddress-254)
[ 13.370845] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[ 13.370849] ACPI Warning: SystemIO range 0x0000000000000500-0x000000000000052F conflicts with OpRegion 0x0000000000000500-0x0000000000000563 (\GPIO) (20150818/utaddress-254)
[ 13.370856] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[ 13.370859] lpc_ich: Resource conflict(s) found affecting gpio_ich
[ 13.538541] samsung_laptop: detected SABI interface: SwSmi@
[ 14.442016] [drm] Initialized drm 1.1.0 20060810
[ 15.105378] Bluetooth: Core ver 2.20
[ 15.105459] NET: Registered protocol family 31
[ 15.105463] Bluetooth: HCI device and connection manager initialized
[ 15.105570] Bluetooth: HCI socket layer initialized
[ 15.105580] Bluetooth: L2CAP socket layer initialized
[ 15.105666] Bluetooth: SCO socket layer initialized
[ 15.152407] psmouse serio1: elantech: assuming hardware version 3 (with firmware version 0x450f00)
[ 15.167827] psmouse serio1: elantech: Synaptics capabilities query result 0x08, 0x17, 0x0c.
[ 15.182771] psmouse serio1: elantech: Elan sample query result 03, 3f, 86
[ 15.258159] input: ETPS/2 Elantech Touchpad as /devices/platform/i8042/serio1/input/input6
[ 16.108015] usb-storage 3-1.2:1.0: USB Mass Storage device detected
[ 16.108376] scsi host6: usb-storage 3-1.2:1.0
[ 16.108773] usb-storage 3-1.2:1.1: USB Mass Storage device detected
[ 16.109008] scsi host7: usb-storage 3-1.2:1.1
[ 16.109274] usbcore: registered new interface driver usb-storage
[ 16.434944] cfg80211: World regulatory domain updated:
[ 16.434951] cfg80211: DFS Master region: unset
[ 16.434954] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[ 16.434959] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm), (N/A)
[ 16.434963] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm), (N/A)
[ 16.434966] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm), (N/A)
[ 16.434970] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm), (N/A)
[ 16.434973] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm), (N/A)
[ 16.593993] usbcore: registered new interface driver btusb
[ 16.619336] ppdev: user-space parallel port driver
[ 16.842177] audit: type=1400 audit(1442987607.760:2): apparmor="STATUS" operation="profile_load" name="/sbin/dhclient" pid=1073 comm="apparmor_parser"
[ 16.842193] audit: type=1400 audit(1442987607.760:3): apparmor="STATUS" operation="profile_load" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=1073 comm="apparmor_parser"
[ 16.842204] audit: type=1400 audit(1442987607.760:4): apparmor="STATUS" operation="profile_load" name="/usr/lib/connman/scripts/dhclient-script" pid=1073 comm="apparmor_parser"
[ 16.842522] audit: type=1400 audit(1442987607.760:5): apparmor="STATUS" operation="profile_replace" name="/sbin/dhclient" pid=1074 comm="apparmor_parser"
[ 16.842533] audit: type=1400 audit(1442987607.760:6): apparmor="STATUS" operation="profile_replace" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=1074 comm="apparmor_parser"
[ 16.842541] audit: type=1400 audit(1442987607.760:7): apparmor="STATUS" operation="profile_replace" name="/usr/lib/connman/scripts/dhclient-script" pid=1074 comm="apparmor_parser"
[ 16.843282] audit: type=1400 audit(1442987607.764:8): apparmor="STATUS" operation="profile_replace" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=1073 comm="apparmor_parser"
[ 16.843297] audit: type=1400 audit(1442987607.764:9): apparmor="STATUS" operation="profile_replace" name="/usr/lib/connman/scripts/dhclient-script" pid=1073 comm="apparmor_parser"
[ 16.843321] audit: type=1400 audit(1442987607.764:10): apparmor="STATUS" operation="profile_replace" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=1074 comm="apparmor_parser"
[ 16.843336] audit: type=1400 audit(1442987607.764:11): apparmor="STATUS" operation="profile_replace" name="/usr/lib/connman/scripts/dhclient-script" pid=1074 comm="apparmor_parser"
[ 16.910635] Intel(R) Wireless WiFi driver for Linux
[ 16.910641] Copyright(c) 2003- 2015 Intel Corporation
[ 16.911203] iwlwifi 0000:01:00.0: can't disable ASPM; OS doesn't have ASPM control
[ 16.943773] Linux video capture interface: v2.00
[ 17.109531] scsi 7:0:0:0: Direct-Access HUAWEI SD Storage 2.31 PQ: 0 ANSI: 2
[ 17.109614] scsi 6:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
[ 17.112763] sd 7:0:0:0: Attached scsi generic sg2 type 0
[ 17.123522] sd 7:0:0:0: [sdc] Attached SCSI removable disk
[ 17.130033] sr 6:0:0:0: [sr0] scsi-1 drive
[ 17.130038] cdrom: Uniform CD-ROM driver Revision: 3.20
[ 17.143686] sr 6:0:0:0: Attached scsi CD-ROM sr0
[ 17.144703] sr 6:0:0:0: Attached scsi generic sg3 type 5
[ 17.238123] iwlwifi 0000:01:00.0: loaded firmware version 18.168.6.1 op_mode iwldvm
[ 17.585530] uvcvideo: Found UVC 1.00 device WebCam SC-13HDL11431N (2232:1018)
[ 17.605390] input: WebCam SC-13HDL11431N as /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.4/3-1.4:1.0/input/input7
[ 17.606350] usbcore: registered new interface driver uvcvideo
[ 17.606355] USB Video Class driver (1.1.1)
[ 18.193724] iwlwifi 0000:01:00.0: CONFIG_IWLWIFI_DEBUG disabled
[ 18.193731] iwlwifi 0000:01:00.0: CONFIG_IWLWIFI_DEBUGFS enabled
[ 18.193735] iwlwifi 0000:01:00.0: CONFIG_IWLWIFI_DEVICE_TRACING enabled
[ 18.193741] iwlwifi 0000:01:00.0: Detected Intel(R) Centrino(R) Advanced-N 6230 AGN, REV=0xB0
[ 18.194517] iwlwifi 0000:01:00.0: L1 Enabled - LTR Disabled
[ 18.433322] usb 3-1.2: USB disconnect, device number 4
[ 18.454723] init: failsafe main process (1120) killed by TERM signal
[ 18.697814] ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs'
[ 18.819684] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 18.819691] Bluetooth: BNEP filters: protocol multicast
[ 18.819703] Bluetooth: BNEP socket layer initialized
[ 18.835831] Bluetooth: RFCOMM TTY layer initialized
[ 18.835848] Bluetooth: RFCOMM socket layer initialized
[ 18.835866] Bluetooth: RFCOMM ver 1.11
[ 19.238024] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC269VC: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
[ 19.238032] snd_hda_codec_realtek hdaudioC0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 19.238036] snd_hda_codec_realtek hdaudioC0D0: hp_outs=1 (0x15/0x0/0x0/0x0/0x0)
[ 19.238040] snd_hda_codec_realtek hdaudioC0D0: mono: mono_out=0x0
[ 19.238043] snd_hda_codec_realtek hdaudioC0D0: inputs:
[ 19.238048] snd_hda_codec_realtek hdaudioC0D0: Internal Mic=0x19
[ 19.238052] snd_hda_codec_realtek hdaudioC0D0: Mic=0x18
[ 19.305164] [drm] Memory usable by graphics device = 2048M
[ 19.305237] [drm] Replacing VGA console driver
[ 19.314121] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 19.314127] [drm] Driver supports precise vblank timestamp query.
[ 19.316391] vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=io+mem:owns=io+mem
[ 19.324475] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input8
[ 19.331831] input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input9
[ 19.332394] input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1b.0/sound/card0/input10
[ 19.353738] ACPI: Video Device [GFX0] (multi-head: yes rom: no post: no)
[ 19.354613] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input11
[ 19.356390] [drm] Initialized i915 1.6.0 20150731 for 0000:00:02.0 on minor 0
[ 19.367093] fbcon: inteldrmfb (fb0) is primary device
[ 19.369598] ------------[ cut here ]------------
[ 19.369637] WARNING: CPU: 3 PID: 114 at drivers/gpu/drm/i915/intel_display.c:1377 assert_planes_disabled+0xe4/0x150 [i915]()
[ 19.369638] plane A assertion failure, should be disabled but not
[ 19.369680] Modules linked in: snd_hda_codec_hdmi i915 snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel snd_hda_codec rfcomm parport_pc bnep arc4 iwldvm mac80211 uvcvideo videobuf2_vmalloc videobuf2_memops snd_hwdep snd_hda_core videobuf2_core v4l2_common snd_pcm videodev iwlwifi snd_seq_midi snd_seq_midi_event snd_rawmidi ppdev i2c_algo_bit btusb btrtl joydev btbcm usb_storage kvm_intel drm_kms_helper kvm cfg80211 btintel bluetooth snd_seq syscopyarea sysfillrect sysimgblt fb_sys_fops drm snd_timer snd_seq_device psmouse snd soundcore samsung_laptop serio_raw lpc_ich video wmi intel_rst mac_hid lp binfmt_misc parport hid_generic usbhid hid r8169 mii
[ 19.369683] CPU: 3 PID: 114 Comm: kworker/u16:6 Not tainted 4.3.0-rc2-4-iniza-small #1
[ 19.369684] Hardware name: SAMSUNG ELECTRONICS CO., LTD. 530U3BI/530U4BI/530U4BH/530U3BI/530U4BI/530U4BH, BIOS 13XK 03/28/2013
[ 19.369689] Workqueue: events_unbound async_run_entry_fn
[ 19.369693] ffffffffa06b8e10 ffff8800d3cd3718 ffffffff813e2fdb ffff8800d3cd3760
[ 19.369696] ffff8800d3cd3750 ffffffff8107cdc6 ffff8800c2120000 0000000000000000
[ 19.369698] 0000000000000000 ffff8800c6dba000 ffff8800c6dba000 ffff8800d3cd37b0
[ 19.369699] Call Trace:
[ 19.369703] [<ffffffff813e2fdb>] dump_stack+0x4b/0x70
[ 19.369707] [<ffffffff8107cdc6>] warn_slowpath_common+0x86/0xc0
[ 19.369709] [<ffffffff8107ce4c>] warn_slowpath_fmt+0x4c/0x50
[ 19.369737] [<ffffffffa0643cb4>] assert_planes_disabled+0xe4/0x150 [i915]
[ 19.369762] [<ffffffffa064da7f>] intel_disable_pipe+0x4f/0x2d0 [i915]
[ 19.369785] [<ffffffffa064e075>] ironlake_crtc_disable+0x85/0x7d0 [i915]
[ 19.369807] [<ffffffffa0649b8e>] ? intel_crtc_disable_planes+0xde/0xf0 [i915]
[ 19.369835] [<ffffffffa0656c18>] intel_atomic_commit+0x108/0x1370 [i915]
[ 19.369860] [<ffffffffa0100947>] ? drm_atomic_check_only+0x1d7/0x5a0 [drm]
[ 19.369877] [<ffffffffa01005b9>] ? drm_atomic_get_connector_state+0x49/0x110 [drm]
[ 19.369891] [<ffffffffa0100d47>] drm_atomic_commit+0x37/0x60 [drm]
[ 19.369901] [<ffffffffa02578ea>] drm_atomic_helper_set_config+0x1ca/0x430 [drm_kms_helper]
[ 19.369914] [<ffffffffa00f0415>] drm_mode_set_config_internal+0x65/0x110 [drm]
[ 19.369921] [<ffffffffa025a78e>] restore_fbdev_mode+0xbe/0xe0 [drm_kms_helper]
[ 19.369929] [<ffffffffa025c655>] drm_fb_helper_restore_fbdev_mode_unlocked+0x25/0x70 [drm_kms_helper]
[ 19.369936] [<ffffffffa025c6cd>] drm_fb_helper_set_par+0x2d/0x50 [drm_kms_helper]
[ 19.369969] [<ffffffffa066d17a>] intel_fbdev_set_par+0x1a/0x60 [i915]
[ 19.369972] [<ffffffff814527ee>] fbcon_init+0x53e/0x5d0
[ 19.369976] [<ffffffff814d792a>] visual_init+0xca/0x130
[ 19.369978] [<ffffffff814d9ed7>] do_bind_con_driver+0x167/0x3a0
[ 19.369980] [<ffffffff814da3bc>] do_take_over_console+0xac/0x1d0
[ 19.369983] [<ffffffff8144e4e7>] do_fbcon_takeover+0x57/0xb0
[ 19.369985] [<ffffffff81453392>] fbcon_event_notify+0x752/0x860
[ 19.369988] [<ffffffff810a2ca5>] ? __blocking_notifier_call_chain+0x35/0x70
[ 19.369990] [<ffffffff810a2aad>] notifier_call_chain+0x5d/0x80
[ 19.369993] [<ffffffff810a2cbd>] __blocking_notifier_call_chain+0x4d/0x70
[ 19.369995] [<ffffffff810a2cf6>] blocking_notifier_call_chain+0x16/0x20
[ 19.369998] [<ffffffff81455ceb>] fb_notifier_call_chain+0x1b/0x20
[ 19.369999] [<ffffffff81457f14>] register_framebuffer+0x204/0x330
[ 19.370005] [<ffffffffa025c924>] drm_fb_helper_initial_config+0x234/0x3b0 [drm_kms_helper]
[ 19.370031] [<ffffffffa066e31b>] intel_fbdev_initial_config+0x1b/0x20 [i915]
[ 19.370034] [<ffffffff810a4787>] async_run_entry_fn+0x37/0xe0
[ 19.370037] [<ffffffff8109a871>] process_one_work+0x1e1/0x620
[ 19.370040] [<ffffffff8109a7e6>] ? process_one_work+0x156/0x620
[ 19.370041] [<ffffffff8109b549>] worker_thread+0x69/0x480
[ 19.370044] [<ffffffff8109b4e0>] ? cancel_delayed_work_sync+0x20/0x20
[ 19.370046] [<ffffffff810a17aa>] kthread+0x10a/0x120
[ 19.370049] [<ffffffff810a16a0>] ? kthread_create_on_node+0x200/0x200
[ 19.370052] [<ffffffff817c08af>] ret_from_fork+0x3f/0x70
[ 19.370054] [<ffffffff810a16a0>] ? kthread_create_on_node+0x200/0x200
[ 19.370056] ---[ end trace 984bbdfe9b2075d9 ]---
[ 19.911810] ------------[ cut here ]------------
[ 19.911851] WARNING: CPU: 0 PID: 114 at drivers/gpu/drm/i915/intel_display.c:1377 assert_planes_disabled+0xe4/0x150 [i915]()
[ 19.911852] plane A assertion failure, should be disabled but not
[ 19.911895] Modules linked in: snd_hda_codec_hdmi i915 snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel snd_hda_codec rfcomm parport_pc bnep arc4 iwldvm mac80211 uvcvideo videobuf2_vmalloc videobuf2_memops snd_hwdep snd_hda_core videobuf2_core v4l2_common snd_pcm videodev iwlwifi snd_seq_midi snd_seq_midi_event snd_rawmidi ppdev i2c_algo_bit btusb btrtl joydev btbcm usb_storage kvm_intel drm_kms_helper kvm cfg80211 btintel bluetooth snd_seq syscopyarea sysfillrect sysimgblt fb_sys_fops drm snd_timer snd_seq_device psmouse snd soundcore samsung_laptop serio_raw lpc_ich video wmi intel_rst mac_hid lp binfmt_misc parport hid_generic usbhid hid r8169 mii
[ 19.911898] CPU: 0 PID: 114 Comm: kworker/u16:6 Tainted: G W 4.3.0-rc2-4-iniza-small #1
[ 19.911899] Hardware name: SAMSUNG ELECTRONICS CO., LTD. 530U3BI/530U4BI/530U4BH/530U3BI/530U4BI/530U4BH, BIOS 13XK 03/28/2013
[ 19.911905] Workqueue: events_unbound async_run_entry_fn
[ 19.911908] ffffffffa06b8e10 ffff8800d3cd3720 ffffffff813e2fdb ffff8800d3cd3768
[ 19.911911] ffff8800d3cd3758 ffffffff8107cdc6 ffff8800c2120000 0000000000000000
[ 19.911913] 0000000000000000 ffff8800c2120000 ffff8800c2120000 ffff8800d3cd37b8
[ 19.911914] Call Trace:
[ 19.911919] [<ffffffff813e2fdb>] dump_stack+0x4b/0x70
[ 19.911922] [<ffffffff8107cdc6>] warn_slowpath_common+0x86/0xc0
[ 19.911924] [<ffffffff8107ce4c>] warn_slowpath_fmt+0x4c/0x50
[ 19.911952] [<ffffffffa0643cb4>] assert_planes_disabled+0xe4/0x150 [i915]
[ 19.911977] [<ffffffffa0650512>] intel_enable_pipe+0x52/0x250 [i915]
[ 19.912003] [<ffffffffa065a3fe>] ironlake_crtc_enable+0x31e/0xd60 [i915]
[ 19.912026] [<ffffffffa05fcb4f>] ? intel_display_power_put+0xef/0x160 [i915]
[ 19.912051] [<ffffffffa0656e8b>] intel_atomic_commit+0x37b/0x1370 [i915]
[ 19.912069] [<ffffffffa0100947>] ? drm_atomic_check_only+0x1d7/0x5a0 [drm]
[ 19.912081] [<ffffffffa01005b9>] ? drm_atomic_get_connector_state+0x49/0x110 [drm]
[ 19.912093] [<ffffffffa0100d47>] drm_atomic_commit+0x37/0x60 [drm]
[ 19.912100] [<ffffffffa02578ea>] drm_atomic_helper_set_config+0x1ca/0x430 [drm_kms_helper]
[ 19.912110] [<ffffffffa00f0415>] drm_mode_set_config_internal+0x65/0x110 [drm]
[ 19.912116] [<ffffffffa025a78e>] restore_fbdev_mode+0xbe/0xe0 [drm_kms_helper]
[ 19.912122] [<ffffffffa025c655>] drm_fb_helper_restore_fbdev_mode_unlocked+0x25/0x70 [drm_kms_helper]
[ 19.912127] [<ffffffffa025c6cd>] drm_fb_helper_set_par+0x2d/0x50 [drm_kms_helper]
[ 19.912156] [<ffffffffa066d17a>] intel_fbdev_set_par+0x1a/0x60 [i915]
[ 19.912159] [<ffffffff814527ee>] fbcon_init+0x53e/0x5d0
[ 19.912162] [<ffffffff814d792a>] visual_init+0xca/0x130
[ 19.912164] [<ffffffff814d9ed7>] do_bind_con_driver+0x167/0x3a0
[ 19.912166] [<ffffffff814da3bc>] do_take_over_console+0xac/0x1d0
[ 19.912168] [<ffffffff8144e4e7>] do_fbcon_takeover+0x57/0xb0
[ 19.912171] [<ffffffff81453392>] fbcon_event_notify+0x752/0x860
[ 19.912174] [<ffffffff810a2ca5>] ? __blocking_notifier_call_chain+0x35/0x70
[ 19.912176] [<ffffffff810a2aad>] notifier_call_chain+0x5d/0x80
[ 19.912178] [<ffffffff810a2cbd>] __blocking_notifier_call_chain+0x4d/0x70
[ 19.912181] [<ffffffff810a2cf6>] blocking_notifier_call_chain+0x16/0x20
[ 19.912183] [<ffffffff81455ceb>] fb_notifier_call_chain+0x1b/0x20
[ 19.912185] [<ffffffff81457f14>] register_framebuffer+0x204/0x330
[ 19.912191] [<ffffffffa025c924>] drm_fb_helper_initial_config+0x234/0x3b0 [drm_kms_helper]
[ 19.912217] [<ffffffffa066e31b>] intel_fbdev_initial_config+0x1b/0x20 [i915]
[ 19.912220] [<ffffffff810a4787>] async_run_entry_fn+0x37/0xe0
[ 19.912223] [<ffffffff8109a871>] process_one_work+0x1e1/0x620
[ 19.912226] [<ffffffff8109a7e6>] ? process_one_work+0x156/0x620
[ 19.912228] [<ffffffff8109b549>] worker_thread+0x69/0x480
[ 19.912230] [<ffffffff8109b4e0>] ? cancel_delayed_work_sync+0x20/0x20
[ 19.912232] [<ffffffff810a17aa>] kthread+0x10a/0x120
[ 19.912235] [<ffffffff810a16a0>] ? kthread_create_on_node+0x200/0x200
[ 19.912239] [<ffffffff817c08af>] ret_from_fork+0x3f/0x70
[ 19.912241] [<ffffffff810a16a0>] ? kthread_create_on_node+0x200/0x200
[ 19.912242] ---[ end trace 984bbdfe9b2075da ]---
[ 20.334241] Console: switching to colour frame buffer device 170x48
[ 20.337696] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device
[ 22.210989] usb 3-1.2: new high-speed USB device number 5 using ehci-pci
[ 22.305922] usb 3-1.2: New USB device found, idVendor=12d1, idProduct=1436
[ 22.305928] usb 3-1.2: New USB device strings: Mfr=4, Product=3, SerialNumber=0
[ 22.305930] usb 3-1.2: Product: HUAWEI Mobile
[ 22.305933] usb 3-1.2: Manufacturer: HUAWEI Technology
[ 22.308984] usb-storage 3-1.2:1.0: USB Mass Storage device detected
[ 22.309728] usb-storage 3-1.2:1.1: USB Mass Storage device detected
[ 22.310172] usb-storage 3-1.2:1.2: USB Mass Storage device detected
[ 22.310614] usb-storage 3-1.2:1.3: USB Mass Storage device detected
[ 22.311150] usb-storage 3-1.2:1.4: USB Mass Storage device detected
[ 22.311580] usb-storage 3-1.2:1.5: USB Mass Storage device detected
[ 22.312085] scsi host13: usb-storage 3-1.2:1.5
[ 22.312668] usb-storage 3-1.2:1.6: USB Mass Storage device detected
[ 22.313213] scsi host14: usb-storage 3-1.2:1.6
[ 22.442355] cdc_ether 3-1.2:1.1 wwan0: register 'cdc_ether' at usb-0000:00:1a.0-1.2, Mobile Broadband Network Device, 02:50:f3:00:00:00
[ 22.442458] usbcore: registered new interface driver cdc_ether
[ 22.448904] usbcore: registered new interface driver usbserial
[ 23.070306] usbcore: registered new interface driver option
[ 23.071833] usbserial: USB Serial support registered for GSM modem (1-port)
[ 23.072807] option 3-1.2:1.0: GSM modem (1-port) converter detected
[ 23.073999] usb 3-1.2: GSM modem (1-port) converter now attached to ttyUSB0
[ 23.074297] option 3-1.2:1.3: GSM modem (1-port) converter detected
[ 23.074713] usb 3-1.2: GSM modem (1-port) converter now attached to ttyUSB1
[ 23.074781] option 3-1.2:1.4: GSM modem (1-port) converter detected
[ 23.075050] usb 3-1.2: GSM modem (1-port) converter now attached to ttyUSB2
[ 23.314482] scsi 14:0:0:0: Direct-Access HUAWEI SD Storage 2.31 PQ: 0 ANSI: 2
[ 23.315339] scsi 13:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
[ 23.319253] sd 14:0:0:0: [sdc] Attached SCSI removable disk
[ 23.322261] sd 14:0:0:0: Attached scsi generic sg2 type 0
[ 23.326752] sr 13:0:0:0: [sr0] scsi-1 drive
[ 23.330290] sr 13:0:0:0: Attached scsi CD-ROM sr0
[ 23.331816] sr 13:0:0:0: Attached scsi generic sg3 type 5
[ 24.187670] r8169 0000:02:00.0 eth0: link down
[ 24.187746] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 64.353690] PPP BSD Compression module registered
[ 64.358508] PPP Deflate Compression module registered
[ 64.496385] usb 4-1.5: USB disconnect, device number 3
[ 128.444398]
[ 128.444404] ======================================================
[ 128.444406] [ INFO: possible circular locking dependency detected ]
[ 128.444409] 4.3.0-rc2-4-iniza-small #1 Tainted: G W
[ 128.444410] -------------------------------------------------------
[ 128.444412] pppd/2452 is trying to acquire lock:
[ 128.444413] (&pn->all_ppp_mutex){+.+.+.}, at: [<ffffffff815c9c32>] ppp_dev_uninit+0x112/0x200
[ 128.444422]
[ 128.444422] but task is already holding lock:
[ 128.444424] (rtnl_mutex){+.+.+.}, at: [<ffffffff816c3eb7>] rtnl_lock+0x17/0x20
[ 128.444430]
[ 128.444430] which lock already depends on the new lock.
[ 128.444430]
[ 128.444432]
[ 128.444432] the existing dependency chain (in reverse order) is:
[ 128.444434]
[ 128.444434] -> #1 (rtnl_mutex){+.+.+.}:
[ 128.444437] [<ffffffff810d5eed>] lock_acquire+0xcd/0x1c0
[ 128.444442] [<ffffffff817bba49>] mutex_lock_nested+0x69/0x3d0
[ 128.444446] [<ffffffff816c3eb7>] rtnl_lock+0x17/0x20
[ 128.444449] [<ffffffff816b7542>] register_netdev+0x12/0x30
[ 128.444452] [<ffffffff815cb41f>] ppp_ioctl+0xfcf/0x13a0
[ 128.444455] [<ffffffff81226851>] do_vfs_ioctl+0x301/0x560
[ 128.444458] [<ffffffff81226b29>] SyS_ioctl+0x79/0x90
[ 128.444460] [<ffffffff817c04f6>] entry_SYSCALL_64_fastpath+0x16/0x7a
[ 128.444464]
[ 128.444464] -> #0 (&pn->all_ppp_mutex){+.+.+.}:
[ 128.444467] [<ffffffff810d544c>] __lock_acquire+0x207c/0x20b0
[ 128.444470] [<ffffffff810d5eed>] lock_acquire+0xcd/0x1c0
[ 128.444473] [<ffffffff817bba49>] mutex_lock_nested+0x69/0x3d0
[ 128.444475] [<ffffffff815c9c32>] ppp_dev_uninit+0x112/0x200
[ 128.444478] [<ffffffff816ad8a5>] rollback_registered_many+0x185/0x2f0
[ 128.444481] [<ffffffff816ada3d>] rollback_registered+0x2d/0x40
[ 128.444483] [<ffffffff816ae975>] unregister_netdevice_queue+0x55/0xc0
[ 128.444486] [<ffffffff815c93a8>] ppp_release+0x88/0x90
[ 128.444489] [<ffffffff8121335f>] __fput+0xef/0x200
[ 128.444493] [<ffffffff812134ae>] ____fput+0xe/0x10
[ 128.444496] [<ffffffff8109fc26>] task_work_run+0x76/0xb0
[ 128.444499] [<ffffffff81003c01>] prepare_exit_to_usermode+0xd1/0x120
[ 128.444502] [<ffffffff81003caa>] syscall_return_slowpath+0x5a/0x200
[ 128.444505] [<ffffffff817c0662>] int_ret_from_sys_call+0x25/0x9f
[ 128.444508]
[ 128.444508] other info that might help us debug this:
[ 128.444508]
[ 128.444510] Possible unsafe locking scenario:
[ 128.444510]
[ 128.444512] CPU0 CPU1
[ 128.444513] ---- ----
[ 128.444514] lock(rtnl_mutex);
[ 128.444516] lock(&pn->all_ppp_mutex);
[ 128.444518] lock(rtnl_mutex);
[ 128.444520] lock(&pn->all_ppp_mutex);
[ 128.444522]
[ 128.444522] *** DEADLOCK ***
[ 128.444522]
[ 128.444524] 1 lock held by pppd/2452:
[ 128.444525] #0: (rtnl_mutex){+.+.+.}, at: [<ffffffff816c3eb7>] rtnl_lock+0x17/0x20
[ 128.444530]
[ 128.444530] stack backtrace:
[ 128.444533] CPU: 1 PID: 2452 Comm: pppd Tainted: G W 4.3.0-rc2-4-iniza-small #1
[ 128.444535] Hardware name: SAMSUNG ELECTRONICS CO., LTD. 530U3BI/530U4BI/530U4BH/530U3BI/530U4BI/530U4BH, BIOS 13XK 03/28/2013
[ 128.444537] ffffffff826dd0a0 ffff880080823b70 ffffffff813e2fdb ffffffff826dd0a0
[ 128.444541] ffff880080823bb0 ffffffff810d1bff ffff880080823c20 0000000000000001
[ 128.444544] ffff88008bd04948 0000000000000001 ffff88008bd040c0 0000000000000001
[ 128.444547] Call Trace:
[ 128.444551] [<ffffffff813e2fdb>] dump_stack+0x4b/0x70
[ 128.444554] [<ffffffff810d1bff>] print_circular_bug+0x1cf/0x230
[ 128.444557] [<ffffffff810d544c>] __lock_acquire+0x207c/0x20b0
[ 128.444561] [<ffffffff810d5eed>] lock_acquire+0xcd/0x1c0
[ 128.444564] [<ffffffff815c9c32>] ? ppp_dev_uninit+0x112/0x200
[ 128.444566] [<ffffffff817bba49>] mutex_lock_nested+0x69/0x3d0
[ 128.444568] [<ffffffff815c9c32>] ? ppp_dev_uninit+0x112/0x200
[ 128.444571] [<ffffffff810d2fe1>] ? trace_hardirqs_on_caller+0x151/0x1e0
[ 128.444574] [<ffffffff815c9c28>] ? ppp_dev_uninit+0x108/0x200
[ 128.444576] [<ffffffff810d307d>] ? trace_hardirqs_on+0xd/0x10
[ 128.444579] [<ffffffff81081ec0>] ? __local_bh_enable_ip+0x70/0xd0
[ 128.444581] [<ffffffff815c9c32>] ppp_dev_uninit+0x112/0x200
[ 128.444584] [<ffffffff815c9b44>] ? ppp_dev_uninit+0x24/0x200
[ 128.444586] [<ffffffff816ad8a5>] rollback_registered_many+0x185/0x2f0
[ 128.444589] [<ffffffff816ada3d>] rollback_registered+0x2d/0x40
[ 128.444591] [<ffffffff816ae975>] unregister_netdevice_queue+0x55/0xc0
[ 128.444594] [<ffffffff815c93a8>] ppp_release+0x88/0x90
[ 128.444597] [<ffffffff8121335f>] __fput+0xef/0x200
[ 128.444600] [<ffffffff812134ae>] ____fput+0xe/0x10
[ 128.444602] [<ffffffff8109fc26>] task_work_run+0x76/0xb0
[ 128.444605] [<ffffffff81003c01>] prepare_exit_to_usermode+0xd1/0x120
[ 128.444607] [<ffffffff81003caa>] syscall_return_slowpath+0x5a/0x200
[ 128.444610] [<ffffffff817c0662>] int_ret_from_sys_call+0x25/0x9f
[unhandled content-type:application/octet-stream]Alexey Khoroshilov (1):
irda: ali-ircc: Fix deadlock in ali_ircc_sir_change_speed()

Arnd Bergmann (1):
bnx2x: use ktime_get_seconds() for timestamp

Daniel Borkmann (1):
netlink, mmap: transform mmap skb into full skb on taps

David Ahern (2):
net: Add documentation for VRF device
net: Fix vti use case with oif in dst lookups

David S. Miller (6):
Merge branch 'ip6tunnel_dst'
Merge branch 'for-upstream' of git://git.kernel.org/.../bluetooth/bluetooth
Merge branch 'vxlan-fixes'
Merge git://git.kernel.org/.../pablo/nf
Merge branch 'net-of-autoload'
Merge branch 'phy-of-autoload'

David Woodhouse (3):
solos-pci: Increase headroom on received packets
8139cp: Use dev_kfree_skb_any() instead of dev_kfree_skb() in cp_clean_rings()
8139cp: Call __cp_set_rx_mode() from cp_tx_timeout()

Dmitriy Vyukov (1):
lib: fix data race in rhashtable_rehash_one

Eric Dumazet (4):
net/mlx4_en: really allow to change RSS key
tcp_cubic: do not set epoch_start in the future
tcp/dccp: fix timewait races in timer handling
inet: fix races in reqsk_queue_hash_req()

Erik Hugne (1):
tipc: reinitialize pointer after skb linearize

Florian Westphal (3):
netfilter: nf_log: don't zap all loggers on unregister
netfilter: bridge: fix routing of bridge frames with call-iptables=1
ipv6: ip6_fragment: fix headroom tests and skb leak

Hariprasad Shenai (1):
cxgb4: add device ID for few T5 adapters

Herbert Xu (1):
netlink: Fix autobind race condition that leads to zero port ID

Ivan Vecera (1):
bna: check for dma mapping errors

Javier Martinez Canillas (1):
net: ks8851: Export OF module alias information

Jesse Gross (2):
openvswitch: Fix mask generation for nested attributes.
openvswitch: Zero flows on allocation.

Jiri Benc (6):
vxlan: set needed headroom correctly
vxlan: reject IPv6 addresses if IPv6 is not configured
qlcnic: track vxlan port count
be2net: allow offloading with the same port for IPv4 and IPv6
bnx2x: track vxlan port count
MAINTAINERS: remove bouncing email address for qlcnic

Joe Stringer (2):
openvswitch: Fix dependency on IPv6 defrag.
openvswitch: Fix IPv6 exthdr handling with ct helpers.

Johan Hedberg (1):
Bluetooth: Delay check for conn->smp in smp_conn_security()

John W. Linville (2):
geneve: remove vlan-related feature assignment
geneve: ensure ECN info is handled properly in all tx/rx paths

Julia Lawall (3):
atm: he: drop null test before destroy functions
net: core: drop null test before destroy functions
dccp: drop null test before destroy functions

Kevin Hao (1):
Revert "net/phy: Add Vitesse 8641 phy ID"

Linus Lüssing (1):
bridge: fix igmpv3 / mldv2 report parsing

Luis de Bethencourt (7):
net: arc: Fix module autoload for OF platform driver
net: systemport: Fix module autoload for OF platform driver
net: bcmgenet: Fix module autoload for OF platform driver
net: gianfar_ptp: Fix module autoload for OF platform driver
net: moxa: Fix module autoload for OF platform driver
net: phy: mdio-bcm-unimac: Fix module autoload for OF platform driver
net: phy: mdio-gpio: Fix module autoload for OF platform driver

Marcelo Ricardo Leitner (1):
sctp: fix race on protocol/netns initialization

Martin KaFai Lau (5):
ipv6: Refactor common ip6gre_tunnel_init codes
ipv6: Rename the dst_cache helper functions in ip6_tunnel
ipv6: Fix dst_entry refcnt bugs in ip6_tunnel
ipv6: Avoid double dst_free
ipv6: Replace spinlock with seqlock and rcu in ip6_tunnel

Matthew Garrett (1):
usbnet: New driver for QinHeng CH9200 devices

Michael Grzeschik (2):
ARCNET: fix hard_header_len limit
MAINTAINERS: add arcnet and take maintainership

Michael S. Tsirkin (1):
macvtap: fix TUNSETSNDBUF values > 64k

Neil Armstrong (1):
net: dsa: Fix Marvell Egress Trailer check

Nicolas Dichtel (2):
iptunnel: make rx/tx bytes counters consistent
ip6tunnel: make rx/tx bytes counters consistent

Nikola Forró (1):
net: Fix behaviour of unreachable, blackhole and prohibit routes

Pablo Neira Ayuso (2):
netfilter: nft_compat: skip family comparison in case of NFPROTO_UNSPEC
netfilter: nf_log: wait for rcu grace after logger unregistration

Phil Sutter (1):
net: qdisc: enhance default_qdisc documentation

Roopa Prabhu (2):
rtnetlink: catch -EOPNOTSUPP errors from ndo_bridge_getlink
ipv6: include NLM_F_REPLACE in route replace notifications

Russell King (1):
net: dsa: actually force the speed on the CPU port

Sasha Levin (1):
atm: deal with setting entry before mkip was called

Sedat Dilek (1):
Merge branch 'master' of git://git.kernel.org/.../davem/net into for-4.3/net-fixes-20150923

Simon Guinot (1):
net: mvneta: fix DMA buffer unmapping in mvneta_rx()

Sjoerd Simons (1):
net: stmmac: Use msleep rather then udelay for reset delay

Sowmini Varadhan (1):
sunvnet: Invoke SET_NETDEV_DEV() to set up the vdev in vnet_new()

Taku Izumi (1):
fjes: fix off-by-one error at fjes_hw_update_zone_task()

Tobias Klauser (1):
ch9200: Convert to use module_usb_driver

Tycho Andersen (1):
ebpf: emit correct src_reg for conditional jumps

Documentation/networking/vrf.txt | 96 +++++
Documentation/sysctl/net.txt | 16 +-
MAINTAINERS | 9 +-
drivers/atm/he.c | 7 +-
drivers/atm/solos-pci.c | 12 +-
drivers/net/arcnet/arcnet.c | 2 +-
drivers/net/dsa/mv88e6xxx.c | 1 +
drivers/net/ethernet/arc/emac_arc.c | 1 +
drivers/net/ethernet/broadcom/bcmsysport.c | 1 +
drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 1 +
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 20 +-
drivers/net/ethernet/broadcom/genet/bcmgenet.c | 1 +
drivers/net/ethernet/brocade/bna/bna_tx_rx.c | 2 +
drivers/net/ethernet/brocade/bna/bna_types.h | 1 +
drivers/net/ethernet/brocade/bna/bnad.c | 29 +-
drivers/net/ethernet/brocade/bna/bnad.h | 2 +
drivers/net/ethernet/brocade/bna/bnad_ethtool.c | 4 +
drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h | 5 +
drivers/net/ethernet/emulex/benet/be.h | 1 +
drivers/net/ethernet/emulex/benet/be_main.c | 10 +
drivers/net/ethernet/freescale/gianfar_ptp.c | 1 +
drivers/net/ethernet/marvell/mvneta.c | 4 +-
drivers/net/ethernet/mellanox/mlx4/en_rx.c | 2 -
drivers/net/ethernet/micrel/ks8851.c | 1 +
drivers/net/ethernet/moxa/moxart_ether.c | 1 +
drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 1 +
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 18 +-
drivers/net/ethernet/realtek/8139cp.c | 5 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 11 +-
drivers/net/ethernet/sun/sunvnet.c | 17 +-
drivers/net/fjes/fjes_hw.c | 8 +-
drivers/net/geneve.c | 16 +-
drivers/net/irda/ali-ircc.c | 6 -
drivers/net/macvtap.c | 4 +-
drivers/net/phy/mdio-bcm-unimac.c | 1 +
drivers/net/phy/mdio-gpio.c | 1 +
drivers/net/phy/vitesse.c | 14 -
drivers/net/usb/Kconfig | 11 +
drivers/net/usb/Makefile | 2 +-
drivers/net/usb/ch9200.c | 432 +++++++++++++++++++++
drivers/net/vrf.c | 3 +-
drivers/net/vxlan.c | 15 +-
include/linux/skbuff.h | 6 +-
include/net/flow.h | 1 +
include/net/inet_timewait_sock.h | 14 +-
include/net/ip6_fib.h | 3 +-
include/net/ip6_tunnel.h | 17 +-
include/net/ip_fib.h | 30 +-
include/net/route.h | 2 +-
lib/rhashtable.c | 5 +-
net/atm/clip.c | 3 +
net/bluetooth/smp.c | 12 +-
net/bridge/br_multicast.c | 4 +-
net/core/filter.c | 2 +-
net/core/rtnetlink.c | 26 +-
net/core/sock.c | 12 +-
net/dccp/ackvec.c | 12 +-
net/dccp/ccid.c | 3 +-
net/dccp/minisocks.c | 4 +-
net/dsa/tag_trailer.c | 2 +-
net/ipv4/fib_trie.c | 2 +-
net/ipv4/inet_connection_sock.c | 8 +-
net/ipv4/inet_timewait_sock.c | 16 +-
net/ipv4/ip_tunnel_core.c | 2 +-
net/ipv4/route.c | 6 +-
net/ipv4/tcp_cubic.c | 10 +-
net/ipv4/tcp_minisocks.c | 13 +-
net/ipv4/udp.c | 3 +-
net/ipv4/xfrm4_policy.c | 2 +
net/ipv6/addrconf.c | 7 +-
net/ipv6/ip6_fib.c | 26 +-
net/ipv6/ip6_gre.c | 77 ++--
net/ipv6/ip6_output.c | 14 +-
net/ipv6/ip6_tunnel.c | 131 +++++--
net/ipv6/route.c | 16 +-
net/netfilter/nf_log.c | 9 +-
net/netfilter/nft_compat.c | 24 +-
net/netlink/af_netlink.c | 42 +-
net/netlink/af_netlink.h | 10 +
net/openvswitch/Kconfig | 3 +-
net/openvswitch/conntrack.c | 8 +-
net/openvswitch/datapath.c | 4 +-
net/openvswitch/flow_netlink.c | 82 ++--
net/openvswitch/flow_table.c | 23 +-
net/openvswitch/flow_table.h | 2 +-
net/sctp/protocol.c | 64 +--
net/tipc/msg.c | 1 +
87 files changed, 1212 insertions(+), 346 deletions(-)

diff --git a/Documentation/networking/vrf.txt b/Documentation/networking/vrf.txt
new file mode 100644
index 000000000000..031ef4a63485
--- /dev/null
+++ b/Documentation/networking/vrf.txt
@@ -0,0 +1,96 @@
+Virtual Routing and Forwarding (VRF)
+====================================
+The VRF device combined with ip rules provides the ability to create virtual
+routing and forwarding domains (aka VRFs, VRF-lite to be specific) in the
+Linux network stack. One use case is the multi-tenancy problem where each
+tenant has their own unique routing tables and in the very least need
+different default gateways.
+
+Processes can be "VRF aware" by binding a socket to the VRF device. Packets
+through the socket then use the routing table associated with the VRF
+device. An important feature of the VRF device implementation is that it
+impacts only Layer 3 and above so L2 tools (e.g., LLDP) are not affected
+(ie., they do not need to be run in each VRF). The design also allows
+the use of higher priority ip rules (Policy Based Routing, PBR) to take
+precedence over the VRF device rules directing specific traffic as desired.
+
+In addition, VRF devices allow VRFs to be nested within namespaces. For
+example network namespaces provide separation of network interfaces at L1
+(Layer 1 separation), VLANs on the interfaces within a namespace provide
+L2 separation and then VRF devices provide L3 separation.
+
+Design
+------
+A VRF device is created with an associated route table. Network interfaces
+are then enslaved to a VRF device:
+
+ +-----------------------------+
+ | vrf-blue | ===> route table 10
+ +-----------------------------+
+ | | |
+ +------+ +------+ +-------------+
+ | eth1 | | eth2 | ... | bond1 |
+ +------+ +------+ +-------------+
+ | |
+ +------+ +------+
+ | eth8 | | eth9 |
+ +------+ +------+
+
+Packets received on an enslaved device and are switched to the VRF device
+using an rx_handler which gives the impression that packets flow through
+the VRF device. Similarly on egress routing rules are used to send packets
+to the VRF device driver before getting sent out the actual interface. This
+allows tcpdump on a VRF device to capture all packets into and out of the
+VRF as a whole.[1] Similiarly, netfilter [2] and tc rules can be applied
+using the VRF device to specify rules that apply to the VRF domain as a whole.
+
+[1] Packets in the forwarded state do not flow through the device, so those
+ packets are not seen by tcpdump. Will revisit this limitation in a
+ future release.
+
+[2] Iptables on ingress is limited to NF_INET_PRE_ROUTING only with skb->dev
+ set to real ingress device and egress is limited to NF_INET_POST_ROUTING.
+ Will revisit this limitation in a future release.
+
+
+Setup
+-----
+1. VRF device is created with an association to a FIB table.
+ e.g, ip link add vrf-blue type vrf table 10
+ ip link set dev vrf-blue up
+
+2. Rules are added that send lookups to the associated FIB table when the
+ iif or oif is the VRF device. e.g.,
+ ip ru add oif vrf-blue table 10
+ ip ru add iif vrf-blue table 10
+
+ Set the default route for the table (and hence default route for the VRF).
+ e.g, ip route add table 10 prohibit default
+
+3. Enslave L3 interfaces to a VRF device.
+ e.g, ip link set dev eth1 master vrf-blue
+
+ Local and connected routes for enslaved devices are automatically moved to
+ the table associated with VRF device. Any additional routes depending on
+ the enslaved device will need to be reinserted following the enslavement.
+
+4. Additional VRF routes are added to associated table.
+ e.g., ip route add table 10 ...
+
+
+Applications
+------------
+Applications that are to work within a VRF need to bind their socket to the
+VRF device:
+
+ setsockopt(sd, SOL_SOCKET, SO_BINDTODEVICE, dev, strlen(dev)+1);
+
+or to specify the output device using cmsg and IP_PKTINFO.
+
+
+Limitations
+-----------
+VRF device currently only works for IPv4. Support for IPv6 is under development.
+
+Index of original ingress interface is not available via cmsg. Will address
+soon.
diff --git a/Documentation/sysctl/net.txt b/Documentation/sysctl/net.txt
index 6294b5186ae5..809ab6efcc74 100644
--- a/Documentation/sysctl/net.txt
+++ b/Documentation/sysctl/net.txt
@@ -54,13 +54,15 @@ default_qdisc
--------------

The default queuing discipline to use for network devices. This allows
-overriding the default queue discipline of pfifo_fast with an
-alternative. Since the default queuing discipline is created with the
-no additional parameters so is best suited to queuing disciplines that
-work well without configuration like stochastic fair queue (sfq),
-CoDel (codel) or fair queue CoDel (fq_codel). Don't use queuing disciplines
-like Hierarchical Token Bucket or Deficit Round Robin which require setting
-up classes and bandwidths.
+overriding the default of pfifo_fast with an alternative. Since the default
+queuing discipline is created without additional parameters so is best suited
+to queuing disciplines that work well without configuration like stochastic
+fair queue (sfq), CoDel (codel) or fair queue CoDel (fq_codel). Don't use
+queuing disciplines like Hierarchical Token Bucket or Deficit Round Robin
+which require setting up classes and bandwidths. Note that physical multiqueue
+interfaces still use mq as root qdisc, which in turn uses this default for its
+leaves. Virtual devices (like e.g. lo or veth) ignore this setting and instead
+default to noqueue.
Default: pfifo_fast

busy_read
diff --git a/MAINTAINERS b/MAINTAINERS
index 274f85405584..0415ef02b610 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -808,6 +808,13 @@ S: Maintained
F: drivers/video/fbdev/arcfb.c
F: drivers/video/fbdev/core/fb_defio.c

+ARCNET NETWORK LAYER
+M: Michael Grzeschik <m.grzeschik@pengutronix.de>
+L: netdev@vger.kernel.org
+S: Maintained
+F: drivers/net/arcnet/
+F: include/uapi/linux/if_arcnet.h
+
ARM MFM AND FLOPPY DRIVERS
M: Ian Molton <spyro@f2s.com>
S: Maintained
@@ -8500,7 +8507,6 @@ F: Documentation/networking/LICENSE.qla3xxx
F: drivers/net/ethernet/qlogic/qla3xxx.*

QLOGIC QLCNIC (1/10)Gb ETHERNET DRIVER
-M: Shahed Shaikh <shahed.shaikh@qlogic.com>
M: Dept-GELinuxNICDev@qlogic.com
L: netdev@vger.kernel.org
S: Supported
@@ -11253,6 +11259,7 @@ L: netdev@vger.kernel.org
S: Maintained
F: drivers/net/vrf.c
F: include/net/vrf.h
+F: Documentation/networking/vrf.txt

VT1211 HARDWARE MONITOR DRIVER
M: Juerg Haefliger <juergh@gmail.com>
diff --git a/drivers/atm/he.c b/drivers/atm/he.c
index a8da3a50e374..0f5cb37636bc 100644
--- a/drivers/atm/he.c
+++ b/drivers/atm/he.c
@@ -1578,9 +1578,7 @@ he_stop(struct he_dev *he_dev)

kfree(he_dev->rbpl_virt);
kfree(he_dev->rbpl_table);
-
- if (he_dev->rbpl_pool)
- dma_pool_destroy(he_dev->rbpl_pool);
+ dma_pool_destroy(he_dev->rbpl_pool);

if (he_dev->rbrq_base)
dma_free_coherent(&he_dev->pci_dev->dev, CONFIG_RBRQ_SIZE * sizeof(struct he_rbrq),
@@ -1594,8 +1592,7 @@ he_stop(struct he_dev *he_dev)
dma_free_coherent(&he_dev->pci_dev->dev, CONFIG_TBRQ_SIZE * sizeof(struct he_tbrq),
he_dev->tpdrq_base, he_dev->tpdrq_phys);

- if (he_dev->tpd_pool)
- dma_pool_destroy(he_dev->tpd_pool);
+ dma_pool_destroy(he_dev->tpd_pool);

if (he_dev->pci_dev) {
pci_read_config_word(he_dev->pci_dev, PCI_COMMAND, &command);
diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c
index 74e18b0a6d89..3d7fb6516f74 100644
--- a/drivers/atm/solos-pci.c
+++ b/drivers/atm/solos-pci.c
@@ -805,7 +805,12 @@ static void solos_bh(unsigned long card_arg)
continue;
}

- skb = alloc_skb(size + 1, GFP_ATOMIC);
+ /* Use netdev_alloc_skb() because it adds NET_SKB_PAD of
+ * headroom, and ensures we can route packets back out an
+ * Ethernet interface (for example) without having to
+ * reallocate. Adding NET_IP_ALIGN also ensures that both
+ * PPPoATM and PPPoEoBR2684 packets end up aligned. */
+ skb = netdev_alloc_skb_ip_align(NULL, size + 1);
if (!skb) {
if (net_ratelimit())
dev_warn(&card->dev->dev, "Failed to allocate sk_buff for RX\n");
@@ -869,7 +874,10 @@ static void solos_bh(unsigned long card_arg)
/* Allocate RX skbs for any ports which need them */
if (card->using_dma && card->atmdev[port] &&
!card->rx_skb[port]) {
- struct sk_buff *skb = alloc_skb(RX_DMA_SIZE, GFP_ATOMIC);
+ /* Unlike the MMIO case (qv) we can't add NET_IP_ALIGN
+ * here; the FPGA can only DMA to addresses which are
+ * aligned to 4 bytes. */
+ struct sk_buff *skb = dev_alloc_skb(RX_DMA_SIZE);
if (skb) {
SKB_CB(skb)->dma_addr =
dma_map_single(&card->dev->dev, skb->data,
diff --git a/drivers/net/arcnet/arcnet.c b/drivers/net/arcnet/arcnet.c
index 10f71c732b59..816d0e94961c 100644
--- a/drivers/net/arcnet/arcnet.c
+++ b/drivers/net/arcnet/arcnet.c
@@ -326,7 +326,7 @@ static void arcdev_setup(struct net_device *dev)
dev->type = ARPHRD_ARCNET;
dev->netdev_ops = &arcnet_netdev_ops;
dev->header_ops = &arcnet_header_ops;
- dev->hard_header_len = sizeof(struct archdr);
+ dev->hard_header_len = sizeof(struct arc_hardware);
dev->mtu = choose_mtu();

dev->addr_len = ARCNET_ALEN;
diff --git a/drivers/net/dsa/mv88e6xxx.c b/drivers/net/dsa/mv88e6xxx.c
index 6f13f7206762..f8baa897d1a0 100644
--- a/drivers/net/dsa/mv88e6xxx.c
+++ b/drivers/net/dsa/mv88e6xxx.c
@@ -2000,6 +2000,7 @@ static int mv88e6xxx_setup_port(struct dsa_switch *ds, int port)
*/
reg = _mv88e6xxx_reg_read(ds, REG_PORT(port), PORT_PCS_CTRL);
if (dsa_is_cpu_port(ds, port) || dsa_is_dsa_port(ds, port)) {
+ reg &= ~PORT_PCS_CTRL_UNFORCED;
reg |= PORT_PCS_CTRL_FORCE_LINK |
PORT_PCS_CTRL_LINK_UP |
PORT_PCS_CTRL_DUPLEX_FULL |
diff --git a/drivers/net/ethernet/arc/emac_arc.c b/drivers/net/ethernet/arc/emac_arc.c
index f9cb99bfb511..ffd180570920 100644
--- a/drivers/net/ethernet/arc/emac_arc.c
+++ b/drivers/net/ethernet/arc/emac_arc.c
@@ -78,6 +78,7 @@ static const struct of_device_id emac_arc_dt_ids[] = {
{ .compatible = "snps,arc-emac" },
{ /* Sentinel */ }
};
+MODULE_DEVICE_TABLE(of, emac_arc_dt_ids);

static struct platform_driver emac_arc_driver = {
.probe = emac_arc_probe,
diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c
index b9a5a97ed4dd..f1b5364f3521 100644
--- a/drivers/net/ethernet/broadcom/bcmsysport.c
+++ b/drivers/net/ethernet/broadcom/bcmsysport.c
@@ -2079,6 +2079,7 @@ static const struct of_device_id bcm_sysport_of_match[] = {
{ .compatible = "brcm,systemport" },
{ /* sentinel */ }
};
+MODULE_DEVICE_TABLE(of, bcm_sysport_of_match);

static struct platform_driver bcm_sysport_driver = {
.probe = bcm_sysport_probe,
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
index ba936635322a..b5e64b02200c 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
@@ -1946,6 +1946,7 @@ struct bnx2x {
u16 vlan_cnt;
u16 vlan_credit;
u16 vxlan_dst_port;
+ u8 vxlan_dst_port_count;
bool accept_any_vlan;
};

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index e3da2bddf143..f1d62d5dbaff 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -3705,16 +3705,14 @@ out:

void bnx2x_update_mfw_dump(struct bnx2x *bp)
{
- struct timeval epoc;
u32 drv_ver;
u32 valid_dump;

if (!SHMEM2_HAS(bp, drv_info))
return;

- /* Update Driver load time */
- do_gettimeofday(&epoc);
- SHMEM2_WR(bp, drv_info.epoc, epoc.tv_sec);
+ /* Update Driver load time, possibly broken in y2038 */
+ SHMEM2_WR(bp, drv_info.epoc, (u32)ktime_get_real_seconds());

drv_ver = bnx2x_update_mng_version_utility(DRV_MODULE_VERSION, true);
SHMEM2_WR(bp, drv_info.drv_ver, drv_ver);
@@ -10110,12 +10108,18 @@ static void __bnx2x_add_vxlan_port(struct bnx2x *bp, u16 port)
if (!netif_running(bp->dev))
return;

- if (bp->vxlan_dst_port || !IS_PF(bp)) {
+ if (bp->vxlan_dst_port_count && bp->vxlan_dst_port == port) {
+ bp->vxlan_dst_port_count++;
+ return;
+ }
+
+ if (bp->vxlan_dst_port_count || !IS_PF(bp)) {
DP(BNX2X_MSG_SP, "Vxlan destination port limit reached\n");
return;
}

bp->vxlan_dst_port = port;
+ bp->vxlan_dst_port_count = 1;
bnx2x_schedule_sp_rtnl(bp, BNX2X_SP_RTNL_ADD_VXLAN_PORT, 0);
}

@@ -10130,10 +10134,14 @@ static void bnx2x_add_vxlan_port(struct net_device *netdev,

static void __bnx2x_del_vxlan_port(struct bnx2x *bp, u16 port)
{
- if (!bp->vxlan_dst_port || bp->vxlan_dst_port != port || !IS_PF(bp)) {
+ if (!bp->vxlan_dst_port_count || bp->vxlan_dst_port != port ||
+ !IS_PF(bp)) {
DP(BNX2X_MSG_SP, "Invalid vxlan port\n");
return;
}
+ bp->vxlan_dst_port--;
+ if (bp->vxlan_dst_port)
+ return;

if (netif_running(bp->dev)) {
bnx2x_schedule_sp_rtnl(bp, BNX2X_SP_RTNL_DEL_VXLAN_PORT, 0);
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
index fadbd0088d3e..3bc701e4c59e 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -3155,6 +3155,7 @@ static const struct of_device_id bcmgenet_match[] = {
{ .compatible = "brcm,genet-v4", .data = (void *)GENET_V4 },
{ },
};
+MODULE_DEVICE_TABLE(of, bcmgenet_match);

static int bcmgenet_probe(struct platform_device *pdev)
{
diff --git a/drivers/net/ethernet/brocade/bna/bna_tx_rx.c b/drivers/net/ethernet/brocade/bna/bna_tx_rx.c
index 5d0753cc7e73..04b0d16b210e 100644
--- a/drivers/net/ethernet/brocade/bna/bna_tx_rx.c
+++ b/drivers/net/ethernet/brocade/bna/bna_tx_rx.c
@@ -2400,6 +2400,7 @@ bna_rx_create(struct bna *bna, struct bnad *bnad,
q0->rcb->id = 0;
q0->rx_packets = q0->rx_bytes = 0;
q0->rx_packets_with_error = q0->rxbuf_alloc_failed = 0;
+ q0->rxbuf_map_failed = 0;

bna_rxq_qpt_setup(q0, rxp, dpage_count, PAGE_SIZE,
&dqpt_mem[i], &dsqpt_mem[i], &dpage_mem[i]);
@@ -2428,6 +2429,7 @@ bna_rx_create(struct bna *bna, struct bnad *bnad,
: rx_cfg->q1_buf_size;
q1->rx_packets = q1->rx_bytes = 0;
q1->rx_packets_with_error = q1->rxbuf_alloc_failed = 0;
+ q1->rxbuf_map_failed = 0;

bna_rxq_qpt_setup(q1, rxp, hpage_count, PAGE_SIZE,
&hqpt_mem[i], &hsqpt_mem[i],
diff --git a/drivers/net/ethernet/brocade/bna/bna_types.h b/drivers/net/ethernet/brocade/bna/bna_types.h
index e0e797f2ea14..c438d032e8bf 100644
--- a/drivers/net/ethernet/brocade/bna/bna_types.h
+++ b/drivers/net/ethernet/brocade/bna/bna_types.h
@@ -587,6 +587,7 @@ struct bna_rxq {
u64 rx_bytes;
u64 rx_packets_with_error;
u64 rxbuf_alloc_failed;
+ u64 rxbuf_map_failed;
};

/* RxQ pair */
diff --git a/drivers/net/ethernet/brocade/bna/bnad.c b/drivers/net/ethernet/brocade/bna/bnad.c
index 506047c38607..21a0cfc3e7ec 100644
--- a/drivers/net/ethernet/brocade/bna/bnad.c
+++ b/drivers/net/ethernet/brocade/bna/bnad.c
@@ -399,7 +399,13 @@ bnad_rxq_refill_page(struct bnad *bnad, struct bna_rcb *rcb, u32 nalloc)
}

dma_addr = dma_map_page(&bnad->pcidev->dev, page, page_offset,
- unmap_q->map_size, DMA_FROM_DEVICE);
+ unmap_q->map_size, DMA_FROM_DEVICE);
+ if (dma_mapping_error(&bnad->pcidev->dev, dma_addr)) {
+ put_page(page);
+ BNAD_UPDATE_CTR(bnad, rxbuf_map_failed);
+ rcb->rxq->rxbuf_map_failed++;
+ goto finishing;
+ }

unmap->page = page;
unmap->page_offset = page_offset;
@@ -454,8 +460,15 @@ bnad_rxq_refill_skb(struct bnad *bnad, struct bna_rcb *rcb, u32 nalloc)
rcb->rxq->rxbuf_alloc_failed++;
goto finishing;
}
+
dma_addr = dma_map_single(&bnad->pcidev->dev, skb->data,
buff_sz, DMA_FROM_DEVICE);
+ if (dma_mapping_error(&bnad->pcidev->dev, dma_addr)) {
+ dev_kfree_skb_any(skb);
+ BNAD_UPDATE_CTR(bnad, rxbuf_map_failed);
+ rcb->rxq->rxbuf_map_failed++;
+ goto finishing;
+ }

unmap->skb = skb;
dma_unmap_addr_set(&unmap->vector, dma_addr, dma_addr);
@@ -3025,6 +3038,11 @@ bnad_start_xmit(struct sk_buff *skb, struct net_device *netdev)
unmap = head_unmap;
dma_addr = dma_map_single(&bnad->pcidev->dev, skb->data,
len, DMA_TO_DEVICE);
+ if (dma_mapping_error(&bnad->pcidev->dev, dma_addr)) {
+ dev_kfree_skb_any(skb);
+ BNAD_UPDATE_CTR(bnad, tx_skb_map_failed);
+ return NETDEV_TX_OK;
+ }
BNA_SET_DMA_ADDR(dma_addr, &txqent->vector[0].host_addr);
txqent->vector[0].length = htons(len);
dma_unmap_addr_set(&unmap->vectors[0], dma_addr, dma_addr);
@@ -3056,6 +3074,15 @@ bnad_start_xmit(struct sk_buff *skb, struct net_device *netdev)

dma_addr = skb_frag_dma_map(&bnad->pcidev->dev, frag,
0, size, DMA_TO_DEVICE);
+ if (dma_mapping_error(&bnad->pcidev->dev, dma_addr)) {
+ /* Undo the changes starting at tcb->producer_index */
+ bnad_tx_buff_unmap(bnad, unmap_q, q_depth,
+ tcb->producer_index);
+ dev_kfree_skb_any(skb);
+ BNAD_UPDATE_CTR(bnad, tx_skb_map_failed);
+ return NETDEV_TX_OK;
+ }
+
dma_unmap_len_set(&unmap->vectors[vect_id], dma_len, size);
BNA_SET_DMA_ADDR(dma_addr, &txqent->vector[vect_id].host_addr);
txqent->vector[vect_id].length = htons(size);
diff --git a/drivers/net/ethernet/brocade/bna/bnad.h b/drivers/net/ethernet/brocade/bna/bnad.h
index faedbf24777e..f4ed816b93ee 100644
--- a/drivers/net/ethernet/brocade/bna/bnad.h
+++ b/drivers/net/ethernet/brocade/bna/bnad.h
@@ -175,6 +175,7 @@ struct bnad_drv_stats {
u64 tx_skb_headlen_zero;
u64 tx_skb_frag_zero;
u64 tx_skb_len_mismatch;
+ u64 tx_skb_map_failed;

u64 hw_stats_updates;
u64 netif_rx_dropped;
@@ -189,6 +190,7 @@ struct bnad_drv_stats {
u64 rx_unmap_q_alloc_failed;

u64 rxbuf_alloc_failed;
+ u64 rxbuf_map_failed;
};

/* Complete driver stats */
diff --git a/drivers/net/ethernet/brocade/bna/bnad_ethtool.c b/drivers/net/ethernet/brocade/bna/bnad_ethtool.c
index 2bdfc5dff4b1..0e4fdc3dd729 100644
--- a/drivers/net/ethernet/brocade/bna/bnad_ethtool.c
+++ b/drivers/net/ethernet/brocade/bna/bnad_ethtool.c
@@ -90,6 +90,7 @@ static const char *bnad_net_stats_strings[BNAD_ETHTOOL_STATS_NUM] = {
"tx_skb_headlen_zero",
"tx_skb_frag_zero",
"tx_skb_len_mismatch",
+ "tx_skb_map_failed",
"hw_stats_updates",
"netif_rx_dropped",

@@ -102,6 +103,7 @@ static const char *bnad_net_stats_strings[BNAD_ETHTOOL_STATS_NUM] = {
"tx_unmap_q_alloc_failed",
"rx_unmap_q_alloc_failed",
"rxbuf_alloc_failed",
+ "rxbuf_map_failed",

"mac_stats_clr_cnt",
"mac_frame_64",
@@ -807,6 +809,7 @@ bnad_per_q_stats_fill(struct bnad *bnad, u64 *buf, int bi)
rx_packets_with_error;
buf[bi++] = rcb->rxq->
rxbuf_alloc_failed;
+ buf[bi++] = rcb->rxq->rxbuf_map_failed;
buf[bi++] = rcb->producer_index;
buf[bi++] = rcb->consumer_index;
}
@@ -821,6 +824,7 @@ bnad_per_q_stats_fill(struct bnad *bnad, u64 *buf, int bi)
rx_packets_with_error;
buf[bi++] = rcb->rxq->
rxbuf_alloc_failed;
+ buf[bi++] = rcb->rxq->rxbuf_map_failed;
buf[bi++] = rcb->producer_index;
buf[bi++] = rcb->consumer_index;
}
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h b/drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h
index 8353a6cbfcc2..03ed00c49823 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h
+++ b/drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h
@@ -157,6 +157,11 @@ CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN
CH_PCI_ID_TABLE_FENTRY(0x5090), /* Custom T540-CR */
CH_PCI_ID_TABLE_FENTRY(0x5091), /* Custom T522-CR */
CH_PCI_ID_TABLE_FENTRY(0x5092), /* Custom T520-CR */
+ CH_PCI_ID_TABLE_FENTRY(0x5093), /* Custom T580-LP-CR */
+ CH_PCI_ID_TABLE_FENTRY(0x5094), /* Custom T540-CR */
+ CH_PCI_ID_TABLE_FENTRY(0x5095), /* Custom T540-CR-SO */
+ CH_PCI_ID_TABLE_FENTRY(0x5096), /* Custom T580-CR */
+ CH_PCI_ID_TABLE_FENTRY(0x5097), /* Custom T520-KR */

/* T6 adapters:
*/
diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h
index 0a27805cbbbd..821540913343 100644
--- a/drivers/net/ethernet/emulex/benet/be.h
+++ b/drivers/net/ethernet/emulex/benet/be.h
@@ -582,6 +582,7 @@ struct be_adapter {
u16 pvid;
__be16 vxlan_port;
int vxlan_port_count;
+ int vxlan_port_aliases;
struct phy_info phy;
u8 wol_cap;
bool wol_en;
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index 12687bf52b95..7bf51a1a0a77 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -5176,6 +5176,11 @@ static void be_add_vxlan_port(struct net_device *netdev, sa_family_t sa_family,
if (lancer_chip(adapter) || BEx_chip(adapter) || be_is_mc(adapter))
return;

+ if (adapter->vxlan_port == port && adapter->vxlan_port_count) {
+ adapter->vxlan_port_aliases++;
+ return;
+ }
+
if (adapter->flags & BE_FLAGS_VXLAN_OFFLOADS) {
dev_info(dev,
"Only one UDP port supported for VxLAN offloads\n");
@@ -5226,6 +5231,11 @@ static void be_del_vxlan_port(struct net_device *netdev, sa_family_t sa_family,
if (adapter->vxlan_port != port)
goto done;

+ if (adapter->vxlan_port_aliases) {
+ adapter->vxlan_port_aliases--;
+ return;
+ }
+
be_disable_vxlan_offloads(adapter);

dev_info(&adapter->pdev->dev,
diff --git a/drivers/net/ethernet/freescale/gianfar_ptp.c b/drivers/net/ethernet/freescale/gianfar_ptp.c
index 8e3cd77aa347..664d0c261269 100644
--- a/drivers/net/ethernet/freescale/gianfar_ptp.c
+++ b/drivers/net/ethernet/freescale/gianfar_ptp.c
@@ -557,6 +557,7 @@ static const struct of_device_id match_table[] = {
{ .compatible = "fsl,etsec-ptp" },
{},
};
+MODULE_DEVICE_TABLE(of, match_table);

static struct platform_driver gianfar_ptp_driver = {
.driver = {
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index fe2299ac4f5c..09ec32e33076 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -1479,6 +1479,7 @@ static int mvneta_rx(struct mvneta_port *pp, int rx_todo,
struct mvneta_rx_desc *rx_desc = mvneta_rxq_next_desc_get(rxq);
struct sk_buff *skb;
unsigned char *data;
+ dma_addr_t phys_addr;
u32 rx_status;
int rx_bytes, err;

@@ -1486,6 +1487,7 @@ static int mvneta_rx(struct mvneta_port *pp, int rx_todo,
rx_status = rx_desc->status;
rx_bytes = rx_desc->data_size - (ETH_FCS_LEN + MVNETA_MH_SIZE);
data = (unsigned char *)rx_desc->buf_cookie;
+ phys_addr = rx_desc->buf_phys_addr;

if (!mvneta_rxq_desc_is_first_last(rx_status) ||
(rx_status & MVNETA_RXD_ERR_SUMMARY)) {
@@ -1534,7 +1536,7 @@ static int mvneta_rx(struct mvneta_port *pp, int rx_todo,
if (!skb)
goto err_drop_frame;

- dma_unmap_single(dev->dev.parent, rx_desc->buf_phys_addr,
+ dma_unmap_single(dev->dev.parent, phys_addr,
MVNETA_RX_BUF_SIZE(pp->pkt_size), DMA_FROM_DEVICE);

rcvd_pkts++;
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
index 4c7de8c44659..e7a5000aa12c 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
@@ -1270,8 +1270,6 @@ int mlx4_en_config_rss_steer(struct mlx4_en_priv *priv)
rss_context->hash_fn = MLX4_RSS_HASH_TOP;
memcpy(rss_context->rss_key, priv->rss_key,
MLX4_EN_RSS_KEY_SIZE);
- netdev_rss_key_fill(rss_context->rss_key,
- MLX4_EN_RSS_KEY_SIZE);
} else {
en_err(priv, "Unknown RSS hash function requested\n");
err = -EINVAL;
diff --git a/drivers/net/ethernet/micrel/ks8851.c b/drivers/net/ethernet/micrel/ks8851.c
index 66d4ab703f45..60f43ec22175 100644
--- a/drivers/net/ethernet/micrel/ks8851.c
+++ b/drivers/net/ethernet/micrel/ks8851.c
@@ -1601,6 +1601,7 @@ static const struct of_device_id ks8851_match_table[] = {
{ .compatible = "micrel,ks8851" },
{ }
};
+MODULE_DEVICE_TABLE(of, ks8851_match_table);

static struct spi_driver ks8851_driver = {
.driver = {
diff --git a/drivers/net/ethernet/moxa/moxart_ether.c b/drivers/net/ethernet/moxa/moxart_ether.c
index becbb5f1f5a7..a10c928bbd6b 100644
--- a/drivers/net/ethernet/moxa/moxart_ether.c
+++ b/drivers/net/ethernet/moxa/moxart_ether.c
@@ -552,6 +552,7 @@ static const struct of_device_id moxart_mac_match[] = {
{ .compatible = "moxa,moxart-mac" },
{ }
};
+MODULE_DEVICE_TABLE(of, moxart_mac_match);

static struct platform_driver moxart_mac_driver = {
.probe = moxart_mac_probe,
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
index 06bcc734fe8d..d6696cfa11d2 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
@@ -536,6 +536,7 @@ struct qlcnic_hardware_context {
u8 extend_lb_time;
u8 phys_port_id[ETH_ALEN];
u8 lb_mode;
+ u8 vxlan_port_count;
u16 vxlan_port;
struct device *hwmon_dev;
u32 post_mode;
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index 8b08b20e8b30..d4481454b5f8 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -483,11 +483,17 @@ static void qlcnic_add_vxlan_port(struct net_device *netdev,
/* Adapter supports only one VXLAN port. Use very first port
* for enabling offload
*/
- if (!qlcnic_encap_rx_offload(adapter) || ahw->vxlan_port)
+ if (!qlcnic_encap_rx_offload(adapter))
return;
+ if (!ahw->vxlan_port_count) {
+ ahw->vxlan_port_count = 1;
+ ahw->vxlan_port = ntohs(port);
+ adapter->flags |= QLCNIC_ADD_VXLAN_PORT;
+ return;
+ }
+ if (ahw->vxlan_port == ntohs(port))
+ ahw->vxlan_port_count++;

- ahw->vxlan_port = ntohs(port);
- adapter->flags |= QLCNIC_ADD_VXLAN_PORT;
}

static void qlcnic_del_vxlan_port(struct net_device *netdev,
@@ -496,11 +502,13 @@ static void qlcnic_del_vxlan_port(struct net_device *netdev,
struct qlcnic_adapter *adapter = netdev_priv(netdev);
struct qlcnic_hardware_context *ahw = adapter->ahw;

- if (!qlcnic_encap_rx_offload(adapter) || !ahw->vxlan_port ||
+ if (!qlcnic_encap_rx_offload(adapter) || !ahw->vxlan_port_count ||
(ahw->vxlan_port != ntohs(port)))
return;

- adapter->flags |= QLCNIC_DEL_VXLAN_PORT;
+ ahw->vxlan_port_count--;
+ if (!ahw->vxlan_port_count)
+ adapter->flags |= QLCNIC_DEL_VXLAN_PORT;
}

static netdev_features_t qlcnic_features_check(struct sk_buff *skb,
diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c
index d79e33b3c191..ba3dab721806 100644
--- a/drivers/net/ethernet/realtek/8139cp.c
+++ b/drivers/net/ethernet/realtek/8139cp.c
@@ -1151,7 +1151,7 @@ static void cp_clean_rings (struct cp_private *cp)
desc = cp->rx_ring + i;
dma_unmap_single(&cp->pdev->dev,le64_to_cpu(desc->addr),
cp->rx_buf_sz, PCI_DMA_FROMDEVICE);
- dev_kfree_skb(cp->rx_skb[i]);
+ dev_kfree_skb_any(cp->rx_skb[i]);
}
}

@@ -1164,7 +1164,7 @@ static void cp_clean_rings (struct cp_private *cp)
le32_to_cpu(desc->opts1) & 0xffff,
PCI_DMA_TODEVICE);
if (le32_to_cpu(desc->opts1) & LastFrag)
- dev_kfree_skb(skb);
+ dev_kfree_skb_any(skb);
cp->dev->stats.tx_dropped++;
}
}
@@ -1261,6 +1261,7 @@ static void cp_tx_timeout(struct net_device *dev)
cp_clean_rings(cp);
rc = cp_init_rings(cp);
cp_start_hw(cp);
+ __cp_set_rx_mode(dev);
cp_enable_irq(cp);

netif_wake_queue(dev);
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
index b735fa22ac95..ebf6abc4853f 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
@@ -161,11 +161,16 @@ int stmmac_mdio_reset(struct mii_bus *bus)

if (!gpio_request(reset_gpio, "mdio-reset")) {
gpio_direction_output(reset_gpio, active_low ? 1 : 0);
- udelay(data->delays[0]);
+ if (data->delays[0])
+ msleep(DIV_ROUND_UP(data->delays[0], 1000));
+
gpio_set_value(reset_gpio, active_low ? 0 : 1);
- udelay(data->delays[1]);
+ if (data->delays[1])
+ msleep(DIV_ROUND_UP(data->delays[1], 1000));
+
gpio_set_value(reset_gpio, active_low ? 1 : 0);
- udelay(data->delays[2]);
+ if (data->delays[2])
+ msleep(DIV_ROUND_UP(data->delays[2], 1000));
}
}
#endif
diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c
index 53fe200e0b79..cc106d892e29 100644
--- a/drivers/net/ethernet/sun/sunvnet.c
+++ b/drivers/net/ethernet/sun/sunvnet.c
@@ -1756,7 +1756,8 @@ static const struct net_device_ops vnet_ops = {
#endif
};

-static struct vnet *vnet_new(const u64 *local_mac)
+static struct vnet *vnet_new(const u64 *local_mac,
+ struct vio_dev *vdev)
{
struct net_device *dev;
struct vnet *vp;
@@ -1790,6 +1791,8 @@ static struct vnet *vnet_new(const u64 *local_mac)
NETIF_F_HW_CSUM | NETIF_F_SG;
dev->features = dev->hw_features;

+ SET_NETDEV_DEV(dev, &vdev->dev);
+
err = register_netdev(dev);
if (err) {
pr_err("Cannot register net device, aborting\n");
@@ -1808,7 +1811,8 @@ err_out_free_dev:
return ERR_PTR(err);
}

-static struct vnet *vnet_find_or_create(const u64 *local_mac)
+static struct vnet *vnet_find_or_create(const u64 *local_mac,
+ struct vio_dev *vdev)
{
struct vnet *iter, *vp;

@@ -1821,7 +1825,7 @@ static struct vnet *vnet_find_or_create(const u64 *local_mac)
}
}
if (!vp)
- vp = vnet_new(local_mac);
+ vp = vnet_new(local_mac, vdev);
mutex_unlock(&vnet_list_mutex);

return vp;
@@ -1848,7 +1852,8 @@ static void vnet_cleanup(void)
static const char *local_mac_prop = "local-mac-address";

static struct vnet *vnet_find_parent(struct mdesc_handle *hp,
- u64 port_node)
+ u64 port_node,
+ struct vio_dev *vdev)
{
const u64 *local_mac = NULL;
u64 a;
@@ -1869,7 +1874,7 @@ static struct vnet *vnet_find_parent(struct mdesc_handle *hp,
if (!local_mac)
return ERR_PTR(-ENODEV);

- return vnet_find_or_create(local_mac);
+ return vnet_find_or_create(local_mac, vdev);
}

static struct ldc_channel_config vnet_ldc_cfg = {
@@ -1923,7 +1928,7 @@ static int vnet_port_probe(struct vio_dev *vdev, const struct vio_device_id *id)

hp = mdesc_grab();

- vp = vnet_find_parent(hp, vdev->mp);
+ vp = vnet_find_parent(hp, vdev->mp, vdev);
if (IS_ERR(vp)) {
pr_err("Cannot find port parent vnet\n");
err = PTR_ERR(vp);
diff --git a/drivers/net/fjes/fjes_hw.c b/drivers/net/fjes/fjes_hw.c
index b5f4a78da828..2d3848c9dc35 100644
--- a/drivers/net/fjes/fjes_hw.c
+++ b/drivers/net/fjes/fjes_hw.c
@@ -1011,11 +1011,11 @@ static void fjes_hw_update_zone_task(struct work_struct *work)
set_bit(epidx, &irq_bit);
break;
}
- }
-
- hw->ep_shm_info[epidx].es_status = info[epidx].es_status;
- hw->ep_shm_info[epidx].zone = info[epidx].zone;

+ hw->ep_shm_info[epidx].es_status =
+ info[epidx].es_status;
+ hw->ep_shm_info[epidx].zone = info[epidx].zone;
+ }
break;
}

diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
index da3259ce7c8d..4ce8b7b90c7c 100644
--- a/drivers/net/geneve.c
+++ b/drivers/net/geneve.c
@@ -126,6 +126,8 @@ static void geneve_rx(struct geneve_sock *gs, struct sk_buff *skb)
__be32 addr;
int err;

+ iph = ip_hdr(skb); /* outer IP header... */
+
if (gs->collect_md) {
static u8 zero_vni[3];

@@ -133,7 +135,6 @@ static void geneve_rx(struct geneve_sock *gs, struct sk_buff *skb)
addr = 0;
} else {
vni = gnvh->vni;
- iph = ip_hdr(skb); /* Still outer IP header... */
addr = iph->saddr;
}

@@ -178,7 +179,6 @@ static void geneve_rx(struct geneve_sock *gs, struct sk_buff *skb)

skb_reset_network_header(skb);

- iph = ip_hdr(skb); /* Now inner IP header... */
err = IP_ECN_decapsulate(iph, skb);

if (unlikely(err)) {
@@ -626,6 +626,7 @@ static netdev_tx_t geneve_xmit(struct sk_buff *skb, struct net_device *dev)
struct geneve_sock *gs = geneve->sock;
struct ip_tunnel_info *info = NULL;
struct rtable *rt = NULL;
+ const struct iphdr *iip; /* interior IP header */
struct flowi4 fl4;
__u8 tos, ttl;
__be16 sport;
@@ -653,6 +654,8 @@ static netdev_tx_t geneve_xmit(struct sk_buff *skb, struct net_device *dev)
sport = udp_flow_src_port(geneve->net, skb, 1, USHRT_MAX, true);
skb_reset_mac_header(skb);

+ iip = ip_hdr(skb);
+
if (info) {
const struct ip_tunnel_key *key = &info->key;
u8 *opts = NULL;
@@ -668,19 +671,16 @@ static netdev_tx_t geneve_xmit(struct sk_buff *skb, struct net_device *dev)
if (unlikely(err))
goto err;

- tos = key->tos;
+ tos = ip_tunnel_ecn_encap(key->tos, iip, skb);
ttl = key->ttl;
df = key->tun_flags & TUNNEL_DONT_FRAGMENT ? htons(IP_DF) : 0;
} else {
- const struct iphdr *iip; /* interior IP header */
-
udp_csum = false;
err = geneve_build_skb(rt, skb, 0, geneve->vni,
0, NULL, udp_csum);
if (unlikely(err))
goto err;

- iip = ip_hdr(skb);
tos = ip_tunnel_ecn_encap(fl4.flowi4_tos, iip, skb);
ttl = geneve->ttl;
if (!ttl && IN_MULTICAST(ntohl(fl4.daddr)))
@@ -748,12 +748,8 @@ static void geneve_setup(struct net_device *dev)
dev->features |= NETIF_F_RXCSUM;
dev->features |= NETIF_F_GSO_SOFTWARE;

- dev->vlan_features = dev->features;
- dev->features |= NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_STAG_TX;
-
dev->hw_features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_RXCSUM;
dev->hw_features |= NETIF_F_GSO_SOFTWARE;
- dev->hw_features |= NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_STAG_TX;

netif_keep_dst(dev);
dev->priv_flags |= IFF_LIVE_ADDR_CHANGE | IFF_NO_QUEUE;
diff --git a/drivers/net/irda/ali-ircc.c b/drivers/net/irda/ali-ircc.c
index 58ae11a14bb6..64bb44d5d867 100644
--- a/drivers/net/irda/ali-ircc.c
+++ b/drivers/net/irda/ali-ircc.c
@@ -1031,7 +1031,6 @@ static void ali_ircc_fir_change_speed(struct ali_ircc_cb *priv, __u32 baud)
static void ali_ircc_sir_change_speed(struct ali_ircc_cb *priv, __u32 speed)
{
struct ali_ircc_cb *self = priv;
- unsigned long flags;
int iobase;
int fcr; /* FIFO control reg */
int lcr; /* Line control reg */
@@ -1061,8 +1060,6 @@ static void ali_ircc_sir_change_speed(struct ali_ircc_cb *priv, __u32 speed)
/* Update accounting for new speed */
self->io.speed = speed;

- spin_lock_irqsave(&self->lock, flags);
-
divisor = 115200/speed;

fcr = UART_FCR_ENABLE_FIFO;
@@ -1089,9 +1086,6 @@ static void ali_ircc_sir_change_speed(struct ali_ircc_cb *priv, __u32 speed)
/* without this, the connection will be broken after come back from FIR speed,
but with this, the SIR connection is harder to established */
outb((UART_MCR_DTR | UART_MCR_RTS | UART_MCR_OUT2), iobase+UART_MCR);
-
- spin_unlock_irqrestore(&self->lock, flags);
-
}

static void ali_ircc_change_dongle_speed(struct ali_ircc_cb *priv, int speed)
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
index edd77342773a..248478c6f6e4 100644
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -1111,10 +1111,10 @@ static long macvtap_ioctl(struct file *file, unsigned int cmd,
return 0;

case TUNSETSNDBUF:
- if (get_user(u, up))
+ if (get_user(s, sp))
return -EFAULT;

- q->sk.sk_sndbuf = u;
+ q->sk.sk_sndbuf = s;
return 0;

case TUNGETVNETHDRSZ:
diff --git a/drivers/net/phy/mdio-bcm-unimac.c b/drivers/net/phy/mdio-bcm-unimac.c
index 6a52a7f0fa0d..4bde5e728fe0 100644
--- a/drivers/net/phy/mdio-bcm-unimac.c
+++ b/drivers/net/phy/mdio-bcm-unimac.c
@@ -244,6 +244,7 @@ static const struct of_device_id unimac_mdio_ids[] = {
{ .compatible = "brcm,unimac-mdio", },
{ /* sentinel */ },
};
+MODULE_DEVICE_TABLE(of, unimac_mdio_ids);

static struct platform_driver unimac_mdio_driver = {
.driver = {
diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c
index 7dc21e56a7aa..3bc9f03349f3 100644
--- a/drivers/net/phy/mdio-gpio.c
+++ b/drivers/net/phy/mdio-gpio.c
@@ -261,6 +261,7 @@ static const struct of_device_id mdio_gpio_of_match[] = {
{ .compatible = "virtual,mdio-gpio", },
{ /* sentinel */ }
};
+MODULE_DEVICE_TABLE(of, mdio_gpio_of_match);

static struct platform_driver mdio_gpio_driver = {
.probe = mdio_gpio_probe,
diff --git a/drivers/net/phy/vitesse.c b/drivers/net/phy/vitesse.c
index 17cad185169d..76cad712ddb2 100644
--- a/drivers/net/phy/vitesse.c
+++ b/drivers/net/phy/vitesse.c
@@ -66,7 +66,6 @@
#define PHY_ID_VSC8244 0x000fc6c0
#define PHY_ID_VSC8514 0x00070670
#define PHY_ID_VSC8574 0x000704a0
-#define PHY_ID_VSC8641 0x00070431
#define PHY_ID_VSC8662 0x00070660
#define PHY_ID_VSC8221 0x000fc550
#define PHY_ID_VSC8211 0x000fc4b0
@@ -273,18 +272,6 @@ static struct phy_driver vsc82xx_driver[] = {
.config_intr = &vsc82xx_config_intr,
.driver = { .owner = THIS_MODULE,},
}, {
- .phy_id = PHY_ID_VSC8641,
- .name = "Vitesse VSC8641",
- .phy_id_mask = 0x000ffff0,
- .features = PHY_GBIT_FEATURES,
- .flags = PHY_HAS_INTERRUPT,
- .config_init = &vsc824x_config_init,
- .config_aneg = &vsc82x4_config_aneg,
- .read_status = &genphy_read_status,
- .ack_interrupt = &vsc824x_ack_interrupt,
- .config_intr = &vsc82xx_config_intr,
- .driver = { .owner = THIS_MODULE,},
-}, {
.phy_id = PHY_ID_VSC8662,
.name = "Vitesse VSC8662",
.phy_id_mask = 0x000ffff0,
@@ -331,7 +318,6 @@ static struct mdio_device_id __maybe_unused vitesse_tbl[] = {
{ PHY_ID_VSC8244, 0x000fffc0 },
{ PHY_ID_VSC8514, 0x000ffff0 },
{ PHY_ID_VSC8574, 0x000ffff0 },
- { PHY_ID_VSC8641, 0x000ffff0 },
{ PHY_ID_VSC8662, 0x000ffff0 },
{ PHY_ID_VSC8221, 0x000ffff0 },
{ PHY_ID_VSC8211, 0x000ffff0 },
diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig
index 1610b79ae386..fbb9325d1f6e 100644
--- a/drivers/net/usb/Kconfig
+++ b/drivers/net/usb/Kconfig
@@ -583,4 +583,15 @@ config USB_VL600

http://ubuntuforums.org/showpost.php?p=10589647&postcount=17

+config USB_NET_CH9200
+ tristate "QingHeng CH9200 USB ethernet support"
+ depends on USB_USBNET
+ select MII
+ help
+ Choose this option if you have a USB ethernet adapter with a QinHeng
+ CH9200 chipset.
+
+ To compile this driver as a module, choose M here: the
+ module will be called ch9200.
+
endif # USB_NET_DRIVERS
diff --git a/drivers/net/usb/Makefile b/drivers/net/usb/Makefile
index cf6a0e610a7f..b5f04068dbe4 100644
--- a/drivers/net/usb/Makefile
+++ b/drivers/net/usb/Makefile
@@ -38,4 +38,4 @@ obj-$(CONFIG_USB_NET_HUAWEI_CDC_NCM) += huawei_cdc_ncm.o
obj-$(CONFIG_USB_VL600) += lg-vl600.o
obj-$(CONFIG_USB_NET_QMI_WWAN) += qmi_wwan.o
obj-$(CONFIG_USB_NET_CDC_MBIM) += cdc_mbim.o
-
+obj-$(CONFIG_USB_NET_CH9200) += ch9200.o
diff --git a/drivers/net/usb/ch9200.c b/drivers/net/usb/ch9200.c
new file mode 100644
index 000000000000..5e151e6a3e09
--- /dev/null
+++ b/drivers/net/usb/ch9200.c
@@ -0,0 +1,432 @@
+/*
+ * USB 10M/100M ethernet adapter
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2. This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/sched.h>
+#include <linux/stddef.h>
+#include <linux/init.h>
+#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
+#include <linux/ethtool.h>
+#include <linux/mii.h>
+#include <linux/usb.h>
+#include <linux/crc32.h>
+#include <linux/usb/usbnet.h>
+#include <linux/slab.h>
+
+#define CH9200_VID 0x1A86
+#define CH9200_PID_E092 0xE092
+
+#define CTRL_TIMEOUT_MS 1000
+
+#define CONTROL_TIMEOUT_MS 1000
+
+#define REQUEST_READ 0x0E
+#define REQUEST_WRITE 0x0F
+
+/* Address space:
+ * 00-63 : MII
+ * 64-128: MAC
+ *
+ * Note: all accesses must be 16-bit
+ */
+
+#define MAC_REG_CTRL 64
+#define MAC_REG_STATUS 66
+#define MAC_REG_INTERRUPT_MASK 68
+#define MAC_REG_PHY_COMMAND 70
+#define MAC_REG_PHY_DATA 72
+#define MAC_REG_STATION_L 74
+#define MAC_REG_STATION_M 76
+#define MAC_REG_STATION_H 78
+#define MAC_REG_HASH_L 80
+#define MAC_REG_HASH_M1 82
+#define MAC_REG_HASH_M2 84
+#define MAC_REG_HASH_H 86
+#define MAC_REG_THRESHOLD 88
+#define MAC_REG_FIFO_DEPTH 90
+#define MAC_REG_PAUSE 92
+#define MAC_REG_FLOW_CONTROL 94
+
+/* Control register bits
+ *
+ * Note: bits 13 and 15 are reserved
+ */
+#define LOOPBACK (0x01 << 14)
+#define BASE100X (0x01 << 12)
+#define MBPS_10 (0x01 << 11)
+#define DUPLEX_MODE (0x01 << 10)
+#define PAUSE_FRAME (0x01 << 9)
+#define PROMISCUOUS (0x01 << 8)
+#define MULTICAST (0x01 << 7)
+#define BROADCAST (0x01 << 6)
+#define HASH (0x01 << 5)
+#define APPEND_PAD (0x01 << 4)
+#define APPEND_CRC (0x01 << 3)
+#define TRANSMITTER_ACTION (0x01 << 2)
+#define RECEIVER_ACTION (0x01 << 1)
+#define DMA_ACTION (0x01 << 0)
+
+/* Status register bits
+ *
+ * Note: bits 7-15 are reserved
+ */
+#define ALIGNMENT (0x01 << 6)
+#define FIFO_OVER_RUN (0x01 << 5)
+#define FIFO_UNDER_RUN (0x01 << 4)
+#define RX_ERROR (0x01 << 3)
+#define RX_COMPLETE (0x01 << 2)
+#define TX_ERROR (0x01 << 1)
+#define TX_COMPLETE (0x01 << 0)
+
+/* FIFO depth register bits
+ *
+ * Note: bits 6 and 14 are reserved
+ */
+
+#define ETH_TXBD (0x01 << 15)
+#define ETN_TX_FIFO_DEPTH (0x01 << 8)
+#define ETH_RXBD (0x01 << 7)
+#define ETH_RX_FIFO_DEPTH (0x01 << 0)
+
+static int control_read(struct usbnet *dev,
+ unsigned char request, unsigned short value,
+ unsigned short index, void *data, unsigned short size,
+ int timeout)
+{
+ unsigned char *buf = NULL;
+ unsigned char request_type;
+ int err = 0;
+
+ if (request == REQUEST_READ)
+ request_type = (USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_OTHER);
+ else
+ request_type = (USB_DIR_IN | USB_TYPE_VENDOR |
+ USB_RECIP_DEVICE);
+
+ netdev_dbg(dev->net, "Control_read() index=0x%02x size=%d\n",
+ index, size);
+
+ buf = kmalloc(size, GFP_KERNEL);
+ if (!buf) {
+ err = -ENOMEM;
+ goto err_out;
+ }
+
+ err = usb_control_msg(dev->udev,
+ usb_rcvctrlpipe(dev->udev, 0),
+ request, request_type, value, index, buf, size,
+ timeout);
+ if (err == size)
+ memcpy(data, buf, size);
+ else if (err >= 0)
+ err = -EINVAL;
+ kfree(buf);
+
+ return err;
+
+err_out:
+ return err;
+}
+
+static int control_write(struct usbnet *dev, unsigned char request,
+ unsigned short value, unsigned short index,
+ void *data, unsigned short size, int timeout)
+{
+ unsigned char *buf = NULL;
+ unsigned char request_type;
+ int err = 0;
+
+ if (request == REQUEST_WRITE)
+ request_type = (USB_DIR_OUT | USB_TYPE_VENDOR |
+ USB_RECIP_OTHER);
+ else
+ request_type = (USB_DIR_OUT | USB_TYPE_VENDOR |
+ USB_RECIP_DEVICE);
+
+ netdev_dbg(dev->net, "Control_write() index=0x%02x size=%d\n",
+ index, size);
+
+ if (data) {
+ buf = kmalloc(size, GFP_KERNEL);
+ if (!buf) {
+ err = -ENOMEM;
+ goto err_out;
+ }
+ memcpy(buf, data, size);
+ }
+
+ err = usb_control_msg(dev->udev,
+ usb_sndctrlpipe(dev->udev, 0),
+ request, request_type, value, index, buf, size,
+ timeout);
+ if (err >= 0 && err < size)
+ err = -EINVAL;
+ kfree(buf);
+
+ return 0;
+
+err_out:
+ return err;
+}
+
+static int ch9200_mdio_read(struct net_device *netdev, int phy_id, int loc)
+{
+ struct usbnet *dev = netdev_priv(netdev);
+ unsigned char buff[2];
+
+ netdev_dbg(netdev, "ch9200_mdio_read phy_id:%02x loc:%02x\n",
+ phy_id, loc);
+
+ if (phy_id != 0)
+ return -ENODEV;
+
+ control_read(dev, REQUEST_READ, 0, loc * 2, buff, 0x02,
+ CONTROL_TIMEOUT_MS);
+
+ return (buff[0] | buff[1] << 8);
+}
+
+static void ch9200_mdio_write(struct net_device *netdev,
+ int phy_id, int loc, int val)
+{
+ struct usbnet *dev = netdev_priv(netdev);
+ unsigned char buff[2];
+
+ netdev_dbg(netdev, "ch9200_mdio_write() phy_id=%02x loc:%02x\n",
+ phy_id, loc);
+
+ if (phy_id != 0)
+ return;
+
+ buff[0] = (unsigned char)val;
+ buff[1] = (unsigned char)(val >> 8);
+
+ control_write(dev, REQUEST_WRITE, 0, loc * 2, buff, 0x02,
+ CONTROL_TIMEOUT_MS);
+}
+
+static int ch9200_link_reset(struct usbnet *dev)
+{
+ struct ethtool_cmd ecmd;
+
+ mii_check_media(&dev->mii, 1, 1);
+ mii_ethtool_gset(&dev->mii, &ecmd);
+
+ netdev_dbg(dev->net, "link_reset() speed:%d duplex:%d\n",
+ ecmd.speed, ecmd.duplex);
+
+ return 0;
+}
+
+static void ch9200_status(struct usbnet *dev, struct urb *urb)
+{
+ int link;
+ unsigned char *buf;
+
+ if (urb->actual_length < 16)
+ return;
+
+ buf = urb->transfer_buffer;
+ link = !!(buf[0] & 0x01);
+
+ if (link) {
+ netif_carrier_on(dev->net);
+ usbnet_defer_kevent(dev, EVENT_LINK_RESET);
+ } else {
+ netif_carrier_off(dev->net);
+ }
+}
+
+static struct sk_buff *ch9200_tx_fixup(struct usbnet *dev, struct sk_buff *skb,
+ gfp_t flags)
+{
+ int i = 0;
+ int len = 0;
+ int tx_overhead = 0;
+
+ tx_overhead = 0x40;
+
+ len = skb->len;
+ if (skb_headroom(skb) < tx_overhead) {
+ struct sk_buff *skb2;
+
+ skb2 = skb_copy_expand(skb, tx_overhead, 0, flags);
+ dev_kfree_skb_any(skb);
+ skb = skb2;
+ if (!skb)
+ return NULL;
+ }
+
+ __skb_push(skb, tx_overhead);
+ /* usbnet adds padding if length is a multiple of packet size
+ * if so, adjust length value in header
+ */
+ if ((skb->len % dev->maxpacket) == 0)
+ len++;
+
+ skb->data[0] = len;
+ skb->data[1] = len >> 8;
+ skb->data[2] = 0x00;
+ skb->data[3] = 0x80;
+
+ for (i = 4; i < 48; i++)
+ skb->data[i] = 0x00;
+
+ skb->data[48] = len;
+ skb->data[49] = len >> 8;
+ skb->data[50] = 0x00;
+ skb->data[51] = 0x80;
+
+ for (i = 52; i < 64; i++)
+ skb->data[i] = 0x00;
+
+ return skb;
+}
+
+static int ch9200_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
+{
+ int len = 0;
+ int rx_overhead = 0;
+
+ rx_overhead = 64;
+
+ if (unlikely(skb->len < rx_overhead)) {
+ dev_err(&dev->udev->dev, "unexpected tiny rx frame\n");
+ return 0;
+ }
+
+ len = (skb->data[skb->len - 16] | skb->data[skb->len - 15] << 8);
+ skb_trim(skb, len);
+
+ return 1;
+}
+
+static int get_mac_address(struct usbnet *dev, unsigned char *data)
+{
+ int err = 0;
+ unsigned char mac_addr[0x06];
+ int rd_mac_len = 0;
+
+ netdev_dbg(dev->net, "get_mac_address:\n\tusbnet VID:%0x PID:%0x\n",
+ dev->udev->descriptor.idVendor,
+ dev->udev->descriptor.idProduct);
+
+ memset(mac_addr, 0, sizeof(mac_addr));
+ rd_mac_len = control_read(dev, REQUEST_READ, 0,
+ MAC_REG_STATION_L, mac_addr, 0x02,
+ CONTROL_TIMEOUT_MS);
+ rd_mac_len += control_read(dev, REQUEST_READ, 0, MAC_REG_STATION_M,
+ mac_addr + 2, 0x02, CONTROL_TIMEOUT_MS);
+ rd_mac_len += control_read(dev, REQUEST_READ, 0, MAC_REG_STATION_H,
+ mac_addr + 4, 0x02, CONTROL_TIMEOUT_MS);
+ if (rd_mac_len != ETH_ALEN)
+ err = -EINVAL;
+
+ data[0] = mac_addr[5];
+ data[1] = mac_addr[4];
+ data[2] = mac_addr[3];
+ data[3] = mac_addr[2];
+ data[4] = mac_addr[1];
+ data[5] = mac_addr[0];
+
+ return err;
+}
+
+static int ch9200_bind(struct usbnet *dev, struct usb_interface *intf)
+{
+ int retval = 0;
+ unsigned char data[2];
+
+ retval = usbnet_get_endpoints(dev, intf);
+ if (retval)
+ return retval;
+
+ dev->mii.dev = dev->net;
+ dev->mii.mdio_read = ch9200_mdio_read;
+ dev->mii.mdio_write = ch9200_mdio_write;
+ dev->mii.reg_num_mask = 0x1f;
+
+ dev->mii.phy_id_mask = 0x1f;
+
+ dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len;
+ dev->rx_urb_size = 24 * 64 + 16;
+ mii_nway_restart(&dev->mii);
+
+ data[0] = 0x01;
+ data[1] = 0x0F;
+ retval = control_write(dev, REQUEST_WRITE, 0, MAC_REG_THRESHOLD, data,
+ 0x02, CONTROL_TIMEOUT_MS);
+
+ data[0] = 0xA0;
+ data[1] = 0x90;
+ retval = control_write(dev, REQUEST_WRITE, 0, MAC_REG_FIFO_DEPTH, data,
+ 0x02, CONTROL_TIMEOUT_MS);
+
+ data[0] = 0x30;
+ data[1] = 0x00;
+ retval = control_write(dev, REQUEST_WRITE, 0, MAC_REG_PAUSE, data,
+ 0x02, CONTROL_TIMEOUT_MS);
+
+ data[0] = 0x17;
+ data[1] = 0xD8;
+ retval = control_write(dev, REQUEST_WRITE, 0, MAC_REG_FLOW_CONTROL,
+ data, 0x02, CONTROL_TIMEOUT_MS);
+
+ /* Undocumented register */
+ data[0] = 0x01;
+ data[1] = 0x00;
+ retval = control_write(dev, REQUEST_WRITE, 0, 254, data, 0x02,
+ CONTROL_TIMEOUT_MS);
+
+ data[0] = 0x5F;
+ data[1] = 0x0D;
+ retval = control_write(dev, REQUEST_WRITE, 0, MAC_REG_CTRL, data, 0x02,
+ CONTROL_TIMEOUT_MS);
+
+ retval = get_mac_address(dev, dev->net->dev_addr);
+
+ return retval;
+}
+
+static const struct driver_info ch9200_info = {
+ .description = "CH9200 USB to Network Adaptor",
+ .flags = FLAG_ETHER,
+ .bind = ch9200_bind,
+ .rx_fixup = ch9200_rx_fixup,
+ .tx_fixup = ch9200_tx_fixup,
+ .status = ch9200_status,
+ .link_reset = ch9200_link_reset,
+ .reset = ch9200_link_reset,
+};
+
+static const struct usb_device_id ch9200_products[] = {
+ {
+ USB_DEVICE(0x1A86, 0xE092),
+ .driver_info = (unsigned long)&ch9200_info,
+ },
+ {},
+};
+
+MODULE_DEVICE_TABLE(usb, ch9200_products);
+
+static struct usb_driver ch9200_driver = {
+ .name = "ch9200",
+ .id_table = ch9200_products,
+ .probe = usbnet_probe,
+ .disconnect = usbnet_disconnect,
+ .suspend = usbnet_suspend,
+ .resume = usbnet_resume,
+};
+
+module_usb_driver(ch9200_driver);
+
+MODULE_DESCRIPTION("QinHeng CH9200 USB Network device");
+MODULE_LICENSE("GPL");
diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
index e7094fbd7568..488c6f50df73 100644
--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
@@ -193,7 +193,8 @@ static netdev_tx_t vrf_process_v4_outbound(struct sk_buff *skb,
.flowi4_oif = vrf_dev->ifindex,
.flowi4_iif = LOOPBACK_IFINDEX,
.flowi4_tos = RT_TOS(ip4h->tos),
- .flowi4_flags = FLOWI_FLAG_ANYSRC | FLOWI_FLAG_VRFSRC,
+ .flowi4_flags = FLOWI_FLAG_ANYSRC | FLOWI_FLAG_VRFSRC |
+ FLOWI_FLAG_SKIP_NH_OIF,
.daddr = ip4h->daddr,
};

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index cf8b7f0473b3..bbac1d35ed4e 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -2392,10 +2392,6 @@ static void vxlan_setup(struct net_device *dev)

eth_hw_addr_random(dev);
ether_setup(dev);
- if (vxlan->default_dst.remote_ip.sa.sa_family == AF_INET6)
- dev->needed_headroom = ETH_HLEN + VXLAN6_HEADROOM;
- else
- dev->needed_headroom = ETH_HLEN + VXLAN_HEADROOM;

dev->netdev_ops = &vxlan_netdev_ops;
dev->destructor = free_netdev;
@@ -2640,8 +2636,11 @@ static int vxlan_dev_configure(struct net *src_net, struct net_device *dev,
dst->remote_ip.sa.sa_family = AF_INET;

if (dst->remote_ip.sa.sa_family == AF_INET6 ||
- vxlan->cfg.saddr.sa.sa_family == AF_INET6)
+ vxlan->cfg.saddr.sa.sa_family == AF_INET6) {
+ if (!IS_ENABLED(CONFIG_IPV6))
+ return -EPFNOSUPPORT;
use_ipv6 = true;
+ }

if (conf->remote_ifindex) {
struct net_device *lowerdev
@@ -2670,8 +2669,12 @@ static int vxlan_dev_configure(struct net *src_net, struct net_device *dev,

dev->needed_headroom = lowerdev->hard_header_len +
(use_ipv6 ? VXLAN6_HEADROOM : VXLAN_HEADROOM);
- } else if (use_ipv6)
+ } else if (use_ipv6) {
vxlan->flags |= VXLAN_F_IPV6;
+ dev->needed_headroom = ETH_HLEN + VXLAN6_HEADROOM;
+ } else {
+ dev->needed_headroom = ETH_HLEN + VXLAN_HEADROOM;
+ }

memcpy(&vxlan->cfg, conf, sizeof(*conf));
if (!vxlan->cfg.dst_port)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 2738d355cdf9..9987af080fa0 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -179,6 +179,9 @@ struct nf_bridge_info {
u8 bridged_dnat:1;
__u16 frag_max_size;
struct net_device *physindev;
+
+ /* always valid & non-NULL from FORWARD on, for physdev match */
+ struct net_device *physoutdev;
union {
/* prerouting: detect dnat in orig/reply direction */
__be32 ipv4_daddr;
@@ -189,9 +192,6 @@ struct nf_bridge_info {
* skb is out in neigh layer.
*/
char neigh_header[8];
-
- /* always valid & non-NULL from FORWARD on, for physdev match */
- struct net_device *physoutdev;
};
};
#endif
diff --git a/include/net/flow.h b/include/net/flow.h
index acd6a096250e..9b85db85f13c 100644
--- a/include/net/flow.h
+++ b/include/net/flow.h
@@ -35,6 +35,7 @@ struct flowi_common {
#define FLOWI_FLAG_ANYSRC 0x01
#define FLOWI_FLAG_KNOWN_NH 0x02
#define FLOWI_FLAG_VRFSRC 0x04
+#define FLOWI_FLAG_SKIP_NH_OIF 0x08
__u32 flowic_secid;
struct flowi_tunnel flowic_tun_key;
};
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h
index 879d6e5a973b..186f3a1e1b1f 100644
--- a/include/net/inet_timewait_sock.h
+++ b/include/net/inet_timewait_sock.h
@@ -110,7 +110,19 @@ struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk,
void __inet_twsk_hashdance(struct inet_timewait_sock *tw, struct sock *sk,
struct inet_hashinfo *hashinfo);

-void inet_twsk_schedule(struct inet_timewait_sock *tw, const int timeo);
+void __inet_twsk_schedule(struct inet_timewait_sock *tw, int timeo,
+ bool rearm);
+
+static void inline inet_twsk_schedule(struct inet_timewait_sock *tw, int timeo)
+{
+ __inet_twsk_schedule(tw, timeo, false);
+}
+
+static void inline inet_twsk_reschedule(struct inet_timewait_sock *tw, int timeo)
+{
+ __inet_twsk_schedule(tw, timeo, true);
+}
+
void inet_twsk_deschedule_put(struct inet_timewait_sock *tw);

void inet_twsk_purge(struct inet_hashinfo *hashinfo,
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h
index 063d30474cf6..aaf9700fc9e5 100644
--- a/include/net/ip6_fib.h
+++ b/include/net/ip6_fib.h
@@ -275,7 +275,8 @@ int fib6_add(struct fib6_node *root, struct rt6_info *rt,
struct nl_info *info, struct mx6_config *mxc);
int fib6_del(struct rt6_info *rt, struct nl_info *info);

-void inet6_rt_notify(int event, struct rt6_info *rt, struct nl_info *info);
+void inet6_rt_notify(int event, struct rt6_info *rt, struct nl_info *info,
+ unsigned int flags);

void fib6_run_gc(unsigned long expires, struct net *net, bool force);

diff --git a/include/net/ip6_tunnel.h b/include/net/ip6_tunnel.h
index b8529aa1dae7..fa915fa0f703 100644
--- a/include/net/ip6_tunnel.h
+++ b/include/net/ip6_tunnel.h
@@ -32,6 +32,12 @@ struct __ip6_tnl_parm {
__be32 o_key;
};

+struct ip6_tnl_dst {
+ seqlock_t lock;
+ struct dst_entry __rcu *dst;
+ u32 cookie;
+};
+
/* IPv6 tunnel */
struct ip6_tnl {
struct ip6_tnl __rcu *next; /* next tunnel in list */
@@ -39,8 +45,7 @@ struct ip6_tnl {
struct net *net; /* netns for packet i/o */
struct __ip6_tnl_parm parms; /* tunnel configuration parameters */
struct flowi fl; /* flowi template for xmit */
- struct dst_entry *dst_cache; /* cached dst */
- u32 dst_cookie;
+ struct ip6_tnl_dst __percpu *dst_cache; /* cached dst */

int err_count;
unsigned long err_time;
@@ -60,9 +65,11 @@ struct ipv6_tlv_tnl_enc_lim {
__u8 encap_limit; /* tunnel encapsulation limit */
} __packed;

-struct dst_entry *ip6_tnl_dst_check(struct ip6_tnl *t);
+struct dst_entry *ip6_tnl_dst_get(struct ip6_tnl *t);
+int ip6_tnl_dst_init(struct ip6_tnl *t);
+void ip6_tnl_dst_destroy(struct ip6_tnl *t);
void ip6_tnl_dst_reset(struct ip6_tnl *t);
-void ip6_tnl_dst_store(struct ip6_tnl *t, struct dst_entry *dst);
+void ip6_tnl_dst_set(struct ip6_tnl *t, struct dst_entry *dst);
int ip6_tnl_rcv_ctl(struct ip6_tnl *t, const struct in6_addr *laddr,
const struct in6_addr *raddr);
int ip6_tnl_xmit_ctl(struct ip6_tnl *t, const struct in6_addr *laddr,
@@ -79,7 +86,7 @@ static inline void ip6tunnel_xmit(struct sock *sk, struct sk_buff *skb,
struct net_device_stats *stats = &dev->stats;
int pkt_len, err;

- pkt_len = skb->len;
+ pkt_len = skb->len - skb_inner_network_offset(skb);
err = ip6_local_out_sk(sk, skb);

if (net_xmit_eval(err) == 0) {
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
index a37d0432bebd..727d6e9a9685 100644
--- a/include/net/ip_fib.h
+++ b/include/net/ip_fib.h
@@ -236,8 +236,11 @@ static inline int fib_lookup(struct net *net, const struct flowi4 *flp,
rcu_read_lock();

tb = fib_get_table(net, RT_TABLE_MAIN);
- if (tb && !fib_table_lookup(tb, flp, res, flags | FIB_LOOKUP_NOREF))
- err = 0;
+ if (tb)
+ err = fib_table_lookup(tb, flp, res, flags | FIB_LOOKUP_NOREF);
+
+ if (err == -EAGAIN)
+ err = -ENETUNREACH;

rcu_read_unlock();

@@ -258,7 +261,7 @@ static inline int fib_lookup(struct net *net, struct flowi4 *flp,
struct fib_result *res, unsigned int flags)
{
struct fib_table *tb;
- int err;
+ int err = -ENETUNREACH;

flags |= FIB_LOOKUP_NOREF;
if (net->ipv4.fib_has_custom_rules)
@@ -268,15 +271,20 @@ static inline int fib_lookup(struct net *net, struct flowi4 *flp,

res->tclassid = 0;

- for (err = 0; !err; err = -ENETUNREACH) {
- tb = rcu_dereference_rtnl(net->ipv4.fib_main);
- if (tb && !fib_table_lookup(tb, flp, res, flags))
- break;
+ tb = rcu_dereference_rtnl(net->ipv4.fib_main);
+ if (tb)
+ err = fib_table_lookup(tb, flp, res, flags);
+
+ if (!err)
+ goto out;
+
+ tb = rcu_dereference_rtnl(net->ipv4.fib_default);
+ if (tb)
+ err = fib_table_lookup(tb, flp, res, flags);

- tb = rcu_dereference_rtnl(net->ipv4.fib_default);
- if (tb && !fib_table_lookup(tb, flp, res, flags))
- break;
- }
+out:
+ if (err == -EAGAIN)
+ err = -ENETUNREACH;

rcu_read_unlock();

diff --git a/include/net/route.h b/include/net/route.h
index cc61cb95f059..f46af256880c 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -255,7 +255,7 @@ static inline void ip_route_connect_init(struct flowi4 *fl4, __be32 dst, __be32
flow_flags |= FLOWI_FLAG_ANYSRC;

if (netif_index_is_vrf(sock_net(sk), oif))
- flow_flags |= FLOWI_FLAG_VRFSRC;
+ flow_flags |= FLOWI_FLAG_VRFSRC | FLOWI_FLAG_SKIP_NH_OIF;

flowi4_init_output(fl4, oif, sk->sk_mark, tos, RT_SCOPE_UNIVERSE,
protocol, flow_flags, dst, src, dport, sport);
diff --git a/lib/rhashtable.c b/lib/rhashtable.c
index cc0c69710dcf..a54ff8949f91 100644
--- a/lib/rhashtable.c
+++ b/lib/rhashtable.c
@@ -187,10 +187,7 @@ static int rhashtable_rehash_one(struct rhashtable *ht, unsigned int old_hash)
head = rht_dereference_bucket(new_tbl->buckets[new_hash],
new_tbl, new_hash);

- if (rht_is_a_nulls(head))
- INIT_RHT_NULLS_HEAD(entry->next, ht, new_hash);
- else
- RCU_INIT_POINTER(entry->next, head);
+ RCU_INIT_POINTER(entry->next, head);

rcu_assign_pointer(new_tbl->buckets[new_hash], entry);
spin_unlock(new_bucket_lock);
diff --git a/net/atm/clip.c b/net/atm/clip.c
index 17e55dfecbe2..e07f551a863c 100644
--- a/net/atm/clip.c
+++ b/net/atm/clip.c
@@ -317,6 +317,9 @@ static int clip_constructor(struct neighbour *neigh)

static int clip_encap(struct atm_vcc *vcc, int mode)
{
+ if (!CLIP_VCC(vcc))
+ return -EBADFD;
+
CLIP_VCC(vcc)->encap = mode;
return 0;
}
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index ad82324f710f..0510a577a7b5 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -2311,12 +2311,6 @@ int smp_conn_security(struct hci_conn *hcon, __u8 sec_level)
if (!conn)
return 1;

- chan = conn->smp;
- if (!chan) {
- BT_ERR("SMP security requested but not available");
- return 1;
- }
-
if (!hci_dev_test_flag(hcon->hdev, HCI_LE_ENABLED))
return 1;

@@ -2330,6 +2324,12 @@ int smp_conn_security(struct hci_conn *hcon, __u8 sec_level)
if (smp_ltk_encrypt(conn, hcon->pending_sec_level))
return 0;

+ chan = conn->smp;
+ if (!chan) {
+ BT_ERR("SMP security requested but not available");
+ return 1;
+ }
+
l2cap_chan_lock(chan);

/* If SMP is already in progress ignore this request */
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index 66efdc21f548..480b3de1a0e3 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1006,7 +1006,7 @@ static int br_ip4_multicast_igmp3_report(struct net_bridge *br,

ih = igmpv3_report_hdr(skb);
num = ntohs(ih->ngrec);
- len = sizeof(*ih);
+ len = skb_transport_offset(skb) + sizeof(*ih);

for (i = 0; i < num; i++) {
len += sizeof(*grec);
@@ -1067,7 +1067,7 @@ static int br_ip6_multicast_mld2_report(struct net_bridge *br,

icmp6h = icmp6_hdr(skb);
num = ntohs(icmp6h->icmp6_dataun.un_data16[1]);
- len = sizeof(*icmp6h);
+ len = skb_transport_offset(skb) + sizeof(*icmp6h);

for (i = 0; i < num; i++) {
__be16 *nsrcs, _nsrcs;
diff --git a/net/core/filter.c b/net/core/filter.c
index 13079f03902e..05a04ea87172 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -478,9 +478,9 @@ do_pass:
bpf_src = BPF_X;
} else {
insn->dst_reg = BPF_REG_A;
- insn->src_reg = BPF_REG_X;
insn->imm = fp->k;
bpf_src = BPF_SRC(fp->code);
+ insn->src_reg = bpf_src == BPF_X ? BPF_REG_X : 0;
}

/* Common case where 'jump_false' is next insn. */
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index a466821d1441..0ec48403ed68 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -3047,6 +3047,7 @@ static int rtnl_bridge_getlink(struct sk_buff *skb, struct netlink_callback *cb)
u32 portid = NETLINK_CB(cb->skb).portid;
u32 seq = cb->nlh->nlmsg_seq;
u32 filter_mask = 0;
+ int err;

if (nlmsg_len(cb->nlh) > sizeof(struct ifinfomsg)) {
struct nlattr *extfilt;
@@ -3067,20 +3068,25 @@ static int rtnl_bridge_getlink(struct sk_buff *skb, struct netlink_callback *cb)
struct net_device *br_dev = netdev_master_upper_dev_get(dev);

if (br_dev && br_dev->netdev_ops->ndo_bridge_getlink) {
- if (idx >= cb->args[0] &&
- br_dev->netdev_ops->ndo_bridge_getlink(
- skb, portid, seq, dev, filter_mask,
- NLM_F_MULTI) < 0)
- break;
+ if (idx >= cb->args[0]) {
+ err = br_dev->netdev_ops->ndo_bridge_getlink(
+ skb, portid, seq, dev,
+ filter_mask, NLM_F_MULTI);
+ if (err < 0 && err != -EOPNOTSUPP)
+ break;
+ }
idx++;
}

if (ops->ndo_bridge_getlink) {
- if (idx >= cb->args[0] &&
- ops->ndo_bridge_getlink(skb, portid, seq, dev,
- filter_mask,
- NLM_F_MULTI) < 0)
- break;
+ if (idx >= cb->args[0]) {
+ err = ops->ndo_bridge_getlink(skb, portid,
+ seq, dev,
+ filter_mask,
+ NLM_F_MULTI);
+ if (err < 0 && err != -EOPNOTSUPP)
+ break;
+ }
idx++;
}
}
diff --git a/net/core/sock.c b/net/core/sock.c
index ca2984afe16e..3307c02244d3 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -2740,10 +2740,8 @@ static void req_prot_cleanup(struct request_sock_ops *rsk_prot)
return;
kfree(rsk_prot->slab_name);
rsk_prot->slab_name = NULL;
- if (rsk_prot->slab) {
- kmem_cache_destroy(rsk_prot->slab);
- rsk_prot->slab = NULL;
- }
+ kmem_cache_destroy(rsk_prot->slab);
+ rsk_prot->slab = NULL;
}

static int req_prot_init(const struct proto *prot)
@@ -2828,10 +2826,8 @@ void proto_unregister(struct proto *prot)
list_del(&prot->node);
mutex_unlock(&proto_list_mutex);

- if (prot->slab != NULL) {
- kmem_cache_destroy(prot->slab);
- prot->slab = NULL;
- }
+ kmem_cache_destroy(prot->slab);
+ prot->slab = NULL;

req_prot_cleanup(prot->rsk_prot);

diff --git a/net/dccp/ackvec.c b/net/dccp/ackvec.c
index bd9e718c2a20..3de0d0362d7f 100644
--- a/net/dccp/ackvec.c
+++ b/net/dccp/ackvec.c
@@ -398,12 +398,8 @@ out_err:

void dccp_ackvec_exit(void)
{
- if (dccp_ackvec_slab != NULL) {
- kmem_cache_destroy(dccp_ackvec_slab);
- dccp_ackvec_slab = NULL;
- }
- if (dccp_ackvec_record_slab != NULL) {
- kmem_cache_destroy(dccp_ackvec_record_slab);
- dccp_ackvec_record_slab = NULL;
- }
+ kmem_cache_destroy(dccp_ackvec_slab);
+ dccp_ackvec_slab = NULL;
+ kmem_cache_destroy(dccp_ackvec_record_slab);
+ dccp_ackvec_record_slab = NULL;
}
diff --git a/net/dccp/ccid.c b/net/dccp/ccid.c
index 83498975165f..90f77d08cc37 100644
--- a/net/dccp/ccid.c
+++ b/net/dccp/ccid.c
@@ -95,8 +95,7 @@ static struct kmem_cache *ccid_kmem_cache_create(int obj_size, char *slab_name_f

static void ccid_kmem_cache_destroy(struct kmem_cache *slab)
{
- if (slab != NULL)
- kmem_cache_destroy(slab);
+ kmem_cache_destroy(slab);
}

static int __init ccid_activate(struct ccid_operations *ccid_ops)
diff --git a/net/dccp/minisocks.c b/net/dccp/minisocks.c
index 30addee2dd03..838f524cf11a 100644
--- a/net/dccp/minisocks.c
+++ b/net/dccp/minisocks.c
@@ -48,8 +48,6 @@ void dccp_time_wait(struct sock *sk, int state, int timeo)
tw->tw_ipv6only = sk->sk_ipv6only;
}
#endif
- /* Linkage updates. */
- __inet_twsk_hashdance(tw, sk, &dccp_hashinfo);

/* Get the TIME_WAIT timeout firing. */
if (timeo < rto)
@@ -60,6 +58,8 @@ void dccp_time_wait(struct sock *sk, int state, int timeo)
timeo = DCCP_TIMEWAIT_LEN;

inet_twsk_schedule(tw, timeo);
+ /* Linkage updates. */
+ __inet_twsk_hashdance(tw, sk, &dccp_hashinfo);
inet_twsk_put(tw);
} else {
/* Sorry, if we're out of memory, just CLOSE this
diff --git a/net/dsa/tag_trailer.c b/net/dsa/tag_trailer.c
index d25efc93d8f1..b6ca0890d018 100644
--- a/net/dsa/tag_trailer.c
+++ b/net/dsa/tag_trailer.c
@@ -78,7 +78,7 @@ static int trailer_rcv(struct sk_buff *skb, struct net_device *dev,

trailer = skb_tail_pointer(skb) - 4;
if (trailer[0] != 0x80 || (trailer[1] & 0xf8) != 0x00 ||
- (trailer[3] & 0xef) != 0x00 || trailer[3] != 0x00)
+ (trailer[2] & 0xef) != 0x00 || trailer[3] != 0x00)
goto out_drop;

source_port = trailer[1] & 7;
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index 26d6ffb6d23c..6c2af797f2f9 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -1426,7 +1426,7 @@ found:
nh->nh_flags & RTNH_F_LINKDOWN &&
!(fib_flags & FIB_LOOKUP_IGNORE_LINKSTATE))
continue;
- if (!(flp->flowi4_flags & FLOWI_FLAG_VRFSRC)) {
+ if (!(flp->flowi4_flags & FLOWI_FLAG_SKIP_NH_OIF)) {
if (flp->flowi4_oif &&
flp->flowi4_oif != nh->nh_oif)
continue;
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index 134957159c27..7bb9c39e0a4d 100644
--- a/net/ipv4/inet_connection_sock.c
+++ b/net/ipv4/inet_connection_sock.c
@@ -685,20 +685,20 @@ void reqsk_queue_hash_req(struct request_sock_queue *queue,
req->num_timeout = 0;
req->sk = NULL;

+ setup_timer(&req->rsk_timer, reqsk_timer_handler, (unsigned long)req);
+ mod_timer_pinned(&req->rsk_timer, jiffies + timeout);
+ req->rsk_hash = hash;
+
/* before letting lookups find us, make sure all req fields
* are committed to memory and refcnt initialized.
*/
smp_wmb();
atomic_set(&req->rsk_refcnt, 2);
- setup_timer(&req->rsk_timer, reqsk_timer_handler, (unsigned long)req);
- req->rsk_hash = hash;

spin_lock(&queue->syn_wait_lock);
req->dl_next = lopt->syn_table[hash];
lopt->syn_table[hash] = req;
spin_unlock(&queue->syn_wait_lock);
-
- mod_timer_pinned(&req->rsk_timer, jiffies + timeout);
}
EXPORT_SYMBOL(reqsk_queue_hash_req);

diff --git a/net/ipv4/inet_timewait_sock.c b/net/ipv4/inet_timewait_sock.c
index ae22cc24fbe8..c67f9bd7699c 100644
--- a/net/ipv4/inet_timewait_sock.c
+++ b/net/ipv4/inet_timewait_sock.c
@@ -123,13 +123,15 @@ void __inet_twsk_hashdance(struct inet_timewait_sock *tw, struct sock *sk,
/*
* Step 2: Hash TW into tcp ehash chain.
* Notes :
- * - tw_refcnt is set to 3 because :
+ * - tw_refcnt is set to 4 because :
* - We have one reference from bhash chain.
* - We have one reference from ehash chain.
+ * - We have one reference from timer.
+ * - One reference for ourself (our caller will release it).
* We can use atomic_set() because prior spin_lock()/spin_unlock()
* committed into memory all tw fields.
*/
- atomic_set(&tw->tw_refcnt, 1 + 1 + 1);
+ atomic_set(&tw->tw_refcnt, 4);
inet_twsk_add_node_rcu(tw, &ehead->chain);

/* Step 3: Remove SK from hash chain */
@@ -217,7 +219,7 @@ void inet_twsk_deschedule_put(struct inet_timewait_sock *tw)
}
EXPORT_SYMBOL(inet_twsk_deschedule_put);

-void inet_twsk_schedule(struct inet_timewait_sock *tw, const int timeo)
+void __inet_twsk_schedule(struct inet_timewait_sock *tw, int timeo, bool rearm)
{
/* timeout := RTO * 3.5
*
@@ -245,12 +247,14 @@ void inet_twsk_schedule(struct inet_timewait_sock *tw, const int timeo)
*/

tw->tw_kill = timeo <= 4*HZ;
- if (!mod_timer_pinned(&tw->tw_timer, jiffies + timeo)) {
- atomic_inc(&tw->tw_refcnt);
+ if (!rearm) {
+ BUG_ON(mod_timer_pinned(&tw->tw_timer, jiffies + timeo));
atomic_inc(&tw->tw_dr->tw_count);
+ } else {
+ mod_timer_pending(&tw->tw_timer, jiffies + timeo);
}
}
-EXPORT_SYMBOL_GPL(inet_twsk_schedule);
+EXPORT_SYMBOL_GPL(__inet_twsk_schedule);

void inet_twsk_purge(struct inet_hashinfo *hashinfo,
struct inet_timewait_death_row *twdr, int family)
diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c
index 29ed6c5a5185..9b97204b8c81 100644
--- a/net/ipv4/ip_tunnel_core.c
+++ b/net/ipv4/ip_tunnel_core.c
@@ -51,7 +51,7 @@ int iptunnel_xmit(struct sock *sk, struct rtable *rt, struct sk_buff *skb,
__be32 src, __be32 dst, __u8 proto,
__u8 tos, __u8 ttl, __be16 df, bool xnet)
{
- int pkt_len = skb->len;
+ int pkt_len = skb->len - skb_inner_network_offset(skb);
struct iphdr *iph;
int err;

diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 5f4a5565ad8b..c6ad99ad0ffb 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2045,6 +2045,7 @@ struct rtable *__ip_route_output_key(struct net *net, struct flowi4 *fl4)
struct fib_result res;
struct rtable *rth;
int orig_oif;
+ int err = -ENETUNREACH;

res.tclassid = 0;
res.fi = NULL;
@@ -2153,7 +2154,8 @@ struct rtable *__ip_route_output_key(struct net *net, struct flowi4 *fl4)
goto make_route;
}

- if (fib_lookup(net, fl4, &res, 0)) {
+ err = fib_lookup(net, fl4, &res, 0);
+ if (err) {
res.fi = NULL;
res.table = NULL;
if (fl4->flowi4_oif) {
@@ -2181,7 +2183,7 @@ struct rtable *__ip_route_output_key(struct net *net, struct flowi4 *fl4)
res.type = RTN_UNICAST;
goto make_route;
}
- rth = ERR_PTR(-ENETUNREACH);
+ rth = ERR_PTR(err);
goto out;
}

diff --git a/net/ipv4/tcp_cubic.c b/net/ipv4/tcp_cubic.c
index c6ded6b2a79f..448c2615fece 100644
--- a/net/ipv4/tcp_cubic.c
+++ b/net/ipv4/tcp_cubic.c
@@ -154,14 +154,20 @@ static void bictcp_init(struct sock *sk)
static void bictcp_cwnd_event(struct sock *sk, enum tcp_ca_event event)
{
if (event == CA_EVENT_TX_START) {
- s32 delta = tcp_time_stamp - tcp_sk(sk)->lsndtime;
struct bictcp *ca = inet_csk_ca(sk);
+ u32 now = tcp_time_stamp;
+ s32 delta;
+
+ delta = now - tcp_sk(sk)->lsndtime;

/* We were application limited (idle) for a while.
* Shift epoch_start to keep cwnd growth to cubic curve.
*/
- if (ca->epoch_start && delta > 0)
+ if (ca->epoch_start && delta > 0) {
ca->epoch_start += delta;
+ if (after(ca->epoch_start, now))
+ ca->epoch_start = now;
+ }
return;
}
}
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
index 6d8795b066ac..def765911ff8 100644
--- a/net/ipv4/tcp_minisocks.c
+++ b/net/ipv4/tcp_minisocks.c
@@ -162,9 +162,9 @@ kill_with_rst:
if (tcp_death_row.sysctl_tw_recycle &&
tcptw->tw_ts_recent_stamp &&
tcp_tw_remember_stamp(tw))
- inet_twsk_schedule(tw, tw->tw_timeout);
+ inet_twsk_reschedule(tw, tw->tw_timeout);
else
- inet_twsk_schedule(tw, TCP_TIMEWAIT_LEN);
+ inet_twsk_reschedule(tw, TCP_TIMEWAIT_LEN);
return TCP_TW_ACK;
}

@@ -201,7 +201,7 @@ kill:
return TCP_TW_SUCCESS;
}
}
- inet_twsk_schedule(tw, TCP_TIMEWAIT_LEN);
+ inet_twsk_reschedule(tw, TCP_TIMEWAIT_LEN);

if (tmp_opt.saw_tstamp) {
tcptw->tw_ts_recent = tmp_opt.rcv_tsval;
@@ -251,7 +251,7 @@ kill:
* Do not reschedule in the last case.
*/
if (paws_reject || th->ack)
- inet_twsk_schedule(tw, TCP_TIMEWAIT_LEN);
+ inet_twsk_reschedule(tw, TCP_TIMEWAIT_LEN);

return tcp_timewait_check_oow_rate_limit(
tw, skb, LINUX_MIB_TCPACKSKIPPEDTIMEWAIT);
@@ -322,9 +322,6 @@ void tcp_time_wait(struct sock *sk, int state, int timeo)
} while (0);
#endif

- /* Linkage updates. */
- __inet_twsk_hashdance(tw, sk, &tcp_hashinfo);
-
/* Get the TIME_WAIT timeout firing. */
if (timeo < rto)
timeo = rto;
@@ -338,6 +335,8 @@ void tcp_time_wait(struct sock *sk, int state, int timeo)
}

inet_twsk_schedule(tw, timeo);
+ /* Linkage updates. */
+ __inet_twsk_hashdance(tw, sk, &tcp_hashinfo);
inet_twsk_put(tw);
} else {
/* Sorry, if we're out of memory, just CLOSE this
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index c0a15e7f359f..f7d1d5e19e95 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1024,7 +1024,8 @@ int udp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
if (netif_index_is_vrf(net, ipc.oif)) {
flowi4_init_output(fl4, ipc.oif, sk->sk_mark, tos,
RT_SCOPE_UNIVERSE, sk->sk_protocol,
- (flow_flags | FLOWI_FLAG_VRFSRC),
+ (flow_flags | FLOWI_FLAG_VRFSRC |
+ FLOWI_FLAG_SKIP_NH_OIF),
faddr, saddr, dport,
inet->inet_sport);

diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c
index bb919b28619f..c10a9ee68433 100644
--- a/net/ipv4/xfrm4_policy.c
+++ b/net/ipv4/xfrm4_policy.c
@@ -33,6 +33,8 @@ static struct dst_entry *__xfrm4_dst_lookup(struct net *net, struct flowi4 *fl4,
if (saddr)
fl4->saddr = saddr->a4;

+ fl4->flowi4_flags = FLOWI_FLAG_SKIP_NH_OIF;
+
rt = __ip_route_output_key(net, fl4);
if (!IS_ERR(rt))
return &rt->dst;
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 030fefdc9aed..900113376d4e 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -5127,13 +5127,12 @@ static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)

rt = addrconf_get_prefix_route(&ifp->peer_addr, 128,
ifp->idev->dev, 0, 0);
- if (rt && ip6_del_rt(rt))
- dst_free(&rt->dst);
+ if (rt)
+ ip6_del_rt(rt);
}
dst_hold(&ifp->rt->dst);

- if (ip6_del_rt(ifp->rt))
- dst_free(&ifp->rt->dst);
+ ip6_del_rt(ifp->rt);

rt_genid_bump_ipv6(net);
break;
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index 418d9823692b..7d2e0023c72d 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -155,6 +155,11 @@ static void node_free(struct fib6_node *fn)
kmem_cache_free(fib6_node_kmem, fn);
}

+static void rt6_rcu_free(struct rt6_info *rt)
+{
+ call_rcu(&rt->dst.rcu_head, dst_rcu_free);
+}
+
static void rt6_free_pcpu(struct rt6_info *non_pcpu_rt)
{
int cpu;
@@ -169,7 +174,7 @@ static void rt6_free_pcpu(struct rt6_info *non_pcpu_rt)
ppcpu_rt = per_cpu_ptr(non_pcpu_rt->rt6i_pcpu, cpu);
pcpu_rt = *ppcpu_rt;
if (pcpu_rt) {
- dst_free(&pcpu_rt->dst);
+ rt6_rcu_free(pcpu_rt);
*ppcpu_rt = NULL;
}
}
@@ -181,7 +186,7 @@ static void rt6_release(struct rt6_info *rt)
{
if (atomic_dec_and_test(&rt->rt6i_ref)) {
rt6_free_pcpu(rt);
- dst_free(&rt->dst);
+ rt6_rcu_free(rt);
}
}

@@ -846,7 +851,7 @@ add:
*ins = rt;
rt->rt6i_node = fn;
atomic_inc(&rt->rt6i_ref);
- inet6_rt_notify(RTM_NEWROUTE, rt, info);
+ inet6_rt_notify(RTM_NEWROUTE, rt, info, 0);
info->nl_net->ipv6.rt6_stats->fib_rt_entries++;

if (!(fn->fn_flags & RTN_RTINFO)) {
@@ -872,7 +877,7 @@ add:
rt->rt6i_node = fn;
rt->dst.rt6_next = iter->dst.rt6_next;
atomic_inc(&rt->rt6i_ref);
- inet6_rt_notify(RTM_NEWROUTE, rt, info);
+ inet6_rt_notify(RTM_NEWROUTE, rt, info, NLM_F_REPLACE);
if (!(fn->fn_flags & RTN_RTINFO)) {
info->nl_net->ipv6.rt6_stats->fib_route_nodes++;
fn->fn_flags |= RTN_RTINFO;
@@ -933,6 +938,10 @@ int fib6_add(struct fib6_node *root, struct rt6_info *rt,
int replace_required = 0;
int sernum = fib6_new_sernum(info->nl_net);

+ if (WARN_ON_ONCE((rt->dst.flags & DST_NOCACHE) &&
+ !atomic_read(&rt->dst.__refcnt)))
+ return -EINVAL;
+
if (info->nlh) {
if (!(info->nlh->nlmsg_flags & NLM_F_CREATE))
allow_create = 0;
@@ -1025,6 +1034,7 @@ int fib6_add(struct fib6_node *root, struct rt6_info *rt,
fib6_start_gc(info->nl_net, rt);
if (!(rt->rt6i_flags & RTF_CACHE))
fib6_prune_clones(info->nl_net, pn);
+ rt->dst.flags &= ~DST_NOCACHE;
}

out:
@@ -1049,7 +1059,8 @@ out:
atomic_inc(&pn->leaf->rt6i_ref);
}
#endif
- dst_free(&rt->dst);
+ if (!(rt->dst.flags & DST_NOCACHE))
+ dst_free(&rt->dst);
}
return err;

@@ -1060,7 +1071,8 @@ out:
st_failure:
if (fn && !(fn->fn_flags & (RTN_RTINFO|RTN_ROOT)))
fib6_repair_tree(info->nl_net, fn);
- dst_free(&rt->dst);
+ if (!(rt->dst.flags & DST_NOCACHE))
+ dst_free(&rt->dst);
return err;
#endif
}
@@ -1410,7 +1422,7 @@ static void fib6_del_route(struct fib6_node *fn, struct rt6_info **rtp,

fib6_purge_rt(rt, fn, net);

- inet6_rt_notify(RTM_DELROUTE, rt, info);
+ inet6_rt_notify(RTM_DELROUTE, rt, info, 0);
rt6_release(rt);
}

diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index 4038c694ec03..646512488c28 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -634,20 +634,20 @@ static netdev_tx_t ip6gre_xmit2(struct sk_buff *skb,
}

if (!fl6->flowi6_mark)
- dst = ip6_tnl_dst_check(tunnel);
+ dst = ip6_tnl_dst_get(tunnel);

if (!dst) {
- ndst = ip6_route_output(net, NULL, fl6);
+ dst = ip6_route_output(net, NULL, fl6);

- if (ndst->error)
+ if (dst->error)
goto tx_err_link_failure;
- ndst = xfrm_lookup(net, ndst, flowi6_to_flowi(fl6), NULL, 0);
- if (IS_ERR(ndst)) {
- err = PTR_ERR(ndst);
- ndst = NULL;
+ dst = xfrm_lookup(net, dst, flowi6_to_flowi(fl6), NULL, 0);
+ if (IS_ERR(dst)) {
+ err = PTR_ERR(dst);
+ dst = NULL;
goto tx_err_link_failure;
}
- dst = ndst;
+ ndst = dst;
}

tdev = dst->dev;
@@ -702,12 +702,9 @@ static netdev_tx_t ip6gre_xmit2(struct sk_buff *skb,
skb = new_skb;
}

- if (fl6->flowi6_mark) {
- skb_dst_set(skb, dst);
- ndst = NULL;
- } else {
- skb_dst_set_noref(skb, dst);
- }
+ if (!fl6->flowi6_mark && ndst)
+ ip6_tnl_dst_set(tunnel, ndst);
+ skb_dst_set(skb, dst);

proto = NEXTHDR_GRE;
if (encap_limit >= 0) {
@@ -762,14 +759,12 @@ static netdev_tx_t ip6gre_xmit2(struct sk_buff *skb,
skb_set_inner_protocol(skb, protocol);

ip6tunnel_xmit(NULL, skb, dev);
- if (ndst)
- ip6_tnl_dst_store(tunnel, ndst);
return 0;
tx_err_link_failure:
stats->tx_carrier_errors++;
dst_link_failure(skb);
tx_err_dst_release:
- dst_release(ndst);
+ dst_release(dst);
return err;
}

@@ -1223,6 +1218,9 @@ static const struct net_device_ops ip6gre_netdev_ops = {

static void ip6gre_dev_free(struct net_device *dev)
{
+ struct ip6_tnl *t = netdev_priv(dev);
+
+ ip6_tnl_dst_destroy(t);
free_percpu(dev->tstats);
free_netdev(dev);
}
@@ -1245,9 +1243,10 @@ static void ip6gre_tunnel_setup(struct net_device *dev)
netif_keep_dst(dev);
}

-static int ip6gre_tunnel_init(struct net_device *dev)
+static int ip6gre_tunnel_init_common(struct net_device *dev)
{
struct ip6_tnl *tunnel;
+ int ret;

tunnel = netdev_priv(dev);

@@ -1255,16 +1254,37 @@ static int ip6gre_tunnel_init(struct net_device *dev)
tunnel->net = dev_net(dev);
strcpy(tunnel->parms.name, dev->name);

+ dev->tstats = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats);
+ if (!dev->tstats)
+ return -ENOMEM;
+
+ ret = ip6_tnl_dst_init(tunnel);
+ if (ret) {
+ free_percpu(dev->tstats);
+ dev->tstats = NULL;
+ return ret;
+ }
+
+ return 0;
+}
+
+static int ip6gre_tunnel_init(struct net_device *dev)
+{
+ struct ip6_tnl *tunnel;
+ int ret;
+
+ ret = ip6gre_tunnel_init_common(dev);
+ if (ret)
+ return ret;
+
+ tunnel = netdev_priv(dev);
+
memcpy(dev->dev_addr, &tunnel->parms.laddr, sizeof(struct in6_addr));
memcpy(dev->broadcast, &tunnel->parms.raddr, sizeof(struct in6_addr));

if (ipv6_addr_any(&tunnel->parms.raddr))
dev->header_ops = &ip6gre_header_ops;

- dev->tstats = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats);
- if (!dev->tstats)
- return -ENOMEM;
-
return 0;
}

@@ -1460,19 +1480,16 @@ static void ip6gre_netlink_parms(struct nlattr *data[],
static int ip6gre_tap_init(struct net_device *dev)
{
struct ip6_tnl *tunnel;
+ int ret;

- tunnel = netdev_priv(dev);
+ ret = ip6gre_tunnel_init_common(dev);
+ if (ret)
+ return ret;

- tunnel->dev = dev;
- tunnel->net = dev_net(dev);
- strcpy(tunnel->parms.name, dev->name);
+ tunnel = netdev_priv(dev);

ip6gre_tnl_link_config(tunnel, 1);

- dev->tstats = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats);
- if (!dev->tstats)
- return -ENOMEM;
-
return 0;
}

diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 26ea47930740..92b1aa38f121 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -586,20 +586,22 @@ int ip6_fragment(struct sock *sk, struct sk_buff *skb,
frag_id = ipv6_select_ident(net, &ipv6_hdr(skb)->daddr,
&ipv6_hdr(skb)->saddr);

+ hroom = LL_RESERVED_SPACE(rt->dst.dev);
if (skb_has_frag_list(skb)) {
int first_len = skb_pagelen(skb);
struct sk_buff *frag2;

if (first_len - hlen > mtu ||
((first_len - hlen) & 7) ||
- skb_cloned(skb))
+ skb_cloned(skb) ||
+ skb_headroom(skb) < (hroom + sizeof(struct frag_hdr)))
goto slow_path;

skb_walk_frags(skb, frag) {
/* Correct geometry. */
if (frag->len > mtu ||
((frag->len & 7) && frag->next) ||
- skb_headroom(frag) < hlen)
+ skb_headroom(frag) < (hlen + hroom + sizeof(struct frag_hdr)))
goto slow_path_clean;

/* Partially cloned skb? */
@@ -616,8 +618,6 @@ int ip6_fragment(struct sock *sk, struct sk_buff *skb,

err = 0;
offset = 0;
- frag = skb_shinfo(skb)->frag_list;
- skb_frag_list_init(skb);
/* BUILD HEADER */

*prevhdr = NEXTHDR_FRAGMENT;
@@ -625,8 +625,11 @@ int ip6_fragment(struct sock *sk, struct sk_buff *skb,
if (!tmp_hdr) {
IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)),
IPSTATS_MIB_FRAGFAILS);
- return -ENOMEM;
+ err = -ENOMEM;
+ goto fail;
}
+ frag = skb_shinfo(skb)->frag_list;
+ skb_frag_list_init(skb);

__skb_pull(skb, hlen);
fh = (struct frag_hdr *)__skb_push(skb, sizeof(struct frag_hdr));
@@ -723,7 +726,6 @@ slow_path:
*/

*prevhdr = NEXTHDR_FRAGMENT;
- hroom = LL_RESERVED_SPACE(rt->dst.dev);
troom = rt->dst.dev->needed_tailroom;

/*
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index b0ab420612bc..983f0d20f96d 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -126,36 +126,92 @@ static struct net_device_stats *ip6_get_stats(struct net_device *dev)
* Locking : hash tables are protected by RCU and RTNL
*/

-struct dst_entry *ip6_tnl_dst_check(struct ip6_tnl *t)
+static void ip6_tnl_per_cpu_dst_set(struct ip6_tnl_dst *idst,
+ struct dst_entry *dst)
{
- struct dst_entry *dst = t->dst_cache;
+ write_seqlock_bh(&idst->lock);
+ dst_release(rcu_dereference_protected(
+ idst->dst,
+ lockdep_is_held(&idst->lock.lock)));
+ if (dst) {
+ dst_hold(dst);
+ idst->cookie = rt6_get_cookie((struct rt6_info *)dst);
+ } else {
+ idst->cookie = 0;
+ }
+ rcu_assign_pointer(idst->dst, dst);
+ write_sequnlock_bh(&idst->lock);
+}
+
+struct dst_entry *ip6_tnl_dst_get(struct ip6_tnl *t)
+{
+ struct ip6_tnl_dst *idst;
+ struct dst_entry *dst;
+ unsigned int seq;
+ u32 cookie;

- if (dst && dst->obsolete &&
- !dst->ops->check(dst, t->dst_cookie)) {
- t->dst_cache = NULL;
+ idst = raw_cpu_ptr(t->dst_cache);
+
+ rcu_read_lock();
+ do {
+ seq = read_seqbegin(&idst->lock);
+ dst = rcu_dereference(idst->dst);
+ cookie = idst->cookie;
+ } while (read_seqretry(&idst->lock, seq));
+
+ if (dst && !atomic_inc_not_zero(&dst->__refcnt))
+ dst = NULL;
+ rcu_read_unlock();
+
+ if (dst && dst->obsolete && !dst->ops->check(dst, cookie)) {
+ ip6_tnl_per_cpu_dst_set(idst, NULL);
dst_release(dst);
- return NULL;
+ dst = NULL;
}
-
return dst;
}
-EXPORT_SYMBOL_GPL(ip6_tnl_dst_check);
+EXPORT_SYMBOL_GPL(ip6_tnl_dst_get);

void ip6_tnl_dst_reset(struct ip6_tnl *t)
{
- dst_release(t->dst_cache);
- t->dst_cache = NULL;
+ int i;
+
+ for_each_possible_cpu(i)
+ ip6_tnl_per_cpu_dst_set(raw_cpu_ptr(t->dst_cache), NULL);
}
EXPORT_SYMBOL_GPL(ip6_tnl_dst_reset);

-void ip6_tnl_dst_store(struct ip6_tnl *t, struct dst_entry *dst)
+void ip6_tnl_dst_set(struct ip6_tnl *t, struct dst_entry *dst)
+{
+ ip6_tnl_per_cpu_dst_set(raw_cpu_ptr(t->dst_cache), dst);
+
+}
+EXPORT_SYMBOL_GPL(ip6_tnl_dst_set);
+
+void ip6_tnl_dst_destroy(struct ip6_tnl *t)
+{
+ if (!t->dst_cache)
+ return;
+
+ ip6_tnl_dst_reset(t);
+ free_percpu(t->dst_cache);
+}
+EXPORT_SYMBOL_GPL(ip6_tnl_dst_destroy);
+
+int ip6_tnl_dst_init(struct ip6_tnl *t)
{
- struct rt6_info *rt = (struct rt6_info *) dst;
- t->dst_cookie = rt6_get_cookie(rt);
- dst_release(t->dst_cache);
- t->dst_cache = dst;
+ int i;
+
+ t->dst_cache = alloc_percpu(struct ip6_tnl_dst);
+ if (!t->dst_cache)
+ return -ENOMEM;
+
+ for_each_possible_cpu(i)
+ seqlock_init(&per_cpu_ptr(t->dst_cache, i)->lock);
+
+ return 0;
}
-EXPORT_SYMBOL_GPL(ip6_tnl_dst_store);
+EXPORT_SYMBOL_GPL(ip6_tnl_dst_init);

/**
* ip6_tnl_lookup - fetch tunnel matching the end-point addresses
@@ -271,6 +327,9 @@ ip6_tnl_unlink(struct ip6_tnl_net *ip6n, struct ip6_tnl *t)

static void ip6_dev_free(struct net_device *dev)
{
+ struct ip6_tnl *t = netdev_priv(dev);
+
+ ip6_tnl_dst_destroy(t);
free_percpu(dev->tstats);
free_netdev(dev);
}
@@ -1010,23 +1069,23 @@ static int ip6_tnl_xmit2(struct sk_buff *skb,
memcpy(&fl6->daddr, addr6, sizeof(fl6->daddr));
neigh_release(neigh);
} else if (!fl6->flowi6_mark)
- dst = ip6_tnl_dst_check(t);
+ dst = ip6_tnl_dst_get(t);

if (!ip6_tnl_xmit_ctl(t, &fl6->saddr, &fl6->daddr))
goto tx_err_link_failure;

if (!dst) {
- ndst = ip6_route_output(net, NULL, fl6);
+ dst = ip6_route_output(net, NULL, fl6);

- if (ndst->error)
+ if (dst->error)
goto tx_err_link_failure;
- ndst = xfrm_lookup(net, ndst, flowi6_to_flowi(fl6), NULL, 0);
- if (IS_ERR(ndst)) {
- err = PTR_ERR(ndst);
- ndst = NULL;
+ dst = xfrm_lookup(net, dst, flowi6_to_flowi(fl6), NULL, 0);
+ if (IS_ERR(dst)) {
+ err = PTR_ERR(dst);
+ dst = NULL;
goto tx_err_link_failure;
}
- dst = ndst;
+ ndst = dst;
}

tdev = dst->dev;
@@ -1072,12 +1131,11 @@ static int ip6_tnl_xmit2(struct sk_buff *skb,
consume_skb(skb);
skb = new_skb;
}
- if (fl6->flowi6_mark) {
- skb_dst_set(skb, dst);
- ndst = NULL;
- } else {
- skb_dst_set_noref(skb, dst);
- }
+
+ if (!fl6->flowi6_mark && ndst)
+ ip6_tnl_dst_set(t, ndst);
+ skb_dst_set(skb, dst);
+
skb->transport_header = skb->network_header;

proto = fl6->flowi6_proto;
@@ -1101,14 +1159,12 @@ static int ip6_tnl_xmit2(struct sk_buff *skb,
ipv6h->saddr = fl6->saddr;
ipv6h->daddr = fl6->daddr;
ip6tunnel_xmit(NULL, skb, dev);
- if (ndst)
- ip6_tnl_dst_store(t, ndst);
return 0;
tx_err_link_failure:
stats->tx_carrier_errors++;
dst_link_failure(skb);
tx_err_dst_release:
- dst_release(ndst);
+ dst_release(dst);
return err;
}

@@ -1573,12 +1629,21 @@ static inline int
ip6_tnl_dev_init_gen(struct net_device *dev)
{
struct ip6_tnl *t = netdev_priv(dev);
+ int ret;

t->dev = dev;
t->net = dev_net(dev);
dev->tstats = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats);
if (!dev->tstats)
return -ENOMEM;
+
+ ret = ip6_tnl_dst_init(t);
+ if (ret) {
+ free_percpu(dev->tstats);
+ dev->tstats = NULL;
+ return ret;
+ }
+
return 0;
}

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 53617d715188..f204089e854c 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1322,8 +1322,7 @@ static void ip6_link_failure(struct sk_buff *skb)
if (rt) {
if (rt->rt6i_flags & RTF_CACHE) {
dst_hold(&rt->dst);
- if (ip6_del_rt(rt))
- dst_free(&rt->dst);
+ ip6_del_rt(rt);
} else if (rt->rt6i_node && (rt->rt6i_flags & RTF_DEFAULT)) {
rt->rt6i_node->fn_sernum = -1;
}
@@ -1886,9 +1885,11 @@ int ip6_route_info_create(struct fib6_config *cfg, struct rt6_info **rt_ret)
rt->dst.input = ip6_pkt_prohibit;
break;
case RTN_THROW:
+ case RTN_UNREACHABLE:
default:
rt->dst.error = (cfg->fc_type == RTN_THROW) ? -EAGAIN
- : -ENETUNREACH;
+ : (cfg->fc_type == RTN_UNREACHABLE)
+ ? -EHOSTUNREACH : -ENETUNREACH;
rt->dst.output = ip6_pkt_discard_out;
rt->dst.input = ip6_pkt_discard;
break;
@@ -2028,7 +2029,8 @@ static int __ip6_del_rt(struct rt6_info *rt, struct nl_info *info)
struct fib6_table *table;
struct net *net = dev_net(rt->dst.dev);

- if (rt == net->ipv6.ip6_null_entry) {
+ if (rt == net->ipv6.ip6_null_entry ||
+ rt->dst.flags & DST_NOCACHE) {
err = -ENOENT;
goto out;
}
@@ -2515,6 +2517,7 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev,
rt->rt6i_dst.addr = *addr;
rt->rt6i_dst.plen = 128;
rt->rt6i_table = fib6_get_table(net, RT6_TABLE_LOCAL);
+ rt->dst.flags |= DST_NOCACHE;

atomic_set(&rt->dst.__refcnt, 1);

@@ -3303,7 +3306,8 @@ errout:
return err;
}

-void inet6_rt_notify(int event, struct rt6_info *rt, struct nl_info *info)
+void inet6_rt_notify(int event, struct rt6_info *rt, struct nl_info *info,
+ unsigned int nlm_flags)
{
struct sk_buff *skb;
struct net *net = info->nl_net;
@@ -3318,7 +3322,7 @@ void inet6_rt_notify(int event, struct rt6_info *rt, struct nl_info *info)
goto errout;

err = rt6_fill_node(net, skb, rt, NULL, NULL, 0,
- event, info->portid, seq, 0, 0, 0);
+ event, info->portid, seq, 0, 0, nlm_flags);
if (err < 0) {
/* -EMSGSIZE implies BUG in rt6_nlmsg_size() */
WARN_ON(err == -EMSGSIZE);
diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c
index 675d12c69e32..a5d41dfa9f05 100644
--- a/net/netfilter/nf_log.c
+++ b/net/netfilter/nf_log.c
@@ -107,12 +107,17 @@ EXPORT_SYMBOL(nf_log_register);

void nf_log_unregister(struct nf_logger *logger)
{
+ const struct nf_logger *log;
int i;

mutex_lock(&nf_log_mutex);
- for (i = 0; i < NFPROTO_NUMPROTO; i++)
- RCU_INIT_POINTER(loggers[i][logger->type], NULL);
+ for (i = 0; i < NFPROTO_NUMPROTO; i++) {
+ log = nft_log_dereference(loggers[i][logger->type]);
+ if (log == logger)
+ RCU_INIT_POINTER(loggers[i][logger->type], NULL);
+ }
mutex_unlock(&nf_log_mutex);
+ synchronize_rcu();
}
EXPORT_SYMBOL(nf_log_unregister);

diff --git a/net/netfilter/nft_compat.c b/net/netfilter/nft_compat.c
index 66def315eb56..9c8fab00164b 100644
--- a/net/netfilter/nft_compat.c
+++ b/net/netfilter/nft_compat.c
@@ -619,6 +619,13 @@ struct nft_xt {

static struct nft_expr_type nft_match_type;

+static bool nft_match_cmp(const struct xt_match *match,
+ const char *name, u32 rev, u32 family)
+{
+ return strcmp(match->name, name) == 0 && match->revision == rev &&
+ (match->family == NFPROTO_UNSPEC || match->family == family);
+}
+
static const struct nft_expr_ops *
nft_match_select_ops(const struct nft_ctx *ctx,
const struct nlattr * const tb[])
@@ -626,7 +633,7 @@ nft_match_select_ops(const struct nft_ctx *ctx,
struct nft_xt *nft_match;
struct xt_match *match;
char *mt_name;
- __u32 rev, family;
+ u32 rev, family;

if (tb[NFTA_MATCH_NAME] == NULL ||
tb[NFTA_MATCH_REV] == NULL ||
@@ -641,8 +648,7 @@ nft_match_select_ops(const struct nft_ctx *ctx,
list_for_each_entry(nft_match, &nft_match_list, head) {
struct xt_match *match = nft_match->ops.data;

- if (strcmp(match->name, mt_name) == 0 &&
- match->revision == rev && match->family == family) {
+ if (nft_match_cmp(match, mt_name, rev, family)) {
if (!try_module_get(match->me))
return ERR_PTR(-ENOENT);

@@ -693,6 +699,13 @@ static LIST_HEAD(nft_target_list);

static struct nft_expr_type nft_target_type;

+static bool nft_target_cmp(const struct xt_target *tg,
+ const char *name, u32 rev, u32 family)
+{
+ return strcmp(tg->name, name) == 0 && tg->revision == rev &&
+ (tg->family == NFPROTO_UNSPEC || tg->family == family);
+}
+
static const struct nft_expr_ops *
nft_target_select_ops(const struct nft_ctx *ctx,
const struct nlattr * const tb[])
@@ -700,7 +713,7 @@ nft_target_select_ops(const struct nft_ctx *ctx,
struct nft_xt *nft_target;
struct xt_target *target;
char *tg_name;
- __u32 rev, family;
+ u32 rev, family;

if (tb[NFTA_TARGET_NAME] == NULL ||
tb[NFTA_TARGET_REV] == NULL ||
@@ -715,8 +728,7 @@ nft_target_select_ops(const struct nft_ctx *ctx,
list_for_each_entry(nft_target, &nft_target_list, head) {
struct xt_target *target = nft_target->ops.data;

- if (strcmp(target->name, tg_name) == 0 &&
- target->revision == rev && target->family == family) {
+ if (nft_target_cmp(target, tg_name, rev, family)) {
if (!try_module_get(target->me))
return ERR_PTR(-ENOENT);

diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 7f86d3b55060..9f51608b968a 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -125,6 +125,24 @@ static inline u32 netlink_group_mask(u32 group)
return group ? 1 << (group - 1) : 0;
}

+static struct sk_buff *netlink_to_full_skb(const struct sk_buff *skb,
+ gfp_t gfp_mask)
+{
+ unsigned int len = skb_end_offset(skb);
+ struct sk_buff *new;
+
+ new = alloc_skb(len, gfp_mask);
+ if (new == NULL)
+ return NULL;
+
+ NETLINK_CB(new).portid = NETLINK_CB(skb).portid;
+ NETLINK_CB(new).dst_group = NETLINK_CB(skb).dst_group;
+ NETLINK_CB(new).creds = NETLINK_CB(skb).creds;
+
+ memcpy(skb_put(new, len), skb->data, len);
+ return new;
+}
+
int netlink_add_tap(struct netlink_tap *nt)
{
if (unlikely(nt->dev->type != ARPHRD_NETLINK))
@@ -206,7 +224,11 @@ static int __netlink_deliver_tap_skb(struct sk_buff *skb,
int ret = -ENOMEM;

dev_hold(dev);
- nskb = skb_clone(skb, GFP_ATOMIC);
+
+ if (netlink_skb_is_mmaped(skb) || is_vmalloc_addr(skb->head))
+ nskb = netlink_to_full_skb(skb, GFP_ATOMIC);
+ else
+ nskb = skb_clone(skb, GFP_ATOMIC);
if (nskb) {
nskb->dev = dev;
nskb->protocol = htons((u16) sk->sk_protocol);
@@ -279,11 +301,6 @@ static void netlink_rcv_wake(struct sock *sk)
}

#ifdef CONFIG_NETLINK_MMAP
-static bool netlink_skb_is_mmaped(const struct sk_buff *skb)
-{
- return NETLINK_CB(skb).flags & NETLINK_SKB_MMAPED;
-}
-
static bool netlink_rx_is_mmaped(struct sock *sk)
{
return nlk_sk(sk)->rx_ring.pg_vec != NULL;
@@ -846,7 +863,6 @@ static void netlink_ring_set_copied(struct sock *sk, struct sk_buff *skb)
}

#else /* CONFIG_NETLINK_MMAP */
-#define netlink_skb_is_mmaped(skb) false
#define netlink_rx_is_mmaped(sk) false
#define netlink_tx_is_mmaped(sk) false
#define netlink_mmap sock_no_mmap
@@ -1015,7 +1031,7 @@ static inline int netlink_compare(struct rhashtable_compare_arg *arg,
const struct netlink_compare_arg *x = arg->key;
const struct netlink_sock *nlk = ptr;

- return nlk->portid != x->portid ||
+ return nlk->rhash_portid != x->portid ||
!net_eq(sock_net(&nlk->sk), read_pnet(&x->pnet));
}

@@ -1041,7 +1057,7 @@ static int __netlink_insert(struct netlink_table *table, struct sock *sk)
{
struct netlink_compare_arg arg;

- netlink_compare_arg_init(&arg, sock_net(sk), nlk_sk(sk)->portid);
+ netlink_compare_arg_init(&arg, sock_net(sk), nlk_sk(sk)->rhash_portid);
return rhashtable_lookup_insert_key(&table->hash, &arg,
&nlk_sk(sk)->node,
netlink_rhashtable_params);
@@ -1103,7 +1119,7 @@ static int netlink_insert(struct sock *sk, u32 portid)
unlikely(atomic_read(&table->hash.nelems) >= UINT_MAX))
goto err;

- nlk_sk(sk)->portid = portid;
+ nlk_sk(sk)->rhash_portid = portid;
sock_hold(sk);

err = __netlink_insert(table, sk);
@@ -1115,10 +1131,12 @@ static int netlink_insert(struct sock *sk, u32 portid)
err = -EOVERFLOW;
if (err == -EEXIST)
err = -EADDRINUSE;
- nlk_sk(sk)->portid = 0;
sock_put(sk);
+ goto err;
}

+ nlk_sk(sk)->portid = portid;
+
err:
release_sock(sk);
return err;
@@ -3255,7 +3273,7 @@ static inline u32 netlink_hash(const void *data, u32 len, u32 seed)
const struct netlink_sock *nlk = data;
struct netlink_compare_arg arg;

- netlink_compare_arg_init(&arg, sock_net(&nlk->sk), nlk->portid);
+ netlink_compare_arg_init(&arg, sock_net(&nlk->sk), nlk->rhash_portid);
return jhash2((u32 *)&arg, netlink_compare_arg_len / sizeof(u32), seed);
}

diff --git a/net/netlink/af_netlink.h b/net/netlink/af_netlink.h
index 89008405d6b4..80b2b7526dfd 100644
--- a/net/netlink/af_netlink.h
+++ b/net/netlink/af_netlink.h
@@ -25,6 +25,7 @@ struct netlink_ring {
struct netlink_sock {
/* struct sock has to be the first member of netlink_sock */
struct sock sk;
+ u32 rhash_portid;
u32 portid;
u32 dst_portid;
u32 dst_group;
@@ -59,6 +60,15 @@ static inline struct netlink_sock *nlk_sk(struct sock *sk)
return container_of(sk, struct netlink_sock, sk);
}

+static inline bool netlink_skb_is_mmaped(const struct sk_buff *skb)
+{
+#ifdef CONFIG_NETLINK_MMAP
+ return NETLINK_CB(skb).flags & NETLINK_SKB_MMAPED;
+#else
+ return false;
+#endif /* CONFIG_NETLINK_MMAP */
+}
+
struct netlink_table {
struct rhashtable hash;
struct hlist_head mc_list;
diff --git a/net/openvswitch/Kconfig b/net/openvswitch/Kconfig
index 2a071f470d57..d143aa9f6654 100644
--- a/net/openvswitch/Kconfig
+++ b/net/openvswitch/Kconfig
@@ -5,7 +5,8 @@
config OPENVSWITCH
tristate "Open vSwitch"
depends on INET
- depends on (!NF_CONNTRACK || NF_CONNTRACK)
+ depends on !NF_CONNTRACK || \
+ (NF_CONNTRACK && (!NF_DEFRAG_IPV6 || NF_DEFRAG_IPV6))
select LIBCRC32C
select MPLS
select NET_MPLS_GSO
diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c
index e8e524ad8a01..002a755fa07e 100644
--- a/net/openvswitch/conntrack.c
+++ b/net/openvswitch/conntrack.c
@@ -275,13 +275,15 @@ static int ovs_ct_helper(struct sk_buff *skb, u16 proto)
case NFPROTO_IPV6: {
u8 nexthdr = ipv6_hdr(skb)->nexthdr;
__be16 frag_off;
+ int ofs;

- protoff = ipv6_skip_exthdr(skb, sizeof(struct ipv6hdr),
- &nexthdr, &frag_off);
- if (protoff < 0 || (frag_off & htons(~0x7)) != 0) {
+ ofs = ipv6_skip_exthdr(skb, sizeof(struct ipv6hdr), &nexthdr,
+ &frag_off);
+ if (ofs < 0 || (frag_off & htons(~0x7)) != 0) {
pr_debug("proto header not found\n");
return NF_ACCEPT;
}
+ protoff = ofs;
break;
}
default:
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index 6fbd2decb19e..b816ff871528 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -952,7 +952,7 @@ static int ovs_flow_cmd_new(struct sk_buff *skb, struct genl_info *info)
if (error)
goto err_kfree_flow;

- ovs_flow_mask_key(&new_flow->key, &key, &mask);
+ ovs_flow_mask_key(&new_flow->key, &key, true, &mask);

/* Extract flow identifier. */
error = ovs_nla_get_identifier(&new_flow->id, a[OVS_FLOW_ATTR_UFID],
@@ -1080,7 +1080,7 @@ static struct sw_flow_actions *get_flow_actions(struct net *net,
struct sw_flow_key masked_key;
int error;

- ovs_flow_mask_key(&masked_key, key, mask);
+ ovs_flow_mask_key(&masked_key, key, true, mask);
error = ovs_nla_copy_actions(net, a, &masked_key, &acts, log);
if (error) {
OVS_NLERR(log,
diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c
index c92d6a262bc5..5c030a4d7338 100644
--- a/net/openvswitch/flow_netlink.c
+++ b/net/openvswitch/flow_netlink.c
@@ -57,6 +57,7 @@ struct ovs_len_tbl {
};

#define OVS_ATTR_NESTED -1
+#define OVS_ATTR_VARIABLE -2

static void update_range(struct sw_flow_match *match,
size_t offset, size_t size, bool is_mask)
@@ -304,6 +305,10 @@ size_t ovs_key_attr_size(void)
+ nla_total_size(28); /* OVS_KEY_ATTR_ND */
}

+static const struct ovs_len_tbl ovs_vxlan_ext_key_lens[OVS_VXLAN_EXT_MAX + 1] = {
+ [OVS_VXLAN_EXT_GBP] = { .len = sizeof(u32) },
+};
+
static const struct ovs_len_tbl ovs_tunnel_key_lens[OVS_TUNNEL_KEY_ATTR_MAX + 1] = {
[OVS_TUNNEL_KEY_ATTR_ID] = { .len = sizeof(u64) },
[OVS_TUNNEL_KEY_ATTR_IPV4_SRC] = { .len = sizeof(u32) },
@@ -315,8 +320,9 @@ static const struct ovs_len_tbl ovs_tunnel_key_lens[OVS_TUNNEL_KEY_ATTR_MAX + 1]
[OVS_TUNNEL_KEY_ATTR_TP_SRC] = { .len = sizeof(u16) },
[OVS_TUNNEL_KEY_ATTR_TP_DST] = { .len = sizeof(u16) },
[OVS_TUNNEL_KEY_ATTR_OAM] = { .len = 0 },
- [OVS_TUNNEL_KEY_ATTR_GENEVE_OPTS] = { .len = OVS_ATTR_NESTED },
- [OVS_TUNNEL_KEY_ATTR_VXLAN_OPTS] = { .len = OVS_ATTR_NESTED },
+ [OVS_TUNNEL_KEY_ATTR_GENEVE_OPTS] = { .len = OVS_ATTR_VARIABLE },
+ [OVS_TUNNEL_KEY_ATTR_VXLAN_OPTS] = { .len = OVS_ATTR_NESTED,
+ .next = ovs_vxlan_ext_key_lens },
};

/* The size of the argument for each %OVS_KEY_ATTR_* Netlink attribute. */
@@ -349,6 +355,13 @@ static const struct ovs_len_tbl ovs_key_lens[OVS_KEY_ATTR_MAX + 1] = {
[OVS_KEY_ATTR_CT_LABEL] = { .len = sizeof(struct ovs_key_ct_label) },
};

+static bool check_attr_len(unsigned int attr_len, unsigned int expected_len)
+{
+ return expected_len == attr_len ||
+ expected_len == OVS_ATTR_NESTED ||
+ expected_len == OVS_ATTR_VARIABLE;
+}
+
static bool is_all_zero(const u8 *fp, size_t size)
{
int i;
@@ -388,7 +401,7 @@ static int __parse_flow_nlattrs(const struct nlattr *attr,
}

expected_len = ovs_key_lens[type].len;
- if (nla_len(nla) != expected_len && expected_len != OVS_ATTR_NESTED) {
+ if (!check_attr_len(nla_len(nla), expected_len)) {
OVS_NLERR(log, "Key %d has unexpected len %d expected %d",
type, nla_len(nla), expected_len);
return -EINVAL;
@@ -473,29 +486,50 @@ static int genev_tun_opt_from_nlattr(const struct nlattr *a,
return 0;
}

-static const struct nla_policy vxlan_opt_policy[OVS_VXLAN_EXT_MAX + 1] = {
- [OVS_VXLAN_EXT_GBP] = { .type = NLA_U32 },
-};
-
-static int vxlan_tun_opt_from_nlattr(const struct nlattr *a,
+static int vxlan_tun_opt_from_nlattr(const struct nlattr *attr,
struct sw_flow_match *match, bool is_mask,
bool log)
{
- struct nlattr *tb[OVS_VXLAN_EXT_MAX+1];
+ struct nlattr *a;
+ int rem;
unsigned long opt_key_offset;
struct vxlan_metadata opts;
- int err;

BUILD_BUG_ON(sizeof(opts) > sizeof(match->key->tun_opts));

- err = nla_parse_nested(tb, OVS_VXLAN_EXT_MAX, a, vxlan_opt_policy);
- if (err < 0)
- return err;
-
memset(&opts, 0, sizeof(opts));
+ nla_for_each_nested(a, attr, rem) {
+ int type = nla_type(a);

- if (tb[OVS_VXLAN_EXT_GBP])
- opts.gbp = nla_get_u32(tb[OVS_VXLAN_EXT_GBP]);
+ if (type > OVS_VXLAN_EXT_MAX) {
+ OVS_NLERR(log, "VXLAN extension %d out of range max %d",
+ type, OVS_VXLAN_EXT_MAX);
+ return -EINVAL;
+ }
+
+ if (!check_attr_len(nla_len(a),
+ ovs_vxlan_ext_key_lens[type].len)) {
+ OVS_NLERR(log, "VXLAN extension %d has unexpected len %d expected %d",
+ type, nla_len(a),
+ ovs_vxlan_ext_key_lens[type].len);
+ return -EINVAL;
+ }
+
+ switch (type) {
+ case OVS_VXLAN_EXT_GBP:
+ opts.gbp = nla_get_u32(a);
+ break;
+ default:
+ OVS_NLERR(log, "Unknown VXLAN extension attribute %d",
+ type);
+ return -EINVAL;
+ }
+ }
+ if (rem) {
+ OVS_NLERR(log, "VXLAN extension message has %d unknown bytes.",
+ rem);
+ return -EINVAL;
+ }

if (!is_mask)
SW_FLOW_KEY_PUT(match, tun_opts_len, sizeof(opts), false);
@@ -528,8 +562,8 @@ static int ipv4_tun_from_nlattr(const struct nlattr *attr,
return -EINVAL;
}

- if (ovs_tunnel_key_lens[type].len != nla_len(a) &&
- ovs_tunnel_key_lens[type].len != OVS_ATTR_NESTED) {
+ if (!check_attr_len(nla_len(a),
+ ovs_tunnel_key_lens[type].len)) {
OVS_NLERR(log, "Tunnel attr %d has unexpected len %d expected %d",
type, nla_len(a), ovs_tunnel_key_lens[type].len);
return -EINVAL;
@@ -1052,10 +1086,13 @@ static void nlattr_set(struct nlattr *attr, u8 val,

/* The nlattr stream should already have been validated */
nla_for_each_nested(nla, attr, rem) {
- if (tbl && tbl[nla_type(nla)].len == OVS_ATTR_NESTED)
- nlattr_set(nla, val, tbl[nla_type(nla)].next);
- else
+ if (tbl[nla_type(nla)].len == OVS_ATTR_NESTED) {
+ if (tbl[nla_type(nla)].next)
+ tbl = tbl[nla_type(nla)].next;
+ nlattr_set(nla, val, tbl);
+ } else {
memset(nla_data(nla), val, nla_len(nla));
+ }
}
}

@@ -1922,8 +1959,7 @@ static int validate_set(const struct nlattr *a,
key_len /= 2;

if (key_type > OVS_KEY_ATTR_MAX ||
- (ovs_key_lens[key_type].len != key_len &&
- ovs_key_lens[key_type].len != OVS_ATTR_NESTED))
+ !check_attr_len(key_len, ovs_key_lens[key_type].len))
return -EINVAL;

if (masked && !validate_masked(nla_data(ovs_key), key_len))
diff --git a/net/openvswitch/flow_table.c b/net/openvswitch/flow_table.c
index d22d8e948d0f..f2ea83ba4763 100644
--- a/net/openvswitch/flow_table.c
+++ b/net/openvswitch/flow_table.c
@@ -57,20 +57,21 @@ static u16 range_n_bytes(const struct sw_flow_key_range *range)
}

void ovs_flow_mask_key(struct sw_flow_key *dst, const struct sw_flow_key *src,
- const struct sw_flow_mask *mask)
+ bool full, const struct sw_flow_mask *mask)
{
- const long *m = (const long *)((const u8 *)&mask->key +
- mask->range.start);
- const long *s = (const long *)((const u8 *)src +
- mask->range.start);
- long *d = (long *)((u8 *)dst + mask->range.start);
+ int start = full ? 0 : mask->range.start;
+ int len = full ? sizeof *dst : range_n_bytes(&mask->range);
+ const long *m = (const long *)((const u8 *)&mask->key + start);
+ const long *s = (const long *)((const u8 *)src + start);
+ long *d = (long *)((u8 *)dst + start);
int i;

- /* The memory outside of the 'mask->range' are not set since
- * further operations on 'dst' only uses contents within
- * 'mask->range'.
+ /* If 'full' is true then all of 'dst' is fully initialized. Otherwise,
+ * if 'full' is false the memory outside of the 'mask->range' is left
+ * uninitialized. This can be used as an optimization when further
+ * operations on 'dst' only use contents within 'mask->range'.
*/
- for (i = 0; i < range_n_bytes(&mask->range); i += sizeof(long))
+ for (i = 0; i < len; i += sizeof(long))
*d++ = *s++ & *m++;
}

@@ -475,7 +476,7 @@ static struct sw_flow *masked_flow_lookup(struct table_instance *ti,
u32 hash;
struct sw_flow_key masked_key;

- ovs_flow_mask_key(&masked_key, unmasked, mask);
+ ovs_flow_mask_key(&masked_key, unmasked, false, mask);
hash = flow_hash(&masked_key, &mask->range);
head = find_bucket(ti, hash);
hlist_for_each_entry_rcu(flow, head, flow_table.node[ti->node_ver]) {
diff --git a/net/openvswitch/flow_table.h b/net/openvswitch/flow_table.h
index 616eda10d955..2dd9900f533d 100644
--- a/net/openvswitch/flow_table.h
+++ b/net/openvswitch/flow_table.h
@@ -86,5 +86,5 @@ struct sw_flow *ovs_flow_tbl_lookup_ufid(struct flow_table *,
bool ovs_flow_cmp(const struct sw_flow *, const struct sw_flow_match *);

void ovs_flow_mask_key(struct sw_flow_key *dst, const struct sw_flow_key *src,
- const struct sw_flow_mask *mask);
+ bool full, const struct sw_flow_mask *mask);
#endif /* flow_table.h */
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index b7143337e4fa..3d9ea9a48289 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -1186,7 +1186,7 @@ static void sctp_v4_del_protocol(void)
unregister_inetaddr_notifier(&sctp_inetaddr_notifier);
}

-static int __net_init sctp_net_init(struct net *net)
+static int __net_init sctp_defaults_init(struct net *net)
{
int status;

@@ -1279,12 +1279,6 @@ static int __net_init sctp_net_init(struct net *net)

sctp_dbg_objcnt_init(net);

- /* Initialize the control inode/socket for handling OOTB packets. */
- if ((status = sctp_ctl_sock_init(net))) {
- pr_err("Failed to initialize the SCTP control sock\n");
- goto err_ctl_sock_init;
- }
-
/* Initialize the local address list. */
INIT_LIST_HEAD(&net->sctp.local_addr_list);
spin_lock_init(&net->sctp.local_addr_lock);
@@ -1300,9 +1294,6 @@ static int __net_init sctp_net_init(struct net *net)

return 0;

-err_ctl_sock_init:
- sctp_dbg_objcnt_exit(net);
- sctp_proc_exit(net);
err_init_proc:
cleanup_sctp_mibs(net);
err_init_mibs:
@@ -1311,15 +1302,12 @@ err_sysctl_register:
return status;
}

-static void __net_exit sctp_net_exit(struct net *net)
+static void __net_exit sctp_defaults_exit(struct net *net)
{
/* Free the local address list */
sctp_free_addr_wq(net);
sctp_free_local_addr_list(net);

- /* Free the control endpoint. */
- inet_ctl_sock_destroy(net->sctp.ctl_sock);
-
sctp_dbg_objcnt_exit(net);

sctp_proc_exit(net);
@@ -1327,9 +1315,32 @@ static void __net_exit sctp_net_exit(struct net *net)
sctp_sysctl_net_unregister(net);
}

-static struct pernet_operations sctp_net_ops = {
- .init = sctp_net_init,
- .exit = sctp_net_exit,
+static struct pernet_operations sctp_defaults_ops = {
+ .init = sctp_defaults_init,
+ .exit = sctp_defaults_exit,
+};
+
+static int __net_init sctp_ctrlsock_init(struct net *net)
+{
+ int status;
+
+ /* Initialize the control inode/socket for handling OOTB packets. */
+ status = sctp_ctl_sock_init(net);
+ if (status)
+ pr_err("Failed to initialize the SCTP control sock\n");
+
+ return status;
+}
+
+static void __net_init sctp_ctrlsock_exit(struct net *net)
+{
+ /* Free the control endpoint. */
+ inet_ctl_sock_destroy(net->sctp.ctl_sock);
+}
+
+static struct pernet_operations sctp_ctrlsock_ops = {
+ .init = sctp_ctrlsock_init,
+ .exit = sctp_ctrlsock_exit,
};

/* Initialize the universe into something sensible. */
@@ -1462,8 +1473,11 @@ static __init int sctp_init(void)
sctp_v4_pf_init();
sctp_v6_pf_init();

- status = sctp_v4_protosw_init();
+ status = register_pernet_subsys(&sctp_defaults_ops);
+ if (status)
+ goto err_register_defaults;

+ status = sctp_v4_protosw_init();
if (status)
goto err_protosw_init;

@@ -1471,9 +1485,9 @@ static __init int sctp_init(void)
if (status)
goto err_v6_protosw_init;

- status = register_pernet_subsys(&sctp_net_ops);
+ status = register_pernet_subsys(&sctp_ctrlsock_ops);
if (status)
- goto err_register_pernet_subsys;
+ goto err_register_ctrlsock;

status = sctp_v4_add_protocol();
if (status)
@@ -1489,12 +1503,14 @@ out:
err_v6_add_protocol:
sctp_v4_del_protocol();
err_add_protocol:
- unregister_pernet_subsys(&sctp_net_ops);
-err_register_pernet_subsys:
+ unregister_pernet_subsys(&sctp_ctrlsock_ops);
+err_register_ctrlsock:
sctp_v6_protosw_exit();
err_v6_protosw_init:
sctp_v4_protosw_exit();
err_protosw_init:
+ unregister_pernet_subsys(&sctp_defaults_ops);
+err_register_defaults:
sctp_v4_pf_exit();
sctp_v6_pf_exit();
sctp_sysctl_unregister();
@@ -1527,12 +1543,14 @@ static __exit void sctp_exit(void)
sctp_v6_del_protocol();
sctp_v4_del_protocol();

- unregister_pernet_subsys(&sctp_net_ops);
+ unregister_pernet_subsys(&sctp_ctrlsock_ops);

/* Free protosw registrations */
sctp_v6_protosw_exit();
sctp_v4_protosw_exit();

+ unregister_pernet_subsys(&sctp_defaults_ops);
+
/* Unregister with socket layer. */
sctp_v6_pf_exit();
sctp_v4_pf_exit();
diff --git a/net/tipc/msg.c b/net/tipc/msg.c
index 562c926a51cc..c5ac436235e0 100644
--- a/net/tipc/msg.c
+++ b/net/tipc/msg.c
@@ -539,6 +539,7 @@ bool tipc_msg_lookup_dest(struct net *net, struct sk_buff *skb, int *err)
*err = -TIPC_ERR_NO_NAME;
if (skb_linearize(skb))
return false;
+ msg = buf_msg(skb);
if (msg_reroute_cnt(msg))
return false;
dnode = addr_domain(net, msg_lookup_scope(msg));
\
 
 \ /
  Last update: 2015-09-23 08:21    [W:0.327 / U:1.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site