1. 18 Jan, 2020 2 commits
    • Linus Torvalds's avatar
      Merge tag 'staging-5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · bf3f401d
      Linus Torvalds authored
      Pull staging and IIO driver fixes from Greg KH:
       "Here are some small staging and iio driver fixes for 5.5-rc7
      
        All of them are for some small reported issues. Nothing major, full
        details in the shortlog.
      
        All have been in linux-next with no reported issues"
      
      * tag 'staging-5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: comedi: ni_routes: allow partial routing information
        staging: comedi: ni_routes: fix null dereference in ni_find_route_source()
        iio: light: vcnl4000: Fix scale for vcnl4040
        iio: buffer: align the size of scan bytes to size of the largest element
        iio: chemical: pms7003: fix unmet triggered buffer dependency
        iio: imu: st_lsm6dsx: Fix selection of ST_LSM6DS3_ID
        iio: adc: ad7124: Fix DT channel configuration
      bf3f401d
    • Linus Torvalds's avatar
      Merge tag 'usb-5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · c5fd2c5b
      Linus Torvalds authored
      Pull USB driver fixes from Greg KH:
       "Here are some small USB driver and core fixes for 5.5-rc7
      
        There's one fix for hub wakeup issues and a number of small usb-serial
        driver fixes and device id updates.
      
        The hub fix has been in linux-next for a while with no reported
        issues, and the usb-serial ones have all passed 0-day with no
        problems"
      
      * tag 'usb-5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        USB: serial: quatech2: handle unbound ports
        USB: serial: keyspan: handle unbound ports
        USB: serial: io_edgeport: add missing active-port sanity check
        USB: serial: io_edgeport: handle unbound ports on URB completion
        USB: serial: ch341: handle unbound port at reset_resume
        USB: serial: suppress driver bind attributes
        USB: serial: option: add support for Quectel RM500Q in QDL mode
        usb: core: hub: Improved device recognition on remote wakeup
        USB: serial: opticon: fix control-message timeouts
        USB: serial: option: Add support for Quectel RM500Q
        USB: serial: simple: Add Motorola Solutions TETRA MTP3xxx and MTP85xx
      c5fd2c5b
  2. 17 Jan, 2020 18 commits
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.5-2020-01-16' of git://git.kernel.dk/linux-block · 25e73aad
      Linus Torvalds authored
      Pull io_uring fixes form Jens Axboe:
      
       - Ensure ->result is always set when IO is retried (Bijan)
      
       - In conjunction with the above, fix a regression in polled IO issue
         when retried (me/Bijan)
      
       - Don't setup async context for read/write fixed, otherwise we may
         wrongly map the iovec on retry (me)
      
       - Cancel io-wq work if we fail getting mm reference (me)
      
       - Ensure dependent work is always initialized correctly (me)
      
       - Only allow original task to submit IO, don't allow it from a passed
         ring fd (me)
      
      * tag 'io_uring-5.5-2020-01-16' of git://git.kernel.dk/linux-block:
        io_uring: only allow submit from owning task
        io_uring: ensure workqueue offload grabs ring mutex for poll list
        io_uring: clear req->result always before issuing a read/write request
        io_uring: be consistent in assigning next work from handler
        io-wq: cancel work if we fail getting a mm reference
        io_uring: don't setup async context for read/write fixed
      25e73aad
    • Linus Torvalds's avatar
      Merge tag 'for-5.5-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · effaf901
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
       "A few more fixes that have been in the works during last twp weeks.
        All have a user visible effect and are stable material:
      
         - scrub: properly update progress after calling cancel ioctl, calling
           'resume' would start from the beginning otherwise
      
         - fix subvolume reference removal, after moving out of the original
           path the reference is not recognized and will lead to transaction
           abort
      
         - fix reloc root lifetime checks, could lead to crashes when there's
           subvolume cleaning running in parallel
      
         - fix memory leak when quotas get disabled in the middle of extent
           accounting
      
         - fix transaction abort in case of balance being started on degraded
           mount on eg. RAID1"
      
      * tag 'for-5.5-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: check rw_devices, not num_devices for balance
        Btrfs: always copy scrub arguments back to user space
        btrfs: relocation: fix reloc_root lifespan and access
        btrfs: fix memory leak in qgroup accounting
        btrfs: do not delete mismatched root refs
        btrfs: fix invalid removal of root ref
        btrfs: rework arguments of btrfs_unlink_subvol
      effaf901
    • Greg Kroah-Hartman's avatar
      Merge tag 'usb-serial-5.5-rc7' of... · 453495d4
      Greg Kroah-Hartman authored
      Merge tag 'usb-serial-5.5-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus
      
      Johan writes:
      
      USB-serial fixes for 5.5-rc7
      
      Here are a few fixes for issues related to unbound port devices which
      could lead to NULL-pointer dereferences. Notably the bind attributes for
      usb-serial (port) drivers are removed as almost none of the drivers can
      handle individual ports going away once they've been bound.
      
      Included are also some new device ids.
      
      All but the unbound-port fixes have been in linux-next with no reported
      issues.
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      
      * tag 'usb-serial-5.5-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial:
        USB: serial: quatech2: handle unbound ports
        USB: serial: keyspan: handle unbound ports
        USB: serial: io_edgeport: add missing active-port sanity check
        USB: serial: io_edgeport: handle unbound ports on URB completion
        USB: serial: ch341: handle unbound port at reset_resume
        USB: serial: suppress driver bind attributes
        USB: serial: option: add support for Quectel RM500Q in QDL mode
        USB: serial: opticon: fix control-message timeouts
        USB: serial: option: Add support for Quectel RM500Q
        USB: serial: simple: Add Motorola Solutions TETRA MTP3xxx and MTP85xx
      453495d4
    • Linus Torvalds's avatar
      Merge tag 'fuse-fixes-5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse · ab7541c3
      Linus Torvalds authored
      Pull fuse fix from Miklos Szeredi:
       "Fix a regression in the last release affecting the ftp module of the
        gvfs filesystem"
      
      * tag 'fuse-fixes-5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
        fuse: fix fuse_send_readpages() in the syncronous read case
      ab7541c3
    • Linus Torvalds's avatar
      Merge tag 'sound-5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 07d5ac6a
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "This became bigger than I have hoped for rc7. But, the only large LOC
        is for stm32 fixes that are simple rewriting of register access
        helpers, while the rest are all nice and small fixes:
      
         - A few ASoC fixes for the remaining probe error handling bugs
      
         - ALSA sequencer core fix for racy proc file accesses
      
         - Revert the option rename of snd-hda-intel to make compatible again
      
         - Various device-specific fixes"
      
      * tag 'sound-5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: seq: Fix racy access for queue timer in proc read
        ALSA: usb-audio: fix sync-ep altsetting sanity check
        ASoC: msm8916-wcd-digital: Reset RX interpolation path after use
        ASoC: msm8916-wcd-analog: Fix MIC BIAS Internal1
        ASoC: cros_ec_codec: Make the device acpi compatible
        ASoC: sti: fix possible sleep-in-atomic
        ASoC: msm8916-wcd-analog: Fix selected events for MIC BIAS External1
        ASoC: hdac_hda: Fix error in driver removal after failed probe
        ASoC: SOF: Intel: fix HDA codec driver probe with multiple controllers
        ASoC: SOF: Intel: lower print level to dbg if we will reinit DSP
        ALSA: dice: fix fallback from protocol extension into limited functionality
        ALSA: firewire-tascam: fix corruption due to spin lock without restoration in SoftIRQ context
        ALSA: hda: Rename back to dmic_detect option
        ASoC: stm32: dfsdm: fix 16 bits record
        ASoC: stm32: sai: fix possible circular locking
        ASoC: Fix NULL dereference at freeing
        ASoC: Intel: bytcht_es8316: Fix Irbis NB41 netbook quirk
        ASoC: rt5640: Fix NULL dereference on module unload
      07d5ac6a
    • Johan Hovold's avatar
      USB: serial: quatech2: handle unbound ports · 9715a43e
      Johan Hovold authored
      Check for NULL port data in the modem- and line-status handlers to avoid
      dereferencing a NULL pointer in the unlikely case where a port device
      isn't bound to a driver (e.g. after an allocation failure on port
      probe).
      
      Note that the other (stubbed) event handlers qt2_process_xmit_empty()
      and qt2_process_flush() would need similar sanity checks in case they
      are ever implemented.
      
      Fixes: f7a33e60 ("USB: serial: add quatech2 usb to serial driver")
      Cc: stable <stable@vger.kernel.org>     # 3.5
      Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      9715a43e
    • Johan Hovold's avatar
      USB: serial: keyspan: handle unbound ports · 3018dd3f
      Johan Hovold authored
      Check for NULL port data in the control URB completion handlers to avoid
      dereferencing a NULL pointer in the unlikely case where a port device
      isn't bound to a driver (e.g. after an allocation failure on port
      probe()).
      
      Fixes: 0ca1268e ("USB Serial Keyspan: add support for USA-49WG & USA-28XG")
      Fixes: 1da177e4 ("Linux-2.6.12-rc2")
      Cc: stable <stable@vger.kernel.org>
      Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      3018dd3f
    • Johan Hovold's avatar
      USB: serial: io_edgeport: add missing active-port sanity check · 1568c58d
      Johan Hovold authored
      The driver receives the active port number from the device, but never
      made sure that the port number was valid. This could lead to a
      NULL-pointer dereference or memory corruption in case a device sends
      data for an invalid port.
      
      Fixes: 1da177e4 ("Linux-2.6.12-rc2")
      Cc: stable <stable@vger.kernel.org>
      Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      1568c58d
    • Johan Hovold's avatar
      USB: serial: io_edgeport: handle unbound ports on URB completion · e37d1aed
      Johan Hovold authored
      Check for NULL port data in the shared interrupt and bulk completion
      callbacks to avoid dereferencing a NULL pointer in case a device sends
      data for a port device which isn't bound to a driver (e.g. due to a
      malicious device having unexpected endpoints or after an allocation
      failure on port probe).
      
      Fixes: 1da177e4 ("Linux-2.6.12-rc2")
      Cc: stable <stable@vger.kernel.org>
      Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      e37d1aed
    • Johan Hovold's avatar
      USB: serial: ch341: handle unbound port at reset_resume · 4d5ef53f
      Johan Hovold authored
      Check for NULL port data in reset_resume() to avoid dereferencing a NULL
      pointer in case the port device isn't bound to a driver (e.g. after a
      failed control request at port probe).
      
      Fixes: 1ded7ea4 ("USB: ch341 serial: fix port number changed after resume")
      Cc: stable <stable@vger.kernel.org>     # 2.6.30
      Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      4d5ef53f
    • Josef Bacik's avatar
      btrfs: check rw_devices, not num_devices for balance · b35cf1f0
      Josef Bacik authored
      The fstest btrfs/154 reports
      
        [ 8675.381709] BTRFS: Transaction aborted (error -28)
        [ 8675.383302] WARNING: CPU: 1 PID: 31900 at fs/btrfs/block-group.c:2038 btrfs_create_pending_block_groups+0x1e0/0x1f0 [btrfs]
        [ 8675.390925] CPU: 1 PID: 31900 Comm: btrfs Not tainted 5.5.0-rc6-default+ #935
        [ 8675.392780] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9ba527-rebuilt.opensuse.org 04/01/2014
        [ 8675.395452] RIP: 0010:btrfs_create_pending_block_groups+0x1e0/0x1f0 [btrfs]
        [ 8675.402672] RSP: 0018:ffffb2090888fb00 EFLAGS: 00010286
        [ 8675.404413] RAX: 0000000000000000 RBX: ffff92026dfa91c8 RCX: 0000000000000001
        [ 8675.406609] RDX: 0000000000000000 RSI: ffffffff8e100899 RDI: ffffffff8e100971
        [ 8675.408775] RBP: ffff920247c61660 R08: 0000000000000000 R09: 0000000000000000
        [ 8675.410978] R10: 0000000000000000 R11: 0000000000000000 R12: 00000000ffffffe4
        [ 8675.412647] R13: ffff92026db74000 R14: ffff920247c616b8 R15: ffff92026dfbc000
        [ 8675.413994] FS:  00007fd5e57248c0(0000) GS:ffff92027d800000(0000) knlGS:0000000000000000
        [ 8675.416146] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
        [ 8675.417833] CR2: 0000564aa51682d8 CR3: 000000006dcbc004 CR4: 0000000000160ee0
        [ 8675.419801] Call Trace:
        [ 8675.420742]  btrfs_start_dirty_block_groups+0x355/0x480 [btrfs]
        [ 8675.422600]  btrfs_commit_transaction+0xc8/0xaf0 [btrfs]
        [ 8675.424335]  reset_balance_state+0x14a/0x190 [btrfs]
        [ 8675.425824]  btrfs_balance.cold+0xe7/0x154 [btrfs]
        [ 8675.427313]  ? kmem_cache_alloc_trace+0x235/0x2c0
        [ 8675.428663]  btrfs_ioctl_balance+0x298/0x350 [btrfs]
        [ 8675.430285]  btrfs_ioctl+0x466/0x2550 [btrfs]
        [ 8675.431788]  ? mem_cgroup_charge_statistics+0x51/0xf0
        [ 8675.433487]  ? mem_cgroup_commit_charge+0x56/0x400
        [ 8675.435122]  ? do_raw_spin_unlock+0x4b/0xc0
        [ 8675.436618]  ? _raw_spin_unlock+0x1f/0x30
        [ 8675.438093]  ? __handle_mm_fault+0x499/0x740
        [ 8675.439619]  ? do_vfs_ioctl+0x56e/0x770
        [ 8675.441034]  do_vfs_ioctl+0x56e/0x770
        [ 8675.442411]  ksys_ioctl+0x3a/0x70
        [ 8675.443718]  ? trace_hardirqs_off_thunk+0x1a/0x1c
        [ 8675.445333]  __x64_sys_ioctl+0x16/0x20
        [ 8675.446705]  do_syscall_64+0x50/0x210
        [ 8675.448059]  entry_SYSCALL_64_after_hwframe+0x49/0xbe
        [ 8675.479187] BTRFS: error (device vdb) in btrfs_create_pending_block_groups:2038: errno=-28 No space left
      
      We now use btrfs_can_overcommit() to see if we can flip a block group
      read only.  Before this would fail because we weren't taking into
      account the usable un-allocated space for allocating chunks.  With my
      patches we were allowed to do the balance, which is technically correct.
      
      The test is trying to start balance on degraded mount.  So now we're
      trying to allocate a chunk and cannot because we want to allocate a
      RAID1 chunk, but there's only 1 device that's available for usage.  This
      results in an ENOSPC.
      
      But we shouldn't even be making it this far, we don't have enough
      devices to restripe.  The problem is we're using btrfs_num_devices(),
      that also includes missing devices. That's not actually what we want, we
      need to use rw_devices.
      
      The chunk_mutex is not needed here, rw_devices changes only in device
      add, remove or replace, all are excluded by EXCL_OP mechanism.
      
      Fixes: e4d8ec0f ("Btrfs: implement online profile changing")
      CC: stable@vger.kernel.org # 4.4+
      Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
      Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
      [ add stacktrace, update changelog, drop chunk_mutex ]
      Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
      b35cf1f0
    • Filipe Manana's avatar
      Btrfs: always copy scrub arguments back to user space · 5afe6ce7
      Filipe Manana authored
      If scrub returns an error we are not copying back the scrub arguments
      structure to user space. This prevents user space to know how much
      progress scrub has done if an error happened - this includes -ECANCELED
      which is returned when users ask for scrub to stop. A particular use
      case, which is used in btrfs-progs, is to resume scrub after it is
      canceled, in that case it relies on checking the progress from the scrub
      arguments structure and then use that progress in a call to resume
      scrub.
      
      So fix this by always copying the scrub arguments structure to user
      space, overwriting the value returned to user space with -EFAULT only if
      copying the structure failed to let user space know that either that
      copying did not happen, and therefore the structure is stale, or it
      happened partially and the structure is probably not valid and corrupt
      due to the partial copy.
      Reported-by: default avatarGraham Cobb <g.btrfs@cobb.uk.net>
      Link: https://lore.kernel.org/linux-btrfs/d0a97688-78be-08de-ca7d-bcb4c7fb397e@cobb.uk.net/
      Fixes: 06fe39ab ("Btrfs: do not overwrite scrub error with fault error in scrub ioctl")
      CC: stable@vger.kernel.org # 5.1+
      Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
      Reviewed-by: default avatarQu Wenruo <wqu@suse.com>
      Tested-by: default avatarGraham Cobb <g.btrfs@cobb.uk.net>
      Signed-off-by: default avatarFilipe Manana <fdmanana@suse.com>
      Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
      Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
      5afe6ce7
    • Linus Torvalds's avatar
      Merge tag 'gpio-v5.5-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio · 13b2668d
      Linus Torvalds authored
      Pull GPIO fixes from Linus Walleij:
       "This reverts the GPIOLIB_IRQCHIP in the ThunderX driver.
      
        ThunderX is a piece of Arm-based server chip. I converted the driver
        to hierarchical gpiochip without access to real silicon and failed
        miserably since I didn't take MSI's into account.
      
        Kevin Hao helpfully stepped in and fixed it properly, let's revert it
        for v5.5 and put the proper conversion into v5.6"
      
      * tag 'gpio-v5.5-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
        Revert "gpio: thunderx: Switch to GPIOLIB_IRQCHIP"
      13b2668d
    • Linus Torvalds's avatar
      Merge tag 'block-5.5-2020-01-16' of git://git.kernel.dk/linux-block · 5ffdff81
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "Three fixes that should go into this release:
      
         - The 32-bit segment size fix that I mentioned last week (Ming)
      
         - Use uint for the block size (Mikulas)
      
         - A null_blk zone write handling fix (Damien)"
      
      * tag 'block-5.5-2020-01-16' of git://git.kernel.dk/linux-block:
        block: fix an integer overflow in logical block size
        null_blk: Fix zone write handling
        block: fix get_max_segment_size() overflow on 32bit arch
      5ffdff81
    • Johan Hovold's avatar
      USB: serial: suppress driver bind attributes · fdb838ef
      Johan Hovold authored
      USB-serial drivers must not be unbound from their ports before the
      corresponding USB driver is unbound from the parent interface so
      suppress the bind and unbind attributes.
      
      Unbinding a serial driver while it's port is open is a sure way to
      trigger a crash as any driver state is released on unbind while port
      hangup is handled on the parent USB interface level. Drivers for
      multiport devices where ports share a resource such as an interrupt
      endpoint also generally cannot handle individual ports going away.
      
      Fixes: 1da177e4 ("Linux-2.6.12-rc2")
      Cc: stable <stable@vger.kernel.org>
      Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      fdb838ef
    • Jens Axboe's avatar
      io_uring: only allow submit from owning task · 44d28279
      Jens Axboe authored
      If the credentials or the mm doesn't match, don't allow the task to
      submit anything on behalf of this ring. The task that owns the ring can
      pass the file descriptor to another task, but we don't want to allow
      that task to submit an SQE that then assumes the ring mm and creds if
      it needs to go async.
      
      Cc: stable@vger.kernel.org
      Suggested-by: default avatarStefan Metzmacher <metze@samba.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      44d28279
    • Linus Torvalds's avatar
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 575966e0
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "I've been sitting on these longer than I meant, so the patch count is
        a bit higher than ideal for this part of the release. There's also
        some reverts of double-applied patches that brings the diffstat up a
        bit.
      
        With that said, the biggest changes are:
      
         - Revert of duplicate i2c device addition on two Aspeed (BMC)
           Devicetrees.
      
         - Move of two device nodes that got applied to the wrong part of the
           tree on ASpeed G6.
      
         - Regulator fix for Beaglebone X15 (adding 12/5V supplies)
      
         - Use interrupts for keys on Amlogic SM1 to avoid missed polls
      
        In addition to that, there is a collection of smaller DT fixes:
      
         - Power supply assignment fixes for i.MX6
      
         - Fix of interrupt line for magnetometer on i.MX8 Librem5 devkit
      
         - Build fixlets (selects) for davinci/omap2+
      
         - More interrupt number fixes for Stratix10, Amlogic SM1, etc.
      
         - ... and more similar fixes across different platforms
      
        And some non-DT stuff:
      
         - optee fix to register multiple shared pages properly
      
         - Clock calculation fixes for MMP3
      
         - Clock fixes for OMAP as well"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (42 commits)
        MAINTAINERS: Add myself as the co-maintainer for Actions Semi platforms
        ARM: dts: imx7: Fix Toradex Colibri iMX7S 256MB NAND flash support
        ARM: dts: imx6sll-evk: Remove incorrect power supply assignment
        ARM: dts: imx6sl-evk: Remove incorrect power supply assignment
        ARM: dts: imx6sx-sdb: Remove incorrect power supply assignment
        ARM: dts: imx6qdl-sabresd: Remove incorrect power supply assignment
        ARM: dts: imx6q-icore-mipi: Use 1.5 version of i.Core MX6DL
        ARM: omap2plus: select RESET_CONTROLLER
        ARM: davinci: select CONFIG_RESET_CONTROLLER
        ARM: dts: aspeed: rainier: Fix fan fault and presence
        ARM: dts: aspeed: rainier: Remove duplicate i2c busses
        ARM: dts: aspeed: tacoma: Remove duplicate flash nodes
        ARM: dts: aspeed: tacoma: Remove duplicate i2c busses
        ARM: dts: aspeed: tacoma: Fix fsi master node
        ARM: dts: aspeed-g6: Fix FSI master location
        ARM: dts: mmp3: Fix the TWSI ranges
        clk: mmp2: Fix the order of timer mux parents
        ARM: mmp: do not divide the clock rate
        arm64: dts: rockchip: Fix IR on Beelink A1
        optee: Fix multi page dynamic shm pool alloc
        ...
      575966e0
    • Linus Torvalds's avatar
      Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · ef64753c
      Linus Torvalds authored
      Pull clk fixes from Stephen Boyd:
       "Second collection of clk fixes for the next release.
      
        This one includes a fix for PM on TI SoCs with sysc devices and fixes
        a bunch of clks that are stuck always enabled on Qualcomm SDM845 SoCs.
      
        Allwinner SoCs get the usual set of fixes too, mostly correcting
        drivers to have the right bits that match the hardware.
      
        There's also a Samsung and Tegra fix in here to mark a clk critical
        and avoid a double free.
      
        And finally there's a fix for critical clks that silences a big
        warning splat about trying to enable a clk that couldn't even be
        prepared"
      
      * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        clk: ti: dra7-atl: Remove pm_runtime_irq_safe()
        clk: qcom: gcc-sdm845: Add missing flag to votable GDSCs
        clk: sunxi-ng: h6-r: Fix AR100/R_APB2 parent order
        clk: sunxi-ng: h6-r: Simplify R_APB1 clock definition
        clk: sunxi-ng: sun8i-r: Fix divider on APB0 clock
        clk: Don't try to enable critical clocks if prepare failed
        clk: tegra: Fix double-free in tegra_clk_init()
        clk: samsung: exynos5420: Keep top G3D clocks enabled
        clk: sunxi-ng: r40: Allow setting parent rate for external clock outputs
        clk: sunxi-ng: v3s: Fix incorrect number of hw_clks.
      ef64753c
  3. 16 Jan, 2020 9 commits
  4. 15 Jan, 2020 11 commits
    • Takashi Iwai's avatar
      ALSA: seq: Fix racy access for queue timer in proc read · 60adcfde
      Takashi Iwai authored
      snd_seq_info_timer_read() reads the information of the timer assigned
      for each queue, but it's done in a racy way which may lead to UAF as
      spotted by syzkaller.
      
      This patch applies the missing q->timer_mutex lock while accessing the
      timer object as well as a slight code change to adapt the standard
      coding style.
      
      Reported-by: syzbot+2b2ef983f973e5c40943@syzkaller.appspotmail.com
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20200115203733.26530-1-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      60adcfde
    • Jari Ruusu's avatar
      Fix built-in early-load Intel microcode alignment · f5ae2ea6
      Jari Ruusu authored
      Intel Software Developer's Manual, volume 3, chapter 9.11.6 says:
      
       "Note that the microcode update must be aligned on a 16-byte boundary
        and the size of the microcode update must be 1-KByte granular"
      
      When early-load Intel microcode is loaded from initramfs, userspace tool
      'iucode_tool' has already 16-byte aligned those microcode bits in that
      initramfs image.  Image that was created something like this:
      
       iucode_tool --write-earlyfw=FOO.cpio microcode-files...
      
      However, when early-load Intel microcode is loaded from built-in
      firmware BLOB using CONFIG_EXTRA_FIRMWARE= kernel config option, that
      16-byte alignment is not guaranteed.
      
      Fix this by forcing all built-in firmware BLOBs to 16-byte alignment.
      
      [ If we end up having other firmware with much bigger alignment
        requirements, we might need to introduce some method for the firmware
        to specify it, this is the minimal "just increase the alignment a bit
        to account for this one special case" patch    - Linus ]
      Signed-off-by: default avatarJari Ruusu <jari.ruusu@gmail.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: stable@kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f5ae2ea6
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2 · a4feff22
      Linus Torvalds authored
      Pull arch/nios2 fixlet from Ley Foon Tan:
       "Update my nios2 maintainer email"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2:
        MAINTAINERS: Update Ley Foon Tan's email address
      a4feff22
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v5.5-3' of git://git.infradead.org/linux-platform-drivers-x86 · 51d69817
      Linus Torvalds authored
      Pull x86 platform driver fixes from Andy Shevchenko:
      
       - Fix keyboard brightness control for ASUS laptops
      
       - Better handling parameters of GPD pocket fan module to avoid
         thermal shock
      
       - Add IDs to PMC platform driver to support Intel Comet Lake
      
       - Fix potential dead lock in Mellanox TM FIFO driver and ABI
         documentation
      
      * tag 'platform-drivers-x86-v5.5-3' of git://git.infradead.org/linux-platform-drivers-x86:
        Documentation/ABI: Add missed attribute for mlxreg-io sysfs interfaces
        Documentation/ABI: Fix documentation inconsistency for mlxreg-io sysfs interfaces
        platform/x86: asus-wmi: Fix keyboard brightness cannot be set to 0
        platform/x86: intel_pmc_core: update Comet Lake platform driver
        platform/x86: GPD pocket fan: Allow somewhat lower/higher temperature limits
        platform/x86: GPD pocket fan: Use default values when wrong modparams are given
        platform/mellanox: fix potential deadlock in the tmfifo driver
        platform/x86: intel-ips: Use the correct style for SPDX License Identifier
      51d69817
    • Linus Torvalds's avatar
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 0174cb6c
      Linus Torvalds authored
      Pull crypto fix from Herbert Xu:
       "This fixes a build problem for the hisilicon driver"
      
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: hisilicon/sec2 - Use atomics instead of __sync
      0174cb6c
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 84bf3946
      Linus Torvalds authored
      Pull vfs fixes from Al Viro:
       "Fixes for mountpoint_last() bugs (by converting to use of
        lookup_last()) and an autofs regression fix from this cycle (caused by
        follow_managed() breakage introduced in barrier fixes series)"
      
      * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        fix autofs regression caused by follow_managed() changes
        reimplement path_mountpoint() with less magic
      84bf3946
    • Damien Le Moal's avatar
      null_blk: Fix zone write handling · 16c731fe
      Damien Le Moal authored
      null_zone_write() only allows writing empty and implicitly opened zones.
      Writing to closed and explicitly opened zones must also be allowed and
      the zone condition must be transitioned to implicit open if the zone
      is not explicitly opened already.
      
      Fixes: da644b2c ("null_blk: add zone open, close, and finish support")
      Signed-off-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      16c731fe
    • Ian Abbott's avatar
      staging: comedi: ni_routes: allow partial routing information · 9fea3a40
      Ian Abbott authored
      This patch fixes a regression on setting up asynchronous commands to use
      external trigger sources when board-specific routing information is
      missing.
      
      `ni_find_device_routes()` (called via `ni_assign_device_routes()`) finds
      the table of register values for the device family and the set of valid
      routes for the specific board.  If both are found,
      `tables->route_values` is set to point to the table of register values
      for the device family and `tables->valid_routes` is set to point to the
      list of valid routes for the specific board.  If either is not found,
      both `tables->route_values` and `tables->valid_routes` are left set at
      their initial null values (initialized by `ni_assign_device_routes()`)
      and the function returns `-ENODATA`.
      
      Returning an error results in some routing functionality being disabled.
      Unfortunately, leaving `table->route_values` set to `NULL` also breaks
      the setting up of asynchronous commands that are configured to use
      external trigger sources.  Calls to `ni_check_trigger_arg()` or
      `ni_check_trigger_arg_roffs()` while checking the asynchronous command
      set-up would result in a null pointer dereference if
      `table->route_values` is `NULL`.  The null pointer dereference is fixed
      in another patch, but it now results in failure to set up the
      asynchronous command.  That is a regression from the behavior prior to
      commit 347e2448 ("staging: comedi: tio: implement global tio/ctr
      routing") and commit 56d0b826 ("staging: comedi: ni_mio_common:
      implement new routing for TRIG_EXT").
      
      Change `ni_find_device_routes()` to set `tables->route_values` and/or
      `tables->valid_routes` to valid information even if the other one can
      only be set to `NULL` due to missing information.  The function will
      still return an error in that case.  This should result in
      `tables->valid_routes` being valid for all currently supported device
      families even if the board-specific routing information is missing.
      That should be enough to fix the regression on setting up asynchronous
      commands to use external triggers for boards with missing routing
      information.
      
      Fixes: 347e2448 ("staging: comedi: tio: implement global tio/ctr routing")
      Fixes: 56d0b826 ("staging: comedi: ni_mio_common: implement new routing for TRIG_EXT").
      Cc: <stable@vger.kernel.org> # 4.20+
      Cc: Spencer E. Olson <olsonse@umich.edu>
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Link: https://lore.kernel.org/r/20200114182532.132058-3-abbotti@mev.co.ukSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9fea3a40
    • Ian Abbott's avatar
      staging: comedi: ni_routes: fix null dereference in ni_find_route_source() · 01e20b66
      Ian Abbott authored
      In `ni_find_route_source()`, `tables->route_values` gets dereferenced.
      However it is possible that `tables->route_values` is `NULL`, leading to
      a null pointer dereference.  `tables->route_values` will be `NULL` if
      the call to `ni_assign_device_routes()` during board initialization
      returned an error due to missing device family routing information or
      missing board-specific routing information.  For example, there is
      currently no board-specific routing information provided for the
      PCIe-6251 board and several other boards, so those are affected by this
      bug.
      
      The bug is triggered when `ni_find_route_source()` is called via
      `ni_check_trigger_arg()` or `ni_check_trigger_arg_roffs()` when checking
      the arguments for setting up asynchronous commands.  Fix it by returning
      `-EINVAL` if `tables->route_values` is `NULL`.
      
      Even with this fix, setting up asynchronous commands to use external
      trigger sources for boards with missing routing information will still
      fail gracefully.  Since `ni_find_route_source()` only depends on the
      device family routing information, it would be better if that was made
      available even if the board-specific routing information is missing.
      That will be addressed by another patch.
      
      Fixes: 4bb90c87 ("staging: comedi: add interface to ni routing table information")
      Cc: <stable@vger.kernel.org> # 4.20+
      Cc: Spencer E. Olson <olsonse@umich.edu>
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Link: https://lore.kernel.org/r/20200114182532.132058-2-abbotti@mev.co.ukSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      01e20b66
    • Keiya Nobuta's avatar
      usb: core: hub: Improved device recognition on remote wakeup · 9c06ac4c
      Keiya Nobuta authored
      If hub_activate() is called before D+ has stabilized after remote
      wakeup, the following situation might occur:
      
               __      ___________________
              /  \    /
      D+   __/    \__/
      
      Hub  _______________________________
                |  ^   ^           ^
                |  |   |           |
      Host _____v__|___|___________|______
                |  |   |           |
                |  |   |           \-- Interrupt Transfer (*3)
                |  |    \-- ClearPortFeature (*2)
                |   \-- GetPortStatus (*1)
                \-- Host detects remote wakeup
      
      - D+ goes high, Host starts running by remote wakeup
      - D+ is not stable, goes low
      - Host requests GetPortStatus at (*1) and gets the following hub status:
        - Current Connect Status bit is 0
        - Connect Status Change bit is 1
      - D+ stabilizes, goes high
      - Host requests ClearPortFeature and thus Connect Status Change bit is
        cleared at (*2)
      - After waiting 100 ms, Host starts the Interrupt Transfer at (*3)
      - Since the Connect Status Change bit is 0, Hub returns NAK.
      
      In this case, port_event() is not called in hub_event() and Host cannot
      recognize device. To solve this issue, flag change_bits even if only
      Connect Status Change bit is 1 when got in the first GetPortStatus.
      
      This issue occurs rarely because it only if D+ changes during a very
      short time between GetPortStatus and ClearPortFeature. However, it is
      fatal if it occurs in embedded system.
      Signed-off-by: default avatarKeiya Nobuta <nobuta.keiya@fujitsu.com>
      Cc: stable <stable@vger.kernel.org>
      Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Link: https://lore.kernel.org/r/20200109051448.28150-1-nobuta.keiya@fujitsu.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9c06ac4c
    • Kevin Hao's avatar
      Revert "gpio: thunderx: Switch to GPIOLIB_IRQCHIP" · a564ac35
      Kevin Hao authored
      This reverts commit a7fc89f9 because
      there are some bugs in this commit, and we don't have a simple way to
      fix these bugs. So revert this commit to make the thunderx gpio work
      on the stable kernel at least. We will switch to GPIOLIB_IRQCHIP
      for thunderx gpio by following patches.
      
      Fixes: a7fc89f9 ("gpio: thunderx: Switch to GPIOLIB_IRQCHIP")
      Signed-off-by: default avatarKevin Hao <haokexin@gmail.com>
      Link: https://lore.kernel.org/r/20200114082821.14015-2-haokexin@gmail.comSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      a564ac35