1. 12 1月, 2016 1 次提交
  2. 11 1月, 2016 1 次提交
  3. 10 1月, 2016 2 次提交
  4. 09 1月, 2016 17 次提交
    • M
      vmstat: allocate vmstat_wq before it is used · 751e5f5c
      Michal Hocko 提交于
      kernel test robot has reported the following crash:
      
        BUG: unable to handle kernel NULL pointer dereference at 00000100
        IP: [<c1074df6>] __queue_work+0x26/0x390
        *pdpt = 0000000000000000 *pde = f000ff53f000ff53 *pde = f000ff53f000ff53
        Oops: 0000 [#1] PREEMPT PREEMPT SMP SMP
        CPU: 0 PID: 24 Comm: kworker/0:1 Not tainted 4.4.0-rc4-00139-g373ccbe5 #1
        Workqueue: events vmstat_shepherd
        task: cb684600 ti: cb7ba000 task.ti: cb7ba000
        EIP: 0060:[<c1074df6>] EFLAGS: 00010046 CPU: 0
        EIP is at __queue_work+0x26/0x390
        EAX: 00000046 EBX: cbb37800 ECX: cbb37800 EDX: 00000000
        ESI: 00000000 EDI: 00000000 EBP: cb7bbe68 ESP: cb7bbe38
         DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
        CR0: 8005003b CR2: 00000100 CR3: 01fd5000 CR4: 000006b0
        Stack:
        Call Trace:
          __queue_delayed_work+0xa1/0x160
          queue_delayed_work_on+0x36/0x60
          vmstat_shepherd+0xad/0xf0
          process_one_work+0x1aa/0x4c0
          worker_thread+0x41/0x440
          kthread+0xb0/0xd0
          ret_from_kernel_thread+0x21/0x40
      
      The reason is that start_shepherd_timer schedules the shepherd work item
      which uses vmstat_wq (vmstat_shepherd) before setup_vmstat allocates
      that workqueue so if the further initialization takes more than HZ we
      might end up scheduling on a NULL vmstat_wq.  This is really unlikely
      but not impossible.
      
      Fixes: 373ccbe5 ("mm, vmstat: allow WQ concurrency to discover memory reclaim doesn't make any progress")
      Reported-by: Nkernel test robot <ying.huang@linux.intel.com>
      Signed-off-by: NMichal Hocko <mhocko@suse.com>
      Tested-by: NTetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
      Cc: stable@vger.kernel.org
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      751e5f5c
    • J
      compat_ioctl: don't call do_ioctl under set_fs(KERNEL_DS) · a7f61e89
      Jann Horn 提交于
      This replaces all code in fs/compat_ioctl.c that translated
      ioctl arguments into a in-kernel structure, then performed
      do_ioctl under set_fs(KERNEL_DS), with code that allocates
      data on the user stack and can call the VFS ioctl handler
      under USER_DS.
      
      This is done as a hardening measure because the caller
      does not know what kind of ioctl handler will be invoked,
      only that no corresponding compat_ioctl handler exists and
      what the ioctl command number is. The accidental
      invocation of an unlocked_ioctl handler that unexpectedly
      calls copy_to_user could be a severe security issue.
      Signed-off-by: NJann Horn <jann@thejh.net>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      a7f61e89
    • A
      compat_ioctl: don't pass fd around when not needed · 66cf191f
      Al Viro 提交于
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      66cf191f
    • J
      compat_ioctl: don't look up the fd twice · b4341721
      Jann Horn 提交于
      In code in fs/compat_ioctl.c that translates ioctl arguments
      into a in-kernel structure, then performs sys_ioctl, possibly
      under set_fs(KERNEL_DS), this commit changes the sys_ioctl
      calls to do_ioctl calls. do_ioctl is a new function that does
      the same thing as sys_ioctl, but doesn't look up the fd again.
      
      This change is made to avoid (potential) security issues
      because of ioctl handlers that accept one of the ioctl
      commands I2C_FUNCS, VIDEO_GET_EVENT, MTIOCPOS, MTIOCGET,
      TIOCGSERIAL, TIOCSSERIAL, RTC_IRQP_READ, RTC_EPOCH_READ.
      This can happen for multiple reasons:
      
       - The ioctl command number could be reused.
       - The ioctl handler might not check the full ioctl
         command. This is e.g. true for drm_ioctl.
       - The ioctl handler is very special, e.g. cuse_file_ioctl
      
      The real issue is that set_fs(KERNEL_DS) is used here,
      but that's fixed in a separate commit
      "compat_ioctl: don't call do_ioctl under set_fs(KERNEL_DS)".
      
      This change mitigates potential security issues by
      preventing a race that permits invocation of
      unlocked_ioctl handlers under KERNEL_DS through compat
      code even if a corresponding compat_ioctl handler exists.
      
      So far, no way has been identified to use this to damage
      kernel memory without having CAP_SYS_ADMIN in the init ns
      (with the capability, doing reads/writes at arbitrary
      kernel addresses should be easy through CUSE's ioctl
      handler with FUSE_IOCTL_UNRESTRICTED set).
      
      [AV: two missed sys_ioctl() taken care of]
      Signed-off-by: NJann Horn <jann@thejh.net>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      b4341721
    • L
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 44d8a7d5
      Linus Torvalds 提交于
      Pull ARM SoC fixes from Arnd Bergmann:
       "This is the final small set of ARM SoC bug fixes for linux-4.4, almost
        all regressions:
      
        OMAP:
         - data corruption on the Nokia N900 flash
      
        Allwinner:
         - Two defconfig change to get USB working again
      
        ARM Versatile:
         - Interrupt numbers gone bad after an older bug fix
      
        Nomadik:
         - Crashes from incorrect L2 cache settings
      
        VIA vt8500:
         - SD/MMC support on WM8650 never worked"
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        dts: vt8500: Add SDHC node to DTS file for WM8650
        ARM: Fix broken USB support in multi_v7_defconfig for sunxi devices
        ARM: versatile: fix MMC/SD interrupt assignment
        ARM: nomadik: set latencies to 8 cycles
        ARM: OMAP2+: Fix onenand rate detection to avoid filesystem corruption
        ARM: Fix broken USB support in sunxi_defconfig
      44d8a7d5
    • L
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 516c50cd
      Linus Torvalds 提交于
      Pull KVM fix from Paolo Bonzini:
       "A simple fix.  I'm sending it before the merge window, because it
        refines a patch found in your master branch but not yet in the
        kvm/next branch that is destined for 4.5"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        kvm: x86: only channel 0 of the i8254 is linked to the HPET
      516c50cd
    • L
      Merge tag 'pm+acpi-4.4-final' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 496b0b57
      Linus Torvalds 提交于
      Pull ACPI fix from Rafael Wysocki:
       "Just one obvious fix that adds a missing function argument in ACPI
        code introduced recently (Kees Cook)"
      
      * tag 'pm+acpi-4.4-final' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI / property: avoid leaking format string into kobject name
      496b0b57
    • L
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 650e5455
      Linus Torvalds 提交于
      Pull x86 fixes from Ingo Molnar:
       "A handful of x86 fixes:
      
         - a syscall ABI fix, fixing an Android breakage
         - a Xen PV guest fix relating to the RTC device, causing a
           non-working console
         - a Xen guest syscall stack frame fix
         - an MCE hotplug CPU crash fix"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/numachip: Fix NumaConnect2 MMCFG PCI access
        x86/entry: Restore traditional SYSENTER calling convention
        x86/entry: Fix some comments
        x86/paravirt: Prevent rtc_cmos platform device init on PV guests
        x86/xen: Avoid fast syscall path for Xen PV guests
        x86/mce: Ensure offline CPUs don't participate in rendezvous process
      650e5455
    • L
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · de030179
      Linus Torvalds 提交于
      Pull scheduler fixes from Ingo Molnar:
       "Misc scheduler fixes"
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/core: Reset task's lockless wake-queues on fork()
        sched/core: Fix unserialized r-m-w scribbling stuff
        sched/core: Check tgid in is_global_init()
        sched/fair: Fix multiplication overflow on 32-bit systems
      de030179
    • L
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 3ab6d1eb
      Linus Torvalds 提交于
      Pull perf fixes from Ingo Molnar:
       "Two core subsystem fixes, plus a handful of tooling fixes"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf: Fix race in swevent hash
        perf: Fix race in perf_event_exec()
        perf list: Robustify event printing routine
        perf list: Add support for PERF_COUNT_SW_BPF_OUT
        perf hists browser: Fix segfault if use symbol filter in cmdline
        perf hists browser: Reset selection when refresh
        perf hists browser: Add NULL pointer check to prevent crash
        perf buildid-list: Fix return value of perf buildid-list -k
        perf buildid-list: Show running kernel build id fix
      3ab6d1eb
    • L
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ea83ae2f
      Linus Torvalds 提交于
      Pull irq fix from Ingo Molnar:
       "Fixes a core IRQ subsystem deadlock"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        genirq: Prevent chip buslock deadlock
      ea83ae2f
    • L
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · a6a7358e
      Linus Torvalds 提交于
      Pull block revert from Jens Axboe:
       "The previous pull request had a split fix for NVMe, however there are
        corner cases where that ends up blowing up.
      
        So let's revert it for 4.4.  The regression isn't introduced in this
        cycle, and it's "just" a performance regression, not a
        stability/integrity issue"
      
      * 'for-linus' of git://git.kernel.dk/linux-block:
        Revert "block: Split bios on chunk boundaries"
      a6a7358e
    • L
      Merge tag 'dmaengine-fix-4.4' of git://git.infradead.org/users/vkoul/slave-dma · 212c7f66
      Linus Torvalds 提交于
      Pull dmaengine fixes from Vinod Koul:
       "Late fixes for 4.4 are three fixes for drivers which include a revert
        of mic-x100 fix which is causing regression, xgene fix for double IRQ
        and async_tx fix to use GFP_NOWAIT"
      
      * tag 'dmaengine-fix-4.4' of git://git.infradead.org/users/vkoul/slave-dma:
        dmaengine: xgene-dma: Fix double IRQ issue by setting IRQ_DISABLE_UNLAZY flag
        async_tx: use GFP_NOWAIT rather than GFP_IO
        dmaengine: Revert "dmaengine: mic_x100: add missing spin_unlock"
      212c7f66
    • L
      Merge branch 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging · 436950a6
      Linus Torvalds 提交于
      Pull dmi fix from Jean Delvare.
      
      * 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
        firmware: dmi_scan: Fix UUID endianness for SMBIOS >= 2.6
      436950a6
    • L
      Merge tag 'sound-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 4054f64c
      Linus Torvalds 提交于
      Pull sound fixes from Takashi Iwai:
       "A slightly higher volume than a new year's wish, but not too
        worrisome: a large LOC is only for HD-audio device-specific quirks, so
        fairly safe to apply.  The rest ASoC fixes are all trivial and small;
        a simple replacement of mutex call with nested lock version, a few
        Arizona and Realtek codec fixes, and a regression fix for Skylake
        firmware handling"
      
      * tag 'sound-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ASoC: Intel: Skylake: Fix the memory leak
        ASoC: Intel: Skylake: Revert previous broken fix memory leak fix
        ASoC: Use nested lock for snd_soc_dapm_mutex_lock
        ASoC: rt5645: add sys clk detection
        ALSA: hda - Add keycode map for alc input device
        ALSA: hda - Add mic mute hotkey quirk for Lenovo ThinkCentre AIO
        ASoC: arizona: Fix bclk for sample rates that are multiple of 4kHz
      4054f64c
    • A
      Merge tag 'omap-for-v4.4/onenand-corruption' of... · 841bcd2e
      Arnd Bergmann 提交于
      Merge tag 'omap-for-v4.4/onenand-corruption' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
      
      Pull "urgent onenand file system corruption fix for n900" from Tony Lindgren:
      
      Last minute urgent pull request to prevent file system corruption
      on Nokia N900.
      
      Looks like we have a GPMC bus timing bug that has gone unnoticed
      because of bootloader configured registers until few days ago. We
      are not detecting the onenand clock rate properly unless we have
      CONFIG_OMAP_GPMC_DEBUG set and this causes onenand corruption
      that can be easily be reproduced.
      
      There seems to be also an additional bug still lurking around for
      onenand corruption. But that is still being investigated and
      it does not seem to be GPMC timings related.
      
      Meanwhile, it would be good to get this fix into v4.4 to prevent
      wrong timings from corrupting onenand.
      
      * tag 'omap-for-v4.4/onenand-corruption' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
        ARM: OMAP2+: Fix onenand rate detection to avoid filesystem corruption
      841bcd2e
    • J
      Revert "block: Split bios on chunk boundaries" · 6126eb24
      Jens Axboe 提交于
      This reverts commit d3805611.
      
      If we end up splitting on the first segment, we don't adjust
      the sector count. That results in hitting a BUG() with attempting
      to split 0 sectors.
      
      As this is just a performance issue and not a regression since
      4.3 release, let's just rever this change. That gives us more
      time to test a real fix for 4.5, which would be marked for
      stable anyway.
      6126eb24
  5. 08 1月, 2016 7 次提交
  6. 07 1月, 2016 12 次提交
    • R
      dts: vt8500: Add SDHC node to DTS file for WM8650 · 0f090bf1
      Roman Volkov 提交于
      Since WM8650 has the same 'WMT' SDHC controller as WM8505, and the driver
      is already in the kernel, this node enables the controller support for
      WM8650
      Signed-off-by: NRoman Volkov <rvolkov@v1ros.org>
      Reviewed-by: NAlexey Charkov <alchark@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      0f090bf1
    • T
      ARM: Fix broken USB support in multi_v7_defconfig for sunxi devices · 5b1a6181
      Timo Sigurdsson 提交于
      Commit 69fb4dca ("power: Add an axp20x-usb-power driver") introduced a
      new driver for the USB power supply used on various Allwinner based SBCs.
      However, the driver was not added to multi_v7_defconfig which breaks USB
      support for some boards (e.g. LeMaker BananaPi) as the kernel will now
      turn off the USB power supply during boot by default if the driver isn't
      present. (This was not the case in linux 4.3 or lower where the USB power
      was always left on.)
      
      Hence, add the driver to multi_v7_defconfig in order to keep USB support
      working on those boards that require it.
      Signed-off-by: NTimo Sigurdsson <public_timo.s@silentcreek.de>
      Tested-by: NTimo Sigurdsson <public_timo.s@silentcreek.de>
      Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      5b1a6181
    • P
      kvm: x86: only channel 0 of the i8254 is linked to the HPET · e5e57e7a
      Paolo Bonzini 提交于
      While setting the KVM PIT counters in 'kvm_pit_load_count', if
      'hpet_legacy_start' is set, the function disables the timer on
      channel[0], instead of the respective index 'channel'. This is
      because channels 1-3 are not linked to the HPET.  Fix the caller
      to only activate the special HPET processing for channel 0.
      Reported-by: NP J P <pjp@fedoraproject.org>
      Fixes: 0185604cSigned-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      e5e57e7a
    • R
      iommu/dma: Use correct offset in map_sg · 164afb1d
      Robin Murphy 提交于
      When mapping a non-page-aligned scatterlist entry, we copy the original
      offset to the output DMA address before aligning it to hand off to
      iommu_map_sg(), then later adding the IOVA page address portion to get
      the final mapped address. However, when the IOVA page size is smaller
      than the CPU page size, it is the offset within the IOVA page we want,
      not that within the CPU page, which can easily be larger than an IOVA
      page and thus result in an incorrect final address.
      
      Fix the bug by taking only the IOVA-aligned part of the offset as the
      basis of the DMA address, not the whole thing.
      Signed-off-by: NRobin Murphy <robin.murphy@arm.com>
      Signed-off-by: NJoerg Roedel <jroedel@suse.de>
      164afb1d
    • D
      Merge branch 'linux-4.4' of git://github.com/skeggsb/linux into drm-fixes · 3bea6a4c
      Dave Airlie 提交于
      single nv40 oops fix.
      
      * 'linux-4.4' of git://github.com/skeggsb/linux:
        drm/nouveau/gr/nv40: fix oops in interrupt handler
      3bea6a4c
    • R
      dmaengine: xgene-dma: Fix double IRQ issue by setting IRQ_DISABLE_UNLAZY flag · b0b79024
      Rameshwar Prasad Sahu 提交于
      For interrupt controller that doesn't support irq_disable and hardware
      with level interrupt, an extra interrupt can be pending. This patch fixes
      the issue by setting IRQ_DISABLE_UNLAZY flag for the interrupt line.
      
      Reference: http://git.kernel.org/tip/e9849777d0e27cdd2902805be51da73e7c79578cSigned-off-by: NRameshwar Prasad Sahu <rsahu@apm.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      b0b79024
    • N
      async_tx: use GFP_NOWAIT rather than GFP_IO · b02bab6b
      NeilBrown 提交于
      These async_XX functions are called from md/raid5 in an atomic
      section, between get_cpu() and put_cpu(), so they must not sleep.
      So use GFP_NOWAIT rather than GFP_IO.
      
      Dan Williams writes: Longer term async_tx needs to be merged into md
      directly as we can allocate this unmap data statically per-stripe
      rather than per request.
      
      Fixed: 7476bd79 ("async_pq: convert to dmaengine_unmap_data")
      Cc: stable@vger.kernel.org (v3.13+)
      Reported-and-tested-by: NStanislav Samsonov <slava@annapurnalabs.com>
      Acked-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NNeilBrown <neilb@suse.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      b02bab6b
    • L
      ARM: versatile: fix MMC/SD interrupt assignment · 20f12758
      Linus Walleij 提交于
      Commit 0976c946
      "arm/versatile: Fix versatile irq specifications"
      has an off-by-one error on the Versatile AB that has
      been regressing the Versatile AB hardware for some time.
      
      However it seems like the interrupt assignments have
      never been correct and I have now adjusted them according
      to the specification. The masks for the valid interrupts
      made it impossible to assign the right SIC interrupt
      for the MMCI, so I went in and fixed these to correspond
      to the specifications, and added references if anyone
      wants to double-check.
      
      Due to the Versatile PB including the Versatile AB
      as a base DTS file, we need to override and correct
      some values to correspond to the actual changes in the
      hardware.
      
      For the Versatile PB I don't think the IRQ line
      assignment for MMCI has ever been correct for either of
      the two MMCI blocks. It would be nice if someone with the
      physical PB board could test this.
      
      Patch tested on the Versatile AB, QEMU for Versatile AB
      and QEMU for Versatile PB.
      
      Cc: Rob Herring <robh@kernel.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: stable@vger.kernel.org
      Fixes: 0976c946 ("arm/versatile: Fix versatile irq specifications")
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      20f12758
    • L
      ARM: nomadik: set latencies to 8 cycles · a461a3ec
      Linus Walleij 提交于
      The Nomadik has sporadic crashes because of these latencies, setting
      them to max makes the platform work nicely, so use this values for
      now.
      
      These latencies were set to 2 since the Nomadik platform was merged,
      but I suspect they never took effect until the right size and
      associativity for the cache was specified in the device tree and
      that is why the crash comes now.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      a461a3ec
    • L
      Merge tag 'for-linus-20160106' of git://git.infradead.org/linux-mtd · b06f3a16
      Linus Torvalds 提交于
      Pull MTD fixes from Brian Norris:
       "Three last MTD fixes for v4.4.  These are all fixes for regressions
        and bugs reported mid cycle.  Unfortunately, some of them took a bit
        long to get proper testing and feedback.
      
         - Assign the default MTD name earlier in the registration process, so
           partition parsers (like cmdlinepart) see the right name.  Without
           this, some systems may come up with unpartitioned flash.  This was
           a v4.4-rc1 regression.
      
         - Revert some new Winbond SPI NOR flash unlocking/locking support;
           new code in v4.4 caused regressions on some Spansion flash.
      
         - Fix mis-typed parameter ordering in SPI NOR unlock function; this
           bug was introduced in v4.4-rc1"
      
      * tag 'for-linus-20160106' of git://git.infradead.org/linux-mtd:
        mtd: spi-nor: fix stm_is_locked_sr() parameters
        mtd: spi-nor: fix Spansion regressions (aliased with Winbond)
        mtd: fix cmdlinepart parser, early naming for auto-filled MTD
      b06f3a16
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 51cb67c0
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
       "As usual, there are a couple straggler bug fixes:
      
         1) qlcnic_alloc_mbx_args() error returns are not checked in qlcnic
            driver.  Fix from Insu Yun.
      
         2) SKB refcounting bug in connector, from Florian Westphal.
      
         3) vrf_get_saddr() has to propagate fib_lookup() errors to it's
            callers, from David Ahern.
      
         4) Fix AF_UNIX splice/bind deadlock, from Rainer Weikusat.
      
         5) qdisc_rcu_free() fails to free the per-cpu qstats.  Fix from John
            Fastabend.
      
         6) vmxnet3 driver passes wrong page to dma_map_page(), fix from
           Shrikrishna Khare.
      
         7) Don't allow zero cwnd in tcp_cwnd_reduction(), from Yuchung Cheng"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
        tcp: fix zero cwnd in tcp_cwnd_reduction
        Driver: Vmxnet3: Fix regression caused by 5738a09d
        net: qmi_wwan: Add WeTelecom-WPD600N
        mkiss: fix scribble on freed memory
        net: possible use after free in dst_release
        net: sched: fix missing free per cpu on qstats
        ARM: net: bpf: fix zero right shift
        6pack: fix free memory scribbles
        net: filter: make JITs zero A for SKF_AD_ALU_XOR_X
        bridge: Only call /sbin/bridge-stp for the initial network namespace
        af_unix: Fix splice-bind deadlock
        net: Propagate lookup failure in l3mdev_get_saddr to caller
        r8152: add reset_resume function
        connector: bump skb->users before callback invocation
        cxgb4: correctly handling failed allocation
        qlcnic: correctly handle qlcnic_alloc_mbx_args
      51cb67c0
    • Y
      tcp: fix zero cwnd in tcp_cwnd_reduction · 8b8a321f
      Yuchung Cheng 提交于
      Patch 3759824d ("tcp: PRR uses CRB mode by default and SS mode
      conditionally") introduced a bug that cwnd may become 0 when both
      inflight and sndcnt are 0 (cwnd = inflight + sndcnt). This may lead
      to a div-by-zero if the connection starts another cwnd reduction
      phase by setting tp->prior_cwnd to the current cwnd (0) in
      tcp_init_cwnd_reduction().
      
      To prevent this we skip PRR operation when nothing is acked or
      sacked. Then cwnd must be positive in all cases as long as ssthresh
      is positive:
      
      1) The proportional reduction mode
         inflight > ssthresh > 0
      
      2) The reduction bound mode
        a) inflight == ssthresh > 0
      
        b) inflight < ssthresh
           sndcnt > 0 since newly_acked_sacked > 0 and inflight < ssthresh
      
      Therefore in all cases inflight and sndcnt can not both be 0.
      We check invalid tp->prior_cwnd to avoid potential div0 bugs.
      
      In reality this bug is triggered only with a sequence of less common
      events.  For example, the connection is terminating an ECN-triggered
      cwnd reduction with an inflight 0, then it receives reordered/old
      ACKs or DSACKs from prior transmission (which acks nothing). Or the
      connection is in fast recovery stage that marks everything lost,
      but fails to retransmit due to local issues, then receives data
      packets from other end which acks nothing.
      
      Fixes: 3759824d ("tcp: PRR uses CRB mode by default and SS mode conditionally")
      Reported-by: NOleksandr Natalenko <oleksandr@natalenko.name>
      Signed-off-by: NYuchung Cheng <ycheng@google.com>
      Signed-off-by: NNeal Cardwell <ncardwell@google.com>
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8b8a321f