[PATCH 4.14 171/228] btrfs: fix memory leaks after failure to lookup checksums during inode logging

2020-08-20 Thread Greg Kroah-Hartman
From: Filipe Manana commit 4f26433e9b3eb7a55ed70d8f882ae9cd48ba448b upstream. While logging an inode, at copy_items(), if we fail to lookup the checksums for an extent we release the destination path, free the ins_data array and then return immediately. However a previous iteration of the for lo

[PATCH 4.14 181/228] mac80211: fix misplaced while instead of if

2020-08-20 Thread Greg Kroah-Hartman
From: Johannes Berg commit 5981fe5b0529ba25d95f37d7faa434183ad618c5 upstream. This never was intended to be a 'while' loop, it should've just been an 'if' instead of 'while'. Fix this. I noticed this while applying another patch from Ben that intended to fix a busy loop at this spot. Cc: sta..

[PATCH 4.14 174/228] xtensa: fix xtensa_pmu_setup prototype

2020-08-20 Thread Greg Kroah-Hartman
From: Max Filippov commit 6d65d3769d1910379e1cfa61ebf387efc6bfb22c upstream. Fix the following build error in configurations with CONFIG_XTENSA_VARIANT_HAVE_PERF_EVENTS=y: arch/xtensa/kernel/perf_event.c:420:29: error: passing argument 3 of ‘cpuhp_setup_state’ from incompatible pointer type

[PATCH 4.14 185/228] ftrace: Setup correct FTRACE_FL_REGS flags for module

2020-08-20 Thread Greg Kroah-Hartman
From: Chengming Zhou commit 8a224ffb3f52b0027f6b7279854c71a31c48fc97 upstream. When module loaded and enabled, we will use __ftrace_replace_code for module if any ftrace_ops referenced it found. But we will get wrong ftrace_addr for module rec in ftrace_get_addr_new, because rec->flags has not b

[PATCH 4.14 160/228] parisc: Implement __smp_store_release and __smp_load_acquire barriers

2020-08-20 Thread Greg Kroah-Hartman
From: John David Anglin commit e96ebd589debd9a6a793608c4ec7019c38785dea upstream. This patch implements the __smp_store_release and __smp_load_acquire barriers using ordered stores and loads. This avoids the sync instruction present in the generic implementation. Cc: # 4.14+ Signed-off-by: Da

[PATCH 4.14 197/228] USB: serial: ftdi_sio: make process-packet buffer unsigned

2020-08-20 Thread Greg Kroah-Hartman
From: Johan Hovold [ Upstream commit ab4cc4ef6724ea588e835fc1e764c4b4407a70b7 ] Use an unsigned type for the process-packet buffer argument and give it a more apt name. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold Signed-off-by: Sasha Levin --- drivers/usb/serial/ftdi_sio.c |

[PATCH 4.14 195/228] mfd: arizona: Ensure 32k clock is put on driver unbind and error

2020-08-20 Thread Greg Kroah-Hartman
From: Charles Keepax [ Upstream commit ddff6c45b21d0437ce0c85f8ac35d7b5480513d7 ] Whilst it doesn't matter if the internal 32k clock register settings are cleaned up on exit, as the part will be turned off losing any settings, hence the driver hasn't historially bothered. The external clock shou

[PATCH 4.14 217/228] ALSA: echoaudio: Fix potential Oops in snd_echo_resume()

2020-08-20 Thread Greg Kroah-Hartman
From: Dinghao Liu [ Upstream commit 5a25de6df789cc805a9b8ba7ab5deef5067af47e ] Freeing chip on error may lead to an Oops at the next time the system goes to resume. Fix this by removing all snd_echo_free() calls on error. Fixes: 47b5d028fdce8 ("ALSA: Echoaudio - Add suspend support #2") Signed-

[PATCH 4.14 221/228] khugepaged: retract_page_tables() remember to test exit

2020-08-20 Thread Greg Kroah-Hartman
From: Hugh Dickins commit 18e77600f7a1ed69f8ce46c9e11cad0985712dfa upstream. Only once have I seen this scenario (and forgot even to notice what forced the eventual crash): a sequence of "BUG: Bad page map" alerts from vm_normal_page(), from zap_pte_range() servicing exit_mmap(); pmd:, p

Re: [RFC PATCH 1/5] printk: implement pr_cont_t

2020-08-20 Thread Petr Mladek
On Thu 2020-08-20 01:32:28, John Ogness wrote: > Implement a new buffering mechanism for pr_cont messages. > > Old mechanism syntax: > > printk(KERN_INFO "text"); > printk(KERN_CONT " continued"); > printk(KERN_CONT "\n"); > > New mechanism syntax: > > pr_cont_t c; > > pr_c

[PATCH 4.14 220/228] sh: landisk: Add missing initialization of sh_io_port_base

2020-08-20 Thread Greg Kroah-Hartman
From: Geert Uytterhoeven [ Upstream commit 0c64a0dce51faa9c706fdf1f957d6f19878f4b81 ] The Landisk setup code maps the CF IDE area using ioremap_prot(), and passes the resulting virtual addresses to the pata_platform driver, disguising them as I/O port addresses. Hence the pata_platform driver t

[PATCH 4.14 225/228] dm cache: pass cache structure to mode functions

2020-08-20 Thread Greg Kroah-Hartman
From: Mike Snitzer commit 8e3c3827776fc93728c0c8d7c7b731226dc6ee23 upstream. No functional changes, just a bit cleaner than passing cache_features structure. Signed-off-by: Mike Snitzer Signed-off-by: Greg Kroah-Hartman --- drivers/md/dm-cache-target.c | 32 ---

[PATCH 4.14 219/228] tools build feature: Quote CC and CXX for their arguments

2020-08-20 Thread Greg Kroah-Hartman
From: Daniel Díaz [ Upstream commit fa5c893181ed2ca2f96552f50073786d2cfce6c0 ] When using a cross-compilation environment, such as OpenEmbedded, the CC an CXX variables are set to something more than just a command: there are arguments (such as --sysroot) that need to be passed on to the compile

[PATCH 4.4 004/149] ath9k_htc: release allocated buffer if timed out

2020-08-20 Thread Greg Kroah-Hartman
From: Navid Emamdoost [ Upstream commit 853acf7caf10b828102d92d05b5c101666a6142b ] In htc_config_pipe_credits, htc_setup_complete, and htc_connect_service if time out happens, the allocated buffer needs to be released. Otherwise there will be memory leak. Signed-off-by: Navid Emamdoost Signed-

[PATCH 4.4 016/149] net/x25: Fix null-ptr-deref in x25_disconnect

2020-08-20 Thread Greg Kroah-Hartman
From: YueHaibing commit 8999dc89497ab1c80d0718828e838c7cd5f6bffe upstream. We should check null before do x25_neigh_put in x25_disconnect, otherwise may cause null-ptr-deref like this: #include #include int main() { int sck_x25; sck_x25 = socket(AF_X25, SOCK_SEQPACKET, 0); clo

[PATCH 4.4 018/149] net: lan78xx: add missing endpoint sanity check

2020-08-20 Thread Greg Kroah-Hartman
From: Johan Hovold [ Upstream commit 8d8e95fd6d69d774013f51e5f2ee10c6e6d1fc14 ] Add the missing endpoint sanity check to prevent a NULL-pointer dereference should a malicious device lack the expected endpoints. Note that the driver has a broken endpoint-lookup helper, lan78xx_get_endpoints(), w

[PATCH 4.4 022/149] nfc: s3fwrn5: add missing release on skb in s3fwrn5_recv_frame

2020-08-20 Thread Greg Kroah-Hartman
From: Navid Emamdoost [ Upstream commit 1e8fd3a97f2d83a7197876ceb4f37b4c2b00a0f3 ] The implementation of s3fwrn5_recv_frame() is supposed to consume skb on all execution paths. Release skb before returning -ENODEV. Signed-off-by: Navid Emamdoost Signed-off-by: David S. Miller Signed-off-by: S

[PATCH 4.4 000/149] 4.4.233-rc1 review

2020-08-20 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.4.233 release. There are 149 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 Sat, 22 Aug 2020 09:21:01 +. Anything re

[PATCH 4.4 035/149] Bluetooth: Fix slab-out-of-bounds read in hci_extended_inquiry_result_evt()

2020-08-20 Thread Greg Kroah-Hartman
From: Peilin Ye commit 51c19bf3d5cfaa66571e4b88ba2a6f6295311101 upstream. Check upon `num_rsp` is insufficient. A malformed event packet with a large `num_rsp` number makes hci_extended_inquiry_result_evt() go out of bounds. Fix it. This patch fixes the following syzbot bug: https://syzka

[PATCH 4.4 005/149] ath9k: release allocated buffer if timed out

2020-08-20 Thread Greg Kroah-Hartman
From: Navid Emamdoost [ Upstream commit 728c1e2a05e4b5fc52fab3421dce772a806612a2 ] In ath9k_wmi_cmd, the allocated network buffer needs to be released if timeout happens. Otherwise memory will be leaked. Signed-off-by: Navid Emamdoost Signed-off-by: Kalle Valo Signed-off-by: Sasha Levin ---

[PATCH 4.4 055/149] udp: drop corrupt packets earlier to avoid data corruption

2020-08-20 Thread Greg Kroah-Hartman
From: Dexuan Cui The v4.4 stable kernel lacks this bugfix: commit 327868212381 ("make skb_copy_datagram_msg() et.al. preserve ->msg_iter on error"). As a result, the v4.4 kernel can deliver corrupt data to the application when a corrupt UDP packet is closely followed by a valid UDP packet: the s

[PATCH 4.4 020/149] mlxsw: core: Increase scope of RCU read-side critical section

2020-08-20 Thread Greg Kroah-Hartman
From: Ido Schimmel [ Upstream commit 7d8e8f3433dc8d1dc87c1aabe73a154978fb4c4d ] The lifetime of the Rx listener item ('rxl_item') is managed using RCU, but is dereferenced outside of RCU read-side critical section, which can lead to a use-after-free. Fix this by increasing the scope of the RCU

[PATCH 4.4 034/149] ALSA: seq: oss: Serialize ioctls

2020-08-20 Thread Greg Kroah-Hartman
From: Takashi Iwai commit 80982c7e834e5d4e325b6ce33757012ecafdf0bb upstream. Some ioctls via OSS sequencer API may race and lead to UAF when the port create and delete are performed concurrently, as spotted by a couple of syzkaller cases. This patch is an attempt to address it by serializing th

[PATCH 4.4 047/149] ipv4: Silence suspicious RCU usage warning

2020-08-20 Thread Greg Kroah-Hartman
From: Ido Schimmel [ Upstream commit 83f3522860f702748143e022f1a546547314c715 ] fib_trie_unmerge() is called with RTNL held, but not from an RCU read-side critical section. This leads to the following warning [1] when the FIB alias list in a leaf is traversed with hlist_for_each_entry_rcu(). Si

[PATCH 4.4 065/149] drm/radeon: Fix reference count leaks caused by pm_runtime_get_sync

2020-08-20 Thread Greg Kroah-Hartman
From: Aditya Pakki [ Upstream commit 9fb10671011143d15b6b40d6d5fa9c52c57e9d63 ] On calling pm_runtime_get_sync() the reference count of the device is incremented. In case of failure, decrement the reference count before returning the error. Acked-by: Evan Quan Signed-off-by: Aditya Pakki Sign

[PATCH 4.4 012/149] ARM: 8986/1: hw_breakpoint: Dont invoke overflow handler on uaccess watchpoints

2020-08-20 Thread Greg Kroah-Hartman
From: Will Deacon [ Upstream commit eec13b42d41b0f3339dcf0c4da43734427c68620 ] Unprivileged memory accesses generated by the so-called "translated" instructions (e.g. LDRT) in kernel mode can cause user watchpoints to fire unexpectedly. In such cases, the hw_breakpoint logic will invoke the user

[PATCH 4.4 019/149] net: lan78xx: fix transfer-buffer memory leak

2020-08-20 Thread Greg Kroah-Hartman
From: Johan Hovold [ Upstream commit 63634aa679ba8b5e306ad0727120309ae6ba8a8e ] The interrupt URB transfer-buffer was never freed on disconnect or after probe errors. Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver") Cc: woojung@microchip.com

[PATCH 4.4 041/149] drm/nouveau/fbcon: fix module unload when fbcon init has failed for some reason

2020-08-20 Thread Greg Kroah-Hartman
From: Ben Skeggs [ Upstream commit 498595abf5bd51f0ae074cec565d888778ea558f ] Stale pointer was tripping up the unload path. Signed-off-by: Ben Skeggs Signed-off-by: Sasha Levin --- drivers/gpu/drm/nouveau/nouveau_fbcon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/no

[PATCH 4.4 036/149] Bluetooth: Prevent out-of-bounds read in hci_inquiry_result_evt()

2020-08-20 Thread Greg Kroah-Hartman
From: Peilin Ye commit 75bbd2ea50ba1c5d9da878a17e92eac02fe0fd3a upstream. Check `num_rsp` before using it as for-loop counter. Cc: sta...@vger.kernel.org Signed-off-by: Peilin Ye Signed-off-by: Marcel Holtmann Signed-off-by: Greg Kroah-Hartman --- net/bluetooth/hci_event.c |2 +- 1 fil

[PATCH 4.4 045/149] tools lib traceevent: Fix memory leak in process_dynamic_array_len

2020-08-20 Thread Greg Kroah-Hartman
From: Philippe Duplessis-Guindon [ Upstream commit e24c6447ccb7b1a01f9bf0aec94939e6450c0b4d ] I compiled with AddressSanitizer and I had these memory leaks while I was using the tep_parse_format function: Direct leak of 28 byte(s) in 4 object(s) allocated from: #0 0x7fb07db49ffe in

[PATCH 4.4 081/149] leds: lm355x: avoid enum conversion warning

2020-08-20 Thread Greg Kroah-Hartman
From: Arnd Bergmann [ Upstream commit 985b1f596f9ed56f42b8c2280005f943e1434c06 ] clang points out that doing arithmetic between diffent enums is usually a mistake: drivers/leds/leds-lm355x.c:167:28: warning: bitwise operation between different enumeration types ('enum lm355x_tx2' and 'enum lm3

Re: [PATCH] efi: discover ESRT table on Xen PV too

2020-08-20 Thread Roger Pau Monné
On Thu, Aug 20, 2020 at 11:34:54AM +0200, Marek Marczykowski-Górecki wrote: > On Thu, Aug 20, 2020 at 11:30:25AM +0200, Roger Pau Monné wrote: > > Right, so you only need access to the ESRT table, that's all. Then I > > think we need to make sure Xen doesn't use this memory for anything > > else, w

[PATCH 4.4 083/149] scsi: cumana_2: Fix different dev_id between request_irq() and free_irq()

2020-08-20 Thread Greg Kroah-Hartman
From: Christophe JAILLET [ Upstream commit 040ab9c4fd0070cd5fa71ba3a7b95b8470db9b4d ] The dev_id used in request_irq() and free_irq() should match. Use 'info' in both cases. Link: https://lore.kernel.org/r/20200625204730.943520-1-christophe.jail...@wanadoo.fr Fixes: 1da177e4c3f4 ("Linux-2.6.1

[PATCH 4.4 094/149] usb: dwc2: Fix error path in gadget registration

2020-08-20 Thread Greg Kroah-Hartman
From: Marek Szyprowski [ Upstream commit 33a06f1300a79cfd461cea0268f05e969d4f34ec ] When gadget registration fails, one should not call usb_del_gadget_udc(). Ensure this by setting gadget->udc to NULL. Also in case of a failure there is no need to disable low-level hardware, so return immiedetly

[PATCH 4.4 091/149] mwifiex: Prevent memory corruption handling keys

2020-08-20 Thread Greg Kroah-Hartman
From: Dan Carpenter [ Upstream commit e18696786548244914f36ec3c46ac99c53df99c3 ] The length of the key comes from the network and it's a 16 bit number. It needs to be capped to prevent a buffer overflow. Fixes: 5e6e3a92b9a4 ("wireless: mwifiex: initial commit for Marvell mwifiex driver") Sign

[PATCH 4.4 100/149] wl1251: fix always return 0 error

2020-08-20 Thread Greg Kroah-Hartman
From: Wang Hai [ Upstream commit 20e6421344b5bc2f97b8e2db47b6994368417904 ] wl1251_event_ps_report() should not always return 0 because wl1251_ps_set_mode() may fail. Change it to return 'ret'. Fixes: f7ad1eed4d4b ("wl1251: retry power save entry") Reported-by: Hulk Robot Signed-off-by: Wang H

[PATCH 4.4 087/149] scsi: eesox: Fix different dev_id between request_irq() and free_irq()

2020-08-20 Thread Greg Kroah-Hartman
From: Christophe JAILLET [ Upstream commit 86f2da1112ccf744ad9068b1d5d9843faf8ddee6 ] The dev_id used in request_irq() and free_irq() should match. Use 'info' in both cases. Link: https://lore.kernel.org/r/20200626040553.944352-1-christophe.jail...@wanadoo.fr Fixes: 1da177e4c3f4 ("Linux-2.6.12

[PATCH 4.4 092/149] powerpc/vdso: Fix vdso cpu truncation

2020-08-20 Thread Greg Kroah-Hartman
From: Milton Miller [ Upstream commit a9f675f950a07d5c1dbcbb97aabac56f5ed085e3 ] The code in vdso_cpu_init that exposes the cpu and numa node to userspace via SPRG_VDSO incorrctly masks the cpu to 12 bits. This means that any kernel running on a box with more than 4096 threads (NR_CPUS advertise

[PATCH 4.4 073/149] bdc: Fix bug causing crash after multiple disconnects

2020-08-20 Thread Greg Kroah-Hartman
From: Sasi Kumar [ Upstream commit a95bdfd22076497288868c028619bc5995f5cc7f ] Multiple connects/disconnects can cause a crash on the second disconnect. The driver had a problem where it would try to send endpoint commands after it was disconnected which is not allowed by the hardware. The fix is

[PATCH 4.4 089/149] media: exynos4-is: Add missed check for pinctrl_lookup_state()

2020-08-20 Thread Greg Kroah-Hartman
From: Chuhong Yuan [ Upstream commit 18ffec750578f7447c288647d7282c7d12b1d969 ] fimc_md_get_pinctrl() misses a check for pinctrl_lookup_state(). Add the missed check to fix it. Fixes: 4163851f7b99 ("[media] s5p-fimc: Use pinctrl API for camera ports configuration]") Signed-off-by: Chuhong Yuan

[PATCH 4.4 093/149] PCI/ASPM: Add missing newline in sysfs policy

2020-08-20 Thread Greg Kroah-Hartman
From: Xiongfeng Wang [ Upstream commit 3167e3d340c092fd47924bc4d23117a3074ef9a9 ] When I cat ASPM parameter 'policy' by sysfs, it displays as follows. Add a newline for easy reading. Other sysfs attributes already include a newline. [root@localhost ~]# cat /sys/module/pcie_aspm/parameters/p

[PATCH 4.4 076/149] ACPICA: Do not increment operation_region reference counts for field units

2020-08-20 Thread Greg Kroah-Hartman
From: Erik Kaneda [ Upstream commit 6a54ebae6d047c988a31f5ac5a64ab5cf83797a2 ] ACPICA commit e17b28cfcc31918d0db9547b6b274b09c413eb70 Object reference counts are used as a part of ACPICA's garbage collection mechanism. This mechanism keeps track of references to heap-allocated structures such a

[PATCH 4.4 111/149] fs/minix: check return value of sb_getblk()

2020-08-20 Thread Greg Kroah-Hartman
From: Eric Biggers commit da27e0a0e5f655f0d58d4e153c3182bb2b290f64 upstream. Patch series "fs/minix: fix syzbot bugs and set s_maxbytes". This series fixes all syzbot bugs in the minix filesystem: KASAN: null-ptr-deref Write in get_block KASAN: use-after-free Write in get_block

[PATCH 4.4 068/149] drm/debugfs: fix plain echo to connector "force" attribute

2020-08-20 Thread Greg Kroah-Hartman
From: Michael Tretter [ Upstream commit c704b17071c4dc571dca3af4e4151dac51de081a ] Using plain echo to set the "force" connector attribute fails with -EINVAL, because echo appends a newline to the output. Replace strcmp with sysfs_streq to also accept strings that end with a newline. v2: use s

[PATCH 4.4 102/149] dlm: Fix kobject memleak

2020-08-20 Thread Greg Kroah-Hartman
From: Wang Hai [ Upstream commit 0ffddafc3a3970ef7013696e7f36b3d378bc4c16 ] Currently the error return path from kobject_init_and_add() is not followed by a call to kobject_put() - which means we are leaking the kobject. Set do_unreg = 1 before kobject_init_and_add() to ensure that kobject_put(

[PATCH 4.4 118/149] xen/balloon: fix accounting in alloc_xenballooned_pages error path

2020-08-20 Thread Greg Kroah-Hartman
From: Roger Pau Monne commit 1951fa33ec259abdf3497bfee7b63e7ddbb1a394 upstream. target_unpopulated is incremented with nr_pages at the start of the function, but the call to free_xenballooned_pages will only subtract pgno number of pages, and thus the rest need to be subtracted before returning

[PATCH 4.4 120/149] PCI: hotplug: ACPI: Fix context refcounting in acpiphp_grab_context()

2020-08-20 Thread Greg Kroah-Hartman
From: Rafael J. Wysocki commit dae68d7fd4930315389117e9da35b763f12238f9 upstream. If context is not NULL in acpiphp_grab_context(), but the is_going_away flag is set for the device's parent, the reference counter of the context needs to be decremented before returning NULL or the context will ne

[PATCH 4.4 122/149] btrfs: fix memory leaks after failure to lookup checksums during inode logging

2020-08-20 Thread Greg Kroah-Hartman
From: Filipe Manana commit 4f26433e9b3eb7a55ed70d8f882ae9cd48ba448b upstream. While logging an inode, at copy_items(), if we fail to lookup the checksums for an extent we release the destination path, free the ins_data array and then return immediately. However a previous iteration of the for lo

[PATCH 4.4 116/149] parisc: mask out enable and reserved bits from sba imask

2020-08-20 Thread Greg Kroah-Hartman
From: Sven Schnelle commit 5b24993c21cbf2de11aff077a48c5cb0505a0450 upstream. When using kexec the SBA IOMMU IBASE might still have the RE bit set. This triggers a WARN_ON when trying to write back the IBASE register later, and it also makes some mask calculations fail. Cc: Signed-off-by: Sven

[PATCH 4.4 127/149] bcache: allocate meta data pages as compound pages

2020-08-20 Thread Greg Kroah-Hartman
From: Coly Li commit 5fe48867856367142d91a82f2cbf7a57a24cbb70 upstream. There are some meta data of bcache are allocated by multiple pages, and they are used as bio bv_page for I/Os to the cache device. for example cache_set->uuids, cache->disk_buckets, journal_write->data, bset_tree->data. For

[PATCH 4.4 131/149] ocfs2: change slot number type s16 to u16

2020-08-20 Thread Greg Kroah-Hartman
From: Junxiao Bi commit 38d51b2dd171ad973afc1f5faab825ed05a2d5e9 upstream. Dan Carpenter reported the following static checker warning. fs/ocfs2/super.c:1269 ocfs2_parse_options() warn: '(-1)' 65535 can't fit into 32767 'mopt->slot' fs/ocfs2/suballoc.c:859 ocfs2_init_inode_stea

[PATCH 4.4 129/149] MIPS: CPU#0 is not hotpluggable

2020-08-20 Thread Greg Kroah-Hartman
From: Huacai Chen commit 9cce844abf07b683cff5f0273977d5f8d0af94c7 upstream. Now CPU#0 is not hotpluggable on MIPS, so prevent to create /sys/devices /system/cpu/cpu0/online which confuses some user-space tools. Cc: sta...@vger.kernel.org Signed-off-by: Huacai Chen Signed-off-by: Thomas Bogendo

[PATCH 4.4 130/149] ext2: fix missing percpu_counter_inc

2020-08-20 Thread Greg Kroah-Hartman
From: Mikulas Patocka commit bc2fbaa4d3808aef82dd1064a8e61c16549fe956 upstream. sbi->s_freeinodes_counter is only decreased by the ext2 code, it is never increased. This patch fixes it. Note that sbi->s_freeinodes_counter is only used in the algorithm that tries to find the group for new alloca

[PATCH 4.4 110/149] crypto: qat - fix double free in qat_uclo_create_batch_init_list

2020-08-20 Thread Greg Kroah-Hartman
From: Tom Rix commit c06c76602e03bde24ee69a2022a829127e504202 upstream. clang static analysis flags this error qat_uclo.c:297:3: warning: Attempt to free released memory [unix.Malloc] kfree(*init_tab_base); ^ When input *init_tab_base is nu

[PATCH 4.4 105/149] net/nfc/rawsock.c: add CAP_NET_RAW check.

2020-08-20 Thread Greg Kroah-Hartman
From: Qingyu Li [ Upstream commit 26896f01467a28651f7a536143fe5ac8449d4041 ] When creating a raw AF_NFC socket, CAP_NET_RAW needs to be checked first. Signed-off-by: Qingyu Li Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/nfc/rawsock.c |7 +-- 1 file chang

[PATCH 4.4 149/149] ipv6: check skb->protocol before lookup for nexthop

2020-08-20 Thread Greg Kroah-Hartman
From: WANG Cong commit 199ab00f3cdb6f154ea93fa76fd80192861a821d upstream. Andrey reported a out-of-bound access in ip6_tnl_xmit(), this is because we use an ipv4 dst in ip6_tnl_xmit() and cast an IPv4 neigh key as an IPv6 address: neigh = dst_neigh_lookup(skb_dst(skb),

[PATCH 4.4 133/149] pseries: Fix 64 bit logical memory block panic

2020-08-20 Thread Greg Kroah-Hartman
From: Anton Blanchard commit 89c140bbaeee7a55ed0360a88f294ead2b95201b upstream. Booting with a 4GB LMB size causes us to panic: qemu-system-ppc64: OS terminated: OS panic: Memory block size not suitable: 0x0 Fix pseries_memory_block_size() to handle 64 bit LMBs. Cc: sta...@vger.kernel

[PATCH 4.4 141/149] Input: sentelic - fix error return when fsp_reg_write fails

2020-08-20 Thread Greg Kroah-Hartman
From: Colin Ian King [ Upstream commit ea38f06e0291986eb93beb6d61fd413607a30ca4 ] Currently when the call to fsp_reg_write fails -EIO is not being returned because the count is being returned instead of the return value in retval. Fix this by returning the value in retval instead of count. Addr

Re: [PATCH 2/8] KVM: nSVM: rename nested 'vmcb' to vmcb_gpa in few places

2020-08-20 Thread Maxim Levitsky
On Thu, 2020-08-20 at 12:19 +0200, Paolo Bonzini wrote: > On 20/08/20 12:00, Maxim Levitsky wrote: > > > Please use vmcb12_gpa, and svm->nested.vmcb12 for the VMCB in patch 6. > > > > > > (You probably also what to have local variables named vmcb12 in patch 6 > > > to avoid too-long lines). > > Th

[PATCH 4.4 138/149] iommu/vt-d: Enforce PASID devTLB field mask

2020-08-20 Thread Greg Kroah-Hartman
From: Liu Yi L [ Upstream commit 5f77d6ca5ca74e4b4a5e2e010f7ff50c45dea326 ] Set proper masks to avoid invalid input spillover to reserved bits. Signed-off-by: Liu Yi L Signed-off-by: Jacob Pan Signed-off-by: Lu Baolu Reviewed-by: Eric Auger Link: https://lore.kernel.org/r/20200724014925.155

[PATCH 4.4 136/149] USB: serial: ftdi_sio: fix break and sysrq handling

2020-08-20 Thread Greg Kroah-Hartman
From: Johan Hovold [ Upstream commit 733fff67941dad64b8a630450b8372b1873edc41 ] Only the last NUL in a packet should be flagged as a break character, for example, to avoid dropping unrelated characters when IGNBRK is set. Also make sysrq work by consuming the break character instead of having i

[PATCH 4.4 140/149] clk: clk-atlas6: fix return value check in atlas6_clk_init()

2020-08-20 Thread Greg Kroah-Hartman
From: Xu Wang [ Upstream commit 12b90b40854a8461a02ef19f6f4474cc88d64b66 ] In case of error, the function clk_register() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Xu Wang Link: https://lore.kernel.org/r/20

[PATCH 4.4 101/149] net: spider_net: Fix the size used in a dma_free_coherent() call

2020-08-20 Thread Greg Kroah-Hartman
From: Christophe JAILLET [ Upstream commit 36f28f7687a9ce665479cce5d64ce7afaa9e77ae ] Update the size used in 'dma_free_coherent()' in order to match the one used in the corresponding 'dma_alloc_coherent()', in 'spider_net_init_chain()'. Fixes: d4ed8f8d1fb7 ("Spidernet DMA coalescing") Signed-o

[PATCH 4.4 147/149] sh: landisk: Add missing initialization of sh_io_port_base

2020-08-20 Thread Greg Kroah-Hartman
From: Geert Uytterhoeven [ Upstream commit 0c64a0dce51faa9c706fdf1f957d6f19878f4b81 ] The Landisk setup code maps the CF IDE area using ioremap_prot(), and passes the resulting virtual addresses to the pata_platform driver, disguising them as I/O port addresses. Hence the pata_platform driver t

[PATCH 4.4 142/149] drm/vmwgfx: Fix two list_for_each loop exit tests

2020-08-20 Thread Greg Kroah-Hartman
From: Dan Carpenter [ Upstream commit 4437c1152ce0e57ab8f401aa696ea6291cc07ab1 ] These if statements are supposed to be true if we ended the list_for_each_entry() loops without hitting a break statement but they don't work. In the first loop, we increment "i" after the "if (i == unit)" conditio

Re: [tip: x86/urgent] x86/entry, selftests: Further improve user entry sanity checks

2020-08-20 Thread peterz
On Sat, Jul 04, 2020 at 05:49:10PM -, tip-bot2 for Andy Lutomirski wrote: > diff --git a/arch/x86/entry/common.c b/arch/x86/entry/common.c > index f392a8b..e83b3f1 100644 > --- a/arch/x86/entry/common.c > +++ b/arch/x86/entry/common.c > @@ -49,6 +49,23 @@ > static void check_user_regs(struct

[PATCH 4.4 137/149] iommu/omap: Check for failure of a call to omap_iommu_dump_ctx

2020-08-20 Thread Greg Kroah-Hartman
From: Colin Ian King [ Upstream commit dee9d154f40c58d02f69acdaa5cfd1eae6ebc28b ] It is possible for the call to omap_iommu_dump_ctx to return a negative error number, so check for the failure and return the error number rather than pass the negative value to simple_read_from_buffer. Fixes: 14e

[PATCH 4.4 146/149] ALSA: echoaudio: Fix potential Oops in snd_echo_resume()

2020-08-20 Thread Greg Kroah-Hartman
From: Dinghao Liu [ Upstream commit 5a25de6df789cc805a9b8ba7ab5deef5067af47e ] Freeing chip on error may lead to an Oops at the next time the system goes to resume. Fix this by removing all snd_echo_free() calls on error. Fixes: 47b5d028fdce8 ("ALSA: Echoaudio - Add suspend support #2") Signed-

[PATCH 4.4 135/149] USB: serial: ftdi_sio: clean up receive processing

2020-08-20 Thread Greg Kroah-Hartman
From: Johan Hovold [ Upstream commit ce054039ba5e47b75a3be02a00274e52b06a6456 ] Clean up receive processing by dropping the character pointer and keeping the length argument unchanged throughout the function. Also make it more apparent that sysrq processing can consume a characters by adding an

[PATCH 4.4 139/149] i2c: rcar: slave: only send STOP event when we have been addressed

2020-08-20 Thread Greg Kroah-Hartman
From: Wolfram Sang [ Upstream commit 314139f9f0abdba61ed9a8463bbcb0bf900ac5a2 ] When the SSR interrupt is activated, it will detect every STOP condition on the bus, not only the ones after we have been addressed. So, enable this interrupt only after we have been addressed, and disable it otherwi

[PATCH 4.4 148/149] drm/radeon: fix fb_div check in ni_init_smc_spll_table()

2020-08-20 Thread Greg Kroah-Hartman
From: Denis Efremov commit f29aa08852e1953e461f2d47ab13c34e14bc08b3 upstream. clk_s is checked twice in a row in ni_init_smc_spll_table(). fb_div should be checked instead. Fixes: 69e0b57a91ad ("drm/radeon/kms: add dpm support for cayman (v5)") Cc: sta...@vger.kernel.org Signed-off-by: Denis Ef

[PATCH 4.4 145/149] mfd: dln2: Run event handler loop under spinlock

2020-08-20 Thread Greg Kroah-Hartman
From: Andy Shevchenko [ Upstream commit 3d858942250820b9adc35f963a257481d6d4c81d ] The event handler loop must be run with interrupts disabled. Otherwise we will have a warning: [ 1970.785649] irq 31 handler lineevent_irq_handler+0x0/0x20 enabled interrupts [ 1970.792739] WARNING: CPU: 0 PID: 0

[PATCH 4.4 001/149] xfs: dont call xfs_da_shrink_inode with NULL bp

2020-08-20 Thread Greg Kroah-Hartman
From: Eric Sandeen [ Upstream commit bb3d48dcf86a97dc25fe9fc2c11938e19cb4399a ] xfs_attr3_leaf_create may have errored out before instantiating a buffer, for example if the blkno is out of range. In that case there is no work to do to remove it, and in fact xfs_da_shrink_inode will lead to an o

Re: [PATCH 5.8 137/232] USB: serial: ftdi_sio: fix break and sysrq handling

2020-08-20 Thread Greg Kroah-Hartman
On Thu, Aug 20, 2020 at 11:51:56AM +0200, Johan Hovold wrote: > This was never intended for stable as it is not a critical fix and has > never worked properly in the first place. Please drop this one and the > preparatory clean ups from all stable trees. Ok, but the "fix this thing" and the "Fixes

[PATCH 4.9 003/212] xfs: dont call xfs_da_shrink_inode with NULL bp

2020-08-20 Thread Greg Kroah-Hartman
From: Eric Sandeen [ Upstream commit bb3d48dcf86a97dc25fe9fc2c11938e19cb4399a ] xfs_attr3_leaf_create may have errored out before instantiating a buffer, for example if the blkno is out of range. In that case there is no work to do to remove it, and in fact xfs_da_shrink_inode will lead to an o

Re: [PATCH 05/28] media/v4l2: remove V4L2-FLAG-MEMORY-NON-CONSISTENT

2020-08-20 Thread Tomasz Figa
On Thu, Aug 20, 2020 at 7:02 AM Christoph Hellwig wrote: > > On Wed, Aug 19, 2020 at 03:07:04PM +0100, Robin Murphy wrote: > >> FWIW, I asked back in time what the plan is for non-coherent > >> allocations and it seemed like DMA_ATTR_NON_CONSISTENT and > >> dma_sync_*() was supposed to be the righ

[PATCH 4.4 106/149] net: Set fput_needed iff FDPUT_FPUT is set

2020-08-20 Thread Greg Kroah-Hartman
From: Miaohe Lin [ Upstream commit ce787a5a074a86f76f5d3fd804fa78e01bfb9e89 ] We should fput() file iff FDPUT_FPUT is set. So we should set fput_needed accordingly. Fixes: 00e188ef6a7e ("sockfd_lookup_light(): switch to fdget^W^Waway from fget_light") Signed-off-by: Miaohe Lin Signed-off-by:

[PATCH 4.4 132/149] kprobes: Fix NULL pointer dereference at kprobe_ftrace_handler

2020-08-20 Thread Greg Kroah-Hartman
From: Muchun Song commit 0cb2f1372baa60af8456388a574af6133edd7d80 upstream. We found a case of kernel panic on our server. The stack trace is as follows(omit some irrelevant information): BUG: kernel NULL pointer dereference, address: 0080 RIP: 0010:kprobe_ftrace_handler+0x5e/0x

[PATCH 4.4 125/149] net: stmmac: dwmac1000: provide multicast filter fallback

2020-08-20 Thread Greg Kroah-Hartman
From: Jonathan McDowell commit 592d751c1e174df5ff219946908b005eb48934b3 upstream. If we don't have a hardware multicast filter available then instead of silently failing to listen for the requested ethernet broadcast addresses fall back to receiving all multicast packets, in a similar fashion to

[PATCH 4.4 134/149] USB: serial: ftdi_sio: make process-packet buffer unsigned

2020-08-20 Thread Greg Kroah-Hartman
From: Johan Hovold [ Upstream commit ab4cc4ef6724ea588e835fc1e764c4b4407a70b7 ] Use an unsigned type for the process-packet buffer argument and give it a more apt name. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold Signed-off-by: Sasha Levin --- drivers/usb/serial/ftdi_sio.c |

[PATCH 4.4 144/149] fs/ufs: avoid potential u32 multiplication overflow

2020-08-20 Thread Greg Kroah-Hartman
From: Colin Ian King [ Upstream commit 88b2e9b06381551b707d980627ad0591191f7a2d ] The 64 bit ino is being compared to the product of two u32 values, however, the multiplication is being performed using a 32 bit multiply so there is a potential of an overflow. To be fully safe, cast uspi->s_ncg

[PATCH 4.4 107/149] ALSA: usb-audio: Creative USB X-Fi Pro SB1095 volume knob support

2020-08-20 Thread Greg Kroah-Hartman
From: Mirko Dietrich commit fec9008828cde0076aae595ac031bfcf49d335a4 upstream. Adds an entry for Creative USB X-Fi to the rc_config array in mixer_quirks.c to allow use of volume knob on the device. Adds support for newer X-Fi Pro card, known as "Model No. SB1095" with USB ID "041e:3263" Signed

[PATCH 4.4 143/149] nfs: Fix getxattr kernel panic and memory overflow

2020-08-20 Thread Greg Kroah-Hartman
From: Jeffrey Mitchell [ Upstream commit b4487b93545214a9db8cbf32e86411677b0cca21 ] Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffre

[PATCH 4.4 128/149] mac80211: fix misplaced while instead of if

2020-08-20 Thread Greg Kroah-Hartman
From: Johannes Berg commit 5981fe5b0529ba25d95f37d7faa434183ad618c5 upstream. This never was intended to be a 'while' loop, it should've just been an 'if' instead of 'while'. Fix this. I noticed this while applying another patch from Ben that intended to fix a busy loop at this spot. Cc: sta..

[PATCH 4.4 109/149] ALSA: usb-audio: add quirk for Pioneer DDJ-RB

2020-08-20 Thread Greg Kroah-Hartman
From: Hector Martin commit 6e8596172ee1cd46ec0bfd5adcf4ff86371478b6 upstream. This is just another Pioneer device with fixed endpoints. Input is dummy but used as feedback (it always returns silence). Cc: sta...@vger.kernel.org Signed-off-by: Hector Martin Link: https://lore.kernel.org/r/20200

[PATCH 4.4 108/149] ALSA: usb-audio: fix overeager device match for MacroSilicon MS2109

2020-08-20 Thread Greg Kroah-Hartman
From: Hector Martin commit 14a720dc1f5332f3bdf30a23a3bc549e81be974c upstream. Matching by device matches all interfaces, which breaks the video/HID portions of the device depending on module load order. Fixes: e337bf19f6af ("ALSA: usb-audio: add quirk for MacroSilicon MS2109") Cc: sta...@vger.k

[PATCH 4.4 104/149] drivers/net/wan/lapbether: Added needed_headroom and a skb->len check

2020-08-20 Thread Greg Kroah-Hartman
From: Xie He [ Upstream commit c7ca03c216acb14466a713fedf1b9f2c24994ef2 ] 1. Added a skb->len check This driver expects upper layers to include a pseudo header of 1 byte when passing down a skb for transmission. This driver will read this 1-byte header. This patch added a skb->len check before

[PATCH 4.4 121/149] btrfs: only search for left_info if there is no right_info in try_merge_free_space

2020-08-20 Thread Greg Kroah-Hartman
From: Josef Bacik commit bf53d4687b8f3f6b752f091eb85f62369a515dfd upstream. In try_to_merge_free_space we attempt to find entries to the left and right of the entry we are adding to see if they can be merged. We search for an entry past our current info (saved into right_info), and then if righ

[PATCH 4.4 117/149] ARM: 8992/1: Fix unwind_frame for clang-built kernels

2020-08-20 Thread Greg Kroah-Hartman
From: Nathan Huckleberry commit b4d5ec9b39f8b31d98f65bc5577b5d15d93795d7 upstream. Since clang does not push pc and sp in function prologues, the current implementation of unwind_frame does not work. By using the previous frame's lr/fp instead of saved pc/sp we get valid unwinds on clang-built k

[PATCH 4.4 126/149] md/raid5: Fix Force reconstruct-write io stuck in degraded raid5

2020-08-20 Thread Greg Kroah-Hartman
From: ChangSyun Peng commit a1c6ae3d9f3dd6aa5981a332a6f700cf1c25edef upstream. In degraded raid5, we need to read parity to do reconstruct-write when data disks fail. However, we can not read parity from handle_stripe_dirtying() in force reconstruct-write mode. Reproducible Steps: 1. Create de

[PATCH 4.4 103/149] pinctrl-single: fix pcs_parse_pinconf() return value

2020-08-20 Thread Greg Kroah-Hartman
From: Drew Fustini [ Upstream commit f46fe79ff1b65692a65266a5bec6dbe2bf7fc70f ] This patch causes pcs_parse_pinconf() to return -ENOTSUPP when no pinctrl_map is added. The current behavior is to return 0 when !PCS_HAS_PINCONF or !nconfs. Thus pcs_parse_one_pinctrl_entry() incorrectly assumes t

[PATCH 4.4 123/149] powerpc: Fix circular dependency between percpu.h and mmu.h

2020-08-20 Thread Greg Kroah-Hartman
From: Michael Ellerman commit 0c83b277ada72b585e6a3e52b067669df15bcedb upstream. Recently random.h started including percpu.h (see commit f227e3ec3b5c ("random32: update the net random state on interrupt and activity")), which broke corenet64_smp_defconfig: In file included from /linux/arch/p

[PATCH 4.4 124/149] net: ethernet: stmmac: Disable hardware multicast filter

2020-08-20 Thread Greg Kroah-Hartman
From: Jonathan McDowell commit df43dd526e6609769ae513a81443c7aa727c8ca3 upstream. The IPQ806x does not appear to have a functional multicast ethernet address filter. This was observed as a failure to correctly receive IPv6 packets on a LAN to the all stations address. Checking the vendor driver

[PATCH 4.4 115/149] 9p: Fix memory leak in v9fs_mount

2020-08-20 Thread Greg Kroah-Hartman
From: Zheng Bin commit cb0aae0e31c632c407a2cab4307be85a001d4d98 upstream. v9fs_mount v9fs_session_init v9fs_cache_session_get_cookie v9fs_random_cachetag -->alloc cachetag v9ses->fscache = fscache_acquire_cookie -->maybe NULL sb = sget

[PATCH 4.4 114/149] ALSA: usb-audio: work around streaming quirk for MacroSilicon MS2109

2020-08-20 Thread Greg Kroah-Hartman
From: Hector Martin commit 1b7ecc241a67ad6b584e071bd791a54e0cd5f097 upstream. Further investigation of the L-R swap problem on the MS2109 reveals that the problem isn't that the channels are swapped, but rather that they are swapped and also out of phase by one sample. In other words, the issue

[PATCH 4.4 072/149] usb: gadget: net2280: fix memory leak on probe error handling paths

2020-08-20 Thread Greg Kroah-Hartman
From: Evgeny Novikov [ Upstream commit 2468c877da428ebfd701142c4cdfefcfb7d4c00e ] Driver does not release memory for device on error handling paths in net2280_probe() when gadget_release() is not registered yet. The patch fixes the bug like in other similar drivers. Found by Linux Driver Verif

[PATCH 4.4 077/149] agp/intel: Fix a memory leak on module initialisation failure

2020-08-20 Thread Greg Kroah-Hartman
From: Qiushi Wu [ Upstream commit b975abbd382fe442713a4c233549abb90e57c22b ] In intel_gtt_setup_scratch_page(), pointer "page" is not released if pci_dma_mapping_error() return an error, leading to a memory leak on module initialisation failure. Simply fix this issue by freeing "page" before re

[PATCH 4.4 075/149] bcache: fix super block seq numbers comparision in register_cache_set()

2020-08-20 Thread Greg Kroah-Hartman
From: Coly Li [ Upstream commit 117f636ea695270fe492d0c0c9dfadc7a662af47 ] In register_cache_set(), c is pointer to struct cache_set, and ca is pointer to struct cache, if ca->sb.seq > c->sb.seq, it means this registering cache has up to date version and other members, the in- memory version and

[PATCH 4.4 112/149] fs/minix: dont allow getting deleted inodes

2020-08-20 Thread Greg Kroah-Hartman
From: Eric Biggers commit facb03dddec04e4aac1bb2139accdceb04deb1f3 upstream. If an inode has no links, we need to mark it bad rather than allowing it to be accessed. This avoids WARNINGs in inc_nlink() and drop_nlink() when doing directory operations on a fuzzed filesystem. Fixes: 1da177e4c3f4

[PATCH 4.4 119/149] xen/balloon: make the balloon wait interruptible

2020-08-20 Thread Greg Kroah-Hartman
From: Roger Pau Monne commit 88a479ff6ef8af7f07e11593d58befc644244ff7 upstream. So it can be killed, or else processes can get hung indefinitely waiting for balloon pages. Signed-off-by: Roger Pau Monné Reviewed-by: Juergen Gross Cc: sta...@vger.kernel.org Link: https://lore.kernel.org/r/2020

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