[PATCH AUTOSEL 5.10 27/31] ext4: check for invalid block size early when mounting a file system

2020-12-30 Thread Sasha Levin
From: Theodore Ts'o [ Upstream commit c9200760da8a728eb9767ca41a956764b28c1310 ] Check for valid block size directly by validating s_log_block_size; we were doing this in two places. First, by calculating blocksize via BLOCK_SIZE << s_log_block_size, and then checking that the blocksize was

[PATCH AUTOSEL 5.10 14/31] powerpc/64: irq replay remove decrementer overflow check

2020-12-30 Thread Sasha Levin
From: Nicholas Piggin [ Upstream commit 59d512e4374b2d8a6ad341475dc94c4a4bdec7d3 ] This is way to catch some cases of decrementer overflow, when the decrementer has underflowed an odd number of times, while MSR[EE] was disabled. With a typical small decrementer, a timer that fires when MSR[EE]

[PATCH AUTOSEL 5.4 08/17] reiserfs: add check for an invalid ih_entry_count

2020-12-30 Thread Sasha Levin
From: Rustam Kovhaev [ Upstream commit d24396c5290ba8ab04ba505176874c4e04a2d53c ] when directory item has an invalid value set for ih_entry_count it might trigger use-after-free or out-of-bounds read in bin_search_in_dir_item() ih_entry_count * IH_SIZE for directory item should not be larger

[PATCH AUTOSEL 5.4 11/17] module: delay kobject uevent until after module init call

2020-12-30 Thread Sasha Levin
From: Jessica Yu [ Upstream commit 38dc717e97153e46375ee21797aa54777e5498f3 ] Apparently there has been a longstanding race between udev/systemd and the module loader. Currently, the module loader sends a uevent right after sysfs initialization, but before the module calls its init function.

[PATCH AUTOSEL 5.4 15/17] tick/sched: Remove bogus boot "safety" check

2020-12-30 Thread Sasha Levin
From: Thomas Gleixner [ Upstream commit ba8ea8e7dd6e1662e34e730eadfc52aa6816f9dd ] can_stop_idle_tick() checks whether the do_timer() duty has been taken over by a CPU on boot. That's silly because the boot CPU always takes over with the initial clockevent device. But even if no CPU would have

[PATCH AUTOSEL 5.10 23/31] drm/amd/display: updated wm table for Renoir

2020-12-30 Thread Sasha Levin
From: Jake Wang [ Upstream commit 410066d24cfc1071be25e402510367aca9db5cb6 ] [Why] For certain timings, Renoir may underflow due to sr exit latency being too slow. [How] Updated wm table for renoir. Signed-off-by: Jake Wang Reviewed-by: Yongqiang Sun Acked-by: Qingqing Zhuo Signed-off-by:

[PATCH AUTOSEL 5.4 10/17] f2fs: avoid race condition for shrinker count

2020-12-30 Thread Sasha Levin
From: Jaegeuk Kim [ Upstream commit a95ba66ac1457b76fe472c8e092ab1006271f16c ] Light reported sometimes shinker gets nat_cnt < dirty_nat_cnt resulting in wrong do_shinker work. Let's avoid to return insane overflowed value by adding single tracking value. Reported-by: Light Hsieh Reviewed-by:

[PATCH AUTOSEL 5.4 09/17] NFSv4: Fix a pNFS layout related use-after-free race when freeing the inode

2020-12-30 Thread Sasha Levin
From: Trond Myklebust [ Upstream commit b6d49ecd1081740b6e632366428b960461f8158b ] When returning the layout in nfs4_evict_inode(), we need to ensure that the layout is actually done being freed before we can proceed to free the inode itself. Signed-off-by: Trond Myklebust Signed-off-by:

[PATCH AUTOSEL 5.10 28/31] ALSA: pcm: Clear the full allocated memory at hw_params

2020-12-30 Thread Sasha Levin
From: Takashi Iwai [ Upstream commit 618de0f4ef11acd8cf26902e65493d46cc20cc89 ] The PCM hw_params core function tries to clear up the PCM buffer before actually using for avoiding the information leak from the previous usages or the usage before a new allocation. It performs the memset() with

[PATCH AUTOSEL 5.4 02/17] rtc: sun6i: Fix memleak in sun6i_rtc_clk_init

2020-12-30 Thread Sasha Levin
From: Dinghao Liu [ Upstream commit 28d211919e422f58c1e6c900e5810eee4f1ce4c8 ] When clk_hw_register_fixed_rate_with_accuracy() fails, clk_data should be freed. It's the same for the subsequent two error paths, but we should also unregister the already registered clocks in them. Signed-off-by:

[PATCH AUTOSEL 5.10 29/31] dm verity: skip verity work if I/O error when system is shutting down

2020-12-30 Thread Sasha Levin
From: Hyeongseok Kim [ Upstream commit 252bd1256396cebc6fc3526127fdb0b317601318 ] If emergency system shutdown is called, like by thermal shutdown, a dm device could be alive when the block device couldn't process I/O requests anymore. In this state, the handling of I/O errors by new dm I/O

[PATCH AUTOSEL 5.10 08/31] reiserfs: add check for an invalid ih_entry_count

2020-12-30 Thread Sasha Levin
From: Rustam Kovhaev [ Upstream commit d24396c5290ba8ab04ba505176874c4e04a2d53c ] when directory item has an invalid value set for ih_entry_count it might trigger use-after-free or out-of-bounds read in bin_search_in_dir_item() ih_entry_count * IH_SIZE for directory item should not be larger

[PATCH AUTOSEL 5.10 10/31] f2fs: Handle casefolding with Encryption

2020-12-30 Thread Sasha Levin
From: Daniel Rosenberg [ Upstream commit 7ad08a58bf67594057362e45cbddd3e27e53e557 ] Expand f2fs's casefolding support to include encrypted directories. To index casefolded+encrypted directories, we use the SipHash of the casefolded name, keyed by a key derived from the directory's fscrypt

[PATCH AUTOSEL 5.4 12/17] f2fs: fix shift-out-of-bounds in sanity_check_raw_super()

2020-12-30 Thread Sasha Levin
From: Chao Yu [ Upstream commit e584bbe821229a3e7cc409eecd51df66f9268c21 ] syzbot reported a bug which could cause shift-out-of-bounds issue, fix it. Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:120 ubsan_epilogue+0xb/0x5a lib/ubsan.c:148

[PATCH AUTOSEL 4.19 03/10] module: set MODULE_STATE_GOING state when a module fails to load

2020-12-30 Thread Sasha Levin
From: Miroslav Benes [ Upstream commit 5e8ed280dab9eeabc1ba0b2db5dbe9fe6debb6b5 ] If a module fails to load due to an error in prepare_coming_module(), the following error handling in load_module() runs with MODULE_STATE_COMING in module's state. Fix it by correctly setting MODULE_STATE_GOING

[PATCH AUTOSEL 5.4 13/17] fs/namespace.c: WARN if mnt_count has become negative

2020-12-30 Thread Sasha Levin
From: Eric Biggers [ Upstream commit edf7ddbf1c5eb98b720b063b73e20e8a4a1ce673 ] Missing calls to mntget() (or equivalently, too many calls to mntput()) are hard to detect because mntput() delays freeing mounts using task_work_add(), then again using call_rcu(). As a result, mnt_count can often

[PATCH AUTOSEL 4.19 05/10] powerpc: sysdev: add missing iounmap() on error in mpic_msgr_probe()

2020-12-30 Thread Sasha Levin
From: Qinglang Miao [ Upstream commit ffa1797040c5da391859a9556be7b735acbe1242 ] I noticed that iounmap() of msgr_block_addr before return from mpic_msgr_probe() in the error handling case is missing. So use devm_ioremap() instead of just ioremap() when remapping the message register block, so

[PATCH AUTOSEL 5.10 24/31] tick/sched: Remove bogus boot "safety" check

2020-12-30 Thread Sasha Levin
From: Thomas Gleixner [ Upstream commit ba8ea8e7dd6e1662e34e730eadfc52aa6816f9dd ] can_stop_idle_tick() checks whether the do_timer() duty has been taken over by a CPU on boot. That's silly because the boot CPU always takes over with the initial clockevent device. But even if no CPU would have

[PATCH AUTOSEL 5.10 26/31] io_uring: remove racy overflow list fast checks

2020-12-30 Thread Sasha Levin
From: Pavel Begunkov [ Upstream commit 9cd2be519d05ee78876d55e8e902b7125f78b74f ] list_empty_careful() is not racy only if some conditions are met, i.e. no re-adds after del_init. io_cqring_overflow_flush() does list_move(), so it's actually racy. Remove those checks, we have

[PATCH AUTOSEL 5.10 31/31] device-dax: Fix range release

2020-12-30 Thread Sasha Levin
From: Dan Williams [ Upstream commit 6268d7da4d192af339f4d688942b9ccb45a65e04 ] There are multiple locations that open-code the release of the last range in a device-dax instance. Consolidate this into a new dev_dax_trim_range() helper. This also addresses a kmemleak report: # cat

[PATCH AUTOSEL 4.19 01/10] ARM: 9014/2: Replace string mem* functions for KASan

2020-12-30 Thread Sasha Levin
From: Linus Walleij [ Upstream commit d6d51a96c7d63b7450860a3037f2d62388286a52 ] Functions like memset()/memmove()/memcpy() do a lot of memory accesses. If a bad pointer is passed to one of these functions it is important to catch this. Compiler instrumentation cannot do this since these

[PATCH AUTOSEL 5.4 16/17] ALSA: pcm: Clear the full allocated memory at hw_params

2020-12-30 Thread Sasha Levin
From: Takashi Iwai [ Upstream commit 618de0f4ef11acd8cf26902e65493d46cc20cc89 ] The PCM hw_params core function tries to clear up the PCM buffer before actually using for avoiding the information leak from the previous usages or the usage before a new allocation. It performs the memset() with

[PATCH AUTOSEL 4.19 06/10] reiserfs: add check for an invalid ih_entry_count

2020-12-30 Thread Sasha Levin
From: Rustam Kovhaev [ Upstream commit d24396c5290ba8ab04ba505176874c4e04a2d53c ] when directory item has an invalid value set for ih_entry_count it might trigger use-after-free or out-of-bounds read in bin_search_in_dir_item() ih_entry_count * IH_SIZE for directory item should not be larger

[PATCH AUTOSEL 5.4 03/17] module: set MODULE_STATE_GOING state when a module fails to load

2020-12-30 Thread Sasha Levin
From: Miroslav Benes [ Upstream commit 5e8ed280dab9eeabc1ba0b2db5dbe9fe6debb6b5 ] If a module fails to load due to an error in prepare_coming_module(), the following error handling in load_module() runs with MODULE_STATE_COMING in module's state. Fix it by correctly setting MODULE_STATE_GOING

[PATCH AUTOSEL 4.14 4/8] powerpc: sysdev: add missing iounmap() on error in mpic_msgr_probe()

2020-12-30 Thread Sasha Levin
From: Qinglang Miao [ Upstream commit ffa1797040c5da391859a9556be7b735acbe1242 ] I noticed that iounmap() of msgr_block_addr before return from mpic_msgr_probe() in the error handling case is missing. So use devm_ioremap() instead of just ioremap() when remapping the message register block, so

[PATCH AUTOSEL 5.4 01/17] ARM: 9014/2: Replace string mem* functions for KASan

2020-12-30 Thread Sasha Levin
From: Linus Walleij [ Upstream commit d6d51a96c7d63b7450860a3037f2d62388286a52 ] Functions like memset()/memmove()/memcpy() do a lot of memory accesses. If a bad pointer is passed to one of these functions it is important to catch this. Compiler instrumentation cannot do this since these

[PATCH AUTOSEL 4.19 02/10] rtc: sun6i: Fix memleak in sun6i_rtc_clk_init

2020-12-30 Thread Sasha Levin
From: Dinghao Liu [ Upstream commit 28d211919e422f58c1e6c900e5810eee4f1ce4c8 ] When clk_hw_register_fixed_rate_with_accuracy() fails, clk_data should be freed. It's the same for the subsequent two error paths, but we should also unregister the already registered clocks in them. Signed-off-by:

[PATCH AUTOSEL 5.4 17/17] dm verity: skip verity work if I/O error when system is shutting down

2020-12-30 Thread Sasha Levin
From: Hyeongseok Kim [ Upstream commit 252bd1256396cebc6fc3526127fdb0b317601318 ] If emergency system shutdown is called, like by thermal shutdown, a dm device could be alive when the block device couldn't process I/O requests anymore. In this state, the handling of I/O errors by new dm I/O

[PATCH AUTOSEL 4.14 2/8] module: set MODULE_STATE_GOING state when a module fails to load

2020-12-30 Thread Sasha Levin
From: Miroslav Benes [ Upstream commit 5e8ed280dab9eeabc1ba0b2db5dbe9fe6debb6b5 ] If a module fails to load due to an error in prepare_coming_module(), the following error handling in load_module() runs with MODULE_STATE_COMING in module's state. Fix it by correctly setting MODULE_STATE_GOING

[PATCH AUTOSEL 4.14 3/8] quota: Don't overflow quota file offsets

2020-12-30 Thread Sasha Levin
From: Jan Kara [ Upstream commit 10f04d40a9fa29785206c619f80d8beedb778837 ] The on-disk quota format supports quota files with upto 2^32 blocks. Be careful when computing quota file offsets in the quota files from block numbers as they can overflow 32-bit types. Since quota files larger than

[PATCH AUTOSEL 4.19 07/10] NFSv4: Fix a pNFS layout related use-after-free race when freeing the inode

2020-12-30 Thread Sasha Levin
From: Trond Myklebust [ Upstream commit b6d49ecd1081740b6e632366428b960461f8158b ] When returning the layout in nfs4_evict_inode(), we need to ensure that the layout is actually done being freed before we can proceed to free the inode itself. Signed-off-by: Trond Myklebust Signed-off-by:

[PATCH AUTOSEL 4.9 2/5] quota: Don't overflow quota file offsets

2020-12-30 Thread Sasha Levin
From: Jan Kara [ Upstream commit 10f04d40a9fa29785206c619f80d8beedb778837 ] The on-disk quota format supports quota files with upto 2^32 blocks. Be careful when computing quota file offsets in the quota files from block numbers as they can overflow 32-bit types. Since quota files larger than

[PATCH AUTOSEL 4.19 09/10] ALSA: pcm: Clear the full allocated memory at hw_params

2020-12-30 Thread Sasha Levin
From: Takashi Iwai [ Upstream commit 618de0f4ef11acd8cf26902e65493d46cc20cc89 ] The PCM hw_params core function tries to clear up the PCM buffer before actually using for avoiding the information leak from the previous usages or the usage before a new allocation. It performs the memset() with

[PATCH AUTOSEL 4.4 2/5] quota: Don't overflow quota file offsets

2020-12-30 Thread Sasha Levin
From: Jan Kara [ Upstream commit 10f04d40a9fa29785206c619f80d8beedb778837 ] The on-disk quota format supports quota files with upto 2^32 blocks. Be careful when computing quota file offsets in the quota files from block numbers as they can overflow 32-bit types. Since quota files larger than

[PATCH AUTOSEL 4.14 1/8] rtc: sun6i: Fix memleak in sun6i_rtc_clk_init

2020-12-30 Thread Sasha Levin
From: Dinghao Liu [ Upstream commit 28d211919e422f58c1e6c900e5810eee4f1ce4c8 ] When clk_hw_register_fixed_rate_with_accuracy() fails, clk_data should be freed. It's the same for the subsequent two error paths, but we should also unregister the already registered clocks in them. Signed-off-by:

[PATCH AUTOSEL 4.19 10/10] dm verity: skip verity work if I/O error when system is shutting down

2020-12-30 Thread Sasha Levin
From: Hyeongseok Kim [ Upstream commit 252bd1256396cebc6fc3526127fdb0b317601318 ] If emergency system shutdown is called, like by thermal shutdown, a dm device could be alive when the block device couldn't process I/O requests anymore. In this state, the handling of I/O errors by new dm I/O

[PATCH AUTOSEL 4.14 5/8] reiserfs: add check for an invalid ih_entry_count

2020-12-30 Thread Sasha Levin
From: Rustam Kovhaev [ Upstream commit d24396c5290ba8ab04ba505176874c4e04a2d53c ] when directory item has an invalid value set for ih_entry_count it might trigger use-after-free or out-of-bounds read in bin_search_in_dir_item() ih_entry_count * IH_SIZE for directory item should not be larger

[PATCH AUTOSEL 4.19 08/10] module: delay kobject uevent until after module init call

2020-12-30 Thread Sasha Levin
From: Jessica Yu [ Upstream commit 38dc717e97153e46375ee21797aa54777e5498f3 ] Apparently there has been a longstanding race between udev/systemd and the module loader. Currently, the module loader sends a uevent right after sysfs initialization, but before the module calls its init function.

[PATCH AUTOSEL 4.14 8/8] dm verity: skip verity work if I/O error when system is shutting down

2020-12-30 Thread Sasha Levin
From: Hyeongseok Kim [ Upstream commit 252bd1256396cebc6fc3526127fdb0b317601318 ] If emergency system shutdown is called, like by thermal shutdown, a dm device could be alive when the block device couldn't process I/O requests anymore. In this state, the handling of I/O errors by new dm I/O

[PATCH AUTOSEL 4.4 1/5] module: set MODULE_STATE_GOING state when a module fails to load

2020-12-30 Thread Sasha Levin
From: Miroslav Benes [ Upstream commit 5e8ed280dab9eeabc1ba0b2db5dbe9fe6debb6b5 ] If a module fails to load due to an error in prepare_coming_module(), the following error handling in load_module() runs with MODULE_STATE_COMING in module's state. Fix it by correctly setting MODULE_STATE_GOING

[PATCH AUTOSEL 4.9 3/5] powerpc: sysdev: add missing iounmap() on error in mpic_msgr_probe()

2020-12-30 Thread Sasha Levin
From: Qinglang Miao [ Upstream commit ffa1797040c5da391859a9556be7b735acbe1242 ] I noticed that iounmap() of msgr_block_addr before return from mpic_msgr_probe() in the error handling case is missing. So use devm_ioremap() instead of just ioremap() when remapping the message register block, so

[PATCH AUTOSEL 4.9 4/5] reiserfs: add check for an invalid ih_entry_count

2020-12-30 Thread Sasha Levin
From: Rustam Kovhaev [ Upstream commit d24396c5290ba8ab04ba505176874c4e04a2d53c ] when directory item has an invalid value set for ih_entry_count it might trigger use-after-free or out-of-bounds read in bin_search_in_dir_item() ih_entry_count * IH_SIZE for directory item should not be larger

[PATCH AUTOSEL 4.19 04/10] quota: Don't overflow quota file offsets

2020-12-30 Thread Sasha Levin
From: Jan Kara [ Upstream commit 10f04d40a9fa29785206c619f80d8beedb778837 ] The on-disk quota format supports quota files with upto 2^32 blocks. Be careful when computing quota file offsets in the quota files from block numbers as they can overflow 32-bit types. Since quota files larger than

[PATCH AUTOSEL 5.10 30/31] ext4: avoid s_mb_prefetch to be zero in individual scenarios

2020-12-30 Thread Sasha Levin
From: Chunguang Xu [ Upstream commit 82ef1370b0c1757ab4ce29f34c52b4e93839b0aa ] Commit cfd732377221 ("ext4: add prefetching for block allocation bitmaps") introduced block bitmap prefetch, and expects to read block bitmaps of flex_bg through an IO. However, it seems to ignore the value range

[PATCH AUTOSEL 4.4 4/5] reiserfs: add check for an invalid ih_entry_count

2020-12-30 Thread Sasha Levin
From: Rustam Kovhaev [ Upstream commit d24396c5290ba8ab04ba505176874c4e04a2d53c ] when directory item has an invalid value set for ih_entry_count it might trigger use-after-free or out-of-bounds read in bin_search_in_dir_item() ih_entry_count * IH_SIZE for directory item should not be larger

[PATCH AUTOSEL 4.14 7/8] ALSA: pcm: Clear the full allocated memory at hw_params

2020-12-30 Thread Sasha Levin
From: Takashi Iwai [ Upstream commit 618de0f4ef11acd8cf26902e65493d46cc20cc89 ] The PCM hw_params core function tries to clear up the PCM buffer before actually using for avoiding the information leak from the previous usages or the usage before a new allocation. It performs the memset() with

[PATCH AUTOSEL 4.9 5/5] module: delay kobject uevent until after module init call

2020-12-30 Thread Sasha Levin
From: Jessica Yu [ Upstream commit 38dc717e97153e46375ee21797aa54777e5498f3 ] Apparently there has been a longstanding race between udev/systemd and the module loader. Currently, the module loader sends a uevent right after sysfs initialization, but before the module calls its init function.

[PATCH AUTOSEL 4.9 1/5] module: set MODULE_STATE_GOING state when a module fails to load

2020-12-30 Thread Sasha Levin
From: Miroslav Benes [ Upstream commit 5e8ed280dab9eeabc1ba0b2db5dbe9fe6debb6b5 ] If a module fails to load due to an error in prepare_coming_module(), the following error handling in load_module() runs with MODULE_STATE_COMING in module's state. Fix it by correctly setting MODULE_STATE_GOING

[PATCH AUTOSEL 4.14 6/8] module: delay kobject uevent until after module init call

2020-12-30 Thread Sasha Levin
From: Jessica Yu [ Upstream commit 38dc717e97153e46375ee21797aa54777e5498f3 ] Apparently there has been a longstanding race between udev/systemd and the module loader. Currently, the module loader sends a uevent right after sysfs initialization, but before the module calls its init function.

[PATCH AUTOSEL 4.4 5/5] module: delay kobject uevent until after module init call

2020-12-30 Thread Sasha Levin
From: Jessica Yu [ Upstream commit 38dc717e97153e46375ee21797aa54777e5498f3 ] Apparently there has been a longstanding race between udev/systemd and the module loader. Currently, the module loader sends a uevent right after sysfs initialization, but before the module calls its init function.

[PATCH AUTOSEL 4.4 3/5] powerpc: sysdev: add missing iounmap() on error in mpic_msgr_probe()

2020-12-30 Thread Sasha Levin
From: Qinglang Miao [ Upstream commit ffa1797040c5da391859a9556be7b735acbe1242 ] I noticed that iounmap() of msgr_block_addr before return from mpic_msgr_probe() in the error handling case is missing. So use devm_ioremap() instead of just ioremap() when remapping the message register block, so

[PATCH AUTOSEL 5.4 14/17] um: ubd: Submit all data segments atomically

2020-12-30 Thread Sasha Levin
From: Gabriel Krisman Bertazi [ Upstream commit fc6b6a872dcd48c6f39c7975836d75113db67d37 ] Internally, UBD treats each physical IO segment as a separate command to be submitted in the execution pipe. If the pipe returns a transient error after a few segments have already been written, UBD will

[PATCH AUTOSEL 5.4 04/17] quota: Don't overflow quota file offsets

2020-12-30 Thread Sasha Levin
From: Jan Kara [ Upstream commit 10f04d40a9fa29785206c619f80d8beedb778837 ] The on-disk quota format supports quota files with upto 2^32 blocks. Be careful when computing quota file offsets in the quota files from block numbers as they can overflow 32-bit types. Since quota files larger than

[PATCH AUTOSEL 5.10 22/31] ceph: fix inode refcount leak when ceph_fill_inode on non-I_NEW inode fails

2020-12-30 Thread Sasha Levin
From: Jeff Layton [ Upstream commit 68cbb8056a4c24c6a38ad2b79e0a9764b235e8fa ] Signed-off-by: Jeff Layton Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov Signed-off-by: Sasha Levin --- fs/ceph/inode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/ceph/inode.c

[PATCH AUTOSEL 5.10 15/31] f2fs: fix shift-out-of-bounds in sanity_check_raw_super()

2020-12-30 Thread Sasha Levin
From: Chao Yu [ Upstream commit e584bbe821229a3e7cc409eecd51df66f9268c21 ] syzbot reported a bug which could cause shift-out-of-bounds issue, fix it. Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:120 ubsan_epilogue+0xb/0x5a lib/ubsan.c:148

[PATCH AUTOSEL 5.10 13/31] module: delay kobject uevent until after module init call

2020-12-30 Thread Sasha Levin
From: Jessica Yu [ Upstream commit 38dc717e97153e46375ee21797aa54777e5498f3 ] Apparently there has been a longstanding race between udev/systemd and the module loader. Currently, the module loader sends a uevent right after sysfs initialization, but before the module calls its init function.

[PATCH AUTOSEL 5.10 18/31] um: random: Register random as hwrng-core device

2020-12-30 Thread Sasha Levin
From: Christopher Obbard [ Upstream commit 72d3e093afae79611fa38f8f2cfab9a888fe66f2 ] The UML random driver creates a dummy device under the guest, /dev/hw_random. When this file is read from the guest, the driver reads from the host machine's /dev/random, in-turn reading from the host kernel's

[PATCH AUTOSEL 5.10 12/31] f2fs: fix race of pending_pages in decompression

2020-12-30 Thread Sasha Levin
From: Daeho Jeong [ Upstream commit 6422a71ef40e4751d59b8c9412e7e2dafe085878 ] I found out f2fs_free_dic() is invoked in a wrong timing, but f2fs_verify_bio() still needed the dic info and it triggered the below kernel panic. It has been caused by the race condition of pending_pages value

[PATCH AUTOSEL 5.10 07/31] i3c master: fix missing destroy_workqueue() on error in i3c_master_register

2020-12-30 Thread Sasha Levin
From: Qinglang Miao [ Upstream commit 59165d16c699182b86b5c65181013f1fd88feb62 ] Add the missing destroy_workqueue() before return from i3c_master_register in the error handling case. Signed-off-by: Qinglang Miao Signed-off-by: Boris Brezillon Link:

[PATCH AUTOSEL 5.10 17/31] watchdog: rti-wdt: fix reference leak in rti_wdt_probe

2020-12-30 Thread Sasha Levin
From: Zhang Qilong [ Upstream commit 8711071e9700b67045fe5518161d63f7a03e3c9e ] pm_runtime_get_sync() will increment pm usage counter even it failed. Forgetting to call pm_runtime_put_noidle will result in reference leak in rti_wdt_probe, so we should fix it. Signed-off-by: Zhang Qilong

[PATCH AUTOSEL 5.10 05/31] rtc: pl031: fix resource leak in pl031_probe

2020-12-30 Thread Sasha Levin
From: Zheng Liang [ Upstream commit 1eab0fea2514b269e384c117f5b5772b882761f0 ] When devm_rtc_allocate_device is failed in pl031_probe, it should release mem regions with device. Reported-by: Hulk Robot Signed-off-by: Zheng Liang Signed-off-by: Alexandre Belloni Acked-by: Linus Walleij

[PATCH AUTOSEL 5.10 16/31] fs/namespace.c: WARN if mnt_count has become negative

2020-12-30 Thread Sasha Levin
From: Eric Biggers [ Upstream commit edf7ddbf1c5eb98b720b063b73e20e8a4a1ce673 ] Missing calls to mntget() (or equivalently, too many calls to mntput()) are hard to detect because mntput() delays freeing mounts using task_work_add(), then again using call_rcu(). As a result, mnt_count can often

[PATCH AUTOSEL 5.10 03/31] module: set MODULE_STATE_GOING state when a module fails to load

2020-12-30 Thread Sasha Levin
From: Miroslav Benes [ Upstream commit 5e8ed280dab9eeabc1ba0b2db5dbe9fe6debb6b5 ] If a module fails to load due to an error in prepare_coming_module(), the following error handling in load_module() runs with MODULE_STATE_COMING in module's state. Fix it by correctly setting MODULE_STATE_GOING

[PATCH AUTOSEL 5.10 01/31] ARM: 9014/2: Replace string mem* functions for KASan

2020-12-30 Thread Sasha Levin
From: Linus Walleij [ Upstream commit d6d51a96c7d63b7450860a3037f2d62388286a52 ] Functions like memset()/memmove()/memcpy() do a lot of memory accesses. If a bad pointer is passed to one of these functions it is important to catch this. Compiler instrumentation cannot do this since these

[PATCH AUTOSEL 5.10 02/31] rtc: sun6i: Fix memleak in sun6i_rtc_clk_init

2020-12-30 Thread Sasha Levin
From: Dinghao Liu [ Upstream commit 28d211919e422f58c1e6c900e5810eee4f1ce4c8 ] When clk_hw_register_fixed_rate_with_accuracy() fails, clk_data should be freed. It's the same for the subsequent two error paths, but we should also unregister the already registered clocks in them. Signed-off-by:

[PATCH AUTOSEL 5.10 04/31] quota: Don't overflow quota file offsets

2020-12-30 Thread Sasha Levin
From: Jan Kara [ Upstream commit 10f04d40a9fa29785206c619f80d8beedb778837 ] The on-disk quota format supports quota files with upto 2^32 blocks. Be careful when computing quota file offsets in the quota files from block numbers as they can overflow 32-bit types. Since quota files larger than

[PATCH AUTOSEL 5.10 06/31] powerpc: sysdev: add missing iounmap() on error in mpic_msgr_probe()

2020-12-30 Thread Sasha Levin
From: Qinglang Miao [ Upstream commit ffa1797040c5da391859a9556be7b735acbe1242 ] I noticed that iounmap() of msgr_block_addr before return from mpic_msgr_probe() in the error handling case is missing. So use devm_ioremap() instead of just ioremap() when remapping the message register block, so

Re: [PATCH] crypto: Fix divide error in do_xor_speed()

2020-12-30 Thread Ard Biesheuvel
(+ Arnd, Douglas) On Wed, 30 Dec 2020 at 13:19, Kirill Tkhai wrote: > > Latest (but not only latest) linux-next panics with divide > error on my QEMU setup. > > The patch at the bottom of this message fixes the problem. > > xor: measuring software checksum speed > divide error: [#1] PREEMPT

Re: [PATCH] selftests: xfrm: fix test return value override issue in xfrm_policy.sh

2020-12-30 Thread Florian Westphal
Po-Hsu Lin wrote: > When running this xfrm_policy.sh test script, even with some cases > marked as FAIL, the overall test result will still be PASS: > > $ sudo ./xfrm_policy.sh > PASS: policy before exception matches > FAIL: expected ping to .254 to fail (exceptions) > PASS: direct policy

[PATCH] media: ipu3-cio2: Fix mbus_code processing in cio2_subdev_set_fmt()

2020-12-30 Thread Pavel Machek
Loop was useless as it would always exit on the first iteration. Fix it with right condition. Signed-off-by: Pavel Machek (CIP) Fixes: a86cf9b29e8b ("media: ipu3-cio2: Validate mbus format in setting subdev format") index 36e354ecf71e..e8ea69d30bfd 100644 ---

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

2020-12-30 Thread Kai-Heng Feng
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 --- sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/pci/hda/patch_realtek.c

Re: [PATCH 5.10 527/717] media: ipu3-cio2: Validate mbus format in setting subdev format

2020-12-30 Thread Pavel Machek
On Wed 2020-12-30 14:44:41, Laurent Pinchart wrote: > On Wed, Dec 30, 2020 at 02:32:46PM +0200, Andy Shevchenko wrote: > > On Wed, Dec 30, 2020 at 2:25 PM Pavel Machek wrote: > > > > > > commit a86cf9b29e8b12811cf53c4970eefe0c1d290476 upstream. > > > > > > > > Validate media bus code, width and

Re: [PATCH 1/3] thermal: ti-soc-thermal: Fix stuck sensor with continuous mode for 4430

2020-12-30 Thread Adam Ford
On Wed, Dec 30, 2020 at 2:43 AM Tony Lindgren wrote: > > At least for 4430, trying to use the single conversion mode eventually > hangs the thermal sensor. This can be quite easily seen with errors: > > thermal thermal_zone0: failed to read out thermal zone (-5) > > Also, trying to read the

Re: [PATCH v3] regmap: debugfs: Fix a memory leak when calling regmap_attach_dev

2020-12-30 Thread Greg Kroah-Hartman
On Wed, Dec 30, 2020 at 01:01:42PM +0100, Markus Elfring wrote: > > Thank you very much, very good suggestion, > > Thanks for another positive feedback. > > > > do I need to re-send a patch to fix this problem, or modify the previous > > patch and send it again? > > Please convince the

Re: [PATCH v2] tty: resolve loopback wait problem for aging serial port

2020-12-30 Thread Greg KH
On Wed, Dec 30, 2020 at 08:39:06PM +0800, zhangqiumi...@huawei.com wrote: > From: Qiumiao Zhang > > Because serial port is low-speed device, serial port writing will be suspended > when the buffer of driver layer is full due to serial port aging. The concrete > representation is n_tty_write

[PATCH v4 2/2] lib: stackdepot: Add support to disable stack depot

2020-12-30 Thread vjitta
From: Vijayanand Jitta Add a kernel parameter stack_depot_disable to disable stack depot. So that stack hash table doesn't consume any memory when stack depot is disabled. Signed-off-by: Vinayak Menon Signed-off-by: Vijayanand Jitta --- lib/stackdepot.c | 31 +--

[PATCH v4 1/2] lib: stackdepot: Add support to configure STACK_HASH_SIZE

2020-12-30 Thread vjitta
From: Yogesh Lal Use STACK_HASH_ORDER_SHIFT to configure STACK_HASH_SIZE. Aim is to have configurable value for STACK_HASH_SIZE, so depend on use case one can configure it. One example is of Page Owner, default value of STACK_HASH_SIZE lead stack depot to consume 8MB of static memory. Making

Re: [PATCH 5.10 527/717] media: ipu3-cio2: Validate mbus format in setting subdev format

2020-12-30 Thread Laurent Pinchart
On Wed, Dec 30, 2020 at 02:32:46PM +0200, Andy Shevchenko wrote: > On Wed, Dec 30, 2020 at 2:25 PM Pavel Machek wrote: > > > > commit a86cf9b29e8b12811cf53c4970eefe0c1d290476 upstream. > > > > > > Validate media bus code, width and height when setting the subdev format. > > > > > > This

[PATCH] HID: multitouch: Enable multi-input for Synaptics pointstick/touchpad device

2020-12-30 Thread Kai-Heng Feng
Pointstick and its left/right buttons on HP EliteBook 850 G7 need multi-input quirk to work correctly. Signed-off-by: Kai-Heng Feng --- drivers/hid/hid-multitouch.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index

Re: [PATCH] mm/page_alloc: remove the static for local variable node_order

2020-12-30 Thread Matthew Wilcox
On Wed, Dec 30, 2020 at 07:40:14PM +0800, Hui Su wrote: > local variable node_order do not need the static here. It bloody well does. It can be up to 2^10 entries on x86 (and larger on others) That's 4kB which you've now moved onto the stack. Please, learn more about what you're doing. I

Re: wg-crypt-wg0 process

2020-12-30 Thread Jason A. Donenfeld
Hi Fatih, Thanks for the report and the detailed test case. From what I can see, this behavior presents itself both with the explicit ip link del and without. When running with debugging enabled, I can see this in dmesg: [558758.361056] wireguard: wg0: Keypair 244 destroyed for peer 21

Re: [PATCH v3] checkpatch: ignore warning designated initializers using NR_CPUS

2020-12-30 Thread Joe Perches
On Wed, 2020-12-30 at 20:29 +0800, Peng Wang wrote: > Some max_length wants to hold as large room as possible to > ensure enough size to tackle with the biggest NR_CPUS. > An example below: > > kernel/cgroup/cpuset.c: > static struct cftype legacy_files[] = { > { > .name =

RE: [PATCH v3] regmap: debugfs: Fix a memory leak when calling regmap_attach_dev

2020-12-30 Thread Wang, Xiaolei
Hi Markus > Thank you very much, very good suggestion, > Thanks for another positive feedback. > do I need to re-send a patch to fix this problem, or modify the previous > patch and send it again? > Please convince the involved contributors to integrate a corrected patch > version. Do you

Re: [RFC PATCH v2 0/1] Adding support for IIO SCMI based sensors

2020-12-30 Thread Jonathan Cameron
On Thu, 24 Dec 2020 03:19:20 + Jyoti Bhayana wrote: > Hi, > > This series adds support for ARM SCMI Protocol based IIO Device. > This driver provides support for Accelerometer and Gyroscope sensor > using new SCMI Sensor Protocol defined by the upcoming SCMIv3.0 ARM > specification, which

Re: [PATCH 5.10 527/717] media: ipu3-cio2: Validate mbus format in setting subdev format

2020-12-30 Thread Andy Shevchenko
On Wed, Dec 30, 2020 at 2:25 PM Pavel Machek wrote: > > commit a86cf9b29e8b12811cf53c4970eefe0c1d290476 upstream. > > > > Validate media bus code, width and height when setting the subdev format. > > > > This effectively reworks how setting subdev format is implemented in the > > driver. > >

[PATCH v3] checkpatch: ignore warning designated initializers using NR_CPUS

2020-12-30 Thread Peng Wang
Some max_length wants to hold as large room as possible to ensure enough size to tackle with the biggest NR_CPUS. An example below: kernel/cgroup/cpuset.c: static struct cftype legacy_files[] = { { .name = "cpus", .seq_show = cpuset_common_seq_show,

[PATCH] futex: Remove unneeded gotos

2020-12-30 Thread 6812skiii
From: Jangwoong Kim <6812sk...@gmail.com> Get rid of gotos that do not contain any cleanup. According to coding style documentation: "If there is no cleanup needed then just return directly" Signed-off-by: Jangwoong Kim <6812sk...@gmail.com> --- kernel/futex.c | 7 +++ 1 file changed, 3

Re: [PATCH 5.10 527/717] media: ipu3-cio2: Validate mbus format in setting subdev format

2020-12-30 Thread Pavel Machek
Hi! > commit a86cf9b29e8b12811cf53c4970eefe0c1d290476 upstream. > > Validate media bus code, width and height when setting the subdev format. > > This effectively reworks how setting subdev format is implemented in the > driver. Something is wrong here: > + fmt->format.code =

[PATCH] x86/microcode: Make microcode_init() static

2020-12-30 Thread Borislav Petkov
From: Borislav Petkov No functional changes. Signed-off-by: Borislav Petkov --- arch/x86/include/asm/microcode.h | 2 -- arch/x86/kernel/cpu/microcode/core.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/x86/include/asm/microcode.h

[PATCH] crypto: Fix divide error in do_xor_speed()

2020-12-30 Thread Kirill Tkhai
Latest (but not only latest) linux-next panics with divide error on my QEMU setup. The patch at the bottom of this message fixes the problem. xor: measuring software checksum speed divide error: [#1] PREEMPT SMP KASAN PREEMPT SMP KASAN CPU: 3 PID: 1 Comm: swapper/0 Not tainted

Re: [PATCH v2] checkpatch: ignore warning designated initializers using NR_CPUS

2020-12-30 Thread Joe Perches
On Wed, 2020-12-30 at 15:14 +0800, Peng Wang wrote: > Some max_length wants to hold as large room as possible to > ensure enough size to tackle with the biggest NR_CPUS. > An example below: > > kernel/cgroup/cpuset.c: > static struct cftype legacy_files[] = { > { > .name =

[PATCH v7 0/2] PCI: cadence: Retrain Link to work around Gen2

2020-12-30 Thread Nadeem Athani
Cadence controller will not initiate autonomous speed change if strapped as Gen2. The Retrain Link bit is set as quirk to enable this speed change. Adding a quirk flag for defective IP. In future IP revisions this will not be applicable. Version history: Changes in v7: - Changing the commit title

[PATCH v7 2/2] PCI: cadence: Retrain Link to work around Gen2 training defect.

2020-12-30 Thread Nadeem Athani
Cadence controller will not initiate autonomous speed change if strapped as Gen2. The Retrain Link bit is set as quirk to enable this speed change. Signed-off-by: Nadeem Athani --- drivers/pci/controller/cadence/pci-j721e.c | 3 ++ drivers/pci/controller/cadence/pcie-cadence-host.c |

[PATCH v7 1/2] PCI: cadence: Shifting of a function to support new code.

2020-12-30 Thread Nadeem Athani
Move the function cdns_pcie_host_wait_for_link() further up in the file, as it's going to be used by upcoming additional code in the driver. Signed-off-by: Nadeem Athani --- drivers/pci/controller/cadence/pcie-cadence-host.c | 33 +++--- 1 file changed, 16 insertions(+), 17

Re: [PATCH v4 0/3] add custom hinge sensor support

2020-12-30 Thread Jonathan Cameron
On Tue, 15 Dec 2020 13:44:41 +0800 Ye Xiang wrote: > Here we register one iio device with three channels which present angle for > hinge, keyboard and screen. > > This driver works on devices with Intel integrated sensor hub, where > hinge sensor is presented using a custom sensor usage id. >

Re: [PATCH v4 2/3] iio: hid-sensors: Add hinge sensor driver

2020-12-30 Thread Jonathan Cameron
On Tue, 15 Dec 2020 13:44:43 +0800 Ye Xiang wrote: > The Hinge sensor is a common custom sensor on laptops. It calculates > the angle between the lid (screen) and the base (keyboard). In addition, > it also exposes screen and the keyboard angles with respect to the > ground. Applications can

Re: [PATCH 01/14] mfd: arizona: Add jack pointer to struct arizona

2020-12-30 Thread Hans de Goede
Hi, On 12/30/20 12:23 PM, Richard Fitzgerald wrote: > On 30/12/2020 11:04, Hans de Goede wrote: >> Hi, >> >> On 12/29/20 5:51 PM, Richard Fitzgerald wrote: >>> >>> >>> On 29/12/2020 15:40, Hans de Goede wrote: Hi, On 12/29/20 4:15 PM, Mark Brown wrote: > On Tue, Dec 29, 2020 at

[PATCH] ipc/sem.c: Convert kfree_rcu() to call_rcu() in freeary function

2020-12-30 Thread qiang . zhang
From: Zqiang Due to freeary function is called with spinlock be held, the synchronize_rcu function may be called in kfree_rcu function, the schedule may be happen in spinlock critical region, need to replace kfree_rcu() with call_rcu(). Fixes: 693a8b6eecce ("ipc,rcu: Convert call_rcu(free_un)

[PATCH] mm/page_alloc: remove the static for local variable node_order

2020-12-30 Thread Hui Su
local variable node_order do not need the static here. Signed-off-by: Hui Su --- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index bdbec4c98173..45e049ccf117 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -5864,7

[PATCH V5 1/2] mfd: qcom-spmi-pmic: Convert bindings to .yaml format

2020-12-30 Thread Kiran Gunda
Convert the bindings from .txt to .yaml format. Signed-off-by: Kiran Gunda --- .../devicetree/bindings/mfd/qcom,spmi-pmic.txt | 80 -- .../devicetree/bindings/mfd/qcom,spmi-pmic.yaml| 117 + 2 files changed, 117 insertions(+), 80 deletions(-) delete

<    1   2   3   4   5   >