Linux 4.11.9
Greg KH
maintainerI'm announcing the release of the 4.11.9 kernel.
All users of the 4.11 kernel series must upgrade.
The updated 4.11.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.11.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/mach-davinci/pm.c | 7 arch/arm/mm/mmu.c | 8 - arch/arm64/include/asm/acpi.h | 6 arch/arm64/kernel/pci.c | 4 arch/mips/kernel/entry.S | 3 arch/mips/kernel/head.S | 2 arch/mips/kernel/pm-cps.c | 9 - arch/mips/kernel/traps.c | 2 arch/x86/boot/compressed/kaslr.c | 3 arch/x86/boot/compressed/misc.c | 4 arch/x86/boot/compressed/misc.h | 2 arch/x86/entry/entry_32.S | 30 ++- arch/x86/entry/entry_64.S | 11 - arch/x86/events/intel/core.c | 2 arch/x86/events/intel/ds.c | 2 arch/x86/events/intel/uncore.c | 2 arch/x86/events/perf_event.h | 1 arch/x86/include/asm/kvm_emulate.h | 4 arch/x86/include/asm/mshyperv.h | 3 arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 4 arch/x86/kvm/emulate.c | 16 +- arch/x86/kvm/pmu_intel.c | 2 arch/x86/kvm/vmx.c | 2 arch/x86/kvm/x86.c | 17 +- arch/x86/mm/init_64.c | 8 - arch/x86/mm/mpx.c | 10 - arch/x86/mm/tlb.c | 4 drivers/block/xen-blkback/blkback.c | 3 drivers/block/xen-blkback/xenbus.c | 7 drivers/gpio/gpiolib.c | 3 drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c | 1 drivers/hsi/clients/ssi_protocol.c | 2 drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 1 drivers/iommu/amd_iommu.c | 6 drivers/iommu/amd_iommu_v2.c | 2 drivers/iommu/dma-iommu.c | 3 drivers/md/dm-thin.c | 26 +-- drivers/mtd/nand/brcmnand/brcmnand.c | 61 +++++++- drivers/mtd/nand/fsmc_nand.c | 13 - drivers/net/bonding/bond_main.c | 6 drivers/net/caif/caif_hsi.c | 2 drivers/net/caif/caif_serial.c | 2 drivers/net/caif/caif_spi.c | 2 drivers/net/caif/caif_virtio.c | 2 drivers/net/can/slcan.c | 7 drivers/net/can/vcan.c | 2 drivers/net/dummy.c | 4 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 2 drivers/net/ethernet/mellanox/mlx5/core/en.h | 8 - drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 8 - drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 drivers/net/ethernet/mellanox/mlx5/core/en_rx_am.c | 45 +++-- drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 11 - drivers/net/ethernet/mellanox/mlx5/core/main.c | 20 ++ drivers/net/geneve.c | 2 drivers/net/gtp.c | 2 drivers/net/hamradio/6pack.c | 2 drivers/net/hamradio/bpqether.c | 2 drivers/net/ifb.c | 4 drivers/net/ipvlan/ipvlan_main.c | 2 drivers/net/loopback.c | 4 drivers/net/macsec.c | 4 drivers/net/macvlan.c | 2 drivers/net/nlmon.c | 2 drivers/net/slip/slip.c | 7 drivers/net/team/team.c | 4 drivers/net/tun.c | 4 drivers/net/usb/cdc-phonet.c | 2 drivers/net/usb/qmi_wwan.c | 4 drivers/net/veth.c | 4 drivers/net/vrf.c | 38 ++++- drivers/net/vxlan.c | 2 drivers/net/wan/dlci.c | 2 drivers/net/wan/hdlc_fr.c | 2 drivers/net/wan/lapbether.c | 2 drivers/net/wireless/ath/ath6kl/main.c | 2 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 1 drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 3 drivers/net/wireless/intersil/hostap/hostap_main.c | 2 drivers/net/wireless/mac80211_hwsim.c | 2 drivers/net/wireless/marvell/mwifiex/main.c | 2 drivers/pinctrl/pinctrl-amd.c | 91 +++++------- drivers/s390/net/netiucv.c | 4 drivers/staging/rtl8188eu/os_dep/mon.c | 2 drivers/usb/gadget/function/f_phonet.c | 2 drivers/watchdog/bcm_kona_wdt.c | 3 fs/nfs/callback.c | 2 fs/nfs/dir.c | 51 +++--- fs/nfs/nfs4proc.c | 5 fs/ocfs2/cluster/heartbeat.c | 8 - fs/ocfs2/dlmglue.c | 4 fs/ocfs2/xattr.c | 23 +-- fs/overlayfs/copy_up.c | 24 +-- include/linux/netdevice.h | 12 + include/net/xfrm.h | 10 - mm/vmalloc.c | 15 + net/8021q/vlan.c | 3 net/8021q/vlan_dev.c | 4 net/batman-adv/soft-interface.c | 5 net/bluetooth/6lowpan.c | 2 net/bridge/br_device.c | 2 net/caif/cfpkt_skbuff.c | 6 net/caif/chnl_net.c | 4 net/core/dev.c | 11 + net/core/dst.c | 14 + net/core/rtnetlink.c | 5 net/decnet/dn_route.c | 14 - net/decnet/netfilter/dn_rtmsg.c | 4 net/hsr/hsr_device.c | 4 net/ieee802154/6lowpan/core.c | 2 net/ipv4/esp4.c | 5 net/ipv4/icmp.c | 8 - net/ipv4/igmp.c | 22 +- net/ipv4/ip_tunnel.c | 4 net/ipv4/ipmr.c | 2 net/ipv6/addrconf.c | 6 net/ipv6/fib6_rules.c | 22 -- net/ipv6/icmp.c | 2 net/ipv6/ip6_fib.c | 3 net/ipv6/ip6_gre.c | 9 - net/ipv6/ip6_tunnel.c | 8 - net/ipv6/ip6_vti.c | 8 - net/ipv6/ip6mr.c | 2 net/ipv6/proc.c | 2 net/ipv6/route.c | 1 net/ipv6/sit.c | 6 net/ipv6/xfrm6_input.c | 2 net/irda/irlan/irlan_eth.c | 2 net/key/af_key.c | 19 +- net/l2tp/l2tp_eth.c | 2 net/mac80211/iface.c | 7 net/mac802154/iface.c | 7 net/netfilter/nf_conntrack_netlink.c | 4 net/openvswitch/vport-internal_dev.c | 4 net/phonet/pep-gprs.c | 2 net/sctp/socket.c | 9 - net/tipc/msg.c | 2 net/unix/af_unix.c | 7 net/xfrm/xfrm_policy.c | 51 ------ net/xfrm/xfrm_user.c | 1 sound/pci/hda/hda_codec.h | 2 sound/pci/hda/hda_controller.c | 8 - sound/pci/hda/hda_generic.c | 1 tools/arch/x86/lib/memcpy_64.S | 2 146 files changed, 608 insertions(+), 503 deletions(-)
Alexander Potapenko (1):
net: don't call strlen on non-terminated string in dev_set_alias()
Andy Lutomirski (1):
x86/mm: Fix flush_tlb_page() on Xen
Ard Biesheuvel (1):
mm/vmalloc.c: huge-vmap: fail gracefully on unexpected huge vmap mappings
Arnaldo Carvalho de Melo (1):
tools arch: Sync arch/x86/lib/memcpy_64.S with the kernel
Arnd Bergmann (1):
infiniband: hns: avoid gcc-7.0.1 warning for uninitialized data
Baoquan He (2):
x86/mm: Fix boot crash caused by incorrect loop count calculation in sync_global_pgds() x86/boot/KASLR: Fix kexec crash due to 'virt_addr' calculation bug
Bartosz Golaszewski (1):
gpiolib: fix filtering out unwanted events
Benjamin Coddington (2):
NFSv4.2: Don't send mode again in post-EXCLUSIVE4_1 SETATTR with umask Revert "NFS: nfs_rename() handle -ERESTARTSYS dentry left behind"
Bjørn Mork (1):
qmi_wwan: new Telewell and Sierra device IDs
Chris Mi (1):
net/mlx5e: Fix min inline value for VF rep SQs
Christian Perle (1):
proc: snmp6: Use correct type in memset
Christophe JAILLET (2):
ARM: davinci: PM: Free resources in error handling path in 'davinci_pm_init'
ARM: davinci: PM: Do not free useful resources in normal path in 'davinci_pm_init'
Dan Carpenter (2):
xfrm: NULL dereference on allocation failure
xfrm: Oops on error in pfkey_msg2xfrm_state()
David Ahern (2):
net: ipv6: Release route when device is unregistering
net: vrf: Make add_fib_rules per network namespace flag
David S. Miller (2):
net: Fix inconsistent teardown and release of private netdev state.
hsi: Fix build regression due to netdev destructor fix.
Deepak Rawat (1):
drm/vmwgfx: Free hash table allocated by cmdbuf managed res mgr
Doug Berger (1):
ARM: 8685/1: ensure memblock-limit is pmd-aligned
Eli Cohen (1):
net/mlx5: Wait for FW readiness before initializing command interface
Eric Anholt (1):
watchdog: bcm281xx: Fix use of uninitialized spinlock.
Eric Leblond (1):
netfilter: synproxy: fix conntrackd interaction
Eric Ren (1):
ocfs2: fix deadlock caused by recursive locking in xattr
Gao Feng (1):
net: 8021q: Fix one possible panic caused by BUG_ON in free_netdev
Greg Kroah-Hartman (1):
Linux 4.11.9
Hangbin Liu (1):
xfrm: move xfrm_garbage_collect out of xfrm_policy_flush
Hui Wang (1):
ALSA: hda - set input_path bitmap to zero after moving it to new place
Huy Nguyen (1):
net/mlx5: Remove several module events out of ethtool stats
James Hogan (1):
MIPS: Avoid accidental raw backtrace
Jesper Dangaard Brouer (1):
net: don't global ICMP rate limit packets originating from loopback
Jia-Ju Bai (2):
net: caif: Fix a sleep-in-atomic bug in cfpkt_create_pfx
net: tipc: Fix a sleep-in-atomic bug in tipc_msg_reverse
Joerg Roedel (1):
x86/mpx: Correctly report do_mpx_bt_fault() failures to user-space
Johannes Berg (1):
mac80211: free netdev on dev_alloc_name() error
Josh Poimboeuf (1):
Revert "x86/entry: Fix the end of the stack for newly forked tasks"
Juergen Gross (2):
xen/blkback: don't use xen_blkif_get() in xen-blkback kthread xen/blkback: don't free be structure too early
Junxiao Bi (1):
ocfs2: o2hb: revert hb threshold to keep compatible
Kamal Dasu (1):
mtd: nand: brcmnand: Check flash #WP pin status before nand erase/program
Kan Liang (2):
perf/x86/intel/uncore: Fix wrong box pointer check perf/x86: Fix spurious NMI with PEBS Load Latency event
Karl Beldan (1):
MIPS: head: Reorder instructions missing a delay slot
Kinglong Mee (1):
NFSv4.x/callback: Create the callback service through svc_create_pooled
Krister Johansen (1):
Fix an intermittent pr_emerg warning about lo becoming free.
Ladi Prosek (1):
KVM: x86: fix emulation of RSM and IRET instructions
Lorenzo Pieralisi (1):
ARM64/ACPI: Fix BAD_MADT_GICC_ENTRY() macro implementation
Majd Dibbiny (1):
net/mlx5: Enable 4K UAR only when page size is bigger than 4K
Maor Dickman (1):
net/mlx5e: Fix timestamping capabilities reporting
Mateusz Jurczyk (2):
decnet: dn_rtmsg: Improve input length sanitization in dnrmg_receive_user_skb
af_unix: Add sockaddr length checks before accessing sa_family in bind and connect handlers
Miklos Szeredi (1):
ovl: copy-up: don't unlock between lookup and link
Mintz, Yuval (1):
net: Zero ifla_vf_info in rtnl_fill_vfinfo()
Or Gerlitz (1):
net/mlx5e: Avoid doing a cleanup call if the profile doesn't have it
Pan Bian (1):
iommu/amd: Fix incorrect error handling in amd_iommu_bind_pasid()
Paul Burton (2):
MIPS: pm-cps: Drop manual cache-line alignment of ready_count
MIPS: Fix IRQ tracing & lockdep when rescheduling
Radim Krčmář (2):
KVM: x86/vPMU: fix undefined shift in intel_pmu_refresh()
KVM: x86: zero base3 of unusable segments
Robin Murphy (1):
iommu/dma: Don't reserve PCI I/O windows
Sabrina Dubroca (1):
xfrm: fix stack access out of bounds with CONFIG_XFRM_SUB_POLICY
Serhey Popovych (2):
ipv6: Do not leak throw route references
rtnetlink: add IFLA_GROUP to ifla_policy
Steffen Klassert (1):
esp4: Fix udpencap for local TCP packets.
Stephen Rothwell (1):
net: s390: fix up for "Fix inconsistent teardown and release of private netdev state"
Suravee Suthikulpanit (1):
iommu/amd: Fix interrupt remapping when disable guest_mode
Takashi Iwai (1):
ALSA: hda - Fix endless loop of codec configure
Tal Gilboa (2):
net/mlx5e: Added BW check for DIM decision mechanism net/mlx5e: Fix wrong indications in DIM due to counter wraparound
Thomas Gleixner (2):
pinctrl/amd: Use regular interrupt instead of chained x86/mshyperv: Remove excess #includes from mshyperv.h
Thomas Petazzoni (1):
mtd: nand: fsmc: fix NAND width handling
Timmy Li (1):
ARM64: PCI: Fix struct acpi_pci_root_ops allocation failure path
Trond Myklebust (1):
NFSv4.1: Fix a race in nfs4_proc_layoutget
Vallish Vaidyeshwara (1):
dm thin: do not queue freed thin mapping for next stage processing
Vikas Shivappa (1):
x86/intel_rdt: Fix memory leak on mount failure
WANG Cong (2):
igmp: acquire pmc lock for ip_mc_clear_src()
igmp: add a missing spin_lock_init()
Wanpeng Li (1):
KVM: nVMX: Fix exception injection
Wei Wang (1):
decnet: always not take dst->__refcnt when inserting dst into hash table
Xin Long (3):
sctp: disable BH in sctp_for_each_endpoint
ipv6: fix calling in6_ifa_hold incorrectly for dad work
sctp: return next obj by passing pos + 1 into sctp_transport_get_idx
Yossi Kuperman (1):
xfrm6: Fix IPv6 payload_len in xfrm6_transport_finish
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 11 -SUBLEVEL = 8 +SUBLEVEL = 9 EXTRAVERSION = NAME = Fearless Coyote
arch/arm/mach-davinci/pm.c +6 -1
@@ -154,7 +154,8 @@ int __init davinci_pm_init(void) davinci_sram_suspend =sram_alloc (davinci_cpu_suspend_sz,NULL );if (!davinci_sram_suspend) {pr_err ("PM: cannot allocate SRAM memory\n" ); -return -ENOMEM ; + ret = -ENOMEM ; + goto no_sram_mem; } davinci_sram_push(davinci_sram_suspend, davinci_cpu_suspend,
@@ -162,6 +163,10 @@ int __init davinci_pm_init(void)suspend_set_ops (&davinci_pm_ops); +return 0 ; + +no_sram_mem: +iounmap (pm_config.ddrpsc_reg_base); no_ddrpsc_mem:iounmap (pm_config.ddrpll_reg_base); no_ddrpll_mem:
arch/arm/mm/mmu.c +4 -4
@@ -1216,15 +1216,15 @@ void __init adjust_lowmem_bounds(void) high_memory =__va (arm_lowmem_limit -1 ) +1 ; +if (!memblock_limit) + memblock_limit = arm_lowmem_limit; +/* * Round the memblock limit down to a pmd size. This * helps to ensure that we will allocate memory from the * last full pmd, which should be mapped. */ -if (memblock_limit) - memblock_limit =round_down (memblock_limit,PMD_SIZE ); -if (!memblock_limit) - memblock_limit = arm_lowmem_limit; + memblock_limit =round_down (memblock_limit,PMD_SIZE );if (!IS_ENABLED (CONFIG_HIGHMEM ) ||cache_is_vipt_aliasing ()) {if (memblock_end_of_DRAM () > arm_lowmem_limit) {
arch/arm64/include/asm/acpi.h +3 -3
@@ -23,9 +23,9 @@#define ACPI_MADT_GICC_LENGTH \ (acpi_gbl_FADT.header.revision < 6 ? 76 : 80) -#define BAD_MADT_GICC_ENTRY (entry, end) \ - (!(entry) || (unsigned long)(entry) + sizeof(*(entry)) > (end) || \ - (entry)->header.length != ACPI_MADT_GICC_LENGTH) +#define BAD_MADT_GICC_ENTRY (entry, end) \ + (!(entry) || (entry)->header.length != ACPI_MADT_GICC_LENGTH || \ + (unsigned long)(entry) + ACPI_MADT_GICC_LENGTH > (end))/* Basic configuration for ACPI */ #ifdef CONFIG_ACPI
arch/arm64/kernel/pci.c +3 -1
@@ -191,8 +191,10 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)return NULL ; root_ops =kzalloc_node (sizeof (*root_ops),GFP_KERNEL , node); -if (!root_ops) +if (!root_ops) { +kfree (ri);return NULL ; + } ri->cfg =pci_acpi_setup_ecam_mapping (root);if (!ri->cfg) {
arch/mips/kernel/entry.S +3 -0
@@ -11,6 +11,7 @@ #include <asm/asm.h> #include <asm/asmmacro.h> #include <asm/compiler.h> +#include <asm/irqflags.h> #include <asm/regdef.h> #include <asm/mipsregs.h> #include <asm/stackframe.h>
@@ -119,6 +120,7 @@ work_pending: andi t0, a2, _TIF_NEED_RESCHED # a2 is preloaded with TI_FLAGS beqz t0, work_notifysig work_resched: + TRACE_IRQS_OFF jal schedule local_irq_disable # make sure need_resched and
@@ -155,6 +157,7 @@ syscall_exit_work: beqz t0, work_pending # trace bit set? local_irq_enable # could let syscall_trace_leave() # call schedule() instead + TRACE_IRQS_ON move a0, sp jal syscall_trace_leave b resume_userspace
arch/mips/kernel/head.S +1 -1
@@ -106,8 +106,8 @@ NESTED(kernel_entry, 16, sp) # kernel entry point beq t0, t1, dtb_found #endif li t1, -2 - beq a0, t1, dtb_found move t2, a1 + beq a0, t1, dtb_found li t2, 0 dtb_found:
arch/mips/kernel/pm-cps.c +1 -8
@@ -56,7 +56,6 @@ DECLARE_BITMAP(state_support, CPS_PM_STATE_COUNT);* state. Actually per-core rather than per-CPU. */ static DEFINE_PER_CPU_ALIGNED(u32*, ready_count); -static DEFINE_PER_CPU_ALIGNED(void*, ready_count_alloc);/* Indicates online CPUs coupled with the current CPU */ static DEFINE_PER_CPU_ALIGNED(cpumask_t, online_coupled);
@@ -642,7 +641,6 @@ static int cps_pm_online_cpu(unsigned int cpu) {enum cps_pm_state state;unsigned core = cpu_data[cpu].core; -unsigned dlinesz = cpu_data[cpu].dcache.linesz;void *entry_fn, *core_rc;for (state =CPS_PM_NC_WAIT ; state <CPS_PM_STATE_COUNT ; state++) {
@@ -662,16 +660,11 @@ static int cps_pm_online_cpu(unsigned int cpu) }if (!per_cpu (ready_count, core)) { - core_rc =kmalloc (dlinesz *2 ,GFP_KERNEL ); + core_rc =kmalloc (sizeof (u32),GFP_KERNEL );if (!core_rc) {pr_err ("Failed allocate core %u ready_count\n" , core);return -ENOMEM ; } -per_cpu (ready_count_alloc, core) = core_rc; - -/* Ensure ready_count is aligned to a cacheline boundary */ - core_rc += dlinesz -1 ; - core_rc = (void *)((unsigned long )core_rc & ~(dlinesz -1 ));per_cpu (ready_count, core) = core_rc; }
arch/mips/kernel/traps.c +2 -0
@@ -201,6 +201,8 @@ void show_stack(struct task_struct *task, unsigned long *sp) {struct pt_regs regs;mm_segment_t old_fs =get_fs (); + + regs.cp0_status =KSU_KERNEL ;if (sp) { regs.regs[29 ] = (unsigned long )sp; regs.regs[31 ] =0 ;
arch/x86/boot/compressed/kaslr.c +0 -3
@@ -564,9 +564,6 @@ void choose_random_location(unsigned long input, {unsigned long random_addr, min_addr; -/* By default, keep output position unchanged. */ - *virt_addr = *output; -if (cmdline_find_option_bool ("nokaslr" )) {warn ("KASLR disabled: 'nokaslr' on cmdline." );return ;
arch/x86/boot/compressed/misc.c +2 -2
@@ -338,7 +338,7 @@ asmlinkage __visible void *extract_kernel(void *rmode, memptr heap, unsigned long output_len) {const unsigned long kernel_total_size = VO__end - VO__text; -unsigned long virt_addr = (unsigned long )output; +unsigned long virt_addr =LOAD_PHYSICAL_ADDR ;/* Retain x86 boot parameters pointer passed from startup_32/64. */ boot_params = rmode;
@@ -397,7 +397,7 @@ asmlinkage __visible void *extract_kernel(void *rmode, memptr heap,#ifndef CONFIG_RELOCATABLE if ((unsigned long )output !=LOAD_PHYSICAL_ADDR )error ("Destination address does not match LOAD_PHYSICAL_ADDR" ); -if ((unsigned long )output != virt_addr) +if (virt_addr !=LOAD_PHYSICAL_ADDR )error ("Destination virtual address changed when not relocatable" );#endif
arch/x86/boot/compressed/misc.h +0 -2
@@ -81,8 +81,6 @@ static inline void choose_random_location(unsigned long input, unsigned long output_size, unsigned long *virt_addr) { -/* No change from existing output location. */ - *virt_addr = *output; }#endif
arch/x86/entry/entry_32.S +19 -11
@@ -255,6 +255,23 @@ ENTRY(__switch_to_asm) END(__switch_to_asm) /* + * The unwinder expects the last frame on the stack to always be at the same + * offset from the end of the page, which allows it to validate the stack. + * Calling schedule_tail() directly would break that convention because its an + * asmlinkage function so its argument has to be pushed on the stack. This + * wrapper creates a proper "end of stack" frame header before the call. + */ +ENTRY(schedule_tail_wrapper) + FRAME_BEGIN + + pushl %eax + call schedule_tail + popl %eax + + FRAME_END + ret +ENDPROC(schedule_tail_wrapper) +/* * A newly forked process directly context switches into this address. * * eax: prev task we switched from
@@ -262,24 +279,15 @@ END(__switch_to_asm) * edi: kernel thread arg */ ENTRY(ret_from_fork) - FRAME_BEGIN /* help unwinder find end of stack */ - - /* - * schedule_tail() is asmlinkage so we have to put its 'prev' argument - * on the stack. - */ - pushl %eax - call schedule_tail - popl %eax + call schedule_tail_wrapper testl %ebx, %ebx jnz 1f /* kernel threads are uncommon */ 2: /* When we fork, we trace the syscall return in the child, too. */ - leal FRAME_OFFSET(%esp), %eax + movl %esp, %eax call syscall_return_slowpath - FRAME_END jmp restore_all /* kernel thread */
arch/x86/entry/entry_64.S +4 -7
@@ -36,7 +36,6 @@ #include <asm/smap.h> #include <asm/pgtable_types.h> #include <asm/export.h> -#include <asm/frame.h> #include <linux/err.h> .code64
@@ -409,19 +408,17 @@ END(__switch_to_asm) * r12: kernel thread arg */ ENTRY(ret_from_fork) - FRAME_BEGIN /* help unwinder find end of stack */ movq %rax, %rdi - call schedule_tail /* rdi: 'prev' task parameter */ + call schedule_tail /* rdi: 'prev' task parameter */ - testq %rbx, %rbx /* from kernel_thread? */ - jnz 1f /* kernel threads are uncommon */ + testq %rbx, %rbx /* from kernel_thread? */ + jnz 1f /* kernel threads are uncommon */ 2: - leaq FRAME_OFFSET(%rsp),%rdi /* pt_regs pointer */ + movq %rsp, %rdi call syscall_return_slowpath /* returns with IRQs disabled */ TRACE_IRQS_ON /* user mode is traced as IRQS on */ SWAPGS - FRAME_END jmp restore_regs_and_iret 1:
arch/x86/events/intel/core.c +1 -1
@@ -2130,7 +2130,7 @@ static int intel_pmu_handle_irq(struct pt_regs *regs)* counters from the GLOBAL_STATUS mask and we always process PEBS * events via drain_pebs(). */ - status &= ~cpuc->pebs_enabled; + status &= ~(cpuc->pebs_enabled &PEBS_COUNTER_MASK );/* * PEBS overflow sets bit 62 in the global status register
arch/x86/events/intel/ds.c +1 -1
@@ -1222,7 +1222,7 @@ get_next_pebs_record_by_bit(void *base, void *top, int bit)/* clear non-PEBS bit and re-check */ pebs_status = p->status & cpuc->pebs_enabled; - pebs_status &= (1ULL <<MAX_PEBS_EVENTS ) -1 ; + pebs_status &=PEBS_COUNTER_MASK ;if (pebs_status == (1 << bit))return at; }
arch/x86/events/intel/uncore.c +1 -1
@@ -1170,7 +1170,7 @@ static int uncore_event_cpu_online(unsigned int cpu) pmu = type->pmus;for (i =0 ; i < type->num_boxes; i++, pmu++) { box = pmu->boxes[pkg]; -if (!box &&atomic_inc_return (&box->refcnt) ==1 ) +if (box &&atomic_inc_return (&box->refcnt) ==1 )uncore_box_init (box); } }
arch/x86/events/perf_event.h +1 -0
@@ -79,6 +79,7 @@ struct amd_nb {/* The maximal number of PEBS events: */ #define MAX_PEBS_EVENTS 8 +#define PEBS_COUNTER_MASK ((1ULL << MAX_PEBS_EVENTS) - 1)/* * Flags PEBS can handle without an PMI.
arch/x86/include/asm/kvm_emulate.h +3 -1
@@ -221,6 +221,9 @@ struct x86_emulate_ops {void (*get_cpuid)(struct x86_emulate_ctxt *ctxt,u32 *eax,u32 *ebx,u32 *ecx,u32 *edx);void (*set_nmi_mask)(struct x86_emulate_ctxt *ctxt,bool masked); + +unsigned (*get_hflags)(struct x86_emulate_ctxt *ctxt); +void (*set_hflags)(struct x86_emulate_ctxt *ctxt,unsigned hflags); }; typedef u32 __attribute__((vector_size(16))) sse128_t;
@@ -290,7 +293,6 @@ struct x86_emulate_ctxt {/* interruptibility state, as a result of execution of STI or MOV SS */ int interruptibility; -int emul_flags;bool perm_ok;/* do not check permissions if true */ bool ud;/* inject an #UD if host doesn't support insn */
arch/x86/include/asm/mshyperv.h +1 -2
@@ -2,8 +2,7 @@#define _ASM_X86_MSHYPER_H#include <linux/types.h> -#include <linux/interrupt.h> -#include <linux/clocksource.h> +#include <linux/atomic.h> #include <asm/hyperv.h> /*
arch/x86/kernel/cpu/intel_rdt_rdtgroup.c +3 -1
@@ -767,11 +767,13 @@ static struct dentry *rdt_mount(struct file_system_type *fs_type, dentry =kernfs_mount (fs_type, flags, rdt_root,RDTGROUP_SUPER_MAGIC ,NULL );if (IS_ERR (dentry)) - goto out_cdp; + goto out_destroy;static_branch_enable (&rdt_enable_key); goto out; +out_destroy: +kernfs_remove (kn_info); out_cdp:cdp_disable (); out:
arch/x86/kvm/emulate.c +9 -7
@@ -2547,7 +2547,7 @@ static int em_rsm(struct x86_emulate_ctxt *ctxt)u64 smbase;int ret; -if ((ctxt->emul_flags &X86EMUL_SMM_MASK ) ==0 ) +if ((ctxt->ops->get_hflags (ctxt) &X86EMUL_SMM_MASK ) ==0 )return emulate_ud (ctxt);/*
@@ -2596,11 +2596,11 @@ static int em_rsm(struct x86_emulate_ctxt *ctxt)return X86EMUL_UNHANDLEABLE ; } -if ((ctxt->emul_flags &X86EMUL_SMM_INSIDE_NMI_MASK ) ==0 ) +if ((ctxt->ops->get_hflags (ctxt) &X86EMUL_SMM_INSIDE_NMI_MASK ) ==0 ) ctxt->ops->set_nmi_mask (ctxt, false); - ctxt->emul_flags &= ~X86EMUL_SMM_INSIDE_NMI_MASK ; - ctxt->emul_flags &= ~X86EMUL_SMM_MASK ; + ctxt->ops->set_hflags (ctxt, ctxt->ops->get_hflags (ctxt) & + ~(X86EMUL_SMM_INSIDE_NMI_MASK |X86EMUL_SMM_MASK ));return X86EMUL_CONTINUE ; }
@@ -5317,6 +5317,7 @@ int x86_emulate_insn(struct x86_emulate_ctxt *ctxt)const struct x86_emulate_ops *ops = ctxt->ops;int rc =X86EMUL_CONTINUE ;int saved_dst_type = ctxt->dst.type; +unsigned emul_flags; ctxt->mem_read.pos =0 ;
@@ -5331,6 +5332,7 @@ int x86_emulate_insn(struct x86_emulate_ctxt *ctxt) goto done; } + emul_flags = ctxt->ops->get_hflags (ctxt);if (unlikely (ctxt->d & (No64|Undefined|Sse|Mmx|Intercept|CheckPerm|Priv|Prot|String))) { if ((ctxt->mode == X86EMUL_MODE_PROT64 && (ctxt->d & No64)) ||
@@ -5364,7 +5366,7 @@ int x86_emulate_insn(struct x86_emulate_ctxt *ctxt)fetch_possible_mmx_operand (ctxt, &ctxt->dst); } -if (unlikely (ctxt->emul_flags &X86EMUL_GUEST_MASK ) && ctxt->intercept) { +if (unlikely (emul_flags &X86EMUL_GUEST_MASK ) && ctxt->intercept) { rc =emulator_check_intercept (ctxt, ctxt->intercept,X86_ICPT_PRE_EXCEPT );if (rc !=X86EMUL_CONTINUE )
@@ -5393,7 +5395,7 @@ int x86_emulate_insn(struct x86_emulate_ctxt *ctxt) goto done; } -if (unlikely (ctxt->emul_flags &X86EMUL_GUEST_MASK ) && (ctxt->d & Intercept)) { +if (unlikely (emul_flags &X86EMUL_GUEST_MASK ) && (ctxt->d & Intercept)) { rc =emulator_check_intercept (ctxt, ctxt->intercept,X86_ICPT_POST_EXCEPT );if (rc !=X86EMUL_CONTINUE )
@@ -5447,7 +5449,7 @@ int x86_emulate_insn(struct x86_emulate_ctxt *ctxt) special_insn: -if (unlikely (ctxt->emul_flags &X86EMUL_GUEST_MASK ) && (ctxt->d & Intercept)) { +if (unlikely (emul_flags &X86EMUL_GUEST_MASK ) && (ctxt->d & Intercept)) { rc =emulator_check_intercept (ctxt, ctxt->intercept,X86_ICPT_POST_MEMACCESS );if (rc !=X86EMUL_CONTINUE )
arch/x86/kvm/pmu_intel.c +1 -1
@@ -294,7 +294,7 @@ static void intel_pmu_refresh(struct kvm_vcpu *vcpu) ((u64 )1 << edx.split.bit_width_fixed) -1 ; } - pmu->global_ctrl = ((1 << pmu->nr_arch_gp_counters) -1 ) | + pmu->global_ctrl = ((1ull << pmu->nr_arch_gp_counters) -1 ) | (((1ull << pmu->nr_arch_fixed_counters) -1 ) <<INTEL_PMC_IDX_FIXED ); pmu->global_ctrl_mask = ~pmu->global_ctrl;
arch/x86/kvm/vmx.c +1 -1
@@ -2436,7 +2436,7 @@ static int nested_vmx_check_exception(struct kvm_vcpu *vcpu, unsigned nr)if (!(vmcs12->exception_bitmap & (1u << nr)))return 0 ; -nested_vmx_vmexit (vcpu,to_vmx (vcpu)->exit_reason, +nested_vmx_vmexit (vcpu,EXIT_REASON_EXCEPTION_NMI ,vmcs_read32 (VM_EXIT_INTR_INFO ),vmcs_readl (EXIT_QUALIFICATION ));return 1 ;
arch/x86/kvm/x86.c +14 -3
@@ -5098,6 +5098,8 @@ static bool emulator_get_segment(struct x86_emulate_ctxt *ctxt, u16 *selector,if (var.unusable) {memset (desc,0 ,sizeof (*desc)); +if (base3) + *base3 =0 ;return false; }
@@ -5248,6 +5250,16 @@ static void emulator_set_nmi_mask(struct x86_emulate_ctxt *ctxt, bool masked) kvm_x86_ops->set_nmi_mask (emul_to_vcpu (ctxt), masked); } +static unsigned emulator_get_hflags (struct x86_emulate_ctxt *ctxt) +{ +return emul_to_vcpu (ctxt)->arch.hflags; +} + +static void emulator_set_hflags (struct x86_emulate_ctxt *ctxt,unsigned emul_flags) +{ +kvm_set_hflags (emul_to_vcpu (ctxt), emul_flags); +} +static const struct x86_emulate_ops emulate_ops = { .read_gpr = emulator_read_gpr, .write_gpr = emulator_write_gpr,
@@ -5287,6 +5299,8 @@ static const struct x86_emulate_ops emulate_ops = { .intercept = emulator_intercept, .get_cpuid = emulator_get_cpuid, .set_nmi_mask = emulator_set_nmi_mask, + .get_hflags = emulator_get_hflags, + .set_hflags = emulator_set_hflags, };static void toggle_interruptibility (struct kvm_vcpu *vcpu,u32 mask)
@@ -5341,7 +5355,6 @@ static void init_emulate_ctxt(struct kvm_vcpu *vcpu)BUILD_BUG_ON (HF_GUEST_MASK !=X86EMUL_GUEST_MASK );BUILD_BUG_ON (HF_SMM_MASK !=X86EMUL_SMM_MASK );BUILD_BUG_ON (HF_SMM_INSIDE_NMI_MASK !=X86EMUL_SMM_INSIDE_NMI_MASK ); - ctxt->emul_flags = vcpu->arch.hflags;init_decode_cache (ctxt); vcpu->arch.emulate_regs_need_sync_from_vcpu = false;
@@ -5744,8 +5757,6 @@ int x86_emulate_instruction(struct kvm_vcpu *vcpu,unsigned long rflags = kvm_x86_ops->get_rflags (vcpu);toggle_interruptibility (vcpu, ctxt->interruptibility); vcpu->arch.emulate_regs_need_sync_to_vcpu = false; -if (vcpu->arch.hflags != ctxt->emul_flags) -kvm_set_hflags (vcpu, ctxt->emul_flags);kvm_rip_write (vcpu, ctxt->eip);if (r ==EMULATE_DONE && (ctxt->tf || (vcpu->guest_debug &KVM_GUESTDBG_SINGLESTEP )))
arch/x86/mm/init_64.c +4 -4
@@ -94,10 +94,10 @@ __setup("noexec32=", nonx32_setup);*/ void sync_global_pgds (unsigned long start,unsigned long end) { -unsigned long address; +unsigned long addr; -for (address = start; address <= end; address +=PGDIR_SIZE ) { -const pgd_t *pgd_ref =pgd_offset_k (address); +for (addr = start; addr <= end; addr =ALIGN (addr +1 ,PGDIR_SIZE )) { +const pgd_t *pgd_ref =pgd_offset_k (addr);struct page *page;if (pgd_none (*pgd_ref))
@@ -108,7 +108,7 @@ void sync_global_pgds(unsigned long start, unsigned long end)pgd_t *pgd;spinlock_t *pgt_lock; - pgd = (pgd_t *)page_address (page) +pgd_index (address); + pgd = (pgd_t *)page_address (page) +pgd_index (addr);/* the pgt_lock only for Xen */ pgt_lock = &pgd_page_get_mm (page)->page_table_lock;spin_lock (pgt_lock);
arch/x86/mm/mpx.c +1 -9
@@ -526,15 +526,7 @@ int mpx_handle_bd_fault(void)if (!kernel_managing_mpx_tables (current->mm))return -EINVAL ; -if (do_mpx_bt_fault ()) { -force_sig (SIGSEGV , current); -/* -* The force_sig() is essentially "handling" this -* exception, so we do not pass up the error -* from do_mpx_bt_fault(). -*/ - } -return 0 ; +return do_mpx_bt_fault (); }/*
arch/x86/mm/tlb.c +1 -3
@@ -263,8 +263,6 @@ void native_flush_tlb_others(const struct cpumask *cpumask, {struct flush_tlb_info info; -if (end ==0 ) - end = start +PAGE_SIZE ; info.flush_mm = mm; info.flush_start = start; info.flush_end = end;
@@ -393,7 +391,7 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long start) }if (cpumask_any_but (mm_cpumask (mm),smp_processor_id ()) < nr_cpu_ids) -flush_tlb_others (mm_cpumask (mm), mm, start,0UL ); +flush_tlb_others (mm_cpumask (mm), mm, start, start +PAGE_SIZE );preempt_enable (); }
drivers/block/xen-blkback/blkback.c +0 -3
@@ -609,8 +609,6 @@ int xen_blkif_schedule(void *arg)unsigned long timeout;int ret; -xen_blkif_get (blkif); -set_freezable ();while (!kthread_should_stop ()) {if (try_to_freeze ())
@@ -665,7 +663,6 @@ int xen_blkif_schedule(void *arg)print_stats (ring); ring->xenblkd =NULL ; -xen_blkif_put (blkif);return 0 ; }
drivers/block/xen-blkback/xenbus.c +3 -4
@@ -255,7 +255,6 @@ static int xen_blkif_disconnect(struct xen_blkif *blkif)if (ring->xenblkd) {kthread_stop (ring->xenblkd);wake_up (&ring->shutdown_wq); - ring->xenblkd =NULL ; }/* The above kthread_stop() guarantees that at this point we
@@ -316,8 +315,10 @@ static int xen_blkif_disconnect(struct xen_blkif *blkif)static void xen_blkif_free (struct xen_blkif *blkif) { -xen_blkif_disconnect (blkif); +WARN_ON (xen_blkif_disconnect (blkif));xen_vbd_free (&blkif->vbd); +kfree (blkif->be->mode); +kfree (blkif->be);/* Make sure everything is drained before shutting down */ kmem_cache_free (xen_blkif_cachep, blkif);
@@ -512,8 +513,6 @@ static int xen_blkbk_remove(struct xenbus_device *dev)/* Put the reference we set in xen_blkif_alloc(). */ xen_blkif_put (be->blkif); -kfree (be->mode); -kfree (be);return 0 ; }
drivers/gpio/gpiolib.c +2 -1
@@ -708,7 +708,8 @@ static irqreturn_t lineevent_irq_thread(int irq, void *p) ge.timestamp =ktime_get_real_ns (); -if (le->eflags &GPIOEVENT_REQUEST_BOTH_EDGES ) { +if (le->eflags &GPIOEVENT_REQUEST_RISING_EDGE + && le->eflags &GPIOEVENT_REQUEST_FALLING_EDGE ) {int level =gpiod_get_value_cansleep (le->desc);if (level)
drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c +1 -0
@@ -321,6 +321,7 @@ void vmw_cmdbuf_res_man_destroy(struct vmw_cmdbuf_res_manager *man)list_for_each_entry_safe (entry, next, &man->list, head)vmw_cmdbuf_res_free (man, entry); +drm_ht_remove (&man->resources);kfree (man); }
drivers/hsi/clients/ssi_protocol.c +1 -1
@@ -1065,7 +1065,7 @@ static void ssip_pn_setup(struct net_device *dev) dev->addr_len =1 ; dev->tx_queue_len =SSIP_TXQUEUE_LEN ; - dev->destructor = free_netdev; + dev->needs_free_netdev = true; dev->header_ops = &phonet_header_ops; }
drivers/infiniband/hw/hns/hns_roce_hw_v1.c +1 -0
@@ -1851,6 +1851,7 @@ void hns_roce_v1_cq_set_ci(struct hns_roce_cq *hr_cq, u32 cons_index)u32 doorbell[2 ]; doorbell[0 ] = cons_index & ((hr_cq->cq_depth <<1 ) -1 ); + doorbell[1 ] =0 ;roce_set_bit (doorbell[1 ],ROCEE_DB_OTHERS_H_ROCEE_DB_OTH_HW_SYNS_S ,1 );roce_set_field (doorbell[1 ],ROCEE_DB_OTHERS_H_ROCEE_DB_OTH_CMD_M ,ROCEE_DB_OTHERS_H_ROCEE_DB_OTH_CMD_S ,3 );
drivers/iommu/amd_iommu.c +2 -4
@@ -3879,11 +3879,9 @@ static void irte_ga_prepare(void *entry, u8 vector, u32 dest_apicid, int devid) { struct irte_ga *irte = (struct irte_ga *) entry; -struct iommu_dev_data *dev_data =search_dev_data (devid); irte->lo.val =0 ; irte->hi.val =0 ; - irte->lo.fields_remap.guest_mode = dev_data ? dev_data->use_vapic :0 ; irte->lo.fields_remap.int_type = delivery_mode; irte->lo.fields_remap.dm = dest_mode; irte->hi.fields.vector = vector;
@@ -3939,10 +3937,10 @@ static void irte_ga_set_affinity(void *entry, u16 devid, u16 index,struct irte_ga *irte = (struct irte_ga *) entry;struct iommu_dev_data *dev_data =search_dev_data (devid); -if (!dev_data || !dev_data->use_vapic) { +if (!dev_data || !dev_data->use_vapic || + !irte->lo.fields_remap.guest_mode) { irte->hi.fields.vector = vector; irte->lo.fields_remap.destination = dest_apicid; - irte->lo.fields_remap.guest_mode =0 ;modify_irte_ga (devid, index, irte,NULL ); } }
drivers/iommu/amd_iommu_v2.c +1 -1
@@ -696,9 +696,9 @@ int amd_iommu_bind_pasid(struct pci_dev *pdev, int pasid, out_unregister:mmu_notifier_unregister (&pasid_state->mn, mm); +mmput (mm); out_free: -mmput (mm);free_pasid_state (pasid_state); out:
drivers/iommu/dma-iommu.c +1 -2
@@ -175,8 +175,7 @@ static void iova_reserve_pci_windows(struct pci_dev *dev,unsigned long lo, hi;resource_list_for_each_entry (window, &bridge->windows) { -if (resource_type (window->res) !=IORESOURCE_MEM && -resource_type (window->res) !=IORESOURCE_IO ) +if (resource_type (window->res) !=IORESOURCE_MEM )continue ; lo =iova_pfn (iovad, window->res->start - window->offset);
drivers/md/dm-thin.c +13 -13
@@ -1094,6 +1094,19 @@ static void process_prepared_discard_passdown_pt1(struct dm_thin_new_mapping *m)return ; } +/* +* Increment the unmapped blocks. This prevents a race between the +* passdown io and reallocation of freed blocks. +*/ + r =dm_pool_inc_data_range (pool->pmd, m->data_block, data_end); +if (r) { +metadata_operation_failed (pool,"dm_pool_inc_data_range" , r); +bio_io_error (m->bio); +cell_defer_no_holder (tc, m->cell); +mempool_free (m, pool->mapping_pool); +return ; + } + discard_parent =bio_alloc (GFP_NOIO ,1 );if (!discard_parent) { DMWARN("%s: unable to allocate top level discard bio for passdown. Skipping passdown.",
@@ -1114,19 +1127,6 @@ static void process_prepared_discard_passdown_pt1(struct dm_thin_new_mapping *m)end_discard (&op, r); } } - -/* -* Increment the unmapped blocks. This prevents a race between the -* passdown io and reallocation of freed blocks. -*/ - r =dm_pool_inc_data_range (pool->pmd, m->data_block, data_end); -if (r) { -metadata_operation_failed (pool,"dm_pool_inc_data_range" , r); -bio_io_error (m->bio); -cell_defer_no_holder (tc, m->cell); -mempool_free (m, pool->mapping_pool); -return ; - } }static void process_prepared_discard_passdown_pt2 (struct dm_thin_new_mapping *m)
drivers/mtd/nand/brcmnand/brcmnand.c +58 -3
97 lines not on this page · raw message
drivers/mtd/nand/fsmc_nand.c +5 -8
@@ -150,7 +150,6 @@ struct fsmc_nand_platform_data {struct mtd_partition *partitions;unsigned int nr_partitions;unsigned int options; -unsigned int width;unsigned int bank;enum access_mode mode;
@@ -844,18 +843,19 @@ static int fsmc_nand_probe_config_dt(struct platform_device *pdev,u32 val;int ret; -/* Set default NAND width to 8 bits */ - pdata->width =8 ; + pdata->options =0 ; +if (!of_property_read_u32 (np,"bank-width" , &val)) {if (val ==2 ) { - pdata->width =16 ; + pdata->options |=NAND_BUSWIDTH_16 ; }else if (val !=1 ) {dev_err (&pdev->dev,"invalid bank-width %u\n" , val);return -EINVAL ; } } +if (of_get_property (np,"nand-skip-bbtscan" ,NULL )) - pdata->options =NAND_SKIP_BBTSCAN ; + pdata->options |=NAND_SKIP_BBTSCAN ; pdata->nand_timings =devm_kzalloc (&pdev->dev,sizeof (*pdata->nand_timings),GFP_KERNEL );
@@ -992,9 +992,6 @@ static int __init fsmc_nand_probe(struct platform_device *pdev) nand->badblockbits =7 ;nand_set_flash_node (nand, np); -if (pdata->width ==FSMC_NAND_BW16 ) - nand->options |=NAND_BUSWIDTH_16 ; -switch (host->mode) {case USE_DMA_ACCESS :dma_cap_zero (mask);
drivers/net/bonding/bond_main.c +3 -3
@@ -4163,7 +4163,6 @@ static void bond_destructor(struct net_device *bond_dev)struct bonding *bond =netdev_priv (bond_dev);if (bond->wq)destroy_workqueue (bond->wq); -free_netdev (bond_dev); }void bond_setup (struct net_device *bond_dev)
@@ -4183,7 +4182,8 @@ void bond_setup(struct net_device *bond_dev) bond_dev->netdev_ops = &bond_netdev_ops; bond_dev->ethtool_ops = &bond_ethtool_ops; - bond_dev->destructor = bond_destructor; + bond_dev->needs_free_netdev = true; + bond_dev->priv_destructor = bond_destructor;SET_NETDEV_DEVTYPE (bond_dev, &bond_type);
@@ -4689,7 +4689,7 @@ int bond_create(struct net *net, const char *name)rtnl_unlock ();if (res <0 ) -bond_destructor (bond_dev); +free_netdev (bond_dev);return res; }
drivers/net/caif/caif_hsi.c +1 -1
@@ -1121,7 +1121,7 @@ static void cfhsi_setup(struct net_device *dev) dev->flags =IFF_POINTOPOINT |IFF_NOARP ; dev->mtu =CFHSI_MAX_CAIF_FRAME_SZ ; dev->priv_flags |=IFF_NO_QUEUE ; - dev->destructor = free_netdev; + dev->needs_free_netdev = true; dev->netdev_ops = &cfhsi_netdevops;for (i =0 ; i <CFHSI_PRIO_LAST ; ++i)skb_queue_head_init (&cfhsi->qhead[i]);
drivers/net/caif/caif_serial.c +1 -1
@@ -428,7 +428,7 @@ static void caifdev_setup(struct net_device *dev) dev->flags =IFF_POINTOPOINT |IFF_NOARP ; dev->mtu =CAIF_MAX_MTU ; dev->priv_flags |=IFF_NO_QUEUE ; - dev->destructor = free_netdev; + dev->needs_free_netdev = true;skb_queue_head_init (&serdev->head); serdev->common.link_select =CAIF_LINK_LOW_LATENCY ; serdev->common.use_frag = true;
drivers/net/caif/caif_spi.c +1 -1
@@ -712,7 +712,7 @@ static void cfspi_setup(struct net_device *dev) dev->flags =IFF_NOARP |IFF_POINTOPOINT ; dev->priv_flags |=IFF_NO_QUEUE ; dev->mtu =SPI_MAX_PAYLOAD_SIZE ; - dev->destructor = free_netdev; + dev->needs_free_netdev = true;skb_queue_head_init (&cfspi->qhead);skb_queue_head_init (&cfspi->chead); cfspi->cfdev.link_select =CAIF_LINK_HIGH_BANDW ;
drivers/net/caif/caif_virtio.c +1 -1
@@ -617,7 +617,7 @@ static void cfv_netdev_setup(struct net_device *netdev) netdev->tx_queue_len =100 ; netdev->flags =IFF_POINTOPOINT |IFF_NOARP ; netdev->mtu =CFV_DEF_MTU_SIZE ; - netdev->destructor = free_netdev; + netdev->needs_free_netdev = true; }/* Create debugfs counters for the device */
drivers/net/can/slcan.c +3 -4
@@ -417,7 +417,7 @@ static int slc_open(struct net_device *dev)static void slc_free_netdev (struct net_device *dev) {int i = dev->base_addr; -free_netdev (dev); + slcan_devs[i] =NULL ; }
@@ -436,7 +436,8 @@ static const struct net_device_ops slc_netdev_ops = {static void slc_setup (struct net_device *dev) { dev->netdev_ops = &slc_netdev_ops; - dev->destructor = slc_free_netdev; + dev->needs_free_netdev = true; + dev->priv_destructor = slc_free_netdev; dev->hard_header_len =0 ; dev->addr_len =0 ;
@@ -761,8 +762,6 @@ static void __exit slcan_exit(void)if (sl->tty) {printk (KERN_ERR "%s: tty discipline still running\n" , dev->name); -/* Intentionally leak the control block. */ - dev->destructor =NULL ; }unregister_netdev (dev);
drivers/net/can/vcan.c +1 -1
@@ -160,7 +160,7 @@ static void vcan_setup(struct net_device *dev) dev->flags |=IFF_ECHO ; dev->netdev_ops = &vcan_netdev_ops; - dev->destructor = free_netdev; + dev->needs_free_netdev = true; }static struct rtnl_link_ops vcan_link_ops__read_mostly = {
drivers/net/dummy.c +2 -2
@@ -313,7 +313,6 @@ static void dummy_free_netdev(struct net_device *dev)struct dummy_priv *priv =netdev_priv (dev);kfree (priv->vfinfo); -free_netdev (dev); }static void dummy_setup (struct net_device *dev)
@@ -323,7 +322,8 @@ static void dummy_setup(struct net_device *dev)/* Initialize the device structure. */ dev->netdev_ops = &dummy_netdev_ops; dev->ethtool_ops = &dummy_ethtool_ops; - dev->destructor = dummy_free_netdev; + dev->needs_free_netdev = true; + dev->priv_destructor = dummy_free_netdev;/* Fill in device structure with ethernet-generic values. */ dev->flags |=IFF_NOARP ;
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +1 -1
@@ -4530,7 +4530,7 @@ static void dummy_setup(struct net_device *dev)/* Initialize the device structure. */ dev->netdev_ops = &cxgb4_mgmt_netdev_ops; dev->ethtool_ops = &cxgb4_mgmt_ethtool_ops; - dev->destructor = free_netdev; + dev->needs_free_netdev = true; }static int config_mgmt_dev (struct pci_dev *pdev)
drivers/net/ethernet/mellanox/mlx5/core/en.h +5 -3
@@ -313,13 +313,15 @@ struct mlx5e_dma_info {struct mlx5e_rx_am_stats {int ppms;/* packets per msec */ +int bpms;/* bytes per msec */ int epms;/* events per msec */ };struct mlx5e_rx_am_sample { -ktime_t time; -unsigned int pkt_ctr; -u16 event_ctr; +ktime_t time; +u32 pkt_ctr; +u32 byte_ctr; +u16 event_ctr; };struct mlx5e_rx_am {/* Adaptive Moderation */
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +4 -4
@@ -1205,11 +1205,11 @@ static int mlx5e_get_ts_info(struct net_device *dev,SOF_TIMESTAMPING_RX_HARDWARE |SOF_TIMESTAMPING_RAW_HARDWARE ; - info->tx_types = (BIT (1 ) <<HWTSTAMP_TX_OFF ) | - (BIT (1 ) <<HWTSTAMP_TX_ON ); + info->tx_types =BIT (HWTSTAMP_TX_OFF ) | +BIT (HWTSTAMP_TX_ON ); - info->rx_filters = (BIT (1 ) <<HWTSTAMP_FILTER_NONE ) | - (BIT (1 ) <<HWTSTAMP_FILTER_ALL ); + info->rx_filters =BIT (HWTSTAMP_FILTER_NONE ) | +BIT (HWTSTAMP_FILTER_ALL );return 0 ; }
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +2 -1
@@ -3885,7 +3885,8 @@ struct net_device *mlx5e_create_netdev(struct mlx5_core_dev *mdev,return netdev; err_cleanup_nic: - profile->cleanup (priv); +if (profile->cleanup) + profile->cleanup (priv);free_netdev (netdev);return NULL ;
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c +2 -0
@@ -424,6 +424,8 @@ static void mlx5e_build_rep_netdev_priv(struct mlx5_core_dev *mdev, priv->params.lro_wqe_sz =MLX5E_PARAMS_DEFAULT_LRO_WQE_SZ ; +mlx5_query_min_inline (mdev, &priv->params.tx_min_inline_mode); + priv->mdev = mdev; priv->netdev = netdev; priv->params.num_channels = profile->max_nch (mdev);
drivers/net/ethernet/mellanox/mlx5/core/en_rx_am.c +26 -19
84 lines not on this page · raw message
drivers/net/ethernet/mellanox/mlx5/core/en_stats.h +2 -9
@@ -417,20 +417,13 @@ struct mlx5e_stats { };static const struct counter_desc mlx5e_pme_status_desc[] = { - {"module_plug" ,0 }, {"module_unplug" ,8 }, };static const struct counter_desc mlx5e_pme_error_desc[] = { - {"module_pwr_budget_exd" ,0 },/* power budget exceed */ - {"module_long_range" ,8 },/* long range for non MLNX cable */ - {"module_bus_stuck" ,16 },/* bus stuck (I2C or data shorted) */ - {"module_no_eeprom" ,24 },/* no eeprom/retry time out */ - {"module_enforce_part" ,32 },/* enforce part number list */ - {"module_unknown_id" ,40 },/* unknown identifier */ - {"module_high_temp" ,48 },/* high temperature */ + {"module_bus_stuck" ,16 },/* bus stuck (I2C or data shorted) */ + {"module_high_temp" ,48 },/* high temperature */ {"module_bad_shorted" ,56 },/* bad or shorted cable/module */ - {"module_unknown_status" ,64 }, };#endif /* __MLX5_EN_STATS_H__ */
drivers/net/ethernet/mellanox/mlx5/core/main.c +16 -4
@@ -175,8 +175,9 @@ static struct mlx5_profile profile[] = { }, }; -#define FW_INIT_TIMEOUT_MILI 2000 -#define FW_INIT_WAIT_MS 2 +#define FW_INIT_TIMEOUT_MILI 2000 +#define FW_INIT_WAIT_MS 2 +#define FW_PRE_INIT_TIMEOUT_MILI 10000static int wait_fw_init (struct mlx5_core_dev *dev,u32 max_wait_mili) {
@@ -537,8 +538,10 @@ static int handle_hca_cap(struct mlx5_core_dev *dev)/* disable cmdif checksum */ MLX5_SET (cmd_hca_cap, set_hca_cap, cmdif_checksum,0 ); -/* If the HCA supports 4K UARs use it */ -if (MLX5_CAP_GEN_MAX (dev, uar_4k)) +/* Enable 4K UAR only when HCA supports it and page size is bigger +* than 4K. +*/ +if (MLX5_CAP_GEN_MAX (dev, uar_4k) &&PAGE_SIZE >4096 )MLX5_SET (cmd_hca_cap, set_hca_cap, uar_4k,1 );MLX5_SET (cmd_hca_cap, set_hca_cap, log_uar_page_sz,PAGE_SHIFT -12 );
@@ -1019,6 +1022,15 @@ static int mlx5_load_one(struct mlx5_core_dev *dev, struct mlx5_priv *priv,*/ dev->state =MLX5_DEVICE_STATE_UP ; +/* wait for firmware to accept initialization segments configurations +*/ + err =wait_fw_init (dev,FW_PRE_INIT_TIMEOUT_MILI ); +if (err) { +dev_err (&dev->pdev->dev,"Firmware over %d MS in pre-initializing state, aborting\n" , +FW_PRE_INIT_TIMEOUT_MILI ); + goto out; + } + err =mlx5_cmd_init (dev);if (err) {dev_err (&pdev->dev,"Failed initializing command interface, aborting\n" );
drivers/net/geneve.c +1 -1
@@ -1007,7 +1007,7 @@ static void geneve_setup(struct net_device *dev) dev->netdev_ops = &geneve_netdev_ops; dev->ethtool_ops = &geneve_ethtool_ops; - dev->destructor = free_netdev; + dev->needs_free_netdev = true;SET_NETDEV_DEVTYPE (dev, &geneve_type);
drivers/net/gtp.c +1 -1
@@ -618,7 +618,7 @@ static const struct net_device_ops gtp_netdev_ops = {static void gtp_link_setup (struct net_device *dev) { dev->netdev_ops = >p_netdev_ops; - dev->destructor = free_netdev; + dev->needs_free_netdev = true; dev->hard_header_len =0 ; dev->addr_len =0 ;
drivers/net/hamradio/6pack.c +1 -1
@@ -311,7 +311,7 @@ static void sp_setup(struct net_device *dev) {/* Finish setting up the DEVICE info. */ dev->netdev_ops = &sp_netdev_ops; - dev->destructor = free_netdev; + dev->needs_free_netdev = true; dev->mtu =SIXP_MTU ; dev->hard_header_len =AX25_MAX_HEADER_LEN ; dev->header_ops = &ax25_header_ops;
drivers/net/hamradio/bpqether.c +1 -1
@@ -476,7 +476,7 @@ static const struct net_device_ops bpq_netdev_ops = {static void bpq_setup (struct net_device *dev) { dev->netdev_ops = &bpq_netdev_ops; - dev->destructor = free_netdev; + dev->needs_free_netdev = true;memcpy (dev->broadcast, &ax25_bcast,AX25_ADDR_LEN );memcpy (dev->dev_addr, &ax25_defaddr,AX25_ADDR_LEN );
drivers/net/ifb.c +2 -2
@@ -207,7 +207,6 @@ static void ifb_dev_free(struct net_device *dev)__skb_queue_purge (&txp->tq); }kfree (dp->tx_private); -free_netdev (dev); }static void ifb_setup (struct net_device *dev)
@@ -230,7 +229,8 @@ static void ifb_setup(struct net_device *dev) dev->priv_flags &= ~IFF_TX_SKB_SHARING ;netif_keep_dst (dev);eth_hw_addr_random (dev); - dev->destructor = ifb_dev_free; + dev->needs_free_netdev = true; + dev->priv_destructor = ifb_dev_free; }static netdev_tx_t ifb_xmit (struct sk_buff *skb,struct net_device *dev)
drivers/net/ipvlan/ipvlan_main.c +1 -1
@@ -621,7 +621,7 @@ void ipvlan_link_setup(struct net_device *dev) dev->priv_flags &= ~(IFF_XMIT_DST_RELEASE |IFF_TX_SKB_SHARING ); dev->priv_flags |=IFF_UNICAST_FLT |IFF_NO_QUEUE ; dev->netdev_ops = &ipvlan_netdev_ops; - dev->destructor = free_netdev; + dev->needs_free_netdev = true; dev->header_ops = &ipvlan_header_ops; dev->ethtool_ops = &ipvlan_ethtool_ops; }
drivers/net/loopback.c +2 -2
@@ -145,7 +145,6 @@ static void loopback_dev_free(struct net_device *dev) {dev_net (dev)->loopback_dev =NULL ;free_percpu (dev->lstats); -free_netdev (dev); }static const struct net_device_ops loopback_ops = {
@@ -183,7 +182,8 @@ static void loopback_setup(struct net_device *dev) dev->ethtool_ops = &loopback_ethtool_ops; dev->header_ops = ð_header_ops; dev->netdev_ops = &loopback_ops; - dev->destructor = loopback_dev_free; + dev->needs_free_netdev = true; + dev->priv_destructor = loopback_dev_free; }/* Setup and register the loopback device. */
drivers/net/macsec.c +2 -2
@@ -2994,7 +2994,6 @@ static void macsec_free_netdev(struct net_device *dev)free_percpu (macsec->secy.tx_sc.stats);dev_put (real_dev); -free_netdev (dev); }static void macsec_setup (struct net_device *dev)
@@ -3004,7 +3003,8 @@ static void macsec_setup(struct net_device *dev) dev->max_mtu =ETH_MAX_MTU ; dev->priv_flags |=IFF_NO_QUEUE ; dev->netdev_ops = &macsec_netdev_ops; - dev->destructor = macsec_free_netdev; + dev->needs_free_netdev = true; + dev->priv_destructor = macsec_free_netdev;SET_NETDEV_DEVTYPE (dev, &macsec_type);eth_zero_addr (dev->broadcast);
drivers/net/macvlan.c +1 -1
@@ -1089,7 +1089,7 @@ void macvlan_common_setup(struct net_device *dev)netif_keep_dst (dev); dev->priv_flags |=IFF_UNICAST_FLT ; dev->netdev_ops = &macvlan_netdev_ops; - dev->destructor = free_netdev; + dev->needs_free_netdev = true; dev->header_ops = &macvlan_hard_header_ops; dev->ethtool_ops = &macvlan_ethtool_ops; }
drivers/net/nlmon.c +1 -1
@@ -113,7 +113,7 @@ static void nlmon_setup(struct net_device *dev) dev->netdev_ops = &nlmon_ops; dev->ethtool_ops = &nlmon_ethtool_ops; - dev->destructor = free_netdev; + dev->needs_free_netdev = true; dev->features =NETIF_F_SG |NETIF_F_FRAGLIST |NETIF_F_HIGHDMA |NETIF_F_LLTX ;
drivers/net/slip/slip.c +3 -4
@@ -629,7 +629,7 @@ static void sl_uninit(struct net_device *dev)static void sl_free_netdev (struct net_device *dev) {int i = dev->base_addr; -free_netdev (dev); + slip_devs[i] =NULL ; }
@@ -651,7 +651,8 @@ static const struct net_device_ops sl_netdev_ops = {static void sl_setup (struct net_device *dev) { dev->netdev_ops = &sl_netdev_ops; - dev->destructor = sl_free_netdev; + dev->needs_free_netdev = true; + dev->priv_destructor = sl_free_netdev; dev->hard_header_len =0 ; dev->addr_len =0 ;
@@ -1369,8 +1370,6 @@ static void __exit slip_exit(void)if (sl->tty) {printk (KERN_ERR "%s: tty discipline still running\n" , dev->name); -/* Intentionally leak the control block. */ - dev->destructor =NULL ; }unregister_netdev (dev);
drivers/net/team/team.c +2 -2
@@ -1643,7 +1643,6 @@ static void team_destructor(struct net_device *dev)struct team *team =netdev_priv (dev);free_percpu (team->pcpu_stats); -free_netdev (dev); }static int team_open (struct net_device *dev)
@@ -2079,7 +2078,8 @@ static void team_setup(struct net_device *dev) dev->netdev_ops = &team_netdev_ops; dev->ethtool_ops = &team_ethtool_ops; - dev->destructor = team_destructor; + dev->needs_free_netdev = true; + dev->priv_destructor = team_destructor; dev->priv_flags &= ~(IFF_XMIT_DST_RELEASE |IFF_TX_SKB_SHARING ); dev->priv_flags |=IFF_NO_QUEUE ; dev->priv_flags |=IFF_TEAM ;
drivers/net/tun.c +2 -2
@@ -1560,7 +1560,6 @@ static void tun_free_netdev(struct net_device *dev)free_percpu (tun->pcpu_stats);tun_flow_uninit (tun);security_tun_dev_free_security (tun->security); -free_netdev (dev); }static void tun_setup (struct net_device *dev)
@@ -1571,7 +1570,8 @@ static void tun_setup(struct net_device *dev) tun->group =INVALID_GID ; dev->ethtool_ops = &tun_ethtool_ops; - dev->destructor = tun_free_netdev; + dev->needs_free_netdev = true; + dev->priv_destructor = tun_free_netdev;/* We prefer our own queue length */ dev->tx_queue_len =TUN_READQ_SIZE ; }
drivers/net/usb/cdc-phonet.c +1 -1
@@ -298,7 +298,7 @@ static void usbpn_setup(struct net_device *dev) dev->addr_len =1 ; dev->tx_queue_len =3 ; - dev->destructor = free_netdev; + dev->needs_free_netdev = true; }/*
drivers/net/usb/qmi_wwan.c +4 -0
@@ -898,6 +898,8 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x1199, 0x9056, 8)}, /* Sierra Wireless Modem */ {QMI_FIXED_INTF(0x1199, 0x9057, 8)}, {QMI_FIXED_INTF(0x1199, 0x9061, 8)}, /* Sierra Wireless Modem */ + {QMI_FIXED_INTF(0x1199, 0x9063, 8)}, /* Sierra Wireless EM7305 */ + {QMI_FIXED_INTF(0x1199, 0x9063, 10)}, /* Sierra Wireless EM7305 */ {QMI_FIXED_INTF(0x1199, 0x9071, 8)}, /* Sierra Wireless MC74xx */ {QMI_FIXED_INTF(0x1199, 0x9071, 10)}, /* Sierra Wireless MC74xx */ {QMI_FIXED_INTF(0x1199, 0x9079, 8)}, /* Sierra Wireless EM74xx */
@@ -912,6 +914,8 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x1bc7, 0x1100, 3)}, /* Telit ME910 */ {QMI_FIXED_INTF(0x1bc7, 0x1200, 5)}, /* Telit LE920 */ {QMI_QUIRK_SET_DTR(0x1bc7, 0x1201, 2)}, /* Telit LE920, LE920A4 */ + {QMI_FIXED_INTF(0x1c9e, 0x9801, 3)}, /* Telewell TW-3G HSPA+ */ + {QMI_FIXED_INTF(0x1c9e, 0x9803, 4)}, /* Telewell TW-3G HSPA+ */ {QMI_FIXED_INTF(0x1c9e, 0x9b01, 3)}, /* XS Stick W100-2 from 4G Systems */ {QMI_FIXED_INTF(0x0b3c, 0xc000, 4)}, /* Olivetti Olicard 100 */ {QMI_FIXED_INTF(0x0b3c, 0xc001, 4)}, /* Olivetti Olicard 120 */
drivers/net/veth.c +2 -2
@@ -227,7 +227,6 @@ static int veth_dev_init(struct net_device *dev)static void veth_dev_free (struct net_device *dev) {free_percpu (dev->vstats); -free_netdev (dev); }#ifdef CONFIG_NET_POLL_CONTROLLER
@@ -322,7 +321,8 @@ static void veth_setup(struct net_device *dev)NETIF_F_HW_VLAN_STAG_TX |NETIF_F_HW_VLAN_CTAG_RX | NETIF_F_HW_VLAN_STAG_RX); - dev->destructor = veth_dev_free; + dev->needs_free_netdev = true; + dev->priv_destructor = veth_dev_free; dev->max_mtu =ETH_MAX_MTU ; dev->hw_features =VETH_FEATURES ;
drivers/net/vrf.c +33 -5
@@ -36,12 +36,14 @@#include <net/addrconf.h> #include <net/l3mdev.h> #include <net/fib_rules.h> +#include <net/netns/generic.h> #define DRV_NAME "vrf"#define DRV_VERSION "1.0"#define FIB_RULE_PREF 1000/* default preference for FIB rules */ -static bool add_fib_rules = true; + +static unsigned int vrf_net_id;struct net_vrf {struct rtable __rcu *rth;
@@ -1206,7 +1208,7 @@ static void vrf_setup(struct net_device *dev) dev->netdev_ops = &vrf_netdev_ops; dev->l3mdev_ops = &vrf_l3mdev_ops; dev->ethtool_ops = &vrf_ethtool_ops; - dev->destructor = free_netdev; + dev->needs_free_netdev = true;/* Fill in device structure with ethernet-generic values. */ eth_hw_addr_random (dev);
@@ -1252,6 +1254,8 @@ static int vrf_newlink(struct net *src_net, struct net_device *dev, struct nlattr *tb[], struct nlattr *data[]) { struct net_vrf *vrf = netdev_priv(dev); +bool *add_fib_rules; +struct net *net;int err;if (!data || !data[IFLA_VRF_TABLE ])
@@ -1267,13 +1271,15 @@ static int vrf_newlink(struct net *src_net, struct net_device *dev,if (err) goto out; -if (add_fib_rules) { + net =dev_net (dev); + add_fib_rules =net_generic (net, vrf_net_id); +if (*add_fib_rules) { err =vrf_add_fib_rules (dev);if (err) {unregister_netdevice (dev); goto out; } - add_fib_rules = false; + *add_fib_rules = false; } out:
@@ -1356,16 +1362,38 @@ static struct notifier_block vrf_notifier_block __read_mostly = { .notifier_call = vrf_device_event, }; +/* Initialize per network namespace state */ +static int __net_init vrf_netns_init (struct net *net) +{ +bool *add_fib_rules =net_generic (net, vrf_net_id); + + *add_fib_rules = true; + +return 0 ; +} + +static struct pernet_operations vrf_net_ops__net_initdata = { + .init = vrf_netns_init, + .id = &vrf_net_id, + .size =sizeof (bool ), +}; +static int __init vrf_init_module (void ) {int rc;register_netdevice_notifier (&vrf_notifier_block); - rc =rtnl_link_register (&vrf_link_ops); + rc =register_pernet_subsys (&vrf_net_ops);if (rc <0 ) goto error; + rc =rtnl_link_register (&vrf_link_ops); +if (rc <0 ) { +unregister_pernet_subsys (&vrf_net_ops); + goto error; + } +return 0 ; error:
drivers/net/vxlan.c +1 -1
@@ -2607,7 +2607,7 @@ static void vxlan_setup(struct net_device *dev)eth_hw_addr_random (dev);ether_setup (dev); - dev->destructor = free_netdev; + dev->needs_free_netdev = true;SET_NETDEV_DEVTYPE (dev, &vxlan_type); dev->features |=NETIF_F_LLTX ;
drivers/net/wan/dlci.c +1 -1
@@ -475,7 +475,7 @@ static void dlci_setup(struct net_device *dev) dev->flags =0 ; dev->header_ops = &dlci_header_ops; dev->netdev_ops = &dlci_netdev_ops; - dev->destructor = free_netdev; + dev->needs_free_netdev = true; dlp->receive = dlci_receive;
drivers/net/wan/hdlc_fr.c +1 -1
@@ -1106,7 +1106,7 @@ static int fr_add_pvc(struct net_device *frad, unsigned int dlci, int type)return -EIO ; } - dev->destructor = free_netdev; + dev->needs_free_netdev = true; *get_dev_p (pvc, type) = dev;if (!used) {state (hdlc)->dce_changed =1 ;
drivers/net/wan/lapbether.c +1 -1
@@ -306,7 +306,7 @@ static const struct net_device_ops lapbeth_netdev_ops = {static void lapbeth_setup (struct net_device *dev) { dev->netdev_ops = &lapbeth_netdev_ops; - dev->destructor = free_netdev; + dev->needs_free_netdev = true; dev->type =ARPHRD_X25 ; dev->hard_header_len =3 ; dev->mtu =1000 ;
drivers/net/wireless/ath/ath6kl/main.c +1 -1
@@ -1287,7 +1287,7 @@ void init_netdev(struct net_device *dev)struct ath6kl *ar =ath6kl_priv (dev); dev->netdev_ops = &ath6kl_netdev_ops; - dev->destructor = free_netdev; + dev->needs_free_netdev = true; dev->watchdog_timeo =ATH6KL_TX_TIMEOUT ; dev->needed_headroom =ETH_HLEN ;
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +0 -1
@@ -5209,7 +5209,6 @@ void brcmf_cfg80211_free_netdev(struct net_device *ndev)if (vif)brcmf_free_vif (vif); -free_netdev (ndev); }static bool brcmf_is_linkup (const struct brcmf_event_msg *e)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +2 -1
@@ -652,7 +652,8 @@ struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bsscfgidx, s32 ifidx,if (!ndev)return ERR_PTR (-ENOMEM ); - ndev->destructor = brcmf_cfg80211_free_netdev; + ndev->needs_free_netdev = true; + ndev->priv_destructor = brcmf_cfg80211_free_netdev; ifp =netdev_priv (ndev); ifp->ndev = ndev;/* store mapping ifidx to bsscfgidx */
drivers/net/wireless/intersil/hostap/hostap_main.c +1 -1
@@ -73,7 +73,7 @@ struct net_device * hostap_add_interface(struct local_info *local, dev->mem_end = mdev->mem_end;hostap_setup_dev (dev, local, type); - dev->destructor = free_netdev; + dev->needs_free_netdev = true;sprintf (dev->name,"%s%s" , prefix, name);if (!rtnl_locked)
drivers/net/wireless/mac80211_hwsim.c +1 -1
@@ -2807,7 +2807,7 @@ static const struct net_device_ops hwsim_netdev_ops = {static void hwsim_mon_setup (struct net_device *dev) { dev->netdev_ops = &hwsim_netdev_ops; - dev->destructor = free_netdev; + dev->needs_free_netdev = true;ether_setup (dev); dev->priv_flags |=IFF_NO_QUEUE ; dev->type =ARPHRD_IEEE80211_RADIOTAP ;
drivers/net/wireless/marvell/mwifiex/main.c +1 -1
@@ -1277,7 +1277,7 @@ void mwifiex_init_priv_params(struct mwifiex_private *priv, struct net_device *dev) { dev->netdev_ops = &mwifiex_netdev_ops; - dev->destructor = free_netdev; + dev->needs_free_netdev = true;/* Initialize private structure */ priv->current_key_index =0 ; priv->media_connected = false;
drivers/pinctrl/pinctrl-amd.c +41 -50
115 lines not on this page · raw message
drivers/s390/net/netiucv.c +2 -2
@@ -1954,7 +1954,6 @@ static void netiucv_free_netdevice(struct net_device *dev) privptr->conn =NULL ; privptr->fsm =NULL ;/* privptr gets freed by free_netdev() */ } -free_netdev (dev); }/**
@@ -1972,7 +1971,8 @@ static void netiucv_setup_netdevice(struct net_device *dev) dev->mtu =NETIUCV_MTU_DEFAULT ; dev->min_mtu =576 ; dev->max_mtu =NETIUCV_MTU_MAX ; - dev->destructor = netiucv_free_netdevice; + dev->needs_free_netdev = true; + dev->priv_destructor = netiucv_free_netdevice; dev->hard_header_len =NETIUCV_HDRLEN ; dev->addr_len =0 ; dev->type =ARPHRD_SLIP ;
drivers/staging/rtl8188eu/os_dep/mon.c +1 -1
@@ -152,7 +152,7 @@ static const struct net_device_ops mon_netdev_ops = {static void mon_setup (struct net_device *dev) { dev->netdev_ops = &mon_netdev_ops; - dev->destructor = free_netdev; + dev->needs_free_netdev = true;ether_setup (dev); dev->priv_flags |=IFF_NO_QUEUE ; dev->type =ARPHRD_IEEE80211 ;
drivers/usb/gadget/function/f_phonet.c +1 -1
@@ -281,7 +281,7 @@ static void pn_net_setup(struct net_device *dev) dev->tx_queue_len =1 ; dev->netdev_ops = &pn_netdev_ops; - dev->destructor = free_netdev; + dev->needs_free_netdev = true; dev->header_ops = &phonet_header_ops; }
drivers/watchdog/bcm_kona_wdt.c +2 -1
@@ -304,6 +304,8 @@ static int bcm_kona_wdt_probe(struct platform_device *pdev)if (!wdt)return -ENOMEM ; +spin_lock_init (&wdt->lock); + res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); wdt->base =devm_ioremap_resource (dev, res);if (IS_ERR (wdt->base))
@@ -316,7 +318,6 @@ static int bcm_kona_wdt_probe(struct platform_device *pdev)return ret; } -spin_lock_init (&wdt->lock);platform_set_drvdata (pdev, wdt);watchdog_set_drvdata (&bcm_kona_wdt_wdd, wdt); bcm_kona_wdt_wdd.parent = &pdev->dev;
fs/nfs/callback.c +1 -1
@@ -280,7 +280,7 @@ static struct svc_serv *nfs_callback_create_svc(int minorversion)printk (KERN_WARNING "nfs_callback_create_svc: no kthread, %d users??\n" , cb_info->users); - serv =svc_create (&nfs4_callback_program,NFS4_CALLBACK_BUFSIZE , sv_ops); + serv =svc_create_pooled (&nfs4_callback_program,NFS4_CALLBACK_BUFSIZE , sv_ops);if (!serv) {printk (KERN_ERR "nfs_callback_create_svc: create service failed\n" );return ERR_PTR (-ENOMEM );
fs/nfs/dir.c +24 -27
91 lines not on this page · raw message
fs/nfs/nfs4proc.c +3 -2
@@ -2588,7 +2588,8 @@ static inline void nfs4_exclusive_attrset(struct nfs4_opendata *opendata,/* Except MODE, it seems harmless of setting twice. */ if (opendata->o_arg.createmode !=NFS4_CREATE_EXCLUSIVE && - attrset[1 ] &FATTR4_WORD1_MODE ) + (attrset[1 ] &FATTR4_WORD1_MODE || + attrset[2 ] &FATTR4_WORD2_MODE_UMASK )) sattr->ia_valid &= ~ATTR_MODE ;if (attrset[2 ] &FATTR4_WORD2_SECURITY_LABEL )
@@ -8429,6 +8430,7 @@ static void nfs4_layoutget_release(void *calldata)size_t max_pages =max_response_pages (server);dprintk ("--> %s\n" , __func__); +nfs4_sequence_free_slot (&lgp->res.seq_res);nfs4_free_pages (lgp->args.layout.pages, max_pages);pnfs_put_layout_hdr (NFS_I (inode)->layout);put_nfs_open_context (lgp->args.ctx);
@@ -8503,7 +8505,6 @@ nfs4_proc_layoutget(struct nfs4_layoutget *lgp, long *timeout, gfp_t gfp_flags)/* if layoutp->len is 0, nfs4_layoutget_prepare called rpc_exit */ if (status ==0 && lgp->res.layoutp->len) lseg =pnfs_layout_process (lgp); -nfs4_sequence_free_slot (&lgp->res.seq_res);rpc_put_task (task);dprintk ("<-- %s status=%d\n" , __func__, status);if (status)
fs/ocfs2/cluster/heartbeat.c +4 -4
@@ -2242,13 +2242,13 @@ static void o2hb_heartbeat_group_drop_item(struct config_group *group,spin_unlock (&o2hb_live_lock); } -static ssize_t o2hb_heartbeat_group_threshold_show (struct config_item *item, +static ssize_t o2hb_heartbeat_group_dead_threshold_show (struct config_item *item,char *page) {return sprintf (page,"%u\n" , o2hb_dead_threshold); } -static ssize_t o2hb_heartbeat_group_threshold_store (struct config_item *item, +static ssize_t o2hb_heartbeat_group_dead_threshold_store (struct config_item *item,const char *page,size_t count) {unsigned long tmp;
@@ -2297,11 +2297,11 @@ static ssize_t o2hb_heartbeat_group_mode_store(struct config_item *item, } -CONFIGFS_ATTR (o2hb_heartbeat_group_, threshold); +CONFIGFS_ATTR (o2hb_heartbeat_group_, dead_threshold);CONFIGFS_ATTR (o2hb_heartbeat_group_, mode);static struct configfs_attribute *o2hb_heartbeat_group_attrs[] = { - &o2hb_heartbeat_group_attr_threshold, + &o2hb_heartbeat_group_attr_dead_threshold, &o2hb_heartbeat_group_attr_mode,NULL , };
fs/ocfs2/dlmglue.c +4 -0
@@ -2591,6 +2591,10 @@ void ocfs2_inode_unlock_tracker(struct inode *inode,struct ocfs2_lock_res *lockres; lockres = &OCFS2_I (inode)->ip_inode_lockres; +/* had_lock means that the currect process already takes the cluster +* lock previously. If had_lock is 1, we have nothing to do here, and +* it will get unlocked where we got the lock. +*/ if (!had_lock) {ocfs2_remove_holder (lockres, oh);ocfs2_inode_unlock (inode, ex);
fs/ocfs2/xattr.c +13 -10
@@ -1328,20 +1328,21 @@ static int ocfs2_xattr_get(struct inode *inode,void *buffer, size_t buffer_size) { - int ret; + int ret, had_lock;struct buffer_head *di_bh =NULL ; +struct ocfs2_lock_holder oh; - ret =ocfs2_inode_lock (inode, &di_bh,0 ); -if (ret <0 ) { -mlog_errno (ret); -return ret; + had_lock =ocfs2_inode_lock_tracker (inode, &di_bh,0 , &oh); +if (had_lock <0 ) { +mlog_errno (had_lock); +return had_lock; }down_read (&OCFS2_I (inode)->ip_xattr_sem); ret =ocfs2_xattr_get_nolock (inode, di_bh, name_index, name, buffer, buffer_size);up_read (&OCFS2_I (inode)->ip_xattr_sem); -ocfs2_inode_unlock (inode,0 ); +ocfs2_inode_unlock_tracker (inode,0 , &oh, had_lock);brelse (di_bh);
@@ -3537,11 +3538,12 @@ int ocfs2_xattr_set(struct inode *inode, {struct buffer_head *di_bh =NULL ;struct ocfs2_dinode *di; -int ret, credits, ref_meta =0 , ref_credits =0 ; +int ret, credits, had_lock, ref_meta =0 , ref_credits =0 ;struct ocfs2_super *osb =OCFS2_SB (inode->i_sb);struct inode *tl_inode = osb->osb_tl_inode;struct ocfs2_xattr_set_ctxt ctxt = {NULL ,NULL ,NULL , };struct ocfs2_refcount_tree *ref_tree =NULL ; +struct ocfs2_lock_holder oh;struct ocfs2_xattr_info xi = { .xi_name_index = name_index,
@@ -3572,8 +3574,9 @@ int ocfs2_xattr_set(struct inode *inode,return -ENOMEM ; } - ret =ocfs2_inode_lock (inode, &di_bh,1 ); -if (ret <0 ) { + had_lock =ocfs2_inode_lock_tracker (inode, &di_bh,1 , &oh); +if (had_lock <0 ) { + ret = had_lock;mlog_errno (ret); goto cleanup_nolock; }
@@ -3670,7 +3673,7 @@ int ocfs2_xattr_set(struct inode *inode,if (ret)mlog_errno (ret); } -ocfs2_inode_unlock (inode,1 ); +ocfs2_inode_unlock_tracker (inode,1 , &oh, had_lock); cleanup_nolock:brelse (di_bh);brelse (xbs.xattr_bh);
fs/overlayfs/copy_up.c +12 -12
@@ -252,15 +252,9 @@ static int ovl_copy_up_locked(struct dentry *workdir, struct dentry *upperdir, .link = link }; - upper =lookup_one_len (dentry->d_name.name, upperdir, - dentry->d_name.len); - err =PTR_ERR (upper); -if (IS_ERR (upper)) - goto out; - err =security_inode_copy_up (dentry, &new_creds);if (err <0 ) - goto out1; + goto out;if (new_creds) old_creds =override_creds (new_creds);
@@ -284,7 +278,7 @@ static int ovl_copy_up_locked(struct dentry *workdir, struct dentry *upperdir, }if (err) - goto out2; + goto out;if (S_ISREG (stat->mode)) {struct path upperpath;
@@ -317,6 +311,14 @@ static int ovl_copy_up_locked(struct dentry *workdir, struct dentry *upperdir,if (err) goto out_cleanup; + upper =lookup_one_len (dentry->d_name.name, upperdir, + dentry->d_name.len); +if (IS_ERR (upper)) { + err =PTR_ERR (upper); + upper =NULL ; + goto out_cleanup; + } +if (tmpfile) err =ovl_do_link (temp, udir, upper, true);else
@@ -330,17 +332,15 @@ static int ovl_copy_up_locked(struct dentry *workdir, struct dentry *upperdir,/* Restore timestamps on parent (best effort) */ ovl_set_timestamps (upperdir, pstat); -out2: +out:dput (temp); -out1:dput (upper); -out:return err; out_cleanup:if (!tmpfile)ovl_cleanup (wdir, temp); - goto out2; + goto out; }/*
include/linux/netdevice.h +9 -3
@@ -1581,8 +1581,8 @@ enum netdev_priv_flags {* @rtnl_link_state: This enum represents the phases of creating * a new link * -* @destructor: Called from unregister, -* can be used to call free_netdev +* @needs_free_netdev: Should unregister perform free_netdev? +* @priv_destructor: Called from unregister * @npinfo: XXX: need comments on this one * @nd_net: Network namespace this network device is inside *
@@ -1838,7 +1838,8 @@ struct net_device { RTNL_LINK_INITIALIZING, } rtnl_link_state:16 ; -void (*destructor)(struct net_device *dev); +bool needs_free_netdev; +void (*priv_destructor)(struct net_device *dev);#ifdef CONFIG_NETPOLL struct netpoll_info __rcu *npinfo;
@@ -4231,6 +4232,11 @@ static inline const char *netdev_name(const struct net_device *dev)return dev->name; } +static inline bool netdev_unregistering (const struct net_device *dev) +{ +return dev->reg_state ==NETREG_UNREGISTERING ; +} +static inline const char *netdev_reg_state (const struct net_device *dev) {switch (dev->reg_state) {
include/net/xfrm.h +0 -10
@@ -945,10 +945,6 @@ struct xfrm_dst {struct flow_cache_object flo;struct xfrm_policy *pols[XFRM_POLICY_TYPE_MAX ];int num_pols, num_xfrms; -#ifdef CONFIG_XFRM_SUB_POLICY -struct flowi *origin; -struct xfrm_selector *partner; -#endif u32 xfrm_genid;u32 policy_genid;u32 route_mtu_cached;
@@ -964,12 +960,6 @@ static inline void xfrm_dst_destroy(struct xfrm_dst *xdst)dst_release (xdst->route);if (likely (xdst->u.dst.xfrm)) xfrm_state_put(xdst->u.dst.xfrm); -#ifdef CONFIG_XFRM_SUB_POLICY -kfree (xdst->origin); - xdst->origin =NULL ; -kfree (xdst->partner); - xdst->partner =NULL ; -#endif }#endif
mm/vmalloc.c +13 -2
@@ -287,10 +287,21 @@ struct page *vmalloc_to_page(const void *vmalloc_addr)if (p4d_none (*p4d))return NULL ; pud =pud_offset (p4d, addr); -if (pud_none (*pud)) + +/* +* Don't dereference bad PUD or PMD (below) entries. This will also +* identify huge mappings, which we may encounter on architectures +* that define CONFIG_HAVE_ARCH_HUGE_VMAP=y. Such regions will be +* identified as vmalloc addresses by is_vmalloc_addr(), but are +* not [unambiguously] associated with a struct page, so there is +* no correct value to return for them. +*/ +WARN_ON_ONCE (pud_bad (*pud)); +if (pud_none (*pud) ||pud_bad (*pud))return NULL ; pmd =pmd_offset (pud, addr); -if (pmd_none (*pmd)) +WARN_ON_ONCE (pmd_bad (*pmd)); +if (pmd_none (*pmd) ||pmd_bad (*pmd))return NULL ; ptep =pte_offset_map (pmd, addr);
net/8021q/vlan.c +2 -1
@@ -277,7 +277,8 @@ static int register_vlan_device(struct net_device *real_dev, u16 vlan_id)return 0 ; out_free_newdev: -free_netdev (new_dev); +if (new_dev->reg_state ==NETREG_UNINITIALIZED ) +free_netdev (new_dev);return err; }
net/8021q/vlan_dev.c +2 -2
@@ -807,7 +807,6 @@ static void vlan_dev_free(struct net_device *dev)free_percpu (vlan->vlan_pcpu_stats); vlan->vlan_pcpu_stats =NULL ; -free_netdev (dev); }void vlan_setup (struct net_device *dev)
@@ -820,7 +819,8 @@ void vlan_setup(struct net_device *dev)netif_keep_dst (dev); dev->netdev_ops = &vlan_netdev_ops; - dev->destructor = vlan_dev_free; + dev->needs_free_netdev = true; + dev->priv_destructor = vlan_dev_free; dev->ethtool_ops = &vlan_ethtool_ops; dev->min_mtu =0 ;
net/batman-adv/soft-interface.c +2 -3
@@ -961,8 +961,6 @@ static void batadv_softif_free(struct net_device *dev)* netdev and its private data (bat_priv) */ rcu_barrier (); - -free_netdev (dev); }/**
@@ -976,7 +974,8 @@ static void batadv_softif_init_early(struct net_device *dev)ether_setup (dev); dev->netdev_ops = &batadv_netdev_ops; - dev->destructor = batadv_softif_free; + dev->needs_free_netdev = true; + dev->priv_destructor = batadv_softif_free; dev->features |=NETIF_F_HW_VLAN_CTAG_FILTER |NETIF_F_NETNS_LOCAL ; dev->priv_flags |=IFF_NO_QUEUE ;
net/bluetooth/6lowpan.c +1 -1
@@ -653,7 +653,7 @@ static void netdev_setup(struct net_device *dev) dev->netdev_ops = &netdev_ops; dev->header_ops = &header_ops; - dev->destructor = free_netdev; + dev->needs_free_netdev = true; }static struct device_type bt_type = {
net/bridge/br_device.c +1 -1
@@ -379,7 +379,7 @@ void br_dev_setup(struct net_device *dev)ether_setup (dev); dev->netdev_ops = &br_netdev_ops; - dev->destructor = free_netdev; + dev->needs_free_netdev = true; dev->ethtool_ops = &br_ethtool_ops;SET_NETDEV_DEVTYPE (dev, &br_type); dev->priv_flags =IFF_EBRIDGE |IFF_NO_QUEUE ;
net/caif/cfpkt_skbuff.c +1 -5
@@ -81,11 +81,7 @@ static struct cfpkt *cfpkt_create_pfx(u16 len, u16 pfx) {struct sk_buff *skb; -if (likely (in_interrupt ())) - skb =alloc_skb (len + pfx,GFP_ATOMIC ); -else - skb =alloc_skb (len + pfx,GFP_KERNEL ); - + skb =alloc_skb (len + pfx,GFP_ATOMIC );if (unlikely (skb ==NULL ))return NULL ;
net/caif/chnl_net.c +2 -2
@@ -392,14 +392,14 @@ static void chnl_net_destructor(struct net_device *dev) {struct chnl_net *priv =netdev_priv (dev);caif_free_client (&priv->chnl); -free_netdev (dev); }static void ipcaif_net_setup (struct net_device *dev) {struct chnl_net *priv; dev->netdev_ops = &netdev_ops; - dev->destructor = chnl_net_destructor; + dev->needs_free_netdev = true; + dev->priv_destructor = chnl_net_destructor; dev->flags |=IFF_NOARP ; dev->flags |=IFF_POINTOPOINT ; dev->mtu =GPRS_PDP_MTU ;
net/core/dev.c +8 -3
@@ -1251,8 +1251,9 @@ int dev_set_alias(struct net_device *dev, const char *alias, size_t len)if (!new_ifalias)return -ENOMEM ; dev->ifalias = new_ifalias; +memcpy (dev->ifalias, alias, len); + dev->ifalias[len] =0 ; -strlcpy (dev->ifalias, alias, len+1 );return len; }
@@ -7345,6 +7346,8 @@ int register_netdevice(struct net_device *dev) err_uninit:if (dev->netdev_ops->ndo_uninit) dev->netdev_ops->ndo_uninit (dev); +if (dev->priv_destructor) + dev->priv_destructor (dev); goto out; }EXPORT_SYMBOL (register_netdevice);
@@ -7552,8 +7555,10 @@ void netdev_run_todo(void)WARN_ON (rcu_access_pointer (dev->ip6_ptr));WARN_ON (dev->dn_ptr); -if (dev->destructor) - dev->destructor (dev); +if (dev->priv_destructor) + dev->priv_destructor (dev); +if (dev->needs_free_netdev) +free_netdev (dev);/* Report a network device has been unregistered */ rtnl_lock ();
net/core/dst.c +14 -0
@@ -469,6 +469,20 @@ static int dst_dev_event(struct notifier_block *this, unsigned long event,spin_lock_bh (&dst_garbage.lock); dst = dst_garbage.list; dst_garbage.list =NULL ; +/* The code in dst_ifdown places a hold on the loopback device. +* If the gc entry processing is set to expire after a lengthy +* interval, this hold can cause netdev_wait_allrefs() to hang +* out and wait for a long time -- until the the loopback +* interface is released. If we're really unlucky, it'll emit +* pr_emerg messages to console too. Reset the interval here, +* so dst cleanups occur in a more timely fashion. +*/ +if (dst_garbage.timer_inc >DST_GC_INC ) { + dst_garbage.timer_inc =DST_GC_INC ; + dst_garbage.timer_expires =DST_GC_MIN ; +mod_delayed_work (system_wq, &dst_gc_work, + dst_garbage.timer_expires); + }spin_unlock_bh (&dst_garbage.lock);if (last)
net/core/rtnetlink.c +4 -1
@@ -934,6 +934,7 @@ static noinline size_t if_nlmsg_size(const struct net_device *dev, +nla_total_size (1 )/* IFLA_LINKMODE */ +nla_total_size (4 )/* IFLA_CARRIER_CHANGES */ +nla_total_size (4 )/* IFLA_LINK_NETNSID */ + +nla_total_size (4 )/* IFLA_GROUP */ +nla_total_size (ext_filter_mask &RTEXT_FILTER_VF ?4 :0 )/* IFLA_NUM_VF */ +rtnl_vfinfo_size (dev, ext_filter_mask)/* IFLA_VFINFO_LIST */
@@ -1127,6 +1128,8 @@ static noinline_for_stack int rtnl_fill_vfinfo(struct sk_buff *skb,struct ifla_vf_mac vf_mac;struct ifla_vf_info ivi; +memset (&ivi,0 ,sizeof (ivi)); +/* Not all SR-IOV capable drivers support the * spoofcheck and "RSS query enable" query. Preset to * -1 so the user space tool can detect that the driver
@@ -1135,7 +1138,6 @@ static noinline_for_stack int rtnl_fill_vfinfo(struct sk_buff *skb, ivi.spoofchk =-1 ; ivi.rss_query_en =-1 ; ivi.trusted =-1 ; -memset (ivi.mac,0 ,sizeof (ivi.mac));/* The default value for VF link state is "auto" * IFLA_VF_LINK_STATE_AUTO which equals zero */
@@ -1461,6 +1463,7 @@ static const struct nla_policy ifla_policy[IFLA_MAX+1] = { [IFLA_LINK_NETNSID] = { .type = NLA_S32 }, [IFLA_PROTO_DOWN] = { .type = NLA_U8 }, [IFLA_XDP] = { .type = NLA_NESTED }, + [IFLA_GROUP] = { .type = NLA_U32 }, };static const struct nla_policy ifla_info_policy[IFLA_INFO_MAX +1 ] = {
net/decnet/dn_route.c +4 -10
@@ -188,12 +188,6 @@ static inline void dnrt_free(struct dn_route *rt)call_rcu_bh (&rt->dst.rcu_head, dst_rcu_free); } -static inline void dnrt_drop (struct dn_route *rt) -{ -dst_release (&rt->dst); -call_rcu_bh (&rt->dst.rcu_head, dst_rcu_free); -} -static void dn_dst_check_expire (unsigned long dummy) {int i;
@@ -248,7 +242,7 @@ static int dn_dst_gc(struct dst_ops *ops) } *rtp = rt->dst.dn_next; rt->dst.dn_next =NULL ; -dnrt_drop (rt); +dnrt_free (rt);break ; }spin_unlock_bh (&dn_rt_hash_table[i].lock);
@@ -350,7 +344,7 @@ static int dn_insert_route(struct dn_route *rt, unsigned int hash, struct dn_roudst_use (&rth->dst, now);spin_unlock_bh (&dn_rt_hash_table[hash].lock); -dnrt_drop (rt); +dst_free (&rt->dst); *rp = rth;return 0 ; }
@@ -380,7 +374,7 @@ static void dn_run_flush(unsigned long dummy)for (; rt; rt = next) { next =rcu_dereference_raw (rt->dst.dn_next);RCU_INIT_POINTER (rt->dst.dn_next,NULL ); -dst_free ((struct dst_entry *)rt); +dnrt_free (rt); } nothing_to_declare:
@@ -1187,7 +1181,7 @@ static int dn_route_output_slow(struct dst_entry **pprt, const struct flowidn *oif (dev_out->flags &IFF_LOOPBACK ) flags |=RTCF_LOCAL ; - rt =dst_alloc (&dn_dst_ops, dev_out,1 ,DST_OBSOLETE_NONE ,DST_HOST ); + rt =dst_alloc (&dn_dst_ops, dev_out,0 ,DST_OBSOLETE_NONE ,DST_HOST );if (rt ==NULL ) goto e_nobufs;
net/decnet/netfilter/dn_rtmsg.c +3 -1
@@ -102,7 +102,9 @@ static inline void dnrmg_receive_user_skb(struct sk_buff *skb) {struct nlmsghdr *nlh =nlmsg_hdr (skb); -if (nlh->nlmsg_len <sizeof (*nlh) || skb->len < nlh->nlmsg_len) +if (skb->len <sizeof (*nlh) || + nlh->nlmsg_len <sizeof (*nlh) || + skb->len < nlh->nlmsg_len)return ;if (!netlink_capable (skb,CAP_NET_ADMIN ))
net/hsr/hsr_device.c +2 -2
@@ -378,7 +378,6 @@ static void hsr_dev_destroy(struct net_device *hsr_dev)del_timer_sync (&hsr->announce_timer);synchronize_rcu (); -free_netdev (hsr_dev); }static const struct net_device_ops hsr_device_ops = {
@@ -404,7 +403,8 @@ void hsr_dev_setup(struct net_device *dev)SET_NETDEV_DEVTYPE (dev, &hsr_type); dev->priv_flags |=IFF_NO_QUEUE ; - dev->destructor = hsr_dev_destroy; + dev->needs_free_netdev = true; + dev->priv_destructor = hsr_dev_destroy; dev->hw_features =NETIF_F_SG |NETIF_F_FRAGLIST |NETIF_F_HIGHDMA | NETIF_F_GSO_MASK | NETIF_F_HW_CSUM |
net/ieee802154/6lowpan/core.c +1 -1
@@ -107,7 +107,7 @@ static void lowpan_setup(struct net_device *ldev) ldev->netdev_ops = &lowpan_netdev_ops; ldev->header_ops = &lowpan_header_ops; - ldev->destructor = free_netdev; + ldev->needs_free_netdev = true; ldev->features |=NETIF_F_NETNS_LOCAL ; }
net/ipv4/esp4.c +4 -1
@@ -212,6 +212,7 @@ static int esp_output(struct xfrm_state *x, struct sk_buff *skb)u8 *iv;u8 *tail;u8 *vaddr; +int esph_offset;int blksize;int clen;int alen;
@@ -392,12 +393,14 @@ static int esp_output(struct xfrm_state *x, struct sk_buff *skb) } cow: + esph_offset = (unsigned char *)esph -skb_transport_header (skb); + err =skb_cow_data (skb, tailen, &trailer);if (err <0 ) goto error; nfrags = err; tail =skb_tail_pointer (trailer); - esph =ip_esp_hdr (skb); + esph = (struct ip_esp_hdr *)(skb_transport_header (skb) + esph_offset); skip_cow:esp_output_fill_trailer (tail, tfclen, plen, proto);
net/ipv4/icmp.c +6 -2
@@ -674,8 +674,12 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)/* Needed by both icmp_global_allow and icmp_xmit_lock */ local_bh_disable (); -/* Check global sysctl_icmp_msgs_per_sec ratelimit */ -if (!icmpv4_global_allow (net, type, code)) +/* Check global sysctl_icmp_msgs_per_sec ratelimit, unless +* incoming dev is loopback. If outgoing dev change to not be +* loopback, then peer ratelimit still work (in icmpv4_xrlim_allow) +*/ +if (!(skb_in->dev && (skb_in->dev->flags&IFF_LOOPBACK )) && + !icmpv4_global_allow (net, type, code)) goto out_bh_enable; sk =icmp_xmit_lock (net);
net/ipv4/igmp.c +14 -8
@@ -1112,6 +1112,7 @@ static void igmpv3_add_delrec(struct in_device *in_dev, struct ip_mc_list *im) pmc =kzalloc (sizeof (*pmc),GFP_KERNEL );if (!pmc)return ; +spin_lock_init (&pmc->lock);spin_lock_bh (&im->lock); pmc->interface = im->interface;in_dev_hold (in_dev);
@@ -2071,21 +2072,26 @@ static int ip_mc_add_src(struct in_device *in_dev, __be32 *pmca, int sfmode,static void ip_mc_clear_src (struct ip_mc_list *pmc) { -struct ip_sf_list *psf, *nextpsf; +struct ip_sf_list *psf, *nextpsf, *tomb, *sources; -for (psf = pmc->tomb; psf; psf = nextpsf) { +spin_lock_bh (&pmc->lock); + tomb = pmc->tomb; + pmc->tomb =NULL ; + sources = pmc->sources; + pmc->sources =NULL ; + pmc->sfmode =MCAST_EXCLUDE ; + pmc->sfcount[MCAST_INCLUDE ] =0 ; + pmc->sfcount[MCAST_EXCLUDE ] =1 ; +spin_unlock_bh (&pmc->lock); + +for (psf = tomb; psf; psf = nextpsf) { nextpsf = psf->sf_next;kfree (psf); } - pmc->tomb =NULL ; -for (psf = pmc->sources; psf; psf = nextpsf) { +for (psf = sources; psf; psf = nextpsf) { nextpsf = psf->sf_next;kfree (psf); } - pmc->sources =NULL ; - pmc->sfmode =MCAST_EXCLUDE ; - pmc->sfcount[MCAST_INCLUDE ] =0 ; - pmc->sfcount[MCAST_EXCLUDE ] =1 ; }/* Join a multicast group
net/ipv4/ip_tunnel.c +2 -2
@@ -961,7 +961,6 @@ static void ip_tunnel_dev_free(struct net_device *dev)gro_cells_destroy (&tunnel->gro_cells);dst_cache_destroy (&tunnel->dst_cache);free_percpu (dev->tstats); -free_netdev (dev); }void ip_tunnel_dellink (struct net_device *dev,struct list_head *head)
@@ -1148,7 +1147,8 @@ int ip_tunnel_init(struct net_device *dev)struct iphdr *iph = &tunnel->parms.iph;int err; - dev->destructor = ip_tunnel_dev_free; + dev->needs_free_netdev = true; + dev->priv_destructor = ip_tunnel_dev_free; dev->tstats = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats);if (!dev->tstats)return -ENOMEM ;
net/ipv4/ipmr.c +1 -1
@@ -501,7 +501,7 @@ static void reg_vif_setup(struct net_device *dev) dev->mtu =ETH_DATA_LEN -sizeof (struct iphdr ) -8 ; dev->flags =IFF_NOARP ; dev->netdev_ops = ®_vif_netdev_ops; - dev->destructor = free_netdev; + dev->needs_free_netdev = true; dev->features |=NETIF_F_NETNS_LOCAL ; }
net/ipv6/addrconf.c +3 -3
@@ -328,9 +328,9 @@ static void addrconf_mod_rs_timer(struct inet6_dev *idev,static void addrconf_mod_dad_work (struct inet6_ifaddr *ifp,unsigned long delay) { -if (!delayed_work_pending (&ifp->dad_work)) -in6_ifa_hold (ifp); -mod_delayed_work (addrconf_wq, &ifp->dad_work, delay); +in6_ifa_hold (ifp); +if (mod_delayed_work (addrconf_wq, &ifp->dad_work, delay)) +in6_ifa_put (ifp); }static int snmp6_alloc_dev (struct inet6_dev *idev)
net/ipv6/fib6_rules.c +6 -16
@@ -32,7 +32,6 @@ struct fib6_rule {struct dst_entry *fib6_rule_lookup (struct net *net,struct flowi6 *fl6,int flags,pol_lookup_t lookup) { -struct rt6_info *rt;struct fib_lookup_arg arg = { .lookup_ptr = lookup, .flags =FIB_LOOKUP_NOREF ,
@@ -44,21 +43,11 @@ struct dst_entry *fib6_rule_lookup(struct net *net, struct flowi6 *fl6,fib_rules_lookup (net->ipv6.fib6_rules_ops,flowi6_to_flowi (fl6), flags, &arg); - rt = arg.result; +if (arg.result) +return arg.result; -if (!rt) { -dst_hold (&net->ipv6.ip6_null_entry->dst); -return &net->ipv6.ip6_null_entry->dst; - } - -if (rt->rt6i_flags &RTF_REJECT && - rt->dst.error == -EAGAIN ) { -ip6_rt_put (rt); - rt = net->ipv6.ip6_null_entry; -dst_hold (&rt->dst); - } - -return &rt->dst; +dst_hold (&net->ipv6.ip6_null_entry->dst); +return &net->ipv6.ip6_null_entry->dst; } static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp,
@@ -121,7 +110,8 @@ static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp, flp6->saddr = saddr; } err = rt->dst.error; - goto out; +if (err != -EAGAIN ) + goto out; } again:ip6_rt_put (rt);
net/ipv6/icmp.c +1 -1
@@ -491,7 +491,7 @@ static void icmp6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info,local_bh_disable ();/* Check global sysctl_icmp_msgs_per_sec ratelimit */ -if (!icmpv6_global_allow (type)) +if (!(skb->dev->flags&IFF_LOOPBACK ) && !icmpv6_global_allow (type)) goto out_bh_enable;mip6_addr_swap (skb);
net/ipv6/ip6_fib.c +1 -2
@@ -289,8 +289,7 @@ struct dst_entry *fib6_rule_lookup(struct net *net, struct flowi6 *fl6,struct rt6_info *rt; rt =lookup (net, net->ipv6.fib6_main_tbl, fl6, flags); -if (rt->rt6i_flags &RTF_REJECT && - rt->dst.error == -EAGAIN ) { +if (rt->dst.error == -EAGAIN ) {ip6_rt_put (rt); rt = net->ipv6.ip6_null_entry;dst_hold (&rt->dst);
net/ipv6/ip6_gre.c +5 -4
@@ -986,13 +986,13 @@ static void ip6gre_dev_free(struct net_device *dev)dst_cache_destroy (&t->dst_cache);free_percpu (dev->tstats); -free_netdev (dev); }static void ip6gre_tunnel_setup (struct net_device *dev) { dev->netdev_ops = &ip6gre_netdev_ops; - dev->destructor = ip6gre_dev_free; + dev->needs_free_netdev = true; + dev->priv_destructor = ip6gre_dev_free; dev->type =ARPHRD_IP6GRE ;
@@ -1143,7 +1143,7 @@ static int __net_init ip6gre_init_net(struct net *net)return 0 ; err_reg_dev: -ip6gre_dev_free (ign->fb_tunnel_dev); +free_netdev (ign->fb_tunnel_dev); err_alloc_dev:return err; }
@@ -1292,7 +1292,8 @@ static void ip6gre_tap_setup(struct net_device *dev)ether_setup (dev); dev->netdev_ops = &ip6gre_tap_netdev_ops; - dev->destructor = ip6gre_dev_free; + dev->needs_free_netdev = true; + dev->priv_destructor = ip6gre_dev_free; dev->features |=NETIF_F_NETNS_LOCAL ; dev->priv_flags &= ~IFF_TX_SKB_SHARING ;
net/ipv6/ip6_tunnel.c +4 -4
@@ -254,7 +254,6 @@ static void ip6_dev_free(struct net_device *dev)gro_cells_destroy (&t->gro_cells);dst_cache_destroy (&t->dst_cache);free_percpu (dev->tstats); -free_netdev (dev); }static int ip6_tnl_create2 (struct net_device *dev)
@@ -322,7 +321,7 @@ static struct ip6_tnl *ip6_tnl_create(struct net *net, struct __ip6_tnl_parm *p)return t; failed_free: -ip6_dev_free (dev); +free_netdev (dev); failed:return ERR_PTR (err); }
@@ -1772,7 +1771,8 @@ static const struct net_device_ops ip6_tnl_netdev_ops = {static void ip6_tnl_dev_setup (struct net_device *dev) { dev->netdev_ops = &ip6_tnl_netdev_ops; - dev->destructor = ip6_dev_free; + dev->needs_free_netdev = true; + dev->priv_destructor = ip6_dev_free; dev->type =ARPHRD_TUNNEL6 ; dev->flags |=IFF_NOARP ;
@@ -2211,7 +2211,7 @@ static int __net_init ip6_tnl_init_net(struct net *net)return 0 ; err_register: -ip6_dev_free (ip6n->fb_tnl_dev); +free_netdev (ip6n->fb_tnl_dev); err_alloc_dev:return err; }
net/ipv6/ip6_vti.c +4 -4
@@ -180,7 +180,6 @@ vti6_tnl_unlink(struct vti6_net *ip6n, struct ip6_tnl *t)static void vti6_dev_free (struct net_device *dev) {free_percpu (dev->tstats); -free_netdev (dev); }static int vti6_tnl_create2 (struct net_device *dev)
@@ -235,7 +234,7 @@ static struct ip6_tnl *vti6_tnl_create(struct net *net, struct __ip6_tnl_parm *preturn t; failed_free: -vti6_dev_free (dev); +free_netdev (dev); failed:return NULL ; }
@@ -841,7 +840,8 @@ static const struct net_device_ops vti6_netdev_ops = {static void vti6_dev_setup (struct net_device *dev) { dev->netdev_ops = &vti6_netdev_ops; - dev->destructor = vti6_dev_free; + dev->needs_free_netdev = true; + dev->priv_destructor = vti6_dev_free; dev->type =ARPHRD_TUNNEL6 ; dev->hard_header_len =LL_MAX_HEADER +sizeof (struct ipv6hdr );
@@ -1092,7 +1092,7 @@ static int __net_init vti6_init_net(struct net *net)return 0 ; err_register: -vti6_dev_free (ip6n->fb_tnl_dev); +free_netdev (ip6n->fb_tnl_dev); err_alloc_dev:return err; }
net/ipv6/ip6mr.c +1 -1
@@ -733,7 +733,7 @@ static void reg_vif_setup(struct net_device *dev) dev->mtu =1500 -sizeof (struct ipv6hdr ) -8 ; dev->flags =IFF_NOARP ; dev->netdev_ops = ®_vif_netdev_ops; - dev->destructor = free_netdev; + dev->needs_free_netdev = true; dev->features |=NETIF_F_NETNS_LOCAL ; }
net/ipv6/proc.c +1 -1
@@ -219,7 +219,7 @@ static void snmp6_seq_show_item64(struct seq_file *seq, void __percpu *mib,u64 buff64[SNMP_MIB_MAX ];int i; -memset (buff64,0 ,sizeof (unsigned long ) *SNMP_MIB_MAX ); +memset (buff64,0 ,sizeof (u64) *SNMP_MIB_MAX );snmp_get_cpu_field64_batch (buff64, itemlist, mib, syncpoff);for (i =0 ; itemlist[i].name; i++)
net/ipv6/route.c +1 -0
@@ -2804,6 +2804,7 @@ static int fib6_ifdown(struct rt6_info *rt, void *arg)if ((rt->dst.dev == dev || !dev) && rt != adn->net->ipv6.ip6_null_entry && (rt->rt6i_nsiblings ==0 || + (dev &&netdev_unregistering (dev)) || !rt->rt6i_idev->cnf.ignore_routes_with_linkdown))return -1 ;
net/ipv6/sit.c +3 -3
@@ -265,7 +265,7 @@ static struct ip_tunnel *ipip6_tunnel_locate(struct net *net,return nt; failed_free: -ipip6_dev_free (dev); +free_netdev (dev); failed:return NULL ; }
@@ -1333,7 +1333,6 @@ static void ipip6_dev_free(struct net_device *dev)dst_cache_destroy (&tunnel->dst_cache);free_percpu (dev->tstats); -free_netdev (dev); }#define SIT_FEATURES (NETIF_F_SG | \
@@ -1348,7 +1347,8 @@ static void ipip6_tunnel_setup(struct net_device *dev)int t_hlen = tunnel->hlen +sizeof (struct iphdr ); dev->netdev_ops = &ipip6_netdev_ops; - dev->destructor = ipip6_dev_free; + dev->needs_free_netdev = true; + dev->priv_destructor = ipip6_dev_free; dev->type =ARPHRD_SIT ; dev->hard_header_len =LL_MAX_HEADER + t_hlen;
net/ipv6/xfrm6_input.c +1 -1
@@ -43,8 +43,8 @@ int xfrm6_transport_finish(struct sk_buff *skb, int async)return 1 ;#endif -ipv6_hdr (skb)->payload_len =htons (skb->len);__skb_push (skb, skb->data -skb_network_header (skb)); +ipv6_hdr (skb)->payload_len =htons (skb->len -sizeof (struct ipv6hdr ));if (xo && (xo->flags &XFRM_GRO )) {skb_mac_header_rebuild (skb);
net/irda/irlan/irlan_eth.c +1 -1
@@ -65,7 +65,7 @@ static void irlan_eth_setup(struct net_device *dev)ether_setup (dev); dev->netdev_ops = &irlan_eth_netdev_ops; - dev->destructor = free_netdev; + dev->needs_free_netdev = true; dev->min_mtu =0 ; dev->max_mtu =ETH_MAX_MTU ;
net/key/af_key.c +15 -4
@@ -1157,6 +1157,7 @@ static struct xfrm_state * pfkey_msg2xfrm_state(struct net *net, goto out; } + err = -ENOBUFS ; key = ext_hdrs[SADB_EXT_KEY_AUTH -1 ];if (sa->sadb_sa_auth) {int keysize =0 ;
@@ -1168,8 +1169,10 @@ static struct xfrm_state * pfkey_msg2xfrm_state(struct net *net,if (key) keysize = (key->sadb_key_bits +7 ) /8 ; x->aalg =kmalloc (sizeof (*x->aalg) + keysize,GFP_KERNEL ); -if (!x->aalg) +if (!x->aalg) { + err = -ENOMEM ; goto out; + }strcpy (x->aalg->alg_name, a->name); x->aalg->alg_key_len =0 ;if (key) {
@@ -1188,8 +1191,10 @@ static struct xfrm_state * pfkey_msg2xfrm_state(struct net *net, goto out; } x->calg =kmalloc (sizeof (*x->calg),GFP_KERNEL ); -if (!x->calg) +if (!x->calg) { + err = -ENOMEM ; goto out; + }strcpy (x->calg->alg_name, a->name); x->props.calgo = sa->sadb_sa_encrypt; }else {
@@ -1203,8 +1208,10 @@ static struct xfrm_state * pfkey_msg2xfrm_state(struct net *net,if (key) keysize = (key->sadb_key_bits +7 ) /8 ; x->ealg =kmalloc (sizeof (*x->ealg) + keysize,GFP_KERNEL ); -if (!x->ealg) +if (!x->ealg) { + err = -ENOMEM ; goto out; + }strcpy (x->ealg->alg_name, a->name); x->ealg->alg_key_len =0 ;if (key) {
@@ -1249,8 +1256,10 @@ static struct xfrm_state * pfkey_msg2xfrm_state(struct net *net,struct xfrm_encap_tmpl *natt; x->encap =kmalloc (sizeof (*x->encap),GFP_KERNEL ); -if (!x->encap) +if (!x->encap) { + err = -ENOMEM ; goto out; + } natt = x->encap; n_type = ext_hdrs[SADB_X_EXT_NAT_T_TYPE -1 ];
@@ -2755,6 +2764,8 @@ static int pfkey_spdflush(struct sock *sk, struct sk_buff *skb, const struct sadint err, err2; err =xfrm_policy_flush (net,XFRM_POLICY_TYPE_MAIN , true); +if (!err) +xfrm_garbage_collect (net); err2 =unicast_flush_resp (sk, hdr);if (err || err2) {if (err == -ESRCH )/* empty table - old silent behavior */
net/l2tp/l2tp_eth.c +1 -1
@@ -133,7 +133,7 @@ static void l2tp_eth_dev_setup(struct net_device *dev) dev->priv_flags &= ~IFF_TX_SKB_SHARING ; dev->features |=NETIF_F_LLTX ; dev->netdev_ops = &l2tp_eth_netdev_ops; - dev->destructor = free_netdev; + dev->needs_free_netdev = true; }static void l2tp_eth_dev_recv (struct l2tp_session *session,struct sk_buff *skb,int data_len)
net/mac80211/iface.c +4 -3
@@ -1198,7 +1198,6 @@ static const struct net_device_ops ieee80211_monitorif_ops = {static void ieee80211_if_free (struct net_device *dev) {free_percpu (dev->tstats); -free_netdev (dev); }static void ieee80211_if_setup (struct net_device *dev)
@@ -1206,7 +1205,8 @@ static void ieee80211_if_setup(struct net_device *dev)ether_setup (dev); dev->priv_flags &= ~IFF_TX_SKB_SHARING ; dev->netdev_ops = &ieee80211_dataif_ops; - dev->destructor = ieee80211_if_free; + dev->needs_free_netdev = true; + dev->priv_destructor = ieee80211_if_free; }static void ieee80211_if_setup_no_queue (struct net_device *dev)
@@ -1810,6 +1810,7 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name, ret =dev_alloc_name (ndev, ndev->name);if (ret <0 ) {ieee80211_if_free (ndev); +free_netdev (ndev);return ret; }
@@ -1899,7 +1900,7 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name, ret =register_netdevice (ndev);if (ret) { -ieee80211_if_free (ndev); +free_netdev (ndev);return ret; } }
net/mac802154/iface.c +3 -4
@@ -526,8 +526,6 @@ static void mac802154_wpan_free(struct net_device *dev)struct ieee802154_sub_if_data *sdata =IEEE802154_DEV_TO_SUB_IF (dev);mac802154_llsec_destroy (&sdata->sec); - -free_netdev (dev); }static void ieee802154_if_setup (struct net_device *dev)
@@ -593,7 +591,8 @@ ieee802154_setup_sdata(struct ieee802154_sub_if_data *sdata, sdata->dev->dev_addr); sdata->dev->header_ops = &mac802154_header_ops; - sdata->dev->destructor = mac802154_wpan_free; + sdata->dev->needs_free_netdev = true; + sdata->dev->priv_destructor = mac802154_wpan_free; sdata->dev->netdev_ops = &mac802154_wpan_ops; sdata->dev->ml_priv = &mac802154_mlme_wpan; wpan_dev->promiscuous_mode = false;
@@ -608,7 +607,7 @@ ieee802154_setup_sdata(struct ieee802154_sub_if_data *sdata,break ;case NL802154_IFTYPE_MONITOR : - sdata->dev->destructor = free_netdev; + sdata->dev->needs_free_netdev = true; sdata->dev->netdev_ops = &mac802154_monitor_ops; wpan_dev->promiscuous_mode = true;break ;
net/netfilter/nf_conntrack_netlink.c +4 -0
@@ -45,6 +45,8 @@#include <net/netfilter/nf_conntrack_zones.h> #include <net/netfilter/nf_conntrack_timestamp.h> #include <net/netfilter/nf_conntrack_labels.h> +#include <net/netfilter/nf_conntrack_seqadj.h> +#include <net/netfilter/nf_conntrack_synproxy.h> #ifdef CONFIG_NF_NAT_NEEDED #include <net/netfilter/nf_nat_core.h> #include <net/netfilter/nf_nat_l4proto.h>
@@ -1814,6 +1816,8 @@ ctnetlink_create_conntrack(struct net *net,nf_ct_tstamp_ext_add (ct,GFP_ATOMIC );nf_ct_ecache_ext_add (ct,0 ,0 ,GFP_ATOMIC );nf_ct_labels_ext_add (ct); +nfct_seqadj_ext_add (ct); +nfct_synproxy_ext_add (ct);/* we must add conntrack extensions before confirmation. */ ct->status |=IPS_CONFIRMED ;
net/openvswitch/vport-internal_dev.c +2 -2
@@ -94,7 +94,6 @@ static void internal_dev_destructor(struct net_device *dev)struct vport *vport =ovs_internal_dev_get_vport (dev);ovs_vport_free (vport); -free_netdev (dev); } static void
@@ -156,7 +155,8 @@ static void do_setup(struct net_device *netdev) netdev->priv_flags &= ~IFF_TX_SKB_SHARING ; netdev->priv_flags |=IFF_LIVE_ADDR_CHANGE |IFF_OPENVSWITCH |IFF_PHONY_HEADROOM |IFF_NO_QUEUE ; - netdev->destructor = internal_dev_destructor; + netdev->needs_free_netdev = true; + netdev->priv_destructor = internal_dev_destructor; netdev->ethtool_ops = &internal_dev_ethtool_ops; netdev->rtnl_link_ops = &internal_dev_link_ops;
net/phonet/pep-gprs.c +1 -1
@@ -236,7 +236,7 @@ static void gprs_setup(struct net_device *dev) dev->tx_queue_len =10 ; dev->netdev_ops = &gprs_netdev_ops; - dev->destructor = free_netdev; + dev->needs_free_netdev = true; }/*
net/sctp/socket.c +4 -5
@@ -4586,13 +4586,13 @@ int sctp_for_each_endpoint(int (*cb)(struct sctp_endpoint *, void *),for (head = sctp_ep_hashtable; hash < sctp_ep_hashsize; hash++, head++) { -read_lock (&head->lock); +read_lock_bh (&head->lock);sctp_for_each_hentry (epb, &head->chain) { err =cb (sctp_ep (epb), p);if (err)break ; } -read_unlock (&head->lock); +read_unlock_bh (&head->lock); }return err;
@@ -4630,9 +4630,8 @@ int sctp_for_each_transport(int (*cb)(struct sctp_transport *, void *),if (err)return err; -sctp_transport_get_idx (net, &hti, pos); - obj =sctp_transport_get_next (net, &hti); -for (; obj && !IS_ERR (obj); obj =sctp_transport_get_next (net, &hti)) { + obj =sctp_transport_get_idx (net, &hti, pos +1 ); +for (; !IS_ERR_OR_NULL (obj); obj =sctp_transport_get_next (net, &hti)) {struct sctp_transport *transport = obj;if (!sctp_transport_hold (transport))
net/tipc/msg.c +1 -1
@@ -508,7 +508,7 @@ bool tipc_msg_reverse(u32 own_node, struct sk_buff **skb, int err) }if (skb_cloned (_skb) && -pskb_expand_head (_skb,BUF_HEADROOM ,BUF_TAILROOM ,GFP_KERNEL )) +pskb_expand_head (_skb,BUF_HEADROOM ,BUF_TAILROOM ,GFP_ATOMIC )) goto exit;/* Now reverse the concerned fields */
net/unix/af_unix.c +6 -1
@@ -999,7 +999,8 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)struct path path = {NULL ,NULL }; err = -EINVAL ; -if (sunaddr->sun_family !=AF_UNIX ) + if (addr_len < offsetofend(struct sockaddr_un, sun_family) || + sunaddr->sun_family !=AF_UNIX ) goto out;if (addr_len ==sizeof (short )) {
@@ -1110,6 +1111,10 @@ static int unix_dgram_connect(struct socket *sock, struct sockaddr *addr,unsigned int hash;int err; + err = -EINVAL ; + if (alen < offsetofend(struct sockaddr, sa_family)) + goto out; +if (addr->sa_family !=AF_UNSPEC ) { err =unix_mkname (sunaddr, alen, &hash);if (err <0 )
net/xfrm/xfrm_policy.c +0 -51
69 lines not on this page · raw message
net/xfrm/xfrm_user.c +1 -0
@@ -1999,6 +1999,7 @@ static int xfrm_flush_policy(struct sk_buff *skb, struct nlmsghdr *nlh,return 0 ;return err; } +xfrm_garbage_collect (net); c.data.type = type; c.event = nlh->nlmsg_type;
sound/pci/hda/hda_codec.h +2 -0
@@ -294,6 +294,8 @@ struct hda_codec {#define list_for_each_codec (c, bus) \ list_for_each_entry(c, &(bus)->core.codec_list, core.list) +#define list_for_each_codec_safe (c, n, bus) \ + list_for_each_entry_safe(c, n, &(bus)->core.codec_list, core.list)/* snd_hda_codec_read/write optional flags */ #define HDA_RW_NO_RESPONSE_FALLBACK (1 << 0)
sound/pci/hda/hda_controller.c +6 -2
@@ -1337,8 +1337,12 @@ EXPORT_SYMBOL_GPL(azx_probe_codecs);/* configure each codec instance */ int azx_codec_configure (struct azx *chip) { -struct hda_codec *codec; -list_for_each_codec (codec, &chip->bus) { +struct hda_codec *codec, *next; + +/* use _safe version here since snd_hda_codec_configure() deregisters +* the device upon error and deletes itself from the bus list. +*/ +list_for_each_codec_safe (codec, next, &chip->bus) {snd_hda_codec_configure (codec); }return 0 ;
sound/pci/hda/hda_generic.c +1 -0
@@ -3169,6 +3169,7 @@ static int check_dyn_adc_switch(struct hda_codec *codec) spec->input_paths[i][nums]); spec->input_paths[i][nums] = spec->input_paths[i][n]; + spec->input_paths[i][n] =0 ; } } nums++;
tools/arch/x86/lib/memcpy_64.S +1 -1
@@ -286,7 +286,7 @@ ENDPROC(memcpy_mcsafe_unrolled) _ASM_EXTABLE_FAULT(.L_copy_leading_bytes, .L_memcpy_mcsafe_fail) _ASM_EXTABLE_FAULT(.L_cache_w0, .L_memcpy_mcsafe_fail) _ASM_EXTABLE_FAULT(.L_cache_w1, .L_memcpy_mcsafe_fail) - _ASM_EXTABLE_FAULT(.L_cache_w3, .L_memcpy_mcsafe_fail) + _ASM_EXTABLE_FAULT(.L_cache_w2, .L_memcpy_mcsafe_fail) _ASM_EXTABLE_FAULT(.L_cache_w3, .L_memcpy_mcsafe_fail) _ASM_EXTABLE_FAULT(.L_cache_w4, .L_memcpy_mcsafe_fail) _ASM_EXTABLE_FAULT(.L_cache_w5, .L_memcpy_mcsafe_fail)