Linux 4.4.68
Greg KH
maintainerI'm announcing the release of the 4.4.68 kernel.
All users of the 4.4 kernel series must upgrade.
The updated 4.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.4.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/kernel/Makefile | 1 arch/arm/kernel/pj4-cp0.c | 4 arch/arm/mach-omap2/omap-headsmp.S | 3 arch/arm64/net/bpf_jit_comp.c | 8 arch/mips/kernel/mips-r2-to-r6-emul.c | 12 - arch/powerpc/platforms/powernv/opal-wrappers.S | 2 arch/x86/kernel/apic/io_apic.c | 2 arch/x86/kernel/kprobes/common.h | 2 arch/x86/kernel/kprobes/core.c | 6 arch/x86/kernel/kprobes/opt.c | 2 arch/x86/kernel/pci-calgary_64.c | 2 arch/x86/kvm/cpuid.c | 6 arch/x86/kvm/vmx.c | 17 + arch/x86/platform/intel-mid/device_libs/platform_wdt.c | 2 block/blk-integrity.c | 19 - block/partition-generic.c | 1 drivers/clk/Makefile | 2 drivers/gpu/drm/ttm/ttm_bo_vm.c | 12 + drivers/leds/leds-ktd2692.c | 8 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 drivers/net/wireless/brcm80211/brcmfmac/core.c | 23 -- drivers/net/wireless/mwifiex/11n_aggr.c | 19 - drivers/net/wireless/mwifiex/debugfs.c | 3 drivers/net/wireless/mwifiex/sta_ioctl.c | 2 drivers/phy/Kconfig | 1 drivers/power/bq24190_charger.c | 182 ++++++----------- drivers/scsi/Kconfig | 2 drivers/staging/emxx_udc/emxx_udc.c | 4 drivers/staging/wlan-ng/p80211netdev.c | 2 drivers/tty/serial/8250/8250_omap.c | 8 drivers/usb/chipidea/ci.h | 3 drivers/usb/chipidea/core.c | 32 -- drivers/usb/chipidea/otg.c | 80 ++++++- drivers/usb/host/ehci-exynos.c | 2 drivers/usb/host/ohci-exynos.c | 2 drivers/usb/serial/ark3116.c | 25 +- drivers/usb/serial/digi_acceleport.c | 38 ++- drivers/usb/serial/ftdi_sio.c | 7 drivers/usb/serial/io_edgeport.c | 48 +++- drivers/usb/serial/keyspan_pda.c | 19 + drivers/usb/serial/mct_u232.c | 6 drivers/usb/serial/quatech2.c | 24 +- drivers/usb/serial/ssu100.c | 31 ++ drivers/usb/serial/ti_usb_3410_5052.c | 12 - fs/9p/acl.c | 2 fs/block_dev.c | 1 fs/f2fs/super.c | 7 include/linux/f2fs_fs.h | 6 include/linux/genhd.h | 2 include/linux/usb/chipidea.h | 2 include/net/addrconf.h | 2 include/net/ip6_route.h | 1 lib/test_bpf.c | 45 ++++ net/core/rtnetlink.c | 2 net/ipv4/raw.c | 3 net/ipv4/tcp_lp.c | 6 net/ipv4/tcp_minisocks.c | 1 net/ipv4/tcp_output.c | 19 + net/ipv6/addrconf.c | 3 net/ipv6/raw.c | 2 net/ipv6/route.c | 39 ++- sound/pci/hda/hda_intel.c | 13 + tools/power/cpupower/utils/helpers/cpuid.c | 1 64 files changed, 513 insertions(+), 335 deletions(-)
Alexander Potapenko (1):
ipv4, ipv6: ensure raw socket message is big enough to hold an IP header
Andy Shevchenko (1):
x86/platform/intel-mid: Correct MSI IRQ line for watchdog device
Ard Biesheuvel (1):
ARM: 8452/3: PJ4: make coprocessor access sequences buildable in Thumb2 mode
Arnd Bergmann (2):
leds: ktd2692: avoid harmless maybe-uninitialized warning
staging: emxx_udc: remove incorrect __init annotations
Ben Hutchings (1):
cpupower: Fix turbo frequency reporting for pre-Sandy Bridge cores
Brian Norris (1):
mwifiex: debugfs: Fix (sometimes) off-by-1 SSID print
Cong Wang (1):
9p: fix a potential acl leak
Dan Carpenter (1):
bnxt_en: allocate enough space for ->ntp_fltr_bmap
Daniel Borkmann (1):
bpf, arm64: fix jit branch offset related to ldimm64
Eric Dumazet (3):
tcp: do not underestimate skb->truesize in tcp_trim_head()
tcp: fix wraparound issue in tcp_lp
tcp: do not inherit fastopen_req from parent
Finn Thain (1):
scsi: mac_scsi: Fix MAC_SCSI=m option when SCSI=m
Ganapathi Bhat (1):
mwifiex: Avoid skipping WEP key deletion for AP
Greg Kroah-Hartman (1):
Linux 4.4.68
Igor Pylypiv (1):
staging: wlan-ng: add missing byte order conversion
Ilya Dryomov (1):
block: get rid of blk_integrity_revalidate()
James Hughes (2):
brcmfmac: Ensure pointer correctly set if skb data location changes
brcmfmac: Make skb header writable before use
Jim Mattson (1):
Revert "KVM: nested VMX: disable perf cpuid reporting"
Jin Qian (1):
f2fs: sanity check segment count
Johan Hovold (10):
USB: serial: keyspan_pda: fix receive sanity checks
USB: serial: digi_acceleport: fix incomplete rx sanity check
USB: serial: ssu100: fix control-message error handling
USB: serial: io_edgeport: fix epic-descriptor handling
USB: serial: ti_usb_3410_5052: fix control-message error handling
USB: serial: ark3116: fix open error handling
USB: serial: ftdi_sio: fix latency-timer error handling
USB: serial: quatech2: fix control-message error handling
USB: serial: mct_u232: fix modem-status error handling
USB: serial: io_edgeport: fix descriptor error handling
Krzysztof Kozlowski (2):
usb: host: ehci-exynos: Decrese node refcount on exynos_ehci_get_phy() error paths
usb: host: ohci-exynos: Decrese node refcount on exynos_ehci_get_phy() error paths
Ladi Prosek (2):
KVM: nVMX: initialize PML fields in vmcs02
KVM: nVMX: do not leak PML full vmexit to L1
Leonid Yegoshin (1):
MIPS: R2-on-R6 MULTU/MADDU/MSUBU emulation bugfix
Liam Breck (6):
power: supply: bq24190_charger: Fix irq trigger to IRQF_TRIGGER_FALLING
power: supply: bq24190_charger: Call set_mode_host() on pm_resume()
power: supply: bq24190_charger: Install irq_handler_thread() at end of probe()
power: supply: bq24190_charger: Call power_supply_changed() for relevant component
power: supply: bq24190_charger: Don't read fault register outside irq_handle_thread()
power: supply: bq24190_charger: Handle fault before status on interrupt
Masami Hiramatsu (1):
kprobes/x86: Fix kernel panic when certain exception-handling addresses are probed
Matthijs van Duin (1):
ARM: OMAP5 / DRA7: Fix HYP mode boot for thumb2 build
Michael Ellerman (1):
powerpc/powernv: Fix opal_exit tracepoint opcode
Michal Schmidt (1):
rtnetlink: NUL-terminate IFLA_PHYS_PORT_NAME string
Nicolai Hähnle (1):
drm/ttm: fix use-after-free races in vm fault handling
Nikola Pajkovsky (1):
x86/pci-calgary: Fix iommu_free() comparison of unsigned expression >= 0
Pierre-Louis Bossart (1):
clk: Make x86/ conditional on CONFIG_COMMON_CLK
Ruslan Ruslichenko (1):
x86/ioapic: Restore IO-APIC irq_chip retrigger callback
Stephen Boyd (3):
usb: chipidea: Only read/write OTGSC from one place
usb: chipidea: Handle extcon events properly
phy: qcom-usb-hs: Add depends on EXTCON
Takashi Iwai (1):
ALSA: hda - Fix deadlock of controller device lock at unbinding
Tony Lindgren (1):
serial: 8250_omap: Fix probe and remove for PM runtime
WANG Cong (2):
ipv6: initialize route null entry in addrconf_init()
ipv6: reorder ip6_route_dev_notifier after ipv6_dev_notf
Xinming Hu (1):
mwifiex: remove redundant dma padding in AMSDU
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 67 +SUBLEVEL = 68 EXTRAVERSION = NAME = Blurry Fish Butt
arch/arm/kernel/Makefile +0 -1
@@ -73,7 +73,6 @@ obj-$(CONFIG_IWMMXT) += iwmmxt.o obj-$(CONFIG_PERF_EVENTS) += perf_regs.o perf_callchain.o obj-$(CONFIG_HW_PERF_EVENTS) += perf_event_xscale.o perf_event_v6.o \ perf_event_v7.o -CFLAGS_pj4-cp0.o := -marm AFLAGS_iwmmxt.o := -Wa,-mcpu=iwmmxt obj-$(CONFIG_ARM_CPU_TOPOLOGY) += topology.o obj-$(CONFIG_VDSO) += vdso.o
arch/arm/kernel/pj4-cp0.c +4 -0
@@ -66,9 +66,13 @@ static void __init pj4_cp_access_write(u32 value) __asm__ __volatile__ ( "mcr p15, 0, %1, c1, c0, 2\n\t" +#ifdef CONFIG_THUMB2_KERNEL + "isb\n\t" +#else"mrc p15, 0, %0, c1, c0, 2\n\t" "mov %0, %0\n\t" "sub pc, pc, #4\n\t" +#endif :"=r" (temp) :"r" (value)); }
arch/arm/mach-omap2/omap-headsmp.S +2 -1
@@ -17,6 +17,7 @@ #include <linux/linkage.h> #include <linux/init.h> +#include <asm/assembler.h> #include "omap44xx.h"
@@ -56,7 +57,7 @@ wait_2: ldr r2, =AUX_CORE_BOOT0_PA @ read from AuxCoreBoot0 cmp r0, r4 bne wait_2 ldr r12, =API_HYP_ENTRY - adr r0, hyp_boot + badr r0, hyp_boot smc #0 hyp_boot: b secondary_startup
arch/arm64/net/bpf_jit_comp.c +4 -4
@@ -728,14 +728,14 @@ static int build_body(struct jit_ctx *ctx)int ret; ret =build_insn (insn, ctx); - -if (ctx->image ==NULL ) - ctx->offset[i] = ctx->idx; -if (ret >0 ) { i++; +if (ctx->image ==NULL ) + ctx->offset[i] = ctx->idx;continue ; } +if (ctx->image ==NULL ) + ctx->offset[i] = ctx->idx;if (ret)return ret; }
arch/mips/kernel/mips-r2-to-r6-emul.c +6 -6
@@ -434,8 +434,8 @@ static int multu_func(struct pt_regs *regs, u32 ir) rs = regs->regs[MIPSInst_RS (ir)]; res = (u64 )rt * (u64 )rs; rt = res; - regs->lo = (s64 )rt; - regs->hi = (s64)(res >>32 ); + regs->lo = (s64 )(s32 )rt; + regs->hi = (s64)(s32)(res >>32 );MIPS_R2_STATS (muls);
@@ -671,9 +671,9 @@ static int maddu_func(struct pt_regs *regs, u32 ir) res += ((((s64 )rt) <<32 ) | (u32 )rs); rt = res; - regs->lo = (s64 )rt; + regs->lo = (s64 )(s32 )rt; rs = res >>32 ; - regs->hi = (s64 )rs; + regs->hi = (s64 )(s32 )rs;MIPS_R2_STATS (dsps);
@@ -729,9 +729,9 @@ static int msubu_func(struct pt_regs *regs, u32 ir) res = ((((s64 )rt) <<32 ) | (u32 )rs) - res; rt = res; - regs->lo = (s64 )rt; + regs->lo = (s64 )(s32 )rt; rs = res >>32 ; - regs->hi = (s64 )rs; + regs->hi = (s64 )(s32 )rs;MIPS_R2_STATS (dsps);
arch/powerpc/platforms/powernv/opal-wrappers.S +1 -1
@@ -148,7 +148,7 @@ opal_tracepoint_entry: opal_tracepoint_return: std r3,STK_REG(R31)(r1) mr r4,r3 - ld r0,STK_REG(R23)(r1) + ld r3,STK_REG(R23)(r1) bl __trace_opal_exit ld r3,STK_REG(R31)(r1) addi r1,r1,STACKFRAMESIZE
arch/x86/kernel/apic/io_apic.c +2 -0
@@ -1875,6 +1875,7 @@ static struct irq_chip ioapic_chip __read_mostly = { .irq_ack = irq_chip_ack_parent, .irq_eoi = ioapic_ack_level, .irq_set_affinity = ioapic_set_affinity, + .irq_retrigger = irq_chip_retrigger_hierarchy, .flags = IRQCHIP_SKIP_SET_WAKE, };
@@ -1886,6 +1887,7 @@ static struct irq_chip ioapic_ir_chip __read_mostly = { .irq_ack = irq_chip_ack_parent, .irq_eoi = ioapic_ir_ack_level, .irq_set_affinity = ioapic_set_affinity, + .irq_retrigger = irq_chip_retrigger_hierarchy, .flags = IRQCHIP_SKIP_SET_WAKE, };
arch/x86/kernel/kprobes/common.h +1 -1
@@ -67,7 +67,7 @@#endif /* Ensure if the instruction can be boostable */ -extern int can_boost (kprobe_opcode_t *instruction); +extern int can_boost (kprobe_opcode_t *instruction,void *addr);/* Recover instruction if given address is probed */ extern unsigned long recover_probed_instruction (kprobe_opcode_t *buf,unsigned long addr);
arch/x86/kernel/kprobes/core.c +3 -3
@@ -163,12 +163,12 @@ NOKPROBE_SYMBOL(skip_prefixes);* Returns non-zero if opcode is boostable. * RIP relative instructions are adjusted at copying time in 64 bits mode */ -int can_boost (kprobe_opcode_t *opcodes) +int can_boost (kprobe_opcode_t *opcodes,void *addr) {kprobe_opcode_t opcode;kprobe_opcode_t *orig_opcodes = opcodes; -if (search_exception_tables ((unsigned long )opcodes)) +if (search_exception_tables ((unsigned long )addr))return 0 ;/* Page fault may occur on this address. */ retry:
@@ -413,7 +413,7 @@ static int arch_copy_kprobe(struct kprobe *p)* __copy_instruction can modify the displacement of the instruction, * but it doesn't affect boostable check. */ -if (can_boost (p->ainsn.insn)) +if (can_boost (p->ainsn.insn, p->addr)) p->ainsn.boostable =0 ;else p->ainsn.boostable =-1 ;
arch/x86/kernel/kprobes/opt.c +1 -1
@@ -177,7 +177,7 @@ static int copy_optimized_instructions(u8 *dest, u8 *src)while (len <RELATIVEJUMP_SIZE ) { ret =__copy_instruction (dest + len, src + len); -if (!ret || !can_boost (dest + len)) +if (!ret || !can_boost (dest + len, src + len))return -EINVAL ; len += ret; }
arch/x86/kernel/pci-calgary_64.c +1 -1
@@ -296,7 +296,7 @@ static void iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr,/* were we called with bad_dma_address? */ badend =DMA_ERROR_CODE + (EMERGENCY_PAGES *PAGE_SIZE ); -if (unlikely ((dma_addr >=DMA_ERROR_CODE ) && (dma_addr < badend))) { +if (unlikely (dma_addr < badend)) {WARN (1 ,KERN_ERR "Calgary: driver tried unmapping bad DMA " "address 0x%Lx\n" , dma_addr);return ;
arch/x86/kvm/cpuid.c +0 -6
@@ -818,12 +818,6 @@ void kvm_cpuid(struct kvm_vcpu *vcpu, u32 *eax, u32 *ebx, u32 *ecx, u32 *edx)if (!best) best =check_cpuid_limit (vcpu, function, index); -/* -* Perfmon not yet supported for L2 guest. -*/ -if (is_guest_mode (vcpu) && function ==0xa ) - best =NULL ; -if (best) { *eax = best->eax; *ebx = best->ebx;
arch/x86/kvm/vmx.c +15 -2
@@ -7754,8 +7754,6 @@ static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu)case EXIT_REASON_TASK_SWITCH :return true;case EXIT_REASON_CPUID : -if (kvm_register_read (vcpu,VCPU_REGS_RAX ) ==0xa ) -return false;return true;case EXIT_REASON_HLT :return nested_cpu_has (vmcs12,CPU_BASED_HLT_EXITING );
@@ -7840,6 +7838,9 @@ static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu)return nested_cpu_has2 (vmcs12,SECONDARY_EXEC_XSAVES );case EXIT_REASON_PCOMMIT :return nested_cpu_has2 (vmcs12,SECONDARY_EXEC_PCOMMIT ); +case EXIT_REASON_PML_FULL : +/* We don't expose PML support to L1. */ +return false;default :return true; }
@@ -9759,6 +9760,18 @@ static void prepare_vmcs02(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) } +if (enable_pml) { +/* +* Conceptually we want to copy the PML address and index from +* vmcs01 here, and then back to vmcs01 on nested vmexit. But, +* since we always flush the log on each vmexit, this happens +* to be equivalent to simply resetting the fields in vmcs02. +*/ +ASSERT (vmx->pml_pg); +vmcs_write64 (PML_ADDRESS ,page_to_phys (vmx->pml_pg)); +vmcs_write16 (GUEST_PML_INDEX ,PML_ENTITY_NUM -1 ); + } +if (nested_cpu_has_ept (vmcs12)) {kvm_mmu_unload (vcpu);nested_ept_init_mmu_context (vcpu);
arch/x86/platform/intel-mid/device_libs/platform_wdt.c +1 -1
@@ -17,7 +17,7 @@#include <asm/intel-mid.h> #include <asm/io_apic.h> -#define TANGIER_EXT_TIMER0_MSI 15 +#define TANGIER_EXT_TIMER0_MSI 12static struct platform_device wdt_dev = { .name ="intel_mid_wdt" ,
block/blk-integrity.c +2 -17
@@ -417,7 +417,7 @@ void blk_integrity_register(struct gendisk *disk, struct blk_integrity *template bi->tuple_size = template->tuple_size; bi->tag_size = template->tag_size; -blk_integrity_revalidate (disk); + disk->queue->backing_dev_info.capabilities |=BDI_CAP_STABLE_WRITES ; }EXPORT_SYMBOL (blk_integrity_register);
@@ -430,26 +430,11 @@ EXPORT_SYMBOL(blk_integrity_register);*/ void blk_integrity_unregister (struct gendisk *disk) { -blk_integrity_revalidate (disk); + disk->queue->backing_dev_info.capabilities &= ~BDI_CAP_STABLE_WRITES ;memset (&disk->queue->integrity,0 ,sizeof (struct blk_integrity )); }EXPORT_SYMBOL (blk_integrity_unregister); -void blk_integrity_revalidate (struct gendisk *disk) -{ -struct blk_integrity *bi = &disk->queue->integrity; - -if (!(disk->flags &GENHD_FL_UP )) -return ; - -if (bi->profile) - disk->queue->backing_dev_info.capabilities |= -BDI_CAP_STABLE_WRITES ; -else - disk->queue->backing_dev_info.capabilities &= - ~BDI_CAP_STABLE_WRITES ; -} -void blk_integrity_add (struct gendisk *disk) { if (kobject_init_and_add(&disk->integrity_kobj, &integrity_ktype,
block/partition-generic.c +0 -1
@@ -435,7 +435,6 @@ rescan:if (disk->fops->revalidate_disk) disk->fops->revalidate_disk (disk); -blk_integrity_revalidate (disk);check_disk_size_change (disk, bdev); bdev->bd_invalidated =0 ;if (!get_capacity (disk) || !(state =check_partition (disk, bdev)))
drivers/clk/Makefile +2 -0
@@ -78,7 +78,9 @@ obj-$(CONFIG_ARCH_TEGRA) += tegra/ obj-$(CONFIG_ARCH_OMAP2PLUS) += ti/ obj-$(CONFIG_ARCH_U8500) += ux500/ obj-$(CONFIG_COMMON_CLK_VERSATILE) += versatile/ +ifeq ($(CONFIG_COMMON_CLK), y) obj-$(CONFIG_X86) += x86/ +endif obj-$(CONFIG_ARCH_ZX) += zte/ obj-$(CONFIG_ARCH_ZYNQ) += zynq/ obj-$(CONFIG_H8300) += h8300/
drivers/gpu/drm/ttm/ttm_bo_vm.c +12 -0
@@ -66,8 +66,11 @@ static int ttm_bo_vm_fault_idle(struct ttm_buffer_object *bo,if (vmf->flags &FAULT_FLAG_RETRY_NOWAIT ) goto out_unlock; +ttm_bo_reference (bo);up_read (&vma->vm_mm->mmap_sem); (void )ttm_bo_wait (bo, false, true, false); +ttm_bo_unreserve (bo); +ttm_bo_unref (&bo); goto out_unlock; }
@@ -114,8 +117,10 @@ static int ttm_bo_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)if (vmf->flags &FAULT_FLAG_ALLOW_RETRY ) {if (!(vmf->flags &FAULT_FLAG_RETRY_NOWAIT )) { +ttm_bo_reference (bo);up_read (&vma->vm_mm->mmap_sem); (void )ttm_bo_wait_unreserved (bo); +ttm_bo_unref (&bo); }return VM_FAULT_RETRY ;
@@ -160,6 +165,13 @@ static int ttm_bo_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf) ret =ttm_bo_vm_fault_idle (bo, vma, vmf);if (unlikely (ret !=0 )) { retval = ret; + +if (retval ==VM_FAULT_RETRY && + !(vmf->flags &FAULT_FLAG_RETRY_NOWAIT )) { +/* The BO has already been unreserved. */ +return retval; + } + goto out_unlock; }
drivers/leds/leds-ktd2692.c +4 -4
@@ -296,15 +296,15 @@ static int ktd2692_parse_dt(struct ktd2692_context *led, struct device *dev,return -ENXIO ; led->ctrl_gpio =devm_gpiod_get (dev,"ctrl" ,GPIOD_ASIS ); -if (IS_ERR (led->ctrl_gpio)) { - ret =PTR_ERR (led->ctrl_gpio); + ret =PTR_ERR_OR_ZERO (led->ctrl_gpio); +if (ret) {dev_err (dev,"cannot get ctrl-gpios %d\n" , ret);return ret; } led->aux_gpio =devm_gpiod_get (dev,"aux" ,GPIOD_ASIS ); -if (IS_ERR (led->aux_gpio)) { - ret =PTR_ERR (led->aux_gpio); + ret =PTR_ERR_OR_ZERO (led->aux_gpio); +if (ret) {dev_err (dev,"cannot get aux-gpios %d\n" , ret);return ret; }
drivers/net/ethernet/broadcom/bnxt/bnxt.c +2 -1
@@ -2473,7 +2473,8 @@ static int bnxt_alloc_ntp_fltrs(struct bnxt *bp)INIT_HLIST_HEAD (&bp->ntp_fltr_hash_tbl[i]); bp->ntp_fltr_count =0 ; - bp->ntp_fltr_bmap =kzalloc (BITS_TO_LONGS (BNXT_NTP_FLTR_MAX_FLTR ), + bp->ntp_fltr_bmap =kcalloc (BITS_TO_LONGS (BNXT_NTP_FLTR_MAX_FLTR ), +sizeof (long ),GFP_KERNEL );if (!bp->ntp_fltr_bmap)
drivers/net/wireless/brcm80211/brcmfmac/core.c +8 -15
@@ -211,7 +211,7 @@ static netdev_tx_t brcmf_netdev_start_xmit(struct sk_buff *skb,int ret;struct brcmf_if *ifp =netdev_priv (ndev);struct brcmf_pub *drvr = ifp->drvr; -struct ethhdr *eh = (struct ethhdr *)(skb->data); +struct ethhdr *eh;brcmf_dbg (DATA ,"Enter, idx=%d\n" , ifp->bssidx);
@@ -232,22 +232,13 @@ static netdev_tx_t brcmf_netdev_start_xmit(struct sk_buff *skb, goto done; } -/* Make sure there's enough room for any header */ -if (skb_headroom (skb) < drvr->hdrlen) { -struct sk_buff *skb2; - -brcmf_dbg (INFO ,"%s: insufficient headroom\n" , +/* Make sure there's enough writable headroom*/ + ret =skb_cow_head (skb, drvr->hdrlen); +if (ret <0 ) { +brcmf_err ("%s: skb_cow_head failed\n" ,brcmf_ifname (drvr, ifp->bssidx)); - drvr->bus_if->tx_realloc++; - skb2 =skb_realloc_headroom (skb, drvr->hdrlen);dev_kfree_skb (skb); - skb = skb2; -if (skb ==NULL ) { -brcmf_err ("%s: skb_realloc_headroom failed\n" , -brcmf_ifname (drvr, ifp->bssidx)); - ret = -ENOMEM ; - goto done; - } + goto done; }/* validate length for ether packet */
@@ -257,6 +248,8 @@ static netdev_tx_t brcmf_netdev_start_xmit(struct sk_buff *skb, goto done; } + eh = (struct ethhdr *)(skb->data); +if (eh->h_proto ==htons (ETH_P_PAE ))atomic_inc (&ifp->pend_8021x_cnt);
drivers/net/wireless/mwifiex/11n_aggr.c +7 -12
@@ -101,13 +101,6 @@ mwifiex_11n_form_amsdu_txpd(struct mwifiex_private *priv, {struct txpd *local_tx_pd;struct mwifiex_txinfo *tx_info =MWIFIEX_SKB_TXCB (skb); -unsigned int pad; -int headroom = (priv->adapter->iface_type == -MWIFIEX_USB ) ?0 :INTF_HEADER_LEN ; - - pad = ((void *)skb->data -sizeof (*local_tx_pd) - - headroom -NULL ) & (MWIFIEX_DMA_ALIGN_SZ -1 ); -skb_push (skb, pad);skb_push (skb,sizeof (*local_tx_pd));
@@ -121,12 +114,10 @@ mwifiex_11n_form_amsdu_txpd(struct mwifiex_private *priv, local_tx_pd->bss_num = priv->bss_num; local_tx_pd->bss_type = priv->bss_type;/* Always zero as the data is followed by struct txpd */ - local_tx_pd->tx_pkt_offset =cpu_to_le16 (sizeof (struct txpd ) + - pad); + local_tx_pd->tx_pkt_offset =cpu_to_le16 (sizeof (struct txpd )); local_tx_pd->tx_pkt_type =cpu_to_le16 (PKT_TYPE_AMSDU ); local_tx_pd->tx_pkt_length =cpu_to_le16 (skb->len - -sizeof (*local_tx_pd) - - pad); +sizeof (*local_tx_pd));if (tx_info->flags &MWIFIEX_BUF_FLAG_TDLS_PKT ) local_tx_pd->flags |=MWIFIEX_TXPD_FLAGS_TDLS_PACKET ;
@@ -190,7 +181,11 @@ mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv, ra_list_flags);return -1 ; } -skb_reserve (skb_aggr,MWIFIEX_MIN_DATA_HEADER_LEN ); + +/* skb_aggr->data already 64 byte align, just reserve bus interface +* header and txpd. +*/ +skb_reserve (skb_aggr, headroom +sizeof (struct txpd )); tx_info_aggr =MWIFIEX_SKB_TXCB (skb_aggr);memset (tx_info_aggr,0 ,sizeof (*tx_info_aggr));
drivers/net/wireless/mwifiex/debugfs.c +2 -1
@@ -115,7 +115,8 @@ mwifiex_info_read(struct file *file, char __user *ubuf,if (GET_BSS_ROLE (priv) ==MWIFIEX_BSS_ROLE_STA ) { p +=sprintf (p,"multicast_count=\"%d\"\n" ,netdev_mc_count (netdev)); - p +=sprintf (p,"essid=\"%s\"\n" , info.ssid.ssid); + p +=sprintf (p,"essid=\"%.*s\"\n" , info.ssid.ssid_len, + info.ssid.ssid); p +=sprintf (p,"bssid=\"%pM\"\n" , info.bssid); p +=sprintf (p,"channel=\"%d\"\n" , (int ) info.bss_chan); p +=sprintf (p,"country_code = \"%s\"\n" , info.country_code);
drivers/net/wireless/mwifiex/sta_ioctl.c +0 -2
@@ -1098,8 +1098,6 @@ int mwifiex_set_encode(struct mwifiex_private *priv, struct key_params *kp, encrypt_key.is_rx_seq_valid = true; } }else { -if (GET_BSS_ROLE (priv) ==MWIFIEX_BSS_ROLE_UAP ) -return 0 ; encrypt_key.key_disable = true;if (mac_addr)memcpy (encrypt_key.mac_addr, mac_addr,ETH_ALEN );
drivers/phy/Kconfig +1 -0
@@ -368,6 +368,7 @@ config PHY_QCOM_UFS config PHY_TUSB1210 tristate "TI TUSB1210 ULPI PHY module" depends on USB_ULPI_BUS + depends on EXTCON || !EXTCON # if EXTCON=m, this cannot be built-in select GENERIC_PHY help Support for TI TUSB1210 USB ULPI PHY.
drivers/power/bq24190_charger.c +74 -108
297 lines not on this page · raw message
drivers/scsi/Kconfig +1 -1
@@ -1637,7 +1637,7 @@ config ATARI_SCSI_RESET_BOOT config MAC_SCSI tristate "Macintosh NCR5380 SCSI" - depends on MAC && SCSI=y + depends on MAC && SCSI select SCSI_SPI_ATTRS help This is the NCR 5380 SCSI controller included on most of the 68030
drivers/staging/emxx_udc/emxx_udc.c +2 -2
@@ -3181,7 +3181,7 @@ static const struct { };/*-------------------------------------------------------------------------*/ -static void __init nbu2ss_drv_ep_init (struct nbu2ss_udc *udc) +static void nbu2ss_drv_ep_init (struct nbu2ss_udc *udc) {int i;
@@ -3211,7 +3211,7 @@ static void __init nbu2ss_drv_ep_init(struct nbu2ss_udc *udc)/*-------------------------------------------------------------------------*/ /* platform_driver */ -static int __init nbu2ss_drv_contest_init ( +static int nbu2ss_drv_contest_init (struct platform_device *pdev,struct nbu2ss_udc *udc) {
drivers/staging/wlan-ng/p80211netdev.c +1 -1
@@ -232,7 +232,7 @@ static int p80211_convert_to_ether(wlandevice_t *wlandev, struct sk_buff *skb)struct p80211_hdr_a3 *hdr; hdr = (struct p80211_hdr_a3 *) skb->data; -if (p80211_rx_typedrop (wlandev, hdr->fc)) +if (p80211_rx_typedrop (wlandev,le16_to_cpu (hdr->fc)))return CONV_TO_ETHER_SKIPPED ;/* perform mcast filtering: allow my local address through but reject
drivers/tty/serial/8250/8250_omap.c +7 -1
@@ -1235,7 +1235,8 @@ static int omap8250_probe(struct platform_device *pdev)pm_runtime_put_autosuspend (&pdev->dev);return 0 ; err: -pm_runtime_put (&pdev->dev); +pm_runtime_dont_use_autosuspend (&pdev->dev); +pm_runtime_put_sync (&pdev->dev);pm_runtime_disable (&pdev->dev);return ret; }
@@ -1244,6 +1245,7 @@ static int omap8250_remove(struct platform_device *pdev) {struct omap8250_priv *priv =platform_get_drvdata (pdev); +pm_runtime_dont_use_autosuspend (&pdev->dev);pm_runtime_put_sync (&pdev->dev);pm_runtime_disable (&pdev->dev);serial8250_unregister_port (priv->line);
@@ -1343,6 +1345,10 @@ static int omap8250_runtime_suspend(struct device *dev)struct omap8250_priv *priv =dev_get_drvdata (dev);struct uart_8250_port *up; +/* In case runtime-pm tries this before we are setup */ +if (!priv) +return 0 ; + up =serial8250_get_port (priv->line);/* * When using 'no_console_suspend', the console UART must not be
drivers/usb/chipidea/ci.h +0 -3
@@ -428,9 +428,6 @@ int hw_port_test_set(struct ci_hdrc *ci, u8 mode);u8 hw_port_test_get (struct ci_hdrc *ci); -int hw_wait_reg (struct ci_hdrc *ci,enum ci_hw_regs reg,u32 mask, -u32 value,unsigned int timeout_ms); -void ci_platform_configure (struct ci_hdrc *ci);#endif /* __DRIVERS_USB_CHIPIDEA_CI_H */
drivers/usb/chipidea/core.c +0 -32
@@ -518,38 +518,6 @@ int hw_device_reset(struct ci_hdrc *ci)return 0 ; } -/** -* hw_wait_reg: wait the register value -* -* Sometimes, it needs to wait register value before going on. -* Eg, when switch to device mode, the vbus value should be lower -* than OTGSC_BSV before connects to host. -* -* @ci: the controller -* @reg: register index -* @mask: mast bit -* @value: the bit value to wait -* @timeout_ms: timeout in millisecond -* -* This function returns an error code if timeout -*/ -int hw_wait_reg (struct ci_hdrc *ci,enum ci_hw_regs reg,u32 mask, -u32 value,unsigned int timeout_ms) -{ -unsigned long elapse = jiffies +msecs_to_jiffies (timeout_ms); - -while (hw_read (ci, reg, mask) != value) { -if (time_after (jiffies, elapse)) { -dev_err (ci->dev,"timeout waiting for %08x in %d\n" , - mask, reg); -return -ETIMEDOUT ; - } -msleep (20 ); - } - -return 0 ; -} -static irqreturn_t ci_irq (int irq,void *data) {struct ci_hdrc *ci = data;
drivers/usb/chipidea/otg.c +71 -9
120 lines not on this page · raw message
drivers/usb/host/ehci-exynos.c +2 -0
@@ -77,10 +77,12 @@ static int exynos_ehci_get_phy(struct device *dev,if (IS_ERR (phy)) { ret =PTR_ERR (phy);if (ret == -EPROBE_DEFER ) { +of_node_put (child);return ret; }else if (ret != -ENOSYS && ret != -ENODEV ) {dev_err (dev,"Error retrieving usb2 phy: %d\n" , ret); +of_node_put (child);return ret; } }
drivers/usb/host/ohci-exynos.c +2 -0
@@ -66,10 +66,12 @@ static int exynos_ohci_get_phy(struct device *dev,if (IS_ERR (phy)) { ret =PTR_ERR (phy);if (ret == -EPROBE_DEFER ) { +of_node_put (child);return ret; }else if (ret != -ENOSYS && ret != -ENODEV ) {dev_err (dev,"Error retrieving usb2 phy: %d\n" , ret); +of_node_put (child);return ret; } }
drivers/usb/serial/ark3116.c +19 -6
@@ -373,23 +373,29 @@ static int ark3116_open(struct tty_struct *tty, struct usb_serial_port *port)dev_dbg (&port->dev,"%s - usb_serial_generic_open failed: %d\n" , __func__, result); - goto err_out; + goto err_free; }/* remove any data still left: also clears error state */ ark3116_read_reg (serial,UART_RX , buf);/* read modem status */ - priv->msr =ark3116_read_reg (serial,UART_MSR , buf); + result =ark3116_read_reg (serial,UART_MSR , buf); +if (result <0 ) + goto err_close; + priv->msr = *buf; +/* read line status */ - priv->lsr =ark3116_read_reg (serial,UART_LSR , buf); + result =ark3116_read_reg (serial,UART_LSR , buf); +if (result <0 ) + goto err_close; + priv->lsr = *buf; result =usb_submit_urb (port->interrupt_in_urb,GFP_KERNEL );if (result) {dev_err (&port->dev,"submit irq_in urb failed %d\n" , result); -ark3116_close (port); - goto err_out; + goto err_close; }/* activate interrupts */
@@ -402,8 +408,15 @@ static int ark3116_open(struct tty_struct *tty, struct usb_serial_port *port)if (tty)ark3116_set_termios (tty, port,NULL ); -err_out:kfree (buf); + +return 0 ; + +err_close: +usb_serial_generic_close (port); +err_free: +kfree (buf); +return result; }
drivers/usb/serial/digi_acceleport.c +23 -15
@@ -1399,25 +1399,30 @@ static int digi_read_inb_callback(struct urb *urb) {struct usb_serial_port *port = urb->context;struct digi_port *priv =usb_get_serial_port_data (port); -int opcode = ((unsigned char *)urb->transfer_buffer)[0 ]; -int len = ((unsigned char *)urb->transfer_buffer)[1 ]; -int port_status = ((unsigned char *)urb->transfer_buffer)[2 ]; -unsigned char *data = ((unsigned char *)urb->transfer_buffer) +3 ; +unsigned char *buf = urb->transfer_buffer; +int opcode; +int len; +int port_status; +unsigned char *data;int flag, throttled; -int status = urb->status; - -/* do not process callbacks on closed ports */ -/* but do continue the read chain */ -if (urb->status == -ENOENT ) -return 0 ;/* short/multiple packet check */ +if (urb->actual_length <2 ) { +dev_warn (&port->dev,"short packet received\n" ); +return -1 ; + } + + opcode = buf[0 ]; + len = buf[1 ]; +if (urb->actual_length != len +2 ) { -dev_err (&port->dev,"%s: INCOMPLETE OR MULTIPLE PACKET, " -"status=%d, port=%d, opcode=%d, len=%d, " -"actual_length=%d, status=%d\n" , __func__, status, - priv->dp_port_num, opcode, len, urb->actual_length, - port_status); +dev_err (&port->dev,"malformed packet received: port=%d, opcode=%d, len=%d, actual_length=%u\n" , + priv->dp_port_num, opcode, len, urb->actual_length); +return -1 ; + } + +if (opcode ==DIGI_CMD_RECEIVE_DATA && len <1 ) { +dev_err (&port->dev,"malformed data packet received\n" );return -1 ; }
@@ -1431,6 +1436,9 @@ static int digi_read_inb_callback(struct urb *urb)/* receive data */ if (opcode ==DIGI_CMD_RECEIVE_DATA ) { + port_status = buf[2 ]; + data = &buf[3 ]; +/* get flag from port_status */ flag =0 ;
drivers/usb/serial/ftdi_sio.c +5 -2
@@ -1439,10 +1439,13 @@ static int read_latency_timer(struct usb_serial_port *port)FTDI_SIO_GET_LATENCY_TIMER_REQUEST_TYPE ,0 , priv->interface, buf, 1, WDR_TIMEOUT); -if (rv <0 ) +if (rv <1 ) {dev_err (&port->dev,"Unable to read latency timer: %i\n" , rv); -else +if (rv >=0 ) + rv = -EIO ; + }else { priv->latency = buf[0 ]; + }kfree (buf);
drivers/usb/serial/io_edgeport.c +33 -15
106 lines not on this page · raw message
drivers/usb/serial/keyspan_pda.c +14 -5
@@ -139,6 +139,7 @@ static void keyspan_pda_rx_interrupt(struct urb *urb) {struct usb_serial_port *port = urb->context;unsigned char *data = urb->transfer_buffer; +unsigned int len = urb->actual_length;int retval;int status = urb->status;struct keyspan_pda_private *priv;
@@ -159,18 +160,26 @@ static void keyspan_pda_rx_interrupt(struct urb *urb) goto exit; } +if (len <1 ) { +dev_warn (&port->dev,"short message received\n" ); + goto exit; + } +/* see if the message is data or a status interrupt */ switch (data[0 ]) {case 0 :/* rest of message is rx data */ -if (urb->actual_length) { -tty_insert_flip_string (&port->port, data +1 , - urb->actual_length -1 ); -tty_flip_buffer_push (&port->port); - } +if (len <2 ) +break ; +tty_insert_flip_string (&port->port, data +1 , len -1 ); +tty_flip_buffer_push (&port->port);break ;case 1 :/* status interrupt */ +if (len <3 ) { +dev_warn (&port->dev,"short interrupt message received\n" ); +break ; + }dev_dbg (&port->dev,"rx int, d1=%d, d2=%d\n" , data[1 ], data[2 ]);switch (data[1 ]) {case 1 :/* modemline change */
drivers/usb/serial/mct_u232.c +5 -1
@@ -322,8 +322,12 @@ static int mct_u232_get_modem_stat(struct usb_serial_port *port,MCT_U232_GET_REQUEST_TYPE ,0 ,0 , buf,MCT_U232_GET_MODEM_STAT_SIZE , WDR_TIMEOUT); -if (rc <0 ) { +if (rc <MCT_U232_GET_MODEM_STAT_SIZE ) {dev_err (&port->dev,"Get MODEM STATus failed (error = %d)\n" , rc); + +if (rc >=0 ) + rc = -EIO ; + *msr =0 ; }else { *msr = buf[0 ];
drivers/usb/serial/quatech2.c +13 -11
@@ -188,22 +188,22 @@ static inline int qt2_setdevice(struct usb_device *dev, u8 *data) } -static inline int qt2_getdevice (struct usb_device *dev,u8 *data) -{ -return usb_control_msg (dev,usb_rcvctrlpipe (dev,0 ), -QT_SET_GET_DEVICE ,0xc0 ,0 ,0 , - data,3 ,QT2_USB_TIMEOUT ); -} -static inline int qt2_getregister (struct usb_device *dev,u8 uart,u8 reg,u8 *data) { -return usb_control_msg (dev,usb_rcvctrlpipe (dev,0 ), -QT_SET_GET_REGISTER ,0xc0 , reg, - uart, data,sizeof (*data),QT2_USB_TIMEOUT ); +int ret; + + ret =usb_control_msg (dev,usb_rcvctrlpipe (dev,0 ), +QT_SET_GET_REGISTER ,0xc0 , reg, + uart, data,sizeof (*data),QT2_USB_TIMEOUT ); +if (ret <sizeof (*data)) { +if (ret >=0 ) + ret = -EIO ; + } +return ret; } static inline int qt2_setregister(struct usb_device *dev,
@@ -372,9 +372,11 @@ static int qt2_open(struct tty_struct *tty, struct usb_serial_port *port)0xc0 ,0 , device_port, data, 2, QT2_USB_TIMEOUT); -if (status <0 ) { +if (status <2 ) {dev_err (&port->dev,"%s - open port failed %i\n" , __func__, status); +if (status >=0 ) + status = -EIO ;kfree (data);return status; }
drivers/usb/serial/ssu100.c +24 -7
@@ -80,9 +80,17 @@ static inline int ssu100_setdevice(struct usb_device *dev, u8 *data)static inline int ssu100_getdevice (struct usb_device *dev,u8 *data) { -return usb_control_msg (dev,usb_rcvctrlpipe (dev,0 ), -QT_SET_GET_DEVICE ,0xc0 ,0 ,0 , - data,3 ,300 ); +int ret; + + ret =usb_control_msg (dev,usb_rcvctrlpipe (dev,0 ), +QT_SET_GET_DEVICE ,0xc0 ,0 ,0 , + data,3 ,300 ); +if (ret <3 ) { +if (ret >=0 ) + ret = -EIO ; + } + +return ret; } static inline int ssu100_getregister(struct usb_device *dev,
@@ -90,10 +98,17 @@ static inline int ssu100_getregister(struct usb_device *dev,unsigned short reg, u8 *data) { - return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), - QT_SET_GET_REGISTER, 0xc0, reg, - uart, data, sizeof(*data), 300); + int ret; + + ret =usb_control_msg (dev,usb_rcvctrlpipe (dev,0 ), +QT_SET_GET_REGISTER ,0xc0 , reg, + uart, data,sizeof (*data),300 ); +if (ret <sizeof (*data)) { +if (ret >=0 ) + ret = -EIO ; + } +return ret; }
@@ -289,8 +304,10 @@ static int ssu100_open(struct tty_struct *tty, struct usb_serial_port *port)QT_OPEN_CLOSE_CHANNEL ,QT_TRANSFER_IN ,0x01 , 0, data, 2, 300); -if (result <0 ) { +if (result <2 ) {dev_dbg (&port->dev,"%s - open failed %i\n" , __func__, result); +if (result >=0 ) + result = -EIO ;kfree (data);return result; }
drivers/usb/serial/ti_usb_3410_5052.c +4 -8
@@ -1352,13 +1352,10 @@ static int ti_command_out_sync(struct ti_device *tdev, __u8 command, (USB_TYPE_VENDOR |USB_RECIP_DEVICE |USB_DIR_OUT ), value, moduleid, data, size, 1000); -if (status == size) - status =0 ; - -if (status >0 ) - status = -ECOMM ; +if (status <0 ) +return status; -return status; +return 0 ; }
@@ -1374,8 +1371,7 @@ static int ti_command_in_sync(struct ti_device *tdev, __u8 command,if (status == size) status =0 ; - -if (status >0 ) +else if (status >=0 ) status = -ECOMM ;return status;
fs/9p/acl.c +2 -0
@@ -283,6 +283,7 @@ static int v9fs_xattr_set_acl(const struct xattr_handler *handler,case ACL_TYPE_ACCESS :if (acl) {struct iattr iattr; +struct posix_acl *old_acl = acl; retval =posix_acl_update_mode (inode, &iattr.ia_mode, &acl);if (retval)
@@ -293,6 +294,7 @@ static int v9fs_xattr_set_acl(const struct xattr_handler *handler,* by the mode bits. So don't * update ACL. */ +posix_acl_release (old_acl); value =NULL ; size =0 ; }
fs/block_dev.c +0 -1
@@ -1098,7 +1098,6 @@ int revalidate_disk(struct gendisk *disk)if (disk->fops->revalidate_disk) ret = disk->fops->revalidate_disk (disk); -blk_integrity_revalidate (disk); bdev =bdget_disk (disk,0 );if (!bdev)return ret;
fs/f2fs/super.c +7 -0
@@ -1059,6 +1059,13 @@ static int sanity_check_raw_super(struct super_block *sb,return 1 ; } +if (le32_to_cpu (raw_super->segment_count) >F2FS_MAX_SEGMENT ) { +f2fs_msg (sb,KERN_INFO , +"Invalid segment count (%u)" , +le32_to_cpu (raw_super->segment_count)); +return 1 ; + } +/* check CP/SIT/NAT/SSA/MAIN_AREA area boundary */ if (sanity_check_area_boundary (sb, raw_super))return 1 ;
include/linux/f2fs_fs.h +6 -0
@@ -284,6 +284,12 @@ struct f2fs_nat_block {#define SIT_ENTRY_PER_BLOCK (PAGE_CACHE_SIZE / sizeof(struct f2fs_sit_entry))/* +* F2FS uses 4 bytes to represent block address. As a result, supported size of +* disk is 16 TB and it equals to 16 * 1024 * 1024 / 2 segments. +*/ +#define F2FS_MAX_SEGMENT ((16 * 1024 * 1024) / 2) + +/* * Note that f2fs_sit_entry->vblocks has the following bit-field information. * [15:10] : allocation type such as CURSEG_XXXX_TYPE * [9:0] : valid block count
include/linux/genhd.h +0 -2
@@ -742,11 +742,9 @@ static inline void part_nr_sects_write(struct hd_struct *part, sector_t size)#if defined(CONFIG_BLK_DEV_INTEGRITY )extern void blk_integrity_add (struct gendisk *);extern void blk_integrity_del (struct gendisk *); -extern void blk_integrity_revalidate (struct gendisk *);#else /* CONFIG_BLK_DEV_INTEGRITY */ static inline void blk_integrity_add (struct gendisk *disk) { }static inline void blk_integrity_del (struct gendisk *disk) { } -static inline void blk_integrity_revalidate (struct gendisk *disk) { }#endif /* CONFIG_BLK_DEV_INTEGRITY */ #else /* CONFIG_BLOCK */
include/linux/usb/chipidea.h +2 -0
@@ -14,6 +14,7 @@ struct ci_hdrc;* struct ci_hdrc_cable - structure for external connector cable state tracking * @state: current state of the line * @changed: set to true when extcon event happen +* @enabled: set to true if we've enabled the vbus or id interrupt * @edev: device which generate events * @ci: driver state of the chipidea device * @nb: hold event notification callback
@@ -22,6 +23,7 @@ struct ci_hdrc;struct ci_hdrc_cable {bool state;bool changed; +bool enabled;struct extcon_dev *edev;struct ci_hdrc *ci;struct notifier_block nb;
include/net/addrconf.h +2 -0
@@ -19,6 +19,8 @@#define ADDRCONF_TIMER_FUZZ (HZ / 4)#define ADDRCONF_TIMER_FUZZ_MAX (HZ) +#define ADDRCONF_NOTIFY_PRIORITY 0 +#include <linux/in.h> #include <linux/in6.h>
include/net/ip6_route.h +1 -0
@@ -77,6 +77,7 @@ static inline struct dst_entry *ip6_route_output(struct net *net,struct dst_entry *ip6_route_lookup (struct net *net,struct flowi6 *fl6,int flags); +void ip6_route_init_special_entries (void );int ip6_route_init (void );void ip6_route_cleanup (void );
lib/test_bpf.c +45 -0
51 lines not on this page · raw message
net/core/rtnetlink.c +1 -1
@@ -1018,7 +1018,7 @@ static int rtnl_phys_port_name_fill(struct sk_buff *skb, struct net_device *dev)return err; } -if (nla_put (skb,IFLA_PHYS_PORT_NAME ,strlen (name), name)) +if (nla_put_string (skb,IFLA_PHYS_PORT_NAME , name))return -EMSGSIZE ;return 0 ;
net/ipv4/raw.c +3 -0
@@ -354,6 +354,9 @@ static int raw_send_hdrinc(struct sock *sk, struct flowi4 *fl4, rt->dst.dev->mtu);return -EMSGSIZE ; } +if (length <sizeof (struct iphdr )) +return -EINVAL ; +if (flags&MSG_PROBE ) goto out;
net/ipv4/tcp_lp.c +4 -2
@@ -264,13 +264,15 @@ static void tcp_lp_pkts_acked(struct sock *sk, u32 num_acked, s32 rtt_us) {struct tcp_sock *tp =tcp_sk (sk);struct lp *lp =inet_csk_ca (sk); +u32 delta;if (rtt_us >0 )tcp_lp_rtt_sample (sk, rtt_us);/* calc inference */ -if (tcp_time_stamp > tp->rx_opt.rcv_tsecr) - lp->inference =3 * (tcp_time_stamp - tp->rx_opt.rcv_tsecr); + delta = tcp_time_stamp - tp->rx_opt.rcv_tsecr; +if ((s32 )delta >0 ) + lp->inference =3 * delta;/* test if within inference */ if (lp->last_drop && (tcp_time_stamp - lp->last_drop < lp->inference))
net/ipv4/tcp_minisocks.c +1 -0
@@ -547,6 +547,7 @@ struct sock *tcp_create_openreq_child(const struct sock *sk, newicsk->icsk_ack.last_seg_size = skb->len - newtp->tcp_header_len; newtp->rx_opt.mss_clamp = req->mss;tcp_ecn_openreq_child (newtp, req); + newtp->fastopen_req =NULL ; newtp->fastopen_rsk =NULL ; newtp->syn_data_acked =0 ; newtp->rack.mstamp.v64 =0 ;
net/ipv4/tcp_output.c +12 -7
@@ -1221,7 +1221,7 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len,* eventually). The difference is that pulled data not copied, but * immediately discarded. */ -static void __pskb_trim_head (struct sk_buff *skb,int len) +static int __pskb_trim_head (struct sk_buff *skb,int len) {struct skb_shared_info *shinfo;int i, k, eat;
@@ -1231,7 +1231,7 @@ static void __pskb_trim_head(struct sk_buff *skb, int len)__skb_pull (skb, eat); len -= eat;if (!len) -return ; +return 0 ; } eat = len; k =0 ;
@@ -1257,23 +1257,28 @@ static void __pskb_trim_head(struct sk_buff *skb, int len)skb_reset_tail_pointer (skb); skb->data_len -= len; skb->len = skb->data_len; +return len; }/* Remove acked data from a packet in the transmit queue. */ int tcp_trim_head (struct sock *sk,struct sk_buff *skb,u32 len) { +u32 delta_truesize; +if (skb_unclone (skb,GFP_ATOMIC ))return -ENOMEM ; -__pskb_trim_head (skb, len); + delta_truesize =__pskb_trim_head (skb, len);TCP_SKB_CB (skb)->seq += len; skb->ip_summed =CHECKSUM_PARTIAL ; - skb->truesize -= len; - sk->sk_wmem_queued -= len; -sk_mem_uncharge (sk, len); -sock_set_flag (sk,SOCK_QUEUE_SHRUNK ); +if (delta_truesize) { + skb->truesize -= delta_truesize; + sk->sk_wmem_queued -= delta_truesize; +sk_mem_uncharge (sk, delta_truesize); +sock_set_flag (sk,SOCK_QUEUE_SHRUNK ); + }/* Any change of skb->len requires recalculation of tso factor. */ if (tcp_skb_pcount (skb) >1 )
net/ipv6/addrconf.c +3 -0
@@ -3306,6 +3306,7 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,*/ static struct notifier_block ipv6_dev_notf = { .notifier_call = addrconf_notify, + .priority =ADDRCONF_NOTIFY_PRIORITY , };static void addrconf_type_change (struct net_device *dev,unsigned long event)
@@ -5940,6 +5941,8 @@ int __init addrconf_init(void) goto errlo; } +ip6_route_init_special_entries (); +for (i =0 ; i <IN6_ADDR_HSIZE ; i++)INIT_HLIST_HEAD (&inet6_addr_lst[i]);
net/ipv6/raw.c +2 -0
@@ -630,6 +630,8 @@ static int rawv6_send_hdrinc(struct sock *sk, struct msghdr *msg, int length,ipv6_local_error (sk,EMSGSIZE , fl6, rt->dst.dev->mtu);return -EMSGSIZE ; } +if (length <sizeof (struct ipv6hdr )) +return -EINVAL ;if (flags&MSG_PROBE ) goto out;
net/ipv6/route.c +26 -13
@@ -3363,7 +3363,10 @@ static int ip6_route_dev_notify(struct notifier_block *this,struct net_device *dev =netdev_notifier_info_to_dev (ptr);struct net *net =dev_net (dev); -if (event ==NETDEV_REGISTER && (dev->flags &IFF_LOOPBACK )) { +if (!(dev->flags &IFF_LOOPBACK )) +return NOTIFY_OK ; + +if (event ==NETDEV_REGISTER ) { net->ipv6.ip6_null_entry->dst.dev = dev; net->ipv6.ip6_null_entry->rt6i_idev =in6_dev_get (dev);#ifdef CONFIG_IPV6_MULTIPLE_TABLES
@@ -3372,6 +3375,12 @@ static int ip6_route_dev_notify(struct notifier_block *this, net->ipv6.ip6_blk_hole_entry->dst.dev = dev; net->ipv6.ip6_blk_hole_entry->rt6i_idev =in6_dev_get (dev);#endif + }else if (event ==NETDEV_UNREGISTER ) { +in6_dev_put (net->ipv6.ip6_null_entry->rt6i_idev); +#ifdef CONFIG_IPV6_MULTIPLE_TABLES +in6_dev_put (net->ipv6.ip6_prohibit_entry->rt6i_idev); +in6_dev_put (net->ipv6.ip6_blk_hole_entry->rt6i_idev); +#endif }return NOTIFY_OK ;
@@ -3678,9 +3687,24 @@ static struct pernet_operations ip6_route_net_late_ops = {static struct notifier_block ip6_route_dev_notifier = { .notifier_call = ip6_route_dev_notify, - .priority =0 , + .priority =ADDRCONF_NOTIFY_PRIORITY -10 , }; +void __init ip6_route_init_special_entries (void ) +{ +/* Registering of the loopback is done before this portion of code, +* the loopback reference in rt6_info will not be taken, do it +* manually for init_net */ + init_net.ipv6.ip6_null_entry->dst.dev = init_net.loopback_dev; + init_net.ipv6.ip6_null_entry->rt6i_idev =in6_dev_get (init_net.loopback_dev); +#ifdef CONFIG_IPV6_MULTIPLE_TABLES + init_net.ipv6.ip6_prohibit_entry->dst.dev = init_net.loopback_dev; + init_net.ipv6.ip6_prohibit_entry->rt6i_idev =in6_dev_get (init_net.loopback_dev); + init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev; + init_net.ipv6.ip6_blk_hole_entry->rt6i_idev =in6_dev_get (init_net.loopback_dev); +#endif +} +int __init ip6_route_init (void ) {int ret;
@@ -3707,17 +3731,6 @@ int __init ip6_route_init(void) ip6_dst_blackhole_ops.kmem_cachep = ip6_dst_ops_template.kmem_cachep; -/* Registering of the loopback is done before this portion of code, -* the loopback reference in rt6_info will not be taken, do it -* manually for init_net */ - init_net.ipv6.ip6_null_entry->dst.dev = init_net.loopback_dev; - init_net.ipv6.ip6_null_entry->rt6i_idev =in6_dev_get (init_net.loopback_dev); -#ifdef CONFIG_IPV6_MULTIPLE_TABLES - init_net.ipv6.ip6_prohibit_entry->dst.dev = init_net.loopback_dev; - init_net.ipv6.ip6_prohibit_entry->rt6i_idev =in6_dev_get (init_net.loopback_dev); - init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev; - init_net.ipv6.ip6_blk_hole_entry->rt6i_idev =in6_dev_get (init_net.loopback_dev); -#endif ret =fib6_init ();if (ret) goto out_register_subsys;
sound/pci/hda/hda_intel.c +13 -0
@@ -2166,7 +2166,20 @@ static void azx_remove(struct pci_dev *pci)/* cancel the pending probing work */ chip = card->private_data; hda = container_of(chip, struct hda_intel, chip); +/* FIXME: below is an ugly workaround. +* Both device_release_driver() and driver_probe_device() +* take *both* the device's and its parent's lock before +* calling the remove() and probe() callbacks. The codec +* probe takes the locks of both the codec itself and its +* parent, i.e. the PCI controller dev. Meanwhile, when +* the PCI controller is unbound, it takes its lock, too +* ==> ouch, a deadlock! +* As a workaround, we unlock temporarily here the controller +* device during cancel_work_sync() call. +*/ +device_unlock (&pci->dev);cancel_work_sync (&hda->probe_work); +device_lock (&pci->dev);snd_card_free (card); }
tools/power/cpupower/utils/helpers/cpuid.c +1 -0
@@ -156,6 +156,7 @@ out:*/ case 0x2C :/* Westmere EP - Gulftown */ cpu_info->caps |=CPUPOWER_CAP_HAS_TURBO_RATIO ; +break ;case 0x2A :/* SNB */ case 0x2D :/* SNB Xeon */ case 0x3A :/* IVB */