1. 11 1月, 2020 10 次提交
    • L
      Merge tag 'usb-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 213356fe
      Linus Torvalds 提交于
      Pull USB/PHY fixes from Greg KH:
       "Here are a number of USB and PHY driver fixes for 5.5-rc6
      
        Nothing all that unusual, just the a bunch of small fixes for a lot of
        different reported issues. The PHY driver fixes are in here as they
        interacted with the usb drivers.
      
        Full details of the patches are in the shortlog, and all of these have
        been in linux-next with no reported issues"
      
      * tag 'usb-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (24 commits)
        usb: missing parentheses in USE_NEW_SCHEME
        usb: ohci-da8xx: ensure error return on variable error is set
        usb: musb: Disable pullup at init
        usb: musb: fix idling for suspend after disconnect interrupt
        usb: typec: ucsi: Fix the notification bit offsets
        USB: Fix: Don't skip endpoint descriptors with maxpacket=0
        USB-PD tcpm: bad warning+size, PPS adapters
        phy/rockchip: inno-hdmi: round clock rate down to closest 1000 Hz
        usb: chipidea: host: Disable port power only if previously enabled
        usb: cdns3: should not use the same dev_id for shared interrupt handler
        usb: dwc3: gadget: Fix request complete check
        usb: musb: dma: Correct parameter passed to IRQ handler
        usb: musb: jz4740: Silence error if code is -EPROBE_DEFER
        usb: udc: tegra: select USB_ROLE_SWITCH
        USB: core: fix check for duplicate endpoints
        phy: cpcap-usb: Drop extra write to usb2 register
        phy: cpcap-usb: Improve host vs docked mode detection
        phy: cpcap-usb: Prevent USB line glitches from waking up modem
        phy: mapphone-mdm6600: Fix uninitialized status value regression
        phy: cpcap-usb: Fix flakey host idling and enumerating of devices
        ...
      213356fe
    • L
      Merge tag 'char-misc-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 9fb7007d
      Linus Torvalds 提交于
      Pull char/misc fix from Greg KH:
       "Here is a single fix, for the chrdev core, for 5.5-rc6
      
        There's been a long-standing race condition triggered by syzbot, and
        occasionally real people, in the chrdev open() path. Will finally took
        the time to track it down and fix it for real before the holidays.
      
        Here's that one patch, it's been in linux-next for a while with no
        reported issues and it does fix the reported problem"
      
      * tag 'char-misc-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        chardev: Avoid potential use-after-free in 'chrdev_open()'
      9fb7007d
    • L
      Merge tag 'staging-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 7da37cd0
      Linus Torvalds 提交于
      Pull staging fixes from Greg KH:
       "Here are some small staging driver fixes for 5.5-rc6.
      
        Nothing major here, just some small fixes for a comedi driver, the
        vt6656 driver, and a new device id for the rtl8188eu driver.
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'staging-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: rtl8188eu: Add device code for TP-Link TL-WN727N v5.21
        staging: comedi: adv_pci1710: fix AI channels 16-31 for PCI-1713
        staging: vt6656: set usb_set_intfdata on driver fail.
        staging: vt6656: remove bool from vnt_radio_power_on ret
        staging: vt6656: limit reg output to block size
        staging: vt6656: correct return of vnt_init_registers.
        staging: vt6656: Fix non zero logical return of, usb_control_msg
      7da37cd0
    • L
      Merge tag 'tty-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 5a96c0bb
      Linus Torvalds 提交于
      Pull tty/serial fixes from Greg KH:
       "Here are two tty/serial driver fixes for 5.5-rc6.
      
        The first fixes a much much reported issue with a previous tty port
        link patch that is in your tree, and the second fixes a problem where
        the serdev driver would claim ACPI devices that it shouldn't be
        claiming.
      
        Both have been in linux-next for a while with no reported issues"
      
      * tag 'tty-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        serdev: Don't claim unsupported ACPI serial devices
        tty: always relink the port
      5a96c0bb
    • L
      Merge tag 'block-5.5-2020-01-10' of git://git.kernel.dk/linux-block · 4e4cd21c
      Linus Torvalds 提交于
      Pull block fixes from Jens Axboe:
       "A few fixes that should go into this round.
      
        This pull request contains two NVMe fixes via Keith, removal of a dead
        function, and a fix for the bio op for read truncates (Ming)"
      
      * tag 'block-5.5-2020-01-10' of git://git.kernel.dk/linux-block:
        nvmet: fix per feat data len for get_feature
        nvme: Translate more status codes to blk_status_t
        fs: move guard_bio_eod() after bio_set_op_attrs
        block: remove unused mp_bvec_last_segment
      4e4cd21c
    • L
      Merge tag 'io_uring-5.5-2020-01-10' of git://git.kernel.dk/linux-block · 30b6487d
      Linus Torvalds 提交于
      Pull io_uring fix from Jens Axboe:
       "Single fix for this series, fixing a regression with the short read
        handling.
      
        This just removes it, as it cannot safely be done for all cases"
      
      * tag 'io_uring-5.5-2020-01-10' of git://git.kernel.dk/linux-block:
        io_uring: remove punt of short reads to async context
      30b6487d
    • L
      Merge tag 'mtd/fixes-for-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux · 4936ce17
      Linus Torvalds 提交于
      Pull MTD fixes from Miquel Raynal:
       "MTD:
         - sm_ftl: Fix NULL pointer warning.
      
        Raw NAND:
         - Cadence: fix compile testing.
         - STM32: Avoid locking.
      
        Onenand:
         - Fix several sparse/build warnings.
      
        SPI-NOR:
         - Add a flag to fix interaction with Micron parts"
      
      * tag 'mtd/fixes-for-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux:
        mtd: spi-nor: Fix the writing of the Status Register on micron flashes
        mtd: sm_ftl: fix NULL pointer warning
        mtd: onenand: omap2: Pass correct flags for prep_dma_memcpy
        mtd: onenand: samsung: Fix iomem access with regular memcpy
        mtd: onenand: omap2: Fix errors in style
        mtd: cadence: Fix cast to pointer from integer of different size warning
        mtd: rawnand: stm32_fmc2: avoid to lock the CPU bus
      4936ce17
    • L
      Merge tag 'sound-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · b1d198c0
      Linus Torvalds 提交于
      Pull sound fixes from Takashi Iwai:
       "A few piled ASoC fixes and usual HD-audio and USB-audio fixups. Some
        of them are for ASoC core error-handling"
      
      * tag 'sound-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda: enable regmap internal locking
        ALSA: hda/realtek - Add quirk for the bass speaker on Lenovo Yoga X1 7th gen
        ALSA: hda/realtek - Set EAPD control to default for ALC222
        ALSA: usb-audio: Apply the sample rate quirk for Bose Companion 5
        ALSA: hda/realtek - Add new codec supported for ALCS1200A
        ASoC: Intel: boards: Fix compile-testing RT1011/RT5682
        ASoC: SOF: imx8: Fix dsp_box offset
        ASoC: topology: Prevent use-after-free in snd_soc_get_pcm_runtime()
        ASoC: fsl_audmix: add missed pm_runtime_disable
        ASoC: stm32: spdifrx: fix input pin state management
        ASoC: stm32: spdifrx: fix race condition in irq handler
        ASoC: stm32: spdifrx: fix inconsistent lock state
        ASoC: core: Fix access to uninitialized list heads
        ASoC: soc-core: Set dpcm_playback / dpcm_capture
        ASoC: SOF: imx8: fix memory allocation failure check on priv->pd_dev
        ASoC: SOF: Intel: hda: hda-dai: fix oops on hda_link .hw_free
        ASoC: SOF: fix fault at driver unload after failed probe
      b1d198c0
    • L
      Merge tag 'thermal-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux · 658e1af5
      Linus Torvalds 提交于
      Pull thermal fix from Daniel Lezcano:
       "Fix backward compatibility with old DTBs on QCOM tsens (Amit
        Kucheria)"
      
      * tag 'thermal-v5.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux:
        drivers: thermal: tsens: Work with old DTBs
      658e1af5
    • L
      Merge tag 'pm-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · c23e744b
      Linus Torvalds 提交于
      Pull power management fixes from Rafael Wysocki:
       "Prevent the cpufreq-dt driver from probing Tegra20/30 (Dmitry
        Osipenko) and prevent the Intel RAPL power capping driver from
        crashing during CPU initialization due to a NULL pointer dereference
        if the processor model in use is not known to it (Harry Pan)"
      
      * tag 'pm-5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        powercap: intel_rapl: add NULL pointer check to rapl_mmio_cpu_online()
        cpufreq: dt-platdev: Blacklist NVIDIA Tegra20 and Tegra30 SoCs
      c23e744b
  2. 10 1月, 2020 19 次提交
  3. 09 1月, 2020 11 次提交
    • M
      fs: move guard_bio_eod() after bio_set_op_attrs · 83c9c547
      Ming Lei 提交于
      Commit 85a8ce62 ("block: add bio_truncate to fix guard_bio_eod")
      adds bio_truncate() for handling bio EOD. However, bio_truncate()
      doesn't use the passed 'op' parameter from guard_bio_eod's callers.
      
      So bio_trunacate() may retrieve wrong 'op', and zering pages may
      not be done for READ bio.
      
      Fixes this issue by moving guard_bio_eod() after bio_set_op_attrs()
      in submit_bh_wbc() so that bio_truncate() can always retrieve correct
      op info.
      
      Meantime remove the 'op' parameter from guard_bio_eod() because it isn't
      used any more.
      
      Cc: Carlos Maiolino <cmaiolino@redhat.com>
      Cc: linux-fsdevel@vger.kernel.org
      Fixes: 85a8ce62 ("block: add bio_truncate to fix guard_bio_eod")
      Signed-off-by: NMing Lei <ming.lei@redhat.com>
      
      Fold in kerneldoc and bio_op() change.
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      83c9c547
    • R
      HID: steam: Fix input device disappearing · 20eee6e5
      Rodrigo Rivas Costa 提交于
      The `connected` value for wired devices was not properly initialized,
      it must be set to `true` upon creation, because wired devices do not
      generate connection events.
      
      When a raw client (the Steam Client) uses the device, the input device
      is destroyed. Then, when the raw client finishes, it must be recreated.
      But since the `connected` variable was false this never happended.
      Signed-off-by: NRodrigo Rivas Costa <rodrigorivascosta@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      20eee6e5
    • D
      Merge tag 'amd-drm-fixes-5.5-2020-01-08' of... · ac0c9d3f
      Dave Airlie 提交于
      Merge tag 'amd-drm-fixes-5.5-2020-01-08' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
      
      amd-drm-fixes-5.5-2020-01-08:
      
      amdgpu:
      - Stability fix for raven
      - Reduce pixel encoding to if max clock is exceeded on HDMI
        to allow additional high res modes
      
      UAPI:
      - enable DRIVER_SYNCOBJ_TIMELINE for amdgpu
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      From: Alex Deucher <alexdeucher@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200108213649.5485-1-alexander.deucher@amd.com
      ac0c9d3f
    • D
      Merge tag 'drm-misc-fixes-2020-01-08' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes · 2c3addd8
      Dave Airlie 提交于
      mst: Fix NO_STOP_BIT bit offset (Wayne)
      sun4i: Fix RGB_DIV clock min divider on old hardware (Chen-Yu)
      fb_helper: Fix bits_per_pixel param set behavior to round up (Geert)
      
      Cc: Wayne Lin <Wayne.Lin@amd.com>
      Cc: Chen-Yu Tsai <wens@csie.org>
      Cc: Geert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      
      From: Sean Paul <sean@poorly.run>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200108205949.GA233273@art_vandelay
      2c3addd8
    • K
      pstore/ram: Regularize prz label allocation lifetime · e163fdb3
      Kees Cook 提交于
      In my attempt to fix a memory leak, I introduced a double-free in the
      pstore error path. Instead of trying to manage the allocation lifetime
      between persistent_ram_new() and its callers, adjust the logic so
      persistent_ram_new() always takes a kstrdup() copy, and leaves the
      caller's allocation lifetime up to the caller. Therefore callers are
      _always_ responsible for freeing their label. Before, it only needed
      freeing when the prz itself failed to allocate, and not in any of the
      other prz failure cases, which callers would have no visibility into,
      which is the root design problem that lead to both the leak and now
      double-free bugs.
      Reported-by: NCengiz Can <cengiz@kernel.wtf>
      Link: https://lore.kernel.org/lkml/d4ec59002ede4aaf9928c7f7526da87c@kernel.wtf
      Fixes: 8df955a3 ("pstore/ram: Fix error-path memory leak in persistent_ram_new() callers")
      Cc: stable@vger.kernel.org
      Signed-off-by: NKees Cook <keescook@chromium.org>
      e163fdb3
    • T
      tipc: fix wrong connect() return code · 9546a0b7
      Tuong Lien 提交于
      The current 'tipc_wait_for_connect()' function does a wait-loop for the
      condition 'sk->sk_state != TIPC_CONNECTING' to conclude if the socket
      connecting has done. However, when the condition is met, it returns '0'
      even in the case the connecting is actually failed, the socket state is
      set to 'TIPC_DISCONNECTING' (e.g. when the server socket has closed..).
      This results in a wrong return code for the 'connect()' call from user,
      making it believe that the connection is established and go ahead with
      building, sending a message, etc. but finally failed e.g. '-EPIPE'.
      
      This commit fixes the issue by changing the wait condition to the
      'tipc_sk_connected(sk)', so the function will return '0' only when the
      connection is really established. Otherwise, either the socket 'sk_err'
      if any or '-ETIMEDOUT'/'-EINTR' will be returned correspondingly.
      Acked-by: NYing Xue <ying.xue@windriver.com>
      Acked-by: NJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: NTuong Lien <tuong.t.lien@dektech.com.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9546a0b7
    • T
      tipc: fix link overflow issue at socket shutdown · 49afb806
      Tuong Lien 提交于
      When a socket is suddenly shutdown or released, it will reject all the
      unreceived messages in its receive queue. This applies to a connected
      socket too, whereas there is only one 'FIN' message required to be sent
      back to its peer in this case.
      
      In case there are many messages in the queue and/or some connections
      with such messages are shutdown at the same time, the link layer will
      easily get overflowed at the 'TIPC_SYSTEM_IMPORTANCE' backlog level
      because of the message rejections. As a result, the link will be taken
      down. Moreover, immediately when the link is re-established, the socket
      layer can continue to reject the messages and the same issue happens...
      
      The commit refactors the '__tipc_shutdown()' function to only send one
      'FIN' in the situation mentioned above. For the connectionless case, it
      is unavoidable but usually there is no rejections for such socket
      messages because they are 'dest-droppable' by default.
      
      In addition, the new code makes the other socket states clear
      (e.g.'TIPC_LISTEN') and treats as a separate case to avoid misbehaving.
      Acked-by: NYing Xue <ying.xue@windriver.com>
      Acked-by: NJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: NTuong Lien <tuong.t.lien@dektech.com.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      49afb806
    • D
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf · b73a6561
      David S. Miller 提交于
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter fixes for net
      
      The following patchset contains Netfilter fixes for net:
      
      1) Missing netns context in arp_tables, from Florian Westphal.
      
      2) Underflow in flowtable reference counter, from wenxu.
      
      3) Fix incorrect ethernet destination address in flowtable offload,
         from wenxu.
      
      4) Check for status of neighbour entry, from wenxu.
      
      5) Fix NAT port mangling, from wenxu.
      
      6) Unbind callbacks from destroy path to cleanup hardware properly
         on flowtable removal.
      
      7) Fix missing casting statistics timestamp, add nf_flowtable_time_stamp
         and use it.
      
      8) NULL pointer exception when timeout argument is null in conntrack
         dccp and sctp protocol helpers, from Florian Westphal.
      
      9) Possible nul-dereference in ipset with IPSET_ATTR_LINENO, also from
         Florian.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b73a6561
    • F
      netfilter: ipset: avoid null deref when IPSET_ATTR_LINENO is present · 22dad713
      Florian Westphal 提交于
      The set uadt functions assume lineno is never NULL, but it is in
      case of ip_set_utest().
      
      syzkaller managed to generate a netlink message that calls this with
      LINENO attr present:
      
      general protection fault: 0000 [#1] PREEMPT SMP KASAN
      RIP: 0010:hash_mac4_uadt+0x1bc/0x470 net/netfilter/ipset/ip_set_hash_mac.c:104
      Call Trace:
       ip_set_utest+0x55b/0x890 net/netfilter/ipset/ip_set_core.c:1867
       nfnetlink_rcv_msg+0xcf2/0xfb0 net/netfilter/nfnetlink.c:229
       netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477
       nfnetlink_rcv+0x1ba/0x460 net/netfilter/nfnetlink.c:563
      
      pass a dummy lineno storage, its easier than patching all set
      implementations.
      
      This seems to be a day-0 bug.
      
      Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
      Reported-by: syzbot+34bd2369d38707f3f4a7@syzkaller.appspotmail.com
      Fixes: a7b4f989 ("netfilter: ipset: IP set core support")
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Acked-by: NJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      22dad713
    • F
      netfilter: conntrack: dccp, sctp: handle null timeout argument · 1d9a7acd
      Florian Westphal 提交于
      The timeout pointer can be NULL which means we should modify the
      per-nets timeout instead.
      
      All do this, except sctp and dccp which instead give:
      
      general protection fault: 0000 [#1] PREEMPT SMP KASAN
      net/netfilter/nf_conntrack_proto_dccp.c:682
       ctnl_timeout_parse_policy+0x150/0x1d0 net/netfilter/nfnetlink_cttimeout.c:67
       cttimeout_default_set+0x150/0x1c0 net/netfilter/nfnetlink_cttimeout.c:368
       nfnetlink_rcv_msg+0xcf2/0xfb0 net/netfilter/nfnetlink.c:229
       netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477
      
      Reported-by: syzbot+46a4ad33f345d1dd346e@syzkaller.appspotmail.com
      Fixes: c779e849 ("netfilter: conntrack: remove get_timeout() indirection")
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      1d9a7acd
    • A
      atm: eni: fix uninitialized variable warning · 30780d08
      Arnd Bergmann 提交于
      With -O3, gcc has found an actual unintialized variable stored
      into an mmio register in two instances:
      
      drivers/atm/eni.c: In function 'discard':
      drivers/atm/eni.c:465:13: error: 'dma[1]' is used uninitialized in this function [-Werror=uninitialized]
         writel(dma[i*2+1],eni_dev->rx_dma+dma_wr*8+4);
                   ^
      drivers/atm/eni.c:465:13: error: 'dma[3]' is used uninitialized in this function [-Werror=uninitialized]
      
      Change the code to always write zeroes instead.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      30780d08