[PATCH 5.10 030/145] e1000e: Export S0ix flags to ethtool

2021-01-11 Thread Greg Kroah-Hartman
From: Mario Limonciello [ Upstream commit 3c98cbf22a96c1b12f48c1b2a4680dfe5cb280f9 ] This flag can be used by an end user to disable S0ix flows on a buggy system or by an OEM for development purposes. If you need this flag to be persisted across reboots, it's suggested to use a udev rule to

[PATCH 5.10 031/145] bnxt_en: Check TQM rings for maximum supported value.

2021-01-11 Thread Greg Kroah-Hartman
From: Michael Chan [ Upstream commit a029a2fef5d11bb85587433c3783615442abac96 ] TQM rings are hardware resources that require host context memory managed by the driver. The driver supports up to 9 TQM rings and the number of rings to use is requested by firmware during run-time. Cap this

[PATCH 5.10 074/145] powerpc/32s: Fix RTAS machine check with VMAP stack

2021-01-11 Thread Greg Kroah-Hartman
From: Christophe Leroy commit 98bf2d3f4970179c702ef64db658e0553bc6ef3a upstream. When we have VMAP stack, exception prolog 1 sets r1, not r11. When it is not an RTAS machine check, don't trash r1 because it is needed by prolog 1. Fixes: da7bb43ab9da ("powerpc/32: Fix vmap stack - Properly set

[PATCH 5.10 069/145] Bluetooth: revert: hci_h5: close serdev device and free hu in h5_close

2021-01-11 Thread Greg Kroah-Hartman
From: Hans de Goede commit 5c3b5796866f85354a5ce76a28f8ffba0dcefc7e upstream. There have been multiple revisions of the patch fix the h5->rx_skb leak. Accidentally the first revision (which is buggy) and v5 have both been merged: v1 commit 70f259a3f427 ("Bluetooth: hci_h5: close serdev device

[PATCH 5.10 071/145] scsi: block: Do not accept any requests while suspended

2021-01-11 Thread Greg Kroah-Hartman
From: Alan Stern [ Upstream commit 52abca64fd9410ea6c9a3a74eab25663b403d7da ] blk_queue_enter() accepts BLK_MQ_REQ_PM requests independent of the runtime power management state. Now that SCSI domain validation no longer depends on this behavior, modify the behavior of blk_queue_enter() as

[PATCH 5.10 073/145] crypto: asym_tpm: correct zero out potential secrets

2021-01-11 Thread Greg Kroah-Hartman
From: Greg Kroah-Hartman commit f93274ef0fe972c120c96b3207f8fce376231a60 upstream. The function derive_pub_key() should be calling memzero_explicit() instead of memset() in case the complier decides to optimize away the call to memset() because it "knows" no one is going to touch the memory

[PATCH 5.10 081/145] usb: typec: intel_pmc_mux: Configure HPD first for HPD+IRQ request

2021-01-11 Thread Greg Kroah-Hartman
From: Madhusudanarao Amara commit 0f041b8592daaaea46e91a8ebb3b47e6e0171fd8 upstream. Warm reboot scenarios some times type C Mux driver gets Mux configuration request as HPD=1,IRQ=1. In that scenario typeC Mux driver need to configure Mux as follows as per IOM requirement: (1). Confgiure Mux

[PATCH 5.10 068/145] kbuild: dont hardcode depmod path

2021-01-11 Thread Greg Kroah-Hartman
From: Dominique Martinet commit 436e980e2ed526832de822cbf13c317a458b78e1 upstream. depmod is not guaranteed to be in /sbin, just let make look for it in the path like all the other invoked programs Signed-off-by: Dominique Martinet Signed-off-by: Masahiro Yamada Signed-off-by: Greg

[PATCH 5.10 088/145] usb: chipidea: ci_hdrc_imx: add missing put_device() call in usbmisc_get_init_data()

2021-01-11 Thread Greg Kroah-Hartman
From: Yu Kuai commit 83a43ff80a566de8718dfc6565545a0080ec1fb5 upstream. if of_find_device_by_node() succeed, usbmisc_get_init_data() doesn't have a corresponding put_device(). Thus add put_device() to fix the exception handling for this function implementation. Fixes: ef12da914ed6 ("usb:

[PATCH 5.10 076/145] Staging: comedi: Return -EFAULT if copy_to_user() fails

2021-01-11 Thread Greg Kroah-Hartman
From: Dan Carpenter commit cab36da4bf1a35739b091b73714a39a1bbd02b05 upstream. Return -EFAULT on error instead of the number of bytes remaining to be copied. Fixes: bac42fb21259 ("comedi: get rid of compat_alloc_user_space() mess in COMEDI_CMD{,TEST} compat") Signed-off-by: Dan Carpenter Cc:

[PATCH 5.10 105/145] usb: gadget: configfs: Preserve function ordering after bind failure

2021-01-11 Thread Greg Kroah-Hartman
From: Chandana Kishori Chiluveru commit 6cd0fe91387917be48e91385a572a69dfac2f3f7 upstream. When binding the ConfigFS gadget to a UDC, the functions in each configuration are added in list order. However, if usb_add_function() fails, the failed function is put back on its configuration's

[PATCH 5.10 064/145] local64.h: make mandatory

2021-01-11 Thread Greg Kroah-Hartman
From: Randy Dunlap [ Upstream commit 87dbc209ea04645fd2351981f09eff5d23f8e2e9 ] Make mandatory in include/asm-generic/Kbuild and remove all arch/*/include/asm/local64.h arch-specific files since they only #include . This fixes build errors on arch/c6x/ and arch/nios2/ for block/blk-iocost.c.

[PATCH 5.10 110/145] x86/mm: Fix leak of pmd ptlock

2021-01-11 Thread Greg Kroah-Hartman
From: Dan Williams commit d1c5246e08eb64991001d97a3bd119c93edbc79a upstream. Commit 28ee90fe6048 ("x86/mm: implement free pmd/pte page interfaces") introduced a new location where a pmd was released, but neglected to run the pmd page destructor. In fact, this happened previously for a

[PATCH 5.10 102/145] usb: gadget: u_ether: Fix MTU size mismatch with RX packet size

2021-01-11 Thread Greg Kroah-Hartman
From: Manish Narani commit 0a88fa221ce911c331bf700d2214c5b2f77414d3 upstream. Fix the MTU size issue with RX packet size as the host sends the packet with extra bytes containing ethernet header. This causes failure when user sets the MTU size to the maximum i.e. 15412. In this case the ethernet

[PATCH 5.10 104/145] usb: gadget: Fix spinlock lockup on usb_function_deactivate

2021-01-11 Thread Greg Kroah-Hartman
From: Sriharsha Allenki commit 5cc35c224a80aa5a5a539510ef049faf0d6ed181 upstream. There is a spinlock lockup as part of composite_disconnect when it tries to acquire cdev->lock as part of usb_gadget_deactivate. This is because the usb_gadget_deactivate is called from usb_function_deactivate

[PATCH 5.10 109/145] mm: make wait_on_page_writeback() wait for multiple pending writebacks

2021-01-11 Thread Greg Kroah-Hartman
From: Linus Torvalds commit c2407cf7d22d0c0d94cf20342b3b8f06f1d904e7 upstream. Ever since commit 2a9127fcf229 ("mm: rewrite wait_on_page_bit_common() logic") we've had some very occasional reports of BUG_ON(PageWriteback) in write_cache_pages(), which we thought we already fixed in commit

[PATCH 5.10 111/145] KVM: x86/mmu: Use -1 to flag an undefined spte in get_mmio_spte()

2021-01-11 Thread Greg Kroah-Hartman
From: Sean Christopherson commit 2aa078932ff6c66bf10cc5b310dbfa7d813d upstream. Return -1 from the get_walk() helpers if the shadow walk doesn't fill at least one spte, which can theoretically happen if the walk hits a not-present PDPTR. Returning the root level in such a case will cause

[PATCH 5.10 115/145] x86/resctrl: Use an IPI instead of task_work_add() to update PQR_ASSOC MSR

2021-01-11 Thread Greg Kroah-Hartman
From: Fenghua Yu commit ae28d1aae48a1258bd09a6f707ebb4231d79a761 upstream. Currently, when moving a task to a resource group the PQR_ASSOC MSR is updated with the new closid and rmid in an added task callback. If the task is running, the work is run as soon as possible. If the task is not

[PATCH 5.10 101/145] usb: gadget: function: printer: Fix a memory leak for interface descriptor

2021-01-11 Thread Greg Kroah-Hartman
From: Zqiang commit 2cc332e4ee4febcbb685e2962ad323fe4b3b750a upstream. When printer driver is loaded, the printer_func_bind function is called, in this function, the interface descriptor be allocated memory, if after that, the error occurred, the interface descriptor memory need to be free.

[PATCH 5.10 120/145] ALSA: hda/realtek - Fix speaker volume control on Lenovo C940

2021-01-11 Thread Greg Kroah-Hartman
From: Kailang Yang commit f86de9b1c0663b0a3ca2dcddec9aa910ff0fbf2c upstream. Cannot adjust speaker's volume on Lenovo C940. Applying the alc298_fixup_speaker_volume function can fix the issue. [ Additional note: C940 has I2S amp for the speaker and this needs the same initialization as Dell

[PATCH 5.10 126/145] btrfs: send: fix wrong file path when there is an inode with a pending rmdir

2021-01-11 Thread Greg Kroah-Hartman
From: Filipe Manana commit 0b3f407e6728d990ae1630a02c7b952c21c288d3 upstream. When doing an incremental send, if we have a new inode that happens to have the same number that an old directory inode had in the base snapshot and that old directory has a pending rmdir operation, we end up

[PATCH 5.10 095/145] USB: yurex: fix control-URB timeout handling

2021-01-11 Thread Greg Kroah-Hartman
From: Johan Hovold commit 372c93131998c0622304bed118322d2a04489e63 upstream. Make sure to always cancel the control URB in write() so that it can be reused after a timeout or spurious CMD_ACK. Currently any further write requests after a timeout would fail after triggering a WARN() in

[PATCH 5.10 136/145] ARM: dts: OMAP3: disable AES on N950/N9

2021-01-11 Thread Greg Kroah-Hartman
From: Aaro Koskinen commit f1dc15cd7fc146107cad2a926d9c1d005f69002a upstream. AES needs to be disabled on Nokia N950/N9 as well (HS devices), otherwise kernel fails to boot. Fixes: c312f066314e ("ARM: dts: omap3: Migrate AES from hwmods to sysc-omap2") Signed-off-by: Aaro Koskinen

[PATCH 5.10 137/145] netfilter: x_tables: Update remaining dereference to RCU

2021-01-11 Thread Greg Kroah-Hartman
From: Subash Abhinov Kasiviswanathan commit 443d6e86f821a165fae3fc3fc13086d27ac140b1 upstream. This fixes the dereference to fetch the RCU pointer when holding the appropriate xtables lock. Reported-by: kernel test robot Fixes: cc00bcaa5899 ("netfilter: x_tables: Switch synchronization to

[PATCH 5.10 124/145] iommu/vt-d: Move intel_iommu info from struct intel_svm to struct intel_svm_dev

2021-01-11 Thread Greg Kroah-Hartman
From: Liu Yi L commit 9ad9f45b3b91162b33abfe175ae75ab65718dbf5 upstream. 'struct intel_svm' is shared by all devices bound to a give process, but records only a single pointer to a 'struct intel_iommu'. Consequently, cache invalidations may only be applied to a single DMAR unit, and are

[PATCH 5.10 143/145] KVM: x86: fix shift out of bounds reported by UBSAN

2021-01-11 Thread Greg Kroah-Hartman
From: Paolo Bonzini commit 2f80d502d627f30257ba7e3655e71c373b7d1a5a upstream. Since we know that e >= s, we can reassociate the left shift, changing the shifted number from 1 to 2 in exchange for decreasing the right hand side by 1. Reported-by:

[PATCH 5.10 098/145] usb: gadget: select CONFIG_CRC32

2021-01-11 Thread Greg Kroah-Hartman
From: Arnd Bergmann commit d7889c2020e08caab0d7e36e947f642d91015bd0 upstream. Without crc32 support, this driver fails to link: arm-linux-gnueabi-ld: drivers/usb/gadget/function/f_eem.o: in function `eem_unwrap': f_eem.c:(.text+0x11cc): undefined reference to `crc32_le' arm-linux-gnueabi-ld:

[PATCH 5.10 138/145] netfilter: ipset: fix shift-out-of-bounds in htable_bits()

2021-01-11 Thread Greg Kroah-Hartman
From: Vasily Averin commit 5c8193f568ae16f3242abad6518dc2ca6c8eef86 upstream. htable_bits() can call jhash_size(32) and trigger shift-out-of-bounds UBSAN: shift-out-of-bounds in net/netfilter/ipset/ip_set_hash_gen.h:151:6 shift exponent 32 is too large for 32-bit type 'unsigned int' CPU: 0

[PATCH 5.10 121/145] ALSA: hda/realtek: Add mute LED quirk for more HP laptops

2021-01-11 Thread Greg Kroah-Hartman
From: Manuel Jiménez commit 484229585a5e91eeb00ee10e05d5204e1ca6c481 upstream. HP Pavilion 13-bb (SSID 103c:87c8) needs the same quirk as other models with ALC287. Signed-off-by: Manuel Jiménez Cc: Link: https://lore.kernel.org/r/X+s/gKNydVrI6nLj@HP-Pavilion-13 Signed-off-by: Takashi

[PATCH 5.10 119/145] ALSA: hda/conexant: add a new hda codec CX11970

2021-01-11 Thread Greg Kroah-Hartman
From: bo liu commit 744a11abc56405c5a106e63da30a941b6d27f737 upstream. The current kernel does not support the cx11970 codec chip. Add a codec configuration item to kernel. [ Minor coding style fix by tiwai ] Signed-off-by: bo liu Cc: Link:

[PATCH 5.10 132/145] bcache: fix typo from SUUP to SUPP in features.h

2021-01-11 Thread Greg Kroah-Hartman
From: Coly Li commit f7b4943dea48a572ad751ce1f18a245d43debe7e upstream. This patch fixes the following typos, from BCH_FEATURE_COMPAT_SUUP to BCH_FEATURE_COMPAT_SUPP from BCH_FEATURE_INCOMPAT_SUUP to BCH_FEATURE_INCOMPAT_SUPP from BCH_FEATURE_INCOMPAT_SUUP to BCH_FEATURE_RO_COMPAT_SUPP Fixes:

[PATCH 5.10 125/145] btrfs: qgroup: dont try to wait flushing if were already holding a transaction

2021-01-11 Thread Greg Kroah-Hartman
From: Qu Wenruo commit ae5e070eaca9dbebde3459dd8f4c2756f8c097d0 upstream. There is a chance of racing for qgroup flushing which may lead to deadlock: Thread A| Thread B (not holding trans handle) | (holding a trans handle)

[PATCH 5.10 145/145] rtlwifi: rise completion at the last step of firmware callback

2021-01-11 Thread Greg Kroah-Hartman
From: Ping-Ke Shih commit 4dfde294b9792dcf8615b55c58f093d544f472f0 upstream. request_firmware_nowait() which schedules another work is used to load firmware when USB is probing. If USB is unplugged before running the firmware work, it goes disconnect ops, and then causes use-after-free. Though

[PATCH 5.10 139/145] netfilter: xt_RATEEST: reject non-null terminated string from userspace

2021-01-11 Thread Greg Kroah-Hartman
From: Florian Westphal commit 6cb56218ad9e580e519dcd23bfb3db08d8692e5a upstream. syzbot reports: detected buffer overflow in strlen [..] Call Trace: strlen include/linux/string.h:325 [inline] strlcpy include/linux/string.h:348 [inline] xt_rateest_tg_checkentry+0x2a5/0x6b0

[PATCH 5.10 142/145] x86/mtrr: Correct the range check before performing MTRR type lookups

2021-01-11 Thread Greg Kroah-Hartman
From: Ying-Tsun Huang commit cb7f4a8b1fb426a175d1708f05581939c61329d4 upstream. In mtrr_type_lookup(), if the input memory address region is not in the MTRR, over 4GB, and not over the top of memory, a write-back attribute is returned. These condition checks are for ensuring the input memory

[PATCH 5.10 131/145] drm/i915: clear the gpu reloc batch

2021-01-11 Thread Greg Kroah-Hartman
From: Matthew Auld commit 641382e9b44fba81a0778e1914ee35b8471121f9 upstream. The reloc batch is short lived but can exist in the user visible ppGTT, and since it's backed by an internal object, which lacks page clearing, we should take care to clear it upfront. Signed-off-by: Matthew Auld

[PATCH 5.10 134/145] bcache: introduce BCH_FEATURE_INCOMPAT_LOG_LARGE_BUCKET_SIZE for large bucket

2021-01-11 Thread Greg Kroah-Hartman
From: Coly Li commit b16671e8f493e3df40b1fb0dff4078f391c5099a upstream. When large bucket feature was added, BCH_FEATURE_INCOMPAT_LARGE_BUCKET was introduced into the incompat feature set. It used bucket_size_hi (which was added at the tail of struct cache_sb_disk) to extend current 16bit

[PATCH 5.10 118/145] ALSA: hda/via: Fix runtime PM for Clevo W35xSS

2021-01-11 Thread Greg Kroah-Hartman
From: Takashi Iwai commit 4bfd6247fa9164c8e193a55ef9c0ea3ee22f82d8 upstream. Clevo W35xSS_370SS with VIA codec has had the runtime PM problem that looses the power state of some nodes after the runtime resume. This was worked around by disabling the default runtime PM via a denylist entry.

[PATCH 5.10 112/145] KVM: x86/mmu: Get root level from walkers when retrieving MMIO SPTE

2021-01-11 Thread Greg Kroah-Hartman
From: Sean Christopherson commit 39b4d43e6003cee51cd119596d3c33d0449eb44c upstream. Get the so called "root" level from the low level shadow page table walkers instead of manually attempting to calculate it higher up the stack, e.g. in get_mmio_spte(). When KVM is using PAE shadow paging, the

[PATCH 5.10 122/145] ALSA: hda/realtek: Enable mute and micmute LED on HP EliteBook 850 G7

2021-01-11 Thread Greg Kroah-Hartman
From: Kai-Heng Feng commit a598098cc9737f612dbab52294433fc26c51cc9b upstream. HP EliteBook 850 G7 uses the same GPIO pins as ALC285_FIXUP_HP_GPIO_LED to enable mute and micmute LED. So apply the quirk to enable the LEDs. Signed-off-by: Kai-Heng Feng Cc: Link:

[PATCH 5.10 140/145] netfilter: nft_dynset: report EOPNOTSUPP on missing set feature

2021-01-11 Thread Greg Kroah-Hartman
From: Pablo Neira Ayuso commit 95cd4bca7b1f4a25810f3ddfc5e767fb46931789 upstream. If userspace requests a feature which is not available the original set definition, then bail out with EOPNOTSUPP. If userspace sends unsupported dynset flags (new feature not supported by this kernel), then

[PATCH 5.10 133/145] bcache: check unsupported feature sets for bcache register

2021-01-11 Thread Greg Kroah-Hartman
From: Coly Li commit 1dfc0686c29a9bbd3a446a29f9ccde3dec3bc75a upstream. This patch adds the check for features which is incompatible for current supported feature sets. Now if the bcache device created by bcache-tools has features that current kernel doesn't support, read_super() will fail

[PATCH 5.10 123/145] ALSA: hda/realtek: Add two "Intel Reference board" SSID in the ALC256.

2021-01-11 Thread Greg Kroah-Hartman
From: PeiSen Hou commit ce2e79b223867b9e586021b55dee7035517a236b upstream. Add two "Intel Reference boad" SSID in the alc256. Enable "power saving mode" and Enable "headset jack mode". Signed-off-by: PeiSen Hou Cc: Link: https://lore.kernel.org/r/5978d2267f034c28973d117925ec9...@realtek.com

[PATCH 5.10 130/145] drm/i915: clear the shadow batch

2021-01-11 Thread Greg Kroah-Hartman
From: Matthew Auld commit 75353bcd2184010f08a3ed2f0da019bd9d604e1e upstream. The shadow batch is an internal object, which doesn't have any page clearing, and since the batch_len can be smaller than the object, we should take care to clear it. Testcase: igt/gen9_exec_parse/shadow-peek Fixes:

[PATCH 5.10 129/145] arm64: link with -z norelro for LLD or aarch64-elf

2021-01-11 Thread Greg Kroah-Hartman
From: Nick Desaulniers commit 311bea3cb9ee20ef150ca76fc60a592bf6b159f5 upstream. With GNU binutils 2.35+, linking with BFD produces warnings for vmlinux: aarch64-linux-gnu-ld: warning: -z norelro ignored BFD can produce this warning when the target emulation mode does not support RELRO program

[PATCH 5.10 127/145] Revert "device property: Keep secondary firmware node secondary by type"

2021-01-11 Thread Greg Kroah-Hartman
From: Bard Liao commit 47f4469970d8861bc06d2d4d45ac8200ff07c693 upstream. While commit d5dcce0c414f ("device property: Keep secondary firmware node secondary by type") describes everything correct in its commit message, the change it made does the opposite and original commit c15e1bdda436

[PATCH 5.10 135/145] net/mlx5e: Fix SWP offsets when vlan inserted by driver

2021-01-11 Thread Greg Kroah-Hartman
From: Moshe Shemesh commit b544011f0e58ce43c40105468d6dc67f980a0c7a upstream. In case WQE includes inline header the vlan is inserted by driver even if vlan offload is set. On geneve over vlan interface where software parser is used the SWP offsets should be updated according to the added vlan.

[PATCH 5.10 128/145] dmabuf: fix use-after-free of dmabufs file->f_inode

2021-01-11 Thread Greg Kroah-Hartman
From: Charan Teja Reddy commit 05cd84691eafcd7959a1e120d5e72c0dd98c5d91 upstream. It is observed 'use-after-free' on the dmabuf's file->f_inode with the race between closing the dmabuf file and reading the dmabuf's debug info. Consider the below scenario where P1 is closing the dma_buf file

[PATCH 5.10 097/145] ALSA: usb-audio: Fix UBSAN warnings for MIDI jacks

2021-01-11 Thread Greg Kroah-Hartman
From: Takashi Iwai commit c06ccf3ebb7503706ea49fd248e709287ef385a3 upstream. The calculation of in_cables and out_cables bitmaps are done with the bit shift by the value from the descriptor, which is an arbitrary value, and can lead to UBSAN shift-out-of-bounds warnings. Fix it by filtering

[PATCH 5.10 116/145] x86/resctrl: Dont move a task to the same resource group

2021-01-11 Thread Greg Kroah-Hartman
From: Fenghua Yu commit a0195f314a25582b38993bf30db11c300f4f4611 upstream. Shakeel Butt reported in [1] that a user can request a task to be moved to a resource group even if the task is already in the group. It just wastes time to do the move operation which could be costly to send IPI to a

[PATCH 5.10 144/145] xsk: Fix memory leak for failed bind

2021-01-11 Thread Greg Kroah-Hartman
From: Magnus Karlsson commit 8bee683384087a6275c9183a483435225f7bb209 upstream. Fix a possible memory leak when a bind of an AF_XDP socket fails. When the fill and completion rings are created, they are tied to the socket. But when the buffer pool is later created at bind time, the ownership of

[PATCH 5.10 092/145] USB: serial: iuu_phoenix: fix DMA from stack

2021-01-11 Thread Greg Kroah-Hartman
From: Johan Hovold commit 54d0a3ab80f49f19ee916def62fe067596833403 upstream. Stack-allocated buffers cannot be used for DMA (on all architectures) so allocate the flush command buffer using kmalloc(). Fixes: 60a8fc017103 ("USB: add iuu_phoenix driver") Cc: stable # 2.6.25 Reviewed-by:

[PATCH 5.10 100/145] usb: gadget: f_uac2: reset wMaxPacketSize

2021-01-11 Thread Greg Kroah-Hartman
From: Jerome Brunet commit 9389044f27081d6ec77730c36d5bf9a1288bcda2 upstream. With commit 913e4a90b6f9 ("usb: gadget: f_uac2: finalize wMaxPacketSize according to bandwidth") wMaxPacketSize is computed dynamically but the value is never reset. Because of this, the actual maximum packet size

[PATCH 5.10 096/145] USB: usblp: fix DMA to stack

2021-01-11 Thread Greg Kroah-Hartman
From: Johan Hovold commit 020a1f453449294926ca548d8d5ca970926e8dfd upstream. Stack-allocated buffers cannot be used for DMA (on all architectures). Replace the HP-channel macro with a helper function that allocates a dedicated transfer buffer so that it can continue to be used with arguments

[PATCH 5.10 099/145] USB: Gadget: dummy-hcd: Fix shift-out-of-bounds bug

2021-01-11 Thread Greg Kroah-Hartman
From: Alan Stern commit c318840fb2a42ce25febc95c4c19357acf1ae5ca upstream. The dummy-hcd driver was written under the assumption that all the parameters in URBs sent to its root hub would be valid. With URBs sent from userspace via usbfs, that assumption can be violated. In particular, the

[PATCH 5.10 141/145] dmaengine: idxd: off by one in cleanup code

2021-01-11 Thread Greg Kroah-Hartman
From: Dan Carpenter commit ff58f7dd0c1352a01de3a40327895bd51e03de3a upstream. The clean up is off by one so this will start at "i" and it should start with "i - 1" and then it doesn't unregister the zeroeth elements in the array. Fixes: c52ca478233c ("dmaengine: idxd: add configuration

[PATCH 5.10 113/145] kvm: check tlbs_dirty directly

2021-01-11 Thread Greg Kroah-Hartman
From: Lai Jiangshan commit 88bf56d04bc3564542049ec4ec168a8b60d0b48c upstream. In kvm_mmu_notifier_invalidate_range_start(), tlbs_dirty is used as: need_tlb_flush |= kvm->tlbs_dirty; with need_tlb_flush's type being int and tlbs_dirty's type being long. It means that tlbs_dirty is

Re: [PATCH 1/7] regulator: qcom-labibb: Implement voltage selector ops

2021-01-11 Thread Mark Brown
On Sat, Jan 09, 2021 at 02:29:15PM +0100, AngeloGioacchino Del Regno wrote: > + .linear_ranges = (struct linear_range[]) { > + REGULATOR_LINEAR_RANGE(460, 0, 15, 10), > + }, > + .n_linear_ranges= 1, If there's a single range that's just a simple

[PATCH 5.10 093/145] USB: serial: option: add LongSung M5710 module support

2021-01-11 Thread Greg Kroah-Hartman
From: Daniel Palmer commit 0e2d6795e8dbe91c2f5473564c6b25d11df3778b upstream. Add a device-id entry for the LongSung M5710 module. T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=2df3 ProdID=9d03 Rev=

[PATCH 5.10 094/145] USB: serial: option: add Quectel EM160R-GL

2021-01-11 Thread Greg Kroah-Hartman
From: Bjørn Mork commit d6c1ddd938d84a1adef7e19e8efc10e1b4df5034 upstream. New modem using ff/ff/30 for QCDM, ff/00/00 for AT and NMEA, and ff/ff/ff for RMNET/QMI. T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=5000 MxCh= 0 D: Ver= 3.20 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs= 1 P:

[PATCH 5.10 114/145] KVM: x86/mmu: Ensure TDP MMU roots are freed after yield

2021-01-11 Thread Greg Kroah-Hartman
From: Ben Gardon commit a889ea54b3daa63ee1463dc19ed699407d61458b upstream. Many TDP MMU functions which need to perform some action on all TDP MMU roots hold a reference on that root so that they can safely drop the MMU lock in order to yield to other threads. However, when releasing the

[PATCH 5.10 117/145] blk-iocost: fix NULL iocg deref from racing against initialization

2021-01-11 Thread Greg Kroah-Hartman
From: Tejun Heo commit d16baa3f1453c14d680c5fee01cd122a22d0e0ce upstream. When initializing iocost for a queue, its rqos should be registered before the blkcg policy is activated to allow policy data initiailization to lookup the associated ioc. This unfortunately means that the rqos methods

[PATCH 5.10 107/145] USB: serial: keyspan_pda: remove unused variable

2021-01-11 Thread Greg Kroah-Hartman
From: Johan Hovold Remove an unused variable which was mistakingly left by commit 37faf5061541 ("USB: serial: keyspan_pda: fix write-wakeup use-after-free") and only removed by a later change. This is needed to suppress a W=1 warning about the unused variable in the stable trees that the build

[PATCH 5.10 067/145] scsi: ufs: Clear UAC for FFU and RPMB LUNs

2021-01-11 Thread Greg Kroah-Hartman
From: Jaegeuk Kim [ Upstream commit 4f3e900b628226011a5f71c19e53b175c014eb58 ] In order to conduct FFU or RPMB operations, UFS needs to clear UNIT ATTENTION condition. Clear it explicitly so that we get no failures during initialization. Link:

[PATCH 5.10 108/145] hwmon: (amd_energy) fix allocation of hwmon_channel_info config

2021-01-11 Thread Greg Kroah-Hartman
From: David Arcari commit 84e261553e6f919bf0b4d65244599ab2b41f1da5 upstream. hwmon, specifically hwmon_num_channel_attrs, expects the config array in the hwmon_channel_info structure to be terminated by a zero entry. amd_energy does not honor this convention. As result, a KASAN warning is

[PATCH 5.10 059/145] scsi: block: Introduce BLK_MQ_REQ_PM

2021-01-11 Thread Greg Kroah-Hartman
From: Bart Van Assche [ Upstream commit 0854bcdcdec26aecdc92c303816f349ee1fba2bc ] Introduce the BLK_MQ_REQ_PM flag. This flag makes the request allocation functions set RQF_PM. This is the first step towards removing BLK_MQ_REQ_PREEMPT. Link:

[PATCH 5.10 066/145] depmod: handle the case of /sbin/depmod without /sbin in PATH

2021-01-11 Thread Greg Kroah-Hartman
From: Linus Torvalds [ Upstream commit cedd1862be7e666be87ec824dabc6a2b05618f36 ] Commit 436e980e2ed5 ("kbuild: don't hardcode depmod path") stopped hard-coding the path of depmod, but in the process caused trouble for distributions that had that /sbin location, but didn't have it in the PATH

[PATCH 5.10 106/145] usb: gadget: configfs: Fix use-after-free issue with udc_name

2021-01-11 Thread Greg Kroah-Hartman
From: Eddie Hung commit 64e6bbfff52db4bf6785fab9cffab850b2de6870 upstream. There is a use-after-free issue, if access udc_name in function gadget_dev_desc_UDC_store after another context free udc_name in function unregister_gadget. Context 1: gadget_dev_desc_UDC_store()->unregister_gadget()->

[PATCH 5.10 063/145] scsi: core: Only process PM requests if rpm_status != RPM_ACTIVE

2021-01-11 Thread Greg Kroah-Hartman
From: Bart Van Assche [ Upstream commit e6044f714b256259df9611ff49af433e5411c5c8 ] Instead of submitting all SCSI commands submitted with scsi_execute() to a SCSI device if rpm_status != RPM_ACTIVE, only submit RQF_PM (power management requests) if rpm_status != RPM_ACTIVE. This patch makes the

[PATCH 5.10 083/145] usb: dwc3: gadget: Restart DWC3 gadget when enabling pullup

2021-01-11 Thread Greg Kroah-Hartman
From: Wesley Cheng commit a1383b3537a7bea1c213baa7878ccc4ecf4413b5 upstream. usb_gadget_deactivate/usb_gadget_activate does not execute the UDC start operation, which may leave EP0 disabled and event IRQs disabled when re-activating the function. Move the enabling/disabling of USB EP0 and

[PATCH 5.10 091/145] usb: uas: Add PNY USB Portable SSD to unusual_uas

2021-01-11 Thread Greg Kroah-Hartman
From: Thinh Nguyen commit 96ebc9c871d8a28fb22aa758dd9188a4732df482 upstream. Here's another variant PNY Pro Elite USB 3.1 Gen 2 portable SSD that hangs and doesn't respond to ATA_1x pass-through commands. If it doesn't support these commands, it should respond properly to the host. Add it to

[PATCH 5.10 090/145] usb: usbip: vhci_hcd: protect shift size

2021-01-11 Thread Greg Kroah-Hartman
From: Randy Dunlap commit 718bf42b119de652ebcc93655a1f33a9c0d04b3c upstream. Fix shift out-of-bounds in vhci_hcd.c: UBSAN: shift-out-of-bounds in ../drivers/usb/usbip/vhci_hcd.c:399:41 shift exponent 768 is too large for 32-bit type 'int' Fixes: 03cd00d538a6 ("usbip: vhci-hcd: Set the

[PATCH 5.10 103/145] USB: gadget: legacy: fix return error code in acm_ms_bind()

2021-01-11 Thread Greg Kroah-Hartman
From: Yang Yingliang commit c91d3a6bcaa031f551ba29a496a8027b31289464 upstream. If usb_otg_descriptor_alloc() failed, it need return ENOMEM. Fixes: 578aa8a2b12c ("usb: gadget: acm_ms: allocate and init otg descriptor by otg capabilities") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang

[PATCH 5.10 089/145] USB: xhci: fix U1/U2 handling for hardware with XHCI_INTEL_HOST quirk set

2021-01-11 Thread Greg Kroah-Hartman
From: Michael Grzeschik commit 5d5323a6f3625f101dbfa94ba3ef7706cce38760 upstream. The commit 0472bf06c6fd ("xhci: Prevent U1/U2 link pm states if exit latency is too long") was constraining the xhci code not to allow U1/U2 sleep states if the latency to wake up from the U-states reached the

[PATCH 5.10 086/145] usb: dwc3: ulpi: Replace CPU-based busyloop with Protocol-based one

2021-01-11 Thread Greg Kroah-Hartman
From: Serge Semin commit fca3f138105727c3a22edda32d02f91ce1bf11c9 upstream. Originally the procedure of the ULPI transaction finish detection has been developed as a simple busy-loop with just decrementing counter and no delays. It's wrong since on different systems the loop will take a

[PATCH 5.10 085/145] usb: dwc3: ulpi: Use VStsDone to detect PHY regs access completion

2021-01-11 Thread Greg Kroah-Hartman
From: Serge Semin commit ce722da66d3e9384aa2de9d33d584ee154e5e157 upstream. In accordance with [1] the DWC_usb3 core sets the GUSB2PHYACCn.VStsDone bit when the PHY vendor control access is done and clears it when the application initiates a new transaction. The doc doesn't say anything about

[PATCH 5.10 061/145] scsi: ide: Mark power management requests with RQF_PM instead of RQF_PREEMPT

2021-01-11 Thread Greg Kroah-Hartman
From: Bart Van Assche [ Upstream commit 5ae65383fc7633e0247c31b0c8bf0e6ea63b95a3 ] This is another step that prepares for the removal of RQF_PREEMPT. Link: https://lore.kernel.org/r/20201209052951.16136-5-bvanass...@acm.org Cc: David S. Miller Cc: Alan Stern Cc: Can Guo Cc: Stanley Chu Cc:

[PATCH 5.10 065/145] lib/genalloc: fix the overflow when size is too big

2021-01-11 Thread Greg Kroah-Hartman
From: Huang Shijie [ Upstream commit 36845663843fc59c5d794e3dc0641472e3e572da ] Some graphic card has very big memory on chip, such as 32G bytes. In the following case, it will cause overflow: pool = gen_pool_create(PAGE_SHIFT, NUMA_NO_NODE); ret = gen_pool_add(pool, 0x100,

[PATCH 5.10 082/145] usb: dwc3: meson-g12a: disable clk on error handling path in probe

2021-01-11 Thread Greg Kroah-Hartman
From: Zheng Zengkai commit a5ada3dfe6a20f41f91448b9034a1ef8da3dc87d upstream. dwc3_meson_g12a_probe() does not invoke clk_bulk_disable_unprepare() on one error handling path. This patch fixes that. Fixes: 347052e3bf1b ("usb: dwc3: meson-g12a: fix USB2 PHY initialization on G12A and A1 SoCs")

[PATCH 5.10 062/145] scsi: scsi_transport_spi: Set RQF_PM for domain validation commands

2021-01-11 Thread Greg Kroah-Hartman
From: Bart Van Assche [ Upstream commit cfefd9f8240a7b9fdd96fcd54cb029870b6d8d88 ] Disable runtime power management during domain validation. Since a later patch removes RQF_PREEMPT, set RQF_PM for domain validation commands such that these are executed in the quiesced SCSI device state. Link:

[PATCH 5.10 079/145] USB: cdc-acm: blacklist another IR Droid device

2021-01-11 Thread Greg Kroah-Hartman
From: Sean Young commit 0ffc76539e6e8d28114f95ac25c167c37b5191b3 upstream. This device is supported by the IR Toy driver. Reported-by: Georgi Bakalski Signed-off-by: Sean Young Acked-by: Oliver Neukum Cc: stable Link: https://lore.kernel.org/r/20201227134502.4548-2-s...@mess.org

[PATCH 5.10 033/145] bnxt_en: Fix AER recovery.

2021-01-11 Thread Greg Kroah-Hartman
From: Vasundhara Volam [ Upstream commit fb1e6e562b37b39adfe251919c9abfdb3e01f921 ] A recent change skips sending firmware messages to the firmware when pci_channel_offline() is true during fatal AER error. To make this complete, we need to move the re-initialization sequence to

[PATCH 5.10 075/145] powerpc: Handle .text.{hot,unlikely}.* in linker script

2021-01-11 Thread Greg Kroah-Hartman
From: Nathan Chancellor commit 3ce47d95b7346dcafd9bed3556a8d072cb2b8571 upstream. Commit eff8728fe698 ("vmlinux.lds.h: Add PGO and AutoFDO input sections") added ".text.unlikely.*" and ".text.hot.*" due to an LLVM change [1]. After another LLVM change [2], these sections are seen in some

[PATCH 5.10 078/145] usb: gadget: enable super speed plus

2021-01-11 Thread Greg Kroah-Hartman
From: taehyun.cho commit e2459108b5a0604c4b472cae2b3cb8d3444c77fb upstream. Enable Super speed plus in configfs to support USB3.1 Gen2. This ensures that when a USB gadget is plugged in, it is enumerated as Gen 2 and connected at 10 Gbps if the host and cable are capable of it. Many in-tree

[PATCH 5.10 087/145] usb: dwc3: ulpi: Fix USB2.0 HS/FS/LS PHY suspend regression

2021-01-11 Thread Greg Kroah-Hartman
From: Serge Semin commit e5f4ca3fce90a37b23a77bfcc86800d484a80514 upstream. First of all the commit e0082698b689 ("usb: dwc3: ulpi: conditionally resume ULPI PHY") introduced the Suspend USB2.0 HS/FS/LS PHY regression, as by design of the fix any attempt to read/write from/to the PHY control

[PATCH 5.10 080/145] USB: cdc-wdm: Fix use after free in service_outstanding_interrupt().

2021-01-11 Thread Greg Kroah-Hartman
From: Tetsuo Handa commit 5e5ff0b4b6bcb4d17b7a26ec8bcfc7dd4651684f upstream. syzbot is reporting UAF at usb_submit_urb() [1], for service_outstanding_interrupt() is not checking WDM_DISCONNECTING before calling usb_submit_urb(). Close the race by doing same checks wdm_read() does upon retry.

[PATCH 5.10 046/145] ibmvnic: fix: NULL pointer dereference.

2021-01-11 Thread Greg Kroah-Hartman
From: YANG LI [ Upstream commit 862aecbd9569e563b979c0e23a908b43cda4b0b9 ] The error is due to dereference a null pointer in function reset_one_sub_crq_queue(): if (!scrq) { netdev_dbg(adapter->netdev, "Invalid scrq reset. irq (%d) or msgs(%p).\n", scrq->irq,

[PATCH 5.10 026/145] tun: fix return value when the number of iovs exceeds MAX_SKB_FRAGS

2021-01-11 Thread Greg Kroah-Hartman
From: Yunjian Wang [ Upstream commit 950271d7cc0b4546af3549d8143c4132d6e1f138 ] Currently the tun_napi_alloc_frags() function returns -ENOMEM when the number of iovs exceeds MAX_SKB_FRAGS + 1. However this is inappropriate, we should use -EMSGSIZE instead of -ENOMEM. The following distinctions

[PATCH 5.10 070/145] scsi: block: Remove RQF_PREEMPT and BLK_MQ_REQ_PREEMPT

2021-01-11 Thread Greg Kroah-Hartman
From: Bart Van Assche [ Upstream commit a4d34da715e3cb7e0741fe603dcd511bed067e00 ] Remove flag RQF_PREEMPT and BLK_MQ_REQ_PREEMPT since these are no longer used by any kernel code. Link: https://lore.kernel.org/r/20201209052951.16136-8-bvanass...@acm.org Cc: Can Guo Cc: Stanley Chu Cc: Alan

[PATCH 5.10 077/145] staging: mt7621-dma: Fix a resource leak in an error handling path

2021-01-11 Thread Greg Kroah-Hartman
From: Christophe JAILLET commit d887d6104adeb94d1b926936ea21f07367f0ff9f upstream. If an error occurs after calling 'mtk_hsdma_init()', it must be undone by a corresponding call to 'mtk_hsdma_uninit()' as already done in the remove function. Fixes: 0853c7a53eb3 ("staging: mt7621-dma: ralink:

[PATCH 5.10 060/145] scsi: ide: Do not set the RQF_PREEMPT flag for sense requests

2021-01-11 Thread Greg Kroah-Hartman
From: Bart Van Assche [ Upstream commit 96d86e6a80a3ab9aff81d12f9f1f2a0da2917d38 ] RQF_PREEMPT is used for two different purposes in the legacy IDE code: 1. To mark power management requests. 2. To mark requests that should preempt another request. An (old) explanation of that feature

[PATCH 5.10 084/145] usb: dwc3: gadget: Clear wait flag on dequeue

2021-01-11 Thread Greg Kroah-Hartman
From: Thinh Nguyen commit a5c768210e42928d73de1c9e1e02d2b14c2e upstream. If an active transfer is dequeued, then the endpoint is freed to start a new transfer. Make sure to clear the endpoint's transfer wait flag for this case. Fixes: e0d19563eb6c ("usb: dwc3: gadget: Wait for transfer

[PATCH 5.10 072/145] crypto: ecdh - avoid buffer overflow in ecdh_set_secret()

2021-01-11 Thread Greg Kroah-Hartman
From: Ard Biesheuvel commit 0aa171e9b267ce7c52d3a3df7bc9c1fc0203dec5 upstream. Pavel reports that commit 17858b140bf4 ("crypto: ecdh - avoid unaligned accesses in ecdh_set_secret()") fixes one problem but introduces another: the unconditional memcpy() introduced by that commit may overflow the

[PATCH v2] MIPS: OCTEON: fix unreachable code in octeon_irq_init_ciu

2021-01-11 Thread menglong8 . dong
From: Menglong Dong The type of 'r' in octeon_irq_init_ciu is 'unsigned int', so 'r < 0' can't be true. Fix this by change the type of 'r' and 'i' from 'unsigned int' to 'int'. As 'i' won't be negative, this change works. Fixes: 99fbc70f8547 ("MIPS: Octeon: irq: Alloc desc before configuring

[PATCH v3 00/21] arm64: Early CPU feature override, and applications to VHE, BTI and PAuth

2021-01-11 Thread Marc Zyngier
It recently came to light that there is a need to be able to override some CPU features very early on, before the kernel is fully up and running. The reasons for this range from specific feature support (such as using Protected KVM on VHE HW, which is the main motivation for this work) to errata

[PATCH 5.10 032/145] net: mvpp2: fix pkt coalescing int-threshold configuration

2021-01-11 Thread Greg Kroah-Hartman
From: Stefan Chulski [ Upstream commit 4f374d2c43a9e5e773f1dee56db63bd6b8a36276 ] The packet coalescing interrupt threshold has separated registers for different aggregated/cpu (sw-thread). The required value should be loaded for every thread but not only for 1 current cpu. Fixes: 213f428f5056

[PATCH v3 01/21] arm64: Fix labels in el2_setup macros

2021-01-11 Thread Marc Zyngier
If someone happens to write the following code: b 1f init_el2_state vhe 1: [...] they will be in for a long debugging session, as the label "1f" will be resolved *inside* the init_el2_state macro instead of after it. Not really what one expects. Instead, rewite

[PATCH v3 03/21] arm64: Turn the MMU-on sequence into a macro

2021-01-11 Thread Marc Zyngier
Turning the MMU on is a popular sport in the arm64 kernel, and we do it more than once, or even twice. As we are about to add even more, let's turn it into a macro. No expected functional change. Signed-off-by: Marc Zyngier --- arch/arm64/include/asm/assembler.h | 17 +

[PATCH v3 02/21] arm64: Fix outdated TCR setup comment

2021-01-11 Thread Marc Zyngier
The arm64 kernel has long be able to use more than 39bit VAs. Since day one, actually. Let's rewrite the offending comment. Signed-off-by: Marc Zyngier --- arch/arm64/mm/proc.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S

[PATCH v3 04/21] arm64: Provide an 'upgrade to VHE' stub hypercall

2021-01-11 Thread Marc Zyngier
As we are about to change the way a VHE system boots, let's provide the core helper, in the form of a stub hypercall that enables VHE and replicates the full EL1 context at EL2, thanks to EL1 and VHE-EL2 being extremely similar. On exception return, the kernel carries on at EL2. Fancy! Nothing

  1   2   3   4   5   6   7   8   9   10   >