[PATCH 4.14 11/52] powerpc: Force inlining of cpu_has_feature() to avoid build failure

2021-04-05 Thread Greg Kroah-Hartman
From: Christophe Leroy [ Upstream commit eed5fae00593ab9d261a0c1ffc1bdb786a87a55a ] The code relies on constant folding of cpu_has_feature() based on possible and always true values as defined per CPU_FTRS_ALWAYS and CPU_FTRS_POSSIBLE. Build failure is encountered with for instance book3e_all_d

[PATCH 4.14 15/52] staging: comedi: cb_pcidas: fix request_irq() warn

2021-04-05 Thread Greg Kroah-Hartman
From: Tong Zhang [ Upstream commit 2e5848a3d86f03024ae096478bdb892ab3d79131 ] request_irq() wont accept a name which contains slash so we need to repalce it with something else -- otherwise it will trigger a warning and the entry in /proc/irq/ will not be created since the .name might be used by

[PATCH 4.14 18/52] ext4: do not iput inode under running transaction in ext4_rename()

2021-04-05 Thread Greg Kroah-Hartman
From: zhangyi (F) [ Upstream commit 5dccdc5a1916d4266edd251f20113a5c495f ] In ext4_rename(), when RENAME_WHITEOUT failed to add new entry into directory, it ends up dropping new created whiteout inode under the running transaction. After commit <9b88f9fb0d2> ("ext4: Do not iput inode under r

[PATCH 4.14 16/52] staging: comedi: cb_pcidas64: fix request_irq() warn

2021-04-05 Thread Greg Kroah-Hartman
From: Tong Zhang [ Upstream commit d2d106fe3badfc3bf0dd3899d1c3f210c7203eab ] request_irq() wont accept a name which contains slash so we need to repalce it with something else -- otherwise it will trigger a warning and the entry in /proc/irq/ will not be created since the .name might be used by

[PATCH 4.14 17/52] ASoC: rt5659: Update MCLK rate in set_sysclk()

2021-04-05 Thread Greg Kroah-Hartman
From: Sameer Pujar [ Upstream commit dbf54a9534350d6aebbb34f5c1c606b81a4f35dd ] Simple-card/audio-graph-card drivers do not handle MCLK clock when it is specified in the codec device node. The expectation here is that, the codec should actually own up the MCLK clock and do necessary setup in the

[PATCH 4.9 34/35] audit: fix a net reference leak in audit_send_reply()

2021-04-05 Thread Greg Kroah-Hartman
From: Paul Moore commit a48b284b403a4a073d8beb72d2bb33e54df67fb6 upstream. If audit_send_reply() fails when trying to create a new thread to send the reply it also fails to cleanup properly, leaking a reference to a net structure. This patch fixes the error path and makes a handful of other cle

[PATCH 4.14 12/52] vhost: Fix vhost_vq_reset()

2021-04-05 Thread Greg Kroah-Hartman
From: Laurent Vivier [ Upstream commit beb691e69f4dec7bfe8b81b509848acfd1f0dbf9 ] vhost_reset_is_le() is vhost_init_is_le(), and in the case of cross-endian legacy, vhost_init_is_le() depends on vq->user_be. vq->user_be is set by vhost_disable_cross_endian(). But in vhost_vq_reset(), we have:

[PATCH 4.14 13/52] scsi: st: Fix a use after free in st_open()

2021-04-05 Thread Greg Kroah-Hartman
From: Lv Yunlong [ Upstream commit c8c165dea4c8f5ad67b1240861e4f6c5395fa4ac ] In st_open(), if STp->in_use is true, STp will be freed by scsi_tape_put(). However, STp is still used by DEBC_printk() after. It is better to DEBC_printk() before scsi_tape_put(). Link: https://lore.kernel.org/r/2021

[PATCH 4.14 14/52] scsi: qla2xxx: Fix broken #endif placement

2021-04-05 Thread Greg Kroah-Hartman
From: Alexey Dobriyan [ Upstream commit 5999b9e5b1f8a2f5417b755130919b3ac96f5550 ] Only half of the file is under include guard because terminating #endif is placed too early. Link: https://lore.kernel.org/r/YE4snvoW1SuwcXAn@localhost.localdomain Reviewed-by: Himanshu Madhani Signed-off-by: Al

[PATCH 4.9 32/35] staging: rtl8192e: Fix incorrect source in memcpy()

2021-04-05 Thread Greg Kroah-Hartman
From: Atul Gopinathan commit 72ad25fbbb78930f892b191637359ab5b94b3190 upstream. The variable "info_element" is of the following type: struct rtllib_info_element *info_element defined in drivers/staging/rtl8192e/rtllib.h: struct rtllib_info_element { u8 id;

[PATCH v3 5/5] RISC-V: Add crash kernel support

2021-04-05 Thread Nick Kossifidis
From: Nick Kossifidis This patch allows Linux to act as a crash kernel for use with kdump. Userspace will let the crash kernel know about the memory region it can use through linux,usable-memory property on the /memory node (overriding its reg property), and about the memory region where the elf

[PATCH 4.14 19/52] brcmfmac: clear EAP/association status bits on linkdown events

2021-04-05 Thread Greg Kroah-Hartman
From: Luca Pesce [ Upstream commit e862a3e4088070de352fdafe9bd9e3ae0a95a33c ] This ensure that previous association attempts do not leave stale statuses on subsequent attempts. This fixes the WARN_ON(!cr->bss)) from __cfg80211_connect_result() when connecting to an AP after a previous connectio

[PATCH 4.14 02/52] ipv6: weaken the v4mapped source check

2021-04-05 Thread Greg Kroah-Hartman
From: Jakub Kicinski [ Upstream commit dcc32f4f183ab8479041b23a1525d48233df1d43 ] This reverts commit 6af1799aaf3f1bc8defedddfa00df3192445bbf3. Commit 6af1799aaf3f ("ipv6: drop incoming packets having a v4mapped source address") introduced an input check against v4mapped addresses. Use of such

[PATCH 4.14 20/52] net: ethernet: aquantia: Handle error cleanup of start on open

2021-04-05 Thread Greg Kroah-Hartman
From: Nathan Rossi [ Upstream commit 8a28af7a3e85ddf358f8c41e401a33002f7a9587 ] The aq_nic_start function can fail in a variety of cases which leaves the device in broken state. An example case where the start function fails is the request_threaded_irq which can be interrupted, resulting in a E

[PATCH 4.14 22/52] net: wan/lmc: unregister device when no matching device is found

2021-04-05 Thread Greg Kroah-Hartman
From: Tong Zhang [ Upstream commit 62e69bc419772638369eff8ff81340bde8aceb61 ] lmc set sc->lmc_media pointer when there is a matching device. However, when no matching device is found, this pointer is NULL and the following dereference will result in a null-ptr-deref. To fix this issue, unregist

[PATCH 4.14 21/52] appletalk: Fix skb allocation size in loopback case

2021-04-05 Thread Greg Kroah-Hartman
From: Doug Brown [ Upstream commit 39935dccb21c60f9bbf1bb72d22ab6fd14ae7705 ] If a DDP broadcast packet is sent out to a non-gateway target, it is also looped back. There is a potential for the loopback device to have a longer hardware header length than the original target route's device, which

[PATCH 4.14 23/52] bpf: Remove MTU check in __bpf_skb_max_len

2021-04-05 Thread Greg Kroah-Hartman
From: Jesper Dangaard Brouer commit 6306c1189e77a513bf02720450bb43bd4ba5d8ae upstream. Multiple BPF-helpers that can manipulate/increase the size of the SKB uses __bpf_skb_max_len() as the max-length. This function limit size against the current net_device MTU (skb->dev->mtu). When a BPF-prog g

[PATCH 4.14 24/52] ALSA: usb-audio: Apply sample rate quirk to Logitech Connect

2021-04-05 Thread Greg Kroah-Hartman
From: Ikjoon Jang commit 625bd5a616ceda4840cd28f82e957c8ced394b6a upstream. Logitech ConferenceCam Connect is a compound USB device with UVC and UAC. Not 100% reproducible but sometimes it keeps responding STALL to every control transfer once it receives get_freq request. This patch adds 046d:0

[PATCH 4.14 25/52] ALSA: hda/realtek: fix a determine_headset_type issue for a Dell AIO

2021-04-05 Thread Greg Kroah-Hartman
From: Hui Wang commit febf22565549ea7111e7d45e8f2d64373cc66b11 upstream. We found a recording issue on a Dell AIO, users plug a headset-mic and select headset-mic from UI, but can't record any sound from headset-mic. The root cause is the determine_headset_type() returns a wrong type, e.g. users

[PATCH 4.14 03/52] ext4: fix bh ref count on error paths

2021-04-05 Thread Greg Kroah-Hartman
From: Zhaolong Zhang [ Upstream commit c915fb80eaa6194fa9bd0a4487705cd5b0dda2f1 ] __ext4_journalled_writepage should drop bhs' ref count on error paths Signed-off-by: Zhaolong Zhang Link: https://lore.kernel.org/r/1614678151-70481-1-git-send-email-zhangzl2...@126.com Signed-off-by: Theodore T

[PATCH 4.14 04/52] rpc: fix NULL dereference on kmalloc failure

2021-04-05 Thread Greg Kroah-Hartman
From: J. Bruce Fields [ Upstream commit 0ddc942394013f08992fc379ca04cffacbbe3dae ] I think this is unlikely but possible: svc_authenticate sets rq_authop and calls svcauth_gss_accept. The kmalloc(sizeof(*svcdata), GFP_KERNEL) fails, leaving rq_auth_data NULL, and returning SVC_DENIED. This ca

[PATCH 4.14 05/52] ASoC: rt5640: Fix dac- and adc- vol-tlv values being off by a factor of 10

2021-04-05 Thread Greg Kroah-Hartman
From: Hans de Goede [ Upstream commit cfa26ed1f9f885c2fd8f53ca492989d1e16d0199 ] The adc_vol_tlv volume-control has a range from -17.625 dB to +30 dB, not -176.25 dB to + 300 dB. This wrong scale is esp. a problem in userspace apps which translate the dB scale to a linear scale. With the logarit

[PATCH 4.14 09/52] ASoC: cs42l42: Fix mixer volume control

2021-04-05 Thread Greg Kroah-Hartman
From: Lucas Tanure [ Upstream commit 72d904763ae6a8576e7ad034f9da4f0e3c44bf24 ] The minimum value is 0x3f (-63dB), which also is mute Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20210305173442.195740-4-tanur...@opensource.cirrus.com Signed-off-by: Mark Brown Signed-off-by: Sa

[PATCH 4.14 27/52] tracing: Fix stack trace event size

2021-04-05 Thread Greg Kroah-Hartman
From: Steven Rostedt (VMware) commit 9deb193af69d3fd6dd8e47f292b67c805a787010 upstream. Commit cbc3b92ce037 fixed an issue to modify the macros of the stack trace event so that user space could parse it properly. Originally the stack trace format to user space showed that the called stack was a

[PATCH 4.14 08/52] ASoC: es8316: Simplify adc_pga_gain_tlv table

2021-04-05 Thread Greg Kroah-Hartman
From: Hans de Goede [ Upstream commit bb18c678754ce1514100fb4c0bf6113b5af36c48 ] Most steps in this table are steps of 3dB (300 centi-dB), so we can simplify the table. This not only reduces the amount of space it takes inside the kernel, this also makes alsa-lib's mixer code actually accept th

[PATCH 4.14 37/52] pinctrl: rockchip: fix restore error in resume

2021-04-05 Thread Greg Kroah-Hartman
From: Wang Panzhenzhuan commit c971af25cda94afe71617790826a86253e88eab0 upstream. The restore in resume should match to suspend which only set for RK3288 SoCs pinctrl. Fixes: 8dca933127024 ("pinctrl: rockchip: save and restore gpio6_c6 pinmux in suspend/resume") Reviewed-by: Jianqun Xu Review

[PATCH 4.14 36/52] mm: writeback: use exact memcg dirty counts

2021-04-05 Thread Greg Kroah-Hartman
From: Greg Thelen commit 0b3d6e6f2dd0a7b697b1aa8c167265908940624b upstream. Since commit a983b5ebee57 ("mm: memcontrol: fix excessive complexity in memory.stat reporting") memcg dirty and writeback counters are managed as: 1) per-memcg per-cpu values in range of [-32..32] 2) per-memcg atomic

[PATCH 4.14 00/52] 4.14.229-rc1 review

2021-04-05 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.14.229 release. There are 52 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know. Responses should be made by Wed, 07 Apr 2021 08:50:09 +. Anything re

[PATCH 4.14 07/52] ASoC: sgtl5000: set DAP_AVC_CTRL register to correct default value on probe

2021-04-05 Thread Greg Kroah-Hartman
From: Benjamin Rood [ Upstream commit f86f58e3594fb0ab1993d833d3b9a2496f3c928c ] According to the SGTL5000 datasheet [1], the DAP_AVC_CTRL register has the following bit field definitions: | BITS | FIELD | RW | RESET | DEFINITION| | 15| RSVD| RO | 0x0

[PATCH 4.14 38/52] extcon: Add stubs for extcon_register_notifier_all() functions

2021-04-05 Thread Greg Kroah-Hartman
From: Krzysztof Kozlowski [ Upstream commit c9570d4a5efd04479b3cd09c39b571eb031d94f4 ] Add stubs for extcon_register_notifier_all() function for !CONFIG_EXTCON case. This is useful for compile testing and for drivers which use EXTCON but do not require it (therefore do not depend on CONFIG_EXTC

[PATCH 4.14 06/52] ASoC: rt5651: Fix dac- and adc- vol-tlv values being off by a factor of 10

2021-04-05 Thread Greg Kroah-Hartman
From: Hans de Goede [ Upstream commit eee51df776bd6cac10a76b2779a9fdee3f622b2b ] The adc_vol_tlv volume-control has a range from -17.625 dB to +30 dB, not -176.25 dB to + 300 dB. This wrong scale is esp. a problem in userspace apps which translate the dB scale to a linear scale. With the logarit

[PATCH 4.14 39/52] extcon: Fix error handling in extcon_dev_register

2021-04-05 Thread Greg Kroah-Hartman
From: Dinghao Liu [ Upstream commit d3bdd1c3140724967ca4136755538fa7c05c2b4e ] When devm_kcalloc() fails, we should execute device_unregister() to unregister edev->dev from system. Fixes: 046050f6e623e ("extcon: Update the prototype of extcon_register_notifier() with enum extcon") Signed-off-b

[PATCH 4.14 40/52] firewire: nosy: Fix a use-after-free bug in nosy_ioctl()

2021-04-05 Thread Greg Kroah-Hartman
From: Zheyu Ma [ Upstream commit 829933ef05a951c8ff140e814656d73e74915faf ] For each device, the nosy driver allocates a pcilynx structure. A use-after-free might happen in the following scenario: 1. Open nosy device for the first time and call ioctl with command NOSY_IOC_START, then a new

[PATCH 4.14 41/52] usbip: vhci_hcd fix shift out-of-bounds in vhci_hub_control()

2021-04-05 Thread Greg Kroah-Hartman
From: Shuah Khan commit 1cc5ed25bdade86de2650a82b2730108a76de20c upstream. Fix shift out-of-bounds in vhci_hub_control() SetPortFeature handling. UBSAN: shift-out-of-bounds in drivers/usb/usbip/vhci_hcd.c:605:42 shift exponent 768 is too large for 32-bit type 'int' Reported-by: syzbot+3dea30b0

[PATCH 4.14 42/52] USB: quirks: ignore remote wake-up on Fibocom L850-GL LTE modem

2021-04-05 Thread Greg Kroah-Hartman
From: Vincent Palatin commit 0bd860493f81eb2a46173f6f5e44cc38331c8dbd upstream. This LTE modem (M.2 card) has a bug in its power management: there is some kind of race condition for U3 wake-up between the host and the device. The modem firmware sometimes crashes/locks when both events happen at

[PATCH 4.14 43/52] usb: musb: Fix suspend with devices connected for a64

2021-04-05 Thread Greg Kroah-Hartman
From: Tony Lindgren commit 92af4fc6ec331228aca322ca37c8aea7b150a151 upstream. Pinephone running on Allwinner A64 fails to suspend with USB devices connected as reported by Bhushan Shah . Reverting commit 5fbf7a253470 ("usb: musb: fix idling for suspend after disconnect interrupt") fixes the issu

[PATCH 4.14 44/52] usb: xhci-mtk: fix broken streams issue on 0.96 xHCI

2021-04-05 Thread Greg Kroah-Hartman
From: Chunfeng Yun commit 6f978a30c9bb12dab1302d0f06951ee290f5e600 upstream. The MediaTek 0.96 xHCI controller on some platforms does not support bulk stream even HCCPARAMS says supporting, due to MaxPSASize is set a default value 1 by mistake, here use XHCI_BROKEN_STREAMS quirk to fix it. Fixe

[PATCH 4.14 45/52] cdc-acm: fix BREAK rx code path adding necessary calls

2021-04-05 Thread Greg Kroah-Hartman
From: Oliver Neukum commit 08dff274edda54310d6f1cf27b62fddf0f8d146e upstream. Counting break events is nice but we should actually report them to the tty layer. Fixes: 5a6a62bdb9257 ("cdc-acm: add TIOCMIWAIT") Signed-off-by: Oliver Neukum Link: https://lore.kernel.org/r/20210311133714.31881-1-

[PATCH 4.14 46/52] USB: cdc-acm: untangle a circular dependency between callback and softint

2021-04-05 Thread Greg Kroah-Hartman
From: Oliver Neukum commit 6069e3e927c8fb3a1947b07d1a561644ea960248 upstream. We have a cycle of callbacks scheduling works which submit URBs with thos callbacks. This needs to be blocked, stopped and unblocked to untangle the circle. The issue leads to faults like: [ 55.068392] Unable to ha

[PATCH 4.14 28/52] mm: fix race by making init_zero_pfn() early_initcall

2021-04-05 Thread Greg Kroah-Hartman
From: Ilya Lipnitskiy commit e720e7d0e983bf05de80b231bccc39f1487f0f16 upstream. There are code paths that rely on zero_pfn to be fully initialized before core_initcall. For example, wq_sysfs_init() is a core_initcall function that eventually results in a call to kernel_execve, which causes a pa

[PATCH 4.14 47/52] USB: cdc-acm: downgrade message to debug

2021-04-05 Thread Greg Kroah-Hartman
From: Oliver Neukum commit e4c77070ad45fc940af1d7fb1e637c349e848951 upstream. This failure is so common that logging an error here amounts to spamming log files. Reviewed-by: Bruno Thomsen Signed-off-by: Oliver Neukum Cc: stable Link: https://lore.kernel.org/r/20210311130126.15972-2-oneu...@

[PATCH 4.14 48/52] USB: cdc-acm: fix use-after-free after probe failure

2021-04-05 Thread Greg Kroah-Hartman
From: Johan Hovold commit 4e49bf376c0451ad2eae2592e093659cde12be9a upstream. If tty-device registration fails the driver would fail to release the data interface. When the device is later disconnected, the disconnect callback would still be called for the data interface and would go about releas

[PATCH 4.14 49/52] usb: gadget: udc: amd5536udc_pci fix null-ptr-dereference

2021-04-05 Thread Greg Kroah-Hartman
From: Tong Zhang commit 72035f4954f0bca2d8c47cf31b3629c42116f5b7 upstream. init_dma_pools() calls dma_pool_create(...dev->dev) to create dma pool. however, dev->dev is actually set after calling init_dma_pools(), which effectively makes dma_pool_create(..NULL) and cause crash. To fix this issue,

[PATCH 4.14 51/52] staging: rtl8192e: Change state information from u16 to u8

2021-04-05 Thread Greg Kroah-Hartman
From: Atul Gopinathan commit e78836ae76d20f38eed8c8c67f21db97529949da upstream. The "u16 CcxRmState[2];" array field in struct "rtllib_network" has 4 bytes in total while the operations performed on this array through-out the code base are only 2 bytes. The "CcxRmState" field is fed only 2 byte

[PATCH 4.14 50/52] staging: rtl8192e: Fix incorrect source in memcpy()

2021-04-05 Thread Greg Kroah-Hartman
From: Atul Gopinathan commit 72ad25fbbb78930f892b191637359ab5b94b3190 upstream. The variable "info_element" is of the following type: struct rtllib_info_element *info_element defined in drivers/staging/rtl8192e/rtllib.h: struct rtllib_info_element { u8 id;

[PATCH 4.14 52/52] drivers: video: fbcon: fix NULL dereference in fbcon_cursor()

2021-04-05 Thread Greg Kroah-Hartman
From: Du Cheng commit 01faae5193d6190b7b3aa93dae43f514e866d652 upstream. add null-check on function pointer before dereference on ops->cursor Reported-by: syzbot+b67aaae8d3a927f68...@syzkaller.appspotmail.com Cc: stable Signed-off-by: Du Cheng Link: https://lore.kernel.org/r/20210312081421.45

[PATCH 4.14 29/52] drm/amdgpu: fix offset calculation in amdgpu_vm_bo_clear_mappings()

2021-04-05 Thread Greg Kroah-Hartman
From: Nirmoy Das commit 5e61b84f9d3ddfba73091f9fbc940caae1c9eb22 upstream. Offset calculation wasn't correct as start addresses are in pfn not in bytes. CC: sta...@vger.kernel.org Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher Signed-off-by: Greg Kroah-Har

[PATCH 4.14 30/52] drm/amdgpu: check alignment on CPU page for bo map

2021-04-05 Thread Greg Kroah-Hartman
From: Xℹ Ruoyao commit e3512fb67093fabdf27af303066627b921ee9bd8 upstream. The page table of AMDGPU requires an alignment to CPU page so we should check ioctl parameters for it. Return -EINVAL if some parameter is unaligned to CPU page, instead of corrupt the page table sliently. Reviewed-by: C

[PATCH 4.14 31/52] reiserfs: update reiserfs_xattrs_initialized() condition

2021-04-05 Thread Greg Kroah-Hartman
From: Tetsuo Handa commit 5e46d1b78a03d52306f21f77a4e4a144b6d31486 upstream. syzbot is reporting NULL pointer dereference at reiserfs_security_init() [1], for commit ab17c4f02156c4f7 ("reiserfs: fixup xattr_root caching") is assuming that REISERFS_SB(s)->xattr_root != NULL in reiserfs_xattr_jcre

[PATCH 4.14 32/52] mm: memcontrol: fix NR_WRITEBACK leak in memcg and system stats

2021-04-05 Thread Greg Kroah-Hartman
From: Johannes Weiner commit c3cc39118c3610eb6ab4711bc624af7fc48a35fe upstream. After commit a983b5ebee57 ("mm: memcontrol: fix excessive complexity in memory.stat reporting"), we observed slowly upward creeping NR_WRITEBACK counts over the course of several days, both the per-memcg stats as wel

[PATCH 4.14 33/52] mm: memcg: make sure memory.events is uptodate when waking pollers

2021-04-05 Thread Greg Kroah-Hartman
From: Johannes Weiner commit e27be240df53f1a20c659168e722b5d9f16cc7f4 upstream. Commit a983b5ebee57 ("mm: memcontrol: fix excessive complexity in memory.stat reporting") added per-cpu drift to all memory cgroup stats and events shown in memory.stat and memory.events. For memory.stat this is acc

[PATCH 4.14 34/52] mem_cgroup: make sure moving_account, move_lock_task and stat_cpu in the same cacheline

2021-04-05 Thread Greg Kroah-Hartman
From: Aaron Lu commit e81bf9793b1861d74953ef041b4f6c7faecc2dbd upstream. The LKP robot found a 27% will-it-scale/page_fault3 performance regression regarding commit e27be240df53("mm: memcg: make sure memory.events is uptodate when waking pollers"). What the test does is: 1 mkstemp() a 128M fil

[PATCH 4.14 35/52] mm: fix oom_kill event handling

2021-04-05 Thread Greg Kroah-Hartman
From: Roman Gushchin commit fe6bdfc8e1e131720abbe77a2eb990c94c9024cb upstream. Commit e27be240df53 ("mm: memcg: make sure memory.events is uptodate when waking pollers") converted most of memcg event counters to per-memcg atomics, which made them less confusing for a user. The "oom_kill" counte

[PATCH 4.14 26/52] ALSA: hda/realtek: call alc_update_headset_mode() in hp_automute_hook

2021-04-05 Thread Greg Kroah-Hartman
From: Hui Wang commit e54f30befa7990b897189b44a56c1138c6bfdbb5 upstream. We found the alc_update_headset_mode() is not called on some machines when unplugging the headset, as a result, the mode of the ALC_HEADSET_MODE_UNPLUGGED can't be set, then the current_headset_type is not cleared, if users

[PATCH 4.19 12/56] ASoC: cs42l42: Fix mixer volume control

2021-04-05 Thread Greg Kroah-Hartman
From: Lucas Tanure [ Upstream commit 72d904763ae6a8576e7ad034f9da4f0e3c44bf24 ] The minimum value is 0x3f (-63dB), which also is mute Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20210305173442.195740-4-tanur...@opensource.cirrus.com Signed-off-by: Mark Brown Signed-off-by: Sa

[PATCH 4.19 01/56] selinux: vsock: Set SID for socket returned by accept()

2021-04-05 Thread Greg Kroah-Hartman
From: David Brazdil [ Upstream commit 1f935e8e72ec28dddb2dc0650b3b6626a293d94b ] For AF_VSOCK, accept() currently returns sockets that are unlabelled. Other socket families derive the child's SID from the SID of the parent and the SID of the incoming packet. This is typically done as the connect

[PATCH 4.19 11/56] ASoC: cs42l42: Fix channel width support

2021-04-05 Thread Greg Kroah-Hartman
From: Lucas Tanure [ Upstream commit 2bdc4f5c6838f7c3feb4fe68e4edbeea158ec0a2 ] Remove the hard coded 32 bits width and replace with the correct width calculated by params_width. Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20210305173442.195740-3-tanur...@opensource.cirrus.com

[PATCH 4.19 10/56] ASoC: cs42l42: Fix Bitclock polarity inversion

2021-04-05 Thread Greg Kroah-Hartman
From: Lucas Tanure [ Upstream commit e793c965519b8b7f2fea51a48398405e2a501729 ] The driver was setting bit clock polarity opposite to intended polarity. Also simplify the code by grouping ADC and DAC clock configurations into a single field. Signed-off-by: Lucas Tanure Link: https://lore.kern

[PATCH 4.19 13/56] ASoC: cs42l42: Always wait at least 3ms after reset

2021-04-05 Thread Greg Kroah-Hartman
From: Lucas Tanure [ Upstream commit 19325cfea04446bc79b36bffd4978af15f46a00e ] This delay is part of the power-up sequence defined in the datasheet. A runtime_resume is a power-up so must also include the delay. Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20210305173442.19574

[PATCH 4.19 14/56] vhost: Fix vhost_vq_reset()

2021-04-05 Thread Greg Kroah-Hartman
From: Laurent Vivier [ Upstream commit beb691e69f4dec7bfe8b81b509848acfd1f0dbf9 ] vhost_reset_is_le() is vhost_init_is_le(), and in the case of cross-endian legacy, vhost_init_is_le() depends on vq->user_be. vq->user_be is set by vhost_disable_cross_endian(). But in vhost_vq_reset(), we have:

[PATCH 4.19 15/56] scsi: st: Fix a use after free in st_open()

2021-04-05 Thread Greg Kroah-Hartman
From: Lv Yunlong [ Upstream commit c8c165dea4c8f5ad67b1240861e4f6c5395fa4ac ] In st_open(), if STp->in_use is true, STp will be freed by scsi_tape_put(). However, STp is still used by DEBC_printk() after. It is better to DEBC_printk() before scsi_tape_put(). Link: https://lore.kernel.org/r/2021

[PATCH 4.19 16/56] scsi: qla2xxx: Fix broken #endif placement

2021-04-05 Thread Greg Kroah-Hartman
From: Alexey Dobriyan [ Upstream commit 5999b9e5b1f8a2f5417b755130919b3ac96f5550 ] Only half of the file is under include guard because terminating #endif is placed too early. Link: https://lore.kernel.org/r/YE4snvoW1SuwcXAn@localhost.localdomain Reviewed-by: Himanshu Madhani Signed-off-by: Al

[PATCH 4.19 17/56] staging: comedi: cb_pcidas: fix request_irq() warn

2021-04-05 Thread Greg Kroah-Hartman
From: Tong Zhang [ Upstream commit 2e5848a3d86f03024ae096478bdb892ab3d79131 ] request_irq() wont accept a name which contains slash so we need to repalce it with something else -- otherwise it will trigger a warning and the entry in /proc/irq/ will not be created since the .name might be used by

[PATCH 4.19 19/56] ASoC: rt5659: Update MCLK rate in set_sysclk()

2021-04-05 Thread Greg Kroah-Hartman
From: Sameer Pujar [ Upstream commit dbf54a9534350d6aebbb34f5c1c606b81a4f35dd ] Simple-card/audio-graph-card drivers do not handle MCLK clock when it is specified in the codec device node. The expectation here is that, the codec should actually own up the MCLK clock and do necessary setup in the

[PATCH 4.19 18/56] staging: comedi: cb_pcidas64: fix request_irq() warn

2021-04-05 Thread Greg Kroah-Hartman
From: Tong Zhang [ Upstream commit d2d106fe3badfc3bf0dd3899d1c3f210c7203eab ] request_irq() wont accept a name which contains slash so we need to repalce it with something else -- otherwise it will trigger a warning and the entry in /proc/irq/ will not be created since the .name might be used by

[PATCH 4.19 02/56] tcp: relookup sock for RST+ACK packets handled by obsolete req sock

2021-04-05 Thread Greg Kroah-Hartman
From: Alexander Ovechkin commit 7233da86697efef41288f8b713c10c2499cffe85 upstream. Currently tcp_check_req can be called with obsolete req socket for which big socket have been already created (because of CPU race or early demux assigning req socket to multiple packets in gro batch). Commit e0f

[PATCH 4.19 20/56] thermal/core: Add NULL pointer check before using cooling device stats

2021-04-05 Thread Greg Kroah-Hartman
From: Manaf Meethalavalappu Pallikunhi [ Upstream commit 2046a24ae121cd107929655a6aaf3b8c5beea01f ] There is a possible chance that some cooling device stats buffer allocation fails due to very high cooling device max state value. Later cooling device update sysfs can try to access stats data fo

[PATCH 4.19 21/56] locking/ww_mutex: Simplify use_ww_ctx & ww_ctx handling

2021-04-05 Thread Greg Kroah-Hartman
From: Waiman Long [ Upstream commit 5de2055d31ea88fd9ae9709ac95c372a505a60fa ] The use_ww_ctx flag is passed to mutex_optimistic_spin(), but the function doesn't use it. The frequent use of the (use_ww_ctx && ww_ctx) combination is repetitive. In fact, ww_ctx should not be used at all if !use_w

[PATCH 4.19 04/56] ext4: fix bh ref count on error paths

2021-04-05 Thread Greg Kroah-Hartman
From: Zhaolong Zhang [ Upstream commit c915fb80eaa6194fa9bd0a4487705cd5b0dda2f1 ] __ext4_journalled_writepage should drop bhs' ref count on error paths Signed-off-by: Zhaolong Zhang Link: https://lore.kernel.org/r/1614678151-70481-1-git-send-email-zhangzl2...@126.com Signed-off-by: Theodore T

[PATCH 4.19 03/56] ipv6: weaken the v4mapped source check

2021-04-05 Thread Greg Kroah-Hartman
From: Jakub Kicinski [ Upstream commit dcc32f4f183ab8479041b23a1525d48233df1d43 ] This reverts commit 6af1799aaf3f1bc8defedddfa00df3192445bbf3. Commit 6af1799aaf3f ("ipv6: drop incoming packets having a v4mapped source address") introduced an input check against v4mapped addresses. Use of such

[PATCH 4.19 22/56] ext4: do not iput inode under running transaction in ext4_rename()

2021-04-05 Thread Greg Kroah-Hartman
From: zhangyi (F) [ Upstream commit 5dccdc5a1916d4266edd251f20113a5c495f ] In ext4_rename(), when RENAME_WHITEOUT failed to add new entry into directory, it ends up dropping new created whiteout inode under the running transaction. After commit <9b88f9fb0d2> ("ext4: Do not iput inode under r

[PATCH 4.19 23/56] brcmfmac: clear EAP/association status bits on linkdown events

2021-04-05 Thread Greg Kroah-Hartman
From: Luca Pesce [ Upstream commit e862a3e4088070de352fdafe9bd9e3ae0a95a33c ] This ensure that previous association attempts do not leave stale statuses on subsequent attempts. This fixes the WARN_ON(!cr->bss)) from __cfg80211_connect_result() when connecting to an AP after a previous connectio

[PATCH 4.19 34/56] tracing: Fix stack trace event size

2021-04-05 Thread Greg Kroah-Hartman
From: Steven Rostedt (VMware) commit 9deb193af69d3fd6dd8e47f292b67c805a787010 upstream. Commit cbc3b92ce037 fixed an issue to modify the macros of the stack trace event so that user space could parse it properly. Originally the stack trace format to user space showed that the called stack was a

[PATCH 4.19 09/56] ASoC: es8316: Simplify adc_pga_gain_tlv table

2021-04-05 Thread Greg Kroah-Hartman
From: Hans de Goede [ Upstream commit bb18c678754ce1514100fb4c0bf6113b5af36c48 ] Most steps in this table are steps of 3dB (300 centi-dB), so we can simplify the table. This not only reduces the amount of space it takes inside the kernel, this also makes alsa-lib's mixer code actually accept th

[PATCH 4.19 06/56] ASoC: rt5640: Fix dac- and adc- vol-tlv values being off by a factor of 10

2021-04-05 Thread Greg Kroah-Hartman
From: Hans de Goede [ Upstream commit cfa26ed1f9f885c2fd8f53ca492989d1e16d0199 ] The adc_vol_tlv volume-control has a range from -17.625 dB to +30 dB, not -176.25 dB to + 300 dB. This wrong scale is esp. a problem in userspace apps which translate the dB scale to a linear scale. With the logarit

[PATCH 4.19 08/56] ASoC: sgtl5000: set DAP_AVC_CTRL register to correct default value on probe

2021-04-05 Thread Greg Kroah-Hartman
From: Benjamin Rood [ Upstream commit f86f58e3594fb0ab1993d833d3b9a2496f3c928c ] According to the SGTL5000 datasheet [1], the DAP_AVC_CTRL register has the following bit field definitions: | BITS | FIELD | RW | RESET | DEFINITION| | 15| RSVD| RO | 0x0

[PATCH 4.19 25/56] net: ethernet: aquantia: Handle error cleanup of start on open

2021-04-05 Thread Greg Kroah-Hartman
From: Nathan Rossi [ Upstream commit 8a28af7a3e85ddf358f8c41e401a33002f7a9587 ] The aq_nic_start function can fail in a variety of cases which leaves the device in broken state. An example case where the start function fails is the request_threaded_irq which can be interrupted, resulting in a E

[PATCH 4.19 00/56] 4.19.185-rc1 review

2021-04-05 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.185 release. There are 56 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know. Responses should be made by Wed, 07 Apr 2021 08:50:09 +. Anything re

[PATCH 4.19 05/56] rpc: fix NULL dereference on kmalloc failure

2021-04-05 Thread Greg Kroah-Hartman
From: J. Bruce Fields [ Upstream commit 0ddc942394013f08992fc379ca04cffacbbe3dae ] I think this is unlikely but possible: svc_authenticate sets rq_authop and calls svcauth_gss_accept. The kmalloc(sizeof(*svcdata), GFP_KERNEL) fails, leaving rq_auth_data NULL, and returning SVC_DENIED. This ca

[PATCH 4.19 35/56] mm: fix race by making init_zero_pfn() early_initcall

2021-04-05 Thread Greg Kroah-Hartman
From: Ilya Lipnitskiy commit e720e7d0e983bf05de80b231bccc39f1487f0f16 upstream. There are code paths that rely on zero_pfn to be fully initialized before core_initcall. For example, wq_sysfs_init() is a core_initcall function that eventually results in a call to kernel_execve, which causes a pa

[PATCH 4.19 07/56] ASoC: rt5651: Fix dac- and adc- vol-tlv values being off by a factor of 10

2021-04-05 Thread Greg Kroah-Hartman
From: Hans de Goede [ Upstream commit eee51df776bd6cac10a76b2779a9fdee3f622b2b ] The adc_vol_tlv volume-control has a range from -17.625 dB to +30 dB, not -176.25 dB to + 300 dB. This wrong scale is esp. a problem in userspace apps which translate the dB scale to a linear scale. With the logarit

[PATCH 4.19 36/56] drm/amdgpu: fix offset calculation in amdgpu_vm_bo_clear_mappings()

2021-04-05 Thread Greg Kroah-Hartman
From: Nirmoy Das commit 5e61b84f9d3ddfba73091f9fbc940caae1c9eb22 upstream. Offset calculation wasn't correct as start addresses are in pfn not in bytes. CC: sta...@vger.kernel.org Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher Signed-off-by: Greg Kroah-Har

[PATCH 4.19 41/56] extcon: Fix error handling in extcon_dev_register

2021-04-05 Thread Greg Kroah-Hartman
From: Dinghao Liu [ Upstream commit d3bdd1c3140724967ca4136755538fa7c05c2b4e ] When devm_kcalloc() fails, we should execute device_unregister() to unregister edev->dev from system. Fixes: 046050f6e623e ("extcon: Update the prototype of extcon_register_notifier() with enum extcon") Signed-off-b

[PATCH 4.19 39/56] pinctrl: rockchip: fix restore error in resume

2021-04-05 Thread Greg Kroah-Hartman
From: Wang Panzhenzhuan commit c971af25cda94afe71617790826a86253e88eab0 upstream. The restore in resume should match to suspend which only set for RK3288 SoCs pinctrl. Fixes: 8dca933127024 ("pinctrl: rockchip: save and restore gpio6_c6 pinmux in suspend/resume") Reviewed-by: Jianqun Xu Review

[PATCH 4.19 44/56] USB: quirks: ignore remote wake-up on Fibocom L850-GL LTE modem

2021-04-05 Thread Greg Kroah-Hartman
From: Vincent Palatin commit 0bd860493f81eb2a46173f6f5e44cc38331c8dbd upstream. This LTE modem (M.2 card) has a bug in its power management: there is some kind of race condition for U3 wake-up between the host and the device. The modem firmware sometimes crashes/locks when both events happen at

Re: [PATCH v3 05/25] x86/sgx: Introduce virtual EPC for use by KVM guests

2021-04-05 Thread Borislav Petkov
On Fri, Mar 19, 2021 at 08:22:21PM +1300, Kai Huang wrote: > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index 35391e94bd22..007912f67a06 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -1942,6 +1942,18 @@ config X86_SGX > > If unsure, say N. > > +config X86_SGX_KVM

[PATCH 4.19 43/56] usbip: vhci_hcd fix shift out-of-bounds in vhci_hub_control()

2021-04-05 Thread Greg Kroah-Hartman
From: Shuah Khan commit 1cc5ed25bdade86de2650a82b2730108a76de20c upstream. Fix shift out-of-bounds in vhci_hub_control() SetPortFeature handling. UBSAN: shift-out-of-bounds in drivers/usb/usbip/vhci_hcd.c:605:42 shift exponent 768 is too large for 32-bit type 'int' Reported-by: syzbot+3dea30b0

[PATCH 4.19 50/56] USB: cdc-acm: fix double free on probe failure

2021-04-05 Thread Greg Kroah-Hartman
From: Johan Hovold commit 7180495cb3d0e2a2860d282a468b4146c21da78f upstream. If tty-device registration fails the driver copy of any Country Selection functional descriptor would end up being freed twice; first explicitly in the error path and then again in the tty-port destructor. Drop the fir

[PATCH 4.19 49/56] USB: cdc-acm: downgrade message to debug

2021-04-05 Thread Greg Kroah-Hartman
From: Oliver Neukum commit e4c77070ad45fc940af1d7fb1e637c349e848951 upstream. This failure is so common that logging an error here amounts to spamming log files. Reviewed-by: Bruno Thomsen Signed-off-by: Oliver Neukum Cc: stable Link: https://lore.kernel.org/r/20210311130126.15972-2-oneu...@

[PATCH 4.19 52/56] usb: gadget: udc: amd5536udc_pci fix null-ptr-dereference

2021-04-05 Thread Greg Kroah-Hartman
From: Tong Zhang commit 72035f4954f0bca2d8c47cf31b3629c42116f5b7 upstream. init_dma_pools() calls dma_pool_create(...dev->dev) to create dma pool. however, dev->dev is actually set after calling init_dma_pools(), which effectively makes dma_pool_create(..NULL) and cause crash. To fix this issue,

[PATCH 4.19 51/56] USB: cdc-acm: fix use-after-free after probe failure

2021-04-05 Thread Greg Kroah-Hartman
From: Johan Hovold commit 4e49bf376c0451ad2eae2592e093659cde12be9a upstream. If tty-device registration fails the driver would fail to release the data interface. When the device is later disconnected, the disconnect callback would still be called for the data interface and would go about releas

[PATCH 4.19 47/56] cdc-acm: fix BREAK rx code path adding necessary calls

2021-04-05 Thread Greg Kroah-Hartman
From: Oliver Neukum commit 08dff274edda54310d6f1cf27b62fddf0f8d146e upstream. Counting break events is nice but we should actually report them to the tty layer. Fixes: 5a6a62bdb9257 ("cdc-acm: add TIOCMIWAIT") Signed-off-by: Oliver Neukum Link: https://lore.kernel.org/r/20210311133714.31881-1-

[PATCH 4.19 48/56] USB: cdc-acm: untangle a circular dependency between callback and softint

2021-04-05 Thread Greg Kroah-Hartman
From: Oliver Neukum commit 6069e3e927c8fb3a1947b07d1a561644ea960248 upstream. We have a cycle of callbacks scheduling works which submit URBs with thos callbacks. This needs to be blocked, stopped and unblocked to untangle the circle. The issue leads to faults like: [ 55.068392] Unable to ha

[PATCH 4.19 46/56] usb: xhci-mtk: fix broken streams issue on 0.96 xHCI

2021-04-05 Thread Greg Kroah-Hartman
From: Chunfeng Yun commit 6f978a30c9bb12dab1302d0f06951ee290f5e600 upstream. The MediaTek 0.96 xHCI controller on some platforms does not support bulk stream even HCCPARAMS says supporting, due to MaxPSASize is set a default value 1 by mistake, here use XHCI_BROKEN_STREAMS quirk to fix it. Fixe

[PATCH 4.19 40/56] extcon: Add stubs for extcon_register_notifier_all() functions

2021-04-05 Thread Greg Kroah-Hartman
From: Krzysztof Kozlowski [ Upstream commit c9570d4a5efd04479b3cd09c39b571eb031d94f4 ] Add stubs for extcon_register_notifier_all() function for !CONFIG_EXTCON case. This is useful for compile testing and for drivers which use EXTCON but do not require it (therefore do not depend on CONFIG_EXTC

[PATCH 4.19 45/56] usb: musb: Fix suspend with devices connected for a64

2021-04-05 Thread Greg Kroah-Hartman
From: Tony Lindgren commit 92af4fc6ec331228aca322ca37c8aea7b150a151 upstream. Pinephone running on Allwinner A64 fails to suspend with USB devices connected as reported by Bhushan Shah . Reverting commit 5fbf7a253470 ("usb: musb: fix idling for suspend after disconnect interrupt") fixes the issu

[PATCH 4.19 38/56] reiserfs: update reiserfs_xattrs_initialized() condition

2021-04-05 Thread Greg Kroah-Hartman
From: Tetsuo Handa commit 5e46d1b78a03d52306f21f77a4e4a144b6d31486 upstream. syzbot is reporting NULL pointer dereference at reiserfs_security_init() [1], for commit ab17c4f02156c4f7 ("reiserfs: fixup xattr_root caching") is assuming that REISERFS_SB(s)->xattr_root != NULL in reiserfs_xattr_jcre

[PATCH 4.19 26/56] appletalk: Fix skb allocation size in loopback case

2021-04-05 Thread Greg Kroah-Hartman
From: Doug Brown [ Upstream commit 39935dccb21c60f9bbf1bb72d22ab6fd14ae7705 ] If a DDP broadcast packet is sent out to a non-gateway target, it is also looped back. There is a potential for the loopback device to have a longer hardware header length than the original target route's device, which

[PATCH 4.19 37/56] drm/amdgpu: check alignment on CPU page for bo map

2021-04-05 Thread Greg Kroah-Hartman
From: Xℹ Ruoyao commit e3512fb67093fabdf27af303066627b921ee9bd8 upstream. The page table of AMDGPU requires an alignment to CPU page so we should check ioctl parameters for it. Return -EINVAL if some parameter is unaligned to CPU page, instead of corrupt the page table sliently. Reviewed-by: C

[PATCH 4.19 27/56] net: wan/lmc: unregister device when no matching device is found

2021-04-05 Thread Greg Kroah-Hartman
From: Tong Zhang [ Upstream commit 62e69bc419772638369eff8ff81340bde8aceb61 ] lmc set sc->lmc_media pointer when there is a matching device. However, when no matching device is found, this pointer is NULL and the following dereference will result in a null-ptr-deref. To fix this issue, unregist

<    1   2   3   4   5   6   7   8   9   10   >