This is the start of the stable review cycle for the 4.19.166 release.
There are 8 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, 09 Jan 2021 14:30:35 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.166-r…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.19.166-rc1
Zhang Xiaohui <ruc_zhangxiaohui(a)163.com>
mwifiex: Fix possible buffer overflows in mwifiex_cmd_802_11_ad_hoc_start
Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
iio:magnetometer:mag3110: Fix alignment and data leak issues.
Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
iio:imu:bmi160: Fix alignment and data leak issues
Josh Poimboeuf <jpoimboe(a)redhat.com>
kdev_t: always inline major/minor helper functions
Yu Kuai <yukuai3(a)huawei.com>
dmaengine: at_hdmac: add missing kfree() call in at_dma_xlate()
Yu Kuai <yukuai3(a)huawei.com>
dmaengine: at_hdmac: add missing put_device() call in at_dma_xlate()
Tudor Ambarus <tudor.ambarus(a)microchip.com>
dmaengine: at_hdmac: Substitute kzalloc with kmalloc
Felix Fietkau <nbd(a)nbd.name>
Revert "mtd: spinand: Fix OOB read"
-------------
Diffstat:
Makefile | 4 ++--
drivers/dma/at_hdmac.c | 11 ++++++++---
drivers/iio/imu/bmi160/bmi160_core.c | 13 +++++++++----
drivers/iio/magnetometer/mag3110.c | 13 +++++++++----
drivers/mtd/nand/spi/core.c | 4 ----
drivers/net/wireless/marvell/mwifiex/join.c | 2 ++
include/linux/kdev_t.h | 22 +++++++++++-----------
7 files changed, 41 insertions(+), 28 deletions(-)
The patch titled
Subject: mm: fix numa stats for thp migration
has been added to the -mm tree. Its filename is
mm-fix-numa-stats-for-thp-migration.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/mm-fix-numa-stats-for-thp-migrati…
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/mm-fix-numa-stats-for-thp-migrati…
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Shakeel Butt <shakeelb(a)google.com>
Subject: mm: fix numa stats for thp migration
Currently the kernel is not correctly updating the numa stats for
NR_FILE_PAGES and NR_SHMEM on THP migration. Fix that. For NR_FILE_DIRTY
and NR_ZONE_WRITE_PENDING, although at the moment there is no need to
handle THP migration as kernel still does not have write support for file
THP but to be more future proof, this patch adds the THP support for those
stats as well.
Link: https://lkml.kernel.org/r/20210108155813.2914586-2-shakeelb@google.com
Fixes: e71769ae52609 ("mm: enable thp migration for shmem thp")
Signed-off-by: Shakeel Butt <shakeelb(a)google.com>
Acked-by: Yang Shi <shy828301(a)gmail.com>
Reviewed-by: Roman Gushchin <guro(a)fb.com>
Cc: Johannes Weiner <hannes(a)cmpxchg.org>
Cc: Michal Hocko <mhocko(a)kernel.org>
Cc: Muchun Song <songmuchun(a)bytedance.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/migrate.c | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
--- a/mm/migrate.c~mm-fix-numa-stats-for-thp-migration
+++ a/mm/migrate.c
@@ -402,6 +402,7 @@ int migrate_page_move_mapping(struct add
struct zone *oldzone, *newzone;
int dirty;
int expected_count = expected_page_refs(mapping, page) + extra_count;
+ int nr = thp_nr_pages(page);
if (!mapping) {
/* Anonymous page without mapping */
@@ -437,7 +438,7 @@ int migrate_page_move_mapping(struct add
*/
newpage->index = page->index;
newpage->mapping = page->mapping;
- page_ref_add(newpage, thp_nr_pages(page)); /* add cache reference */
+ page_ref_add(newpage, nr); /* add cache reference */
if (PageSwapBacked(page)) {
__SetPageSwapBacked(newpage);
if (PageSwapCache(page)) {
@@ -459,7 +460,7 @@ int migrate_page_move_mapping(struct add
if (PageTransHuge(page)) {
int i;
- for (i = 1; i < HPAGE_PMD_NR; i++) {
+ for (i = 1; i < nr; i++) {
xas_next(&xas);
xas_store(&xas, newpage);
}
@@ -470,7 +471,7 @@ int migrate_page_move_mapping(struct add
* to one less reference.
* We know this isn't the last reference.
*/
- page_ref_unfreeze(page, expected_count - thp_nr_pages(page));
+ page_ref_unfreeze(page, expected_count - nr);
xas_unlock(&xas);
/* Leave irq disabled to prevent preemption while updating stats */
@@ -493,17 +494,17 @@ int migrate_page_move_mapping(struct add
old_lruvec = mem_cgroup_lruvec(memcg, oldzone->zone_pgdat);
new_lruvec = mem_cgroup_lruvec(memcg, newzone->zone_pgdat);
- __dec_lruvec_state(old_lruvec, NR_FILE_PAGES);
- __inc_lruvec_state(new_lruvec, NR_FILE_PAGES);
+ __mod_lruvec_state(old_lruvec, NR_FILE_PAGES, -nr);
+ __mod_lruvec_state(new_lruvec, NR_FILE_PAGES, nr);
if (PageSwapBacked(page) && !PageSwapCache(page)) {
- __dec_lruvec_state(old_lruvec, NR_SHMEM);
- __inc_lruvec_state(new_lruvec, NR_SHMEM);
+ __mod_lruvec_state(old_lruvec, NR_SHMEM, -nr);
+ __mod_lruvec_state(new_lruvec, NR_SHMEM, nr);
}
if (dirty && mapping_can_writeback(mapping)) {
- __dec_lruvec_state(old_lruvec, NR_FILE_DIRTY);
- __dec_zone_state(oldzone, NR_ZONE_WRITE_PENDING);
- __inc_lruvec_state(new_lruvec, NR_FILE_DIRTY);
- __inc_zone_state(newzone, NR_ZONE_WRITE_PENDING);
+ __mod_lruvec_state(old_lruvec, NR_FILE_DIRTY, -nr);
+ __mod_zone_page_state(oldzone, NR_ZONE_WRITE_PENDING, -nr);
+ __mod_lruvec_state(new_lruvec, NR_FILE_DIRTY, nr);
+ __mod_zone_page_state(newzone, NR_ZONE_WRITE_PENDING, nr);
}
}
local_irq_enable();
_
Patches currently in -mm which might be from shakeelb(a)google.com are
mm-memcg-fix-memcg-file_dirty-numa-stat.patch
mm-fix-numa-stats-for-thp-migration.patch
mm-memcg-add-swapcache-stat-for-memcg-v2.patch
The patch titled
Subject: mm: memcg: fix memcg file_dirty numa stat
has been added to the -mm tree. Its filename is
mm-memcg-fix-memcg-file_dirty-numa-stat.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/mm-memcg-fix-memcg-file_dirty-num…
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/mm-memcg-fix-memcg-file_dirty-num…
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Shakeel Butt <shakeelb(a)google.com>
Subject: mm: memcg: fix memcg file_dirty numa stat
The kernel updates the per-node NR_FILE_DIRTY stats on page migration but
not the memcg numa stats. That was not an issue until recently the commit
5f9a4f4a7096 ("mm: memcontrol: add the missing numa_stat interface for
cgroup v2") exposed numa stats for the memcg. So fix the file_dirty
per-memcg numa stat.
Link: https://lkml.kernel.org/r/20210108155813.2914586-1-shakeelb@google.com
Fixes: 5f9a4f4a7096 ("mm: memcontrol: add the missing numa_stat interface for cgroup v2")
Signed-off-by: Shakeel Butt <shakeelb(a)google.com>
Reviewed-by: Muchun Song <songmuchun(a)bytedance.com>
Acked-by: Yang Shi <shy828301(a)gmail.com>
Reviewed-by: Roman Gushchin <guro(a)fb.com>
Cc: Johannes Weiner <hannes(a)cmpxchg.org>
Cc: Michal Hocko <mhocko(a)kernel.org>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/migrate.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/mm/migrate.c~mm-memcg-fix-memcg-file_dirty-numa-stat
+++ a/mm/migrate.c
@@ -500,9 +500,9 @@ int migrate_page_move_mapping(struct add
__inc_lruvec_state(new_lruvec, NR_SHMEM);
}
if (dirty && mapping_can_writeback(mapping)) {
- __dec_node_state(oldzone->zone_pgdat, NR_FILE_DIRTY);
+ __dec_lruvec_state(old_lruvec, NR_FILE_DIRTY);
__dec_zone_state(oldzone, NR_ZONE_WRITE_PENDING);
- __inc_node_state(newzone->zone_pgdat, NR_FILE_DIRTY);
+ __inc_lruvec_state(new_lruvec, NR_FILE_DIRTY);
__inc_zone_state(newzone, NR_ZONE_WRITE_PENDING);
}
}
_
Patches currently in -mm which might be from shakeelb(a)google.com are
mm-memcg-fix-memcg-file_dirty-numa-stat.patch
mm-fix-numa-stats-for-thp-migration.patch
mm-memcg-add-swapcache-stat-for-memcg-v2.patch
On error we unpin and free the wa_ctx.vma, but do not clear any of the
derived flags. During lrc_init, we look at the flags and attempt to
dereference the wa_ctx.vma if they are set. To protect the error path
where we try to limp along without the wa_ctx, make sure we clear those
flags!
Reported-by: Matt Roper <matthew.d.roper(a)intel.com>
Fixes: 604a8f6f1e33 ("drm/i915/lrc: Only enable per-context and per-bb buffers if set")
Signed-off-by: Chris Wilson <chris(a)chris-wilson.co.uk>
Cc: Matt Roper <matthew.d.roper(a)intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin(a)intel.com>
Cc: Mika Kuoppala <mika.kuoppala(a)linux.intel.com>
Cc: <stable(a)vger.kernel.org> # v4.15+
---
drivers/gpu/drm/i915/gt/intel_lrc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index 4e856947fb13..703d9ecc3f7e 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -1453,6 +1453,9 @@ static int lrc_setup_wa_ctx(struct intel_engine_cs *engine)
void lrc_fini_wa_ctx(struct intel_engine_cs *engine)
{
i915_vma_unpin_and_release(&engine->wa_ctx.vma, 0);
+
+ /* Called on error unwind, clear all flags to prevent further use */
+ memset(&engine->wa_ctx, 0, sizeof(engine->wa_ctx));
}
typedef u32 *(*wa_bb_func_t)(struct intel_engine_cs *engine, u32 *batch);
--
2.20.1
This is the start of the stable review cycle for the 5.4.88 release.
There are 13 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, 09 Jan 2021 14:30:35 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.4.88-rc1…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 5.4.88-rc1
Zhang Xiaohui <ruc_zhangxiaohui(a)163.com>
mwifiex: Fix possible buffer overflows in mwifiex_cmd_802_11_ad_hoc_start
Eric W. Biederman <ebiederm(a)xmission.com>
exec: Transform exec_update_mutex into a rw_semaphore
Eric W. Biederman <ebiederm(a)xmission.com>
rwsem: Implement down_read_interruptible
Eric W. Biederman <ebiederm(a)xmission.com>
rwsem: Implement down_read_killable_nested
peterz(a)infradead.org <peterz(a)infradead.org>
perf: Break deadlock involving exec_update_mutex
Miklos Szeredi <mszeredi(a)redhat.com>
fuse: fix bad inode
Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
iio:imu:bmi160: Fix alignment and data leak issues
Josh Poimboeuf <jpoimboe(a)redhat.com>
kdev_t: always inline major/minor helper functions
Yu Kuai <yukuai3(a)huawei.com>
dmaengine: at_hdmac: add missing kfree() call in at_dma_xlate()
Yu Kuai <yukuai3(a)huawei.com>
dmaengine: at_hdmac: add missing put_device() call in at_dma_xlate()
Tudor Ambarus <tudor.ambarus(a)microchip.com>
dmaengine: at_hdmac: Substitute kzalloc with kmalloc
Felix Fietkau <nbd(a)nbd.name>
Revert "mtd: spinand: Fix OOB read"
Alex Deucher <alexdeucher(a)gmail.com>
Revert "drm/amd/display: Fix memory leaks in S3 resume"
-------------
Diffstat:
Makefile | 4 +-
drivers/dma/at_hdmac.c | 11 +++--
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +-
drivers/iio/imu/bmi160/bmi160.h | 7 +++
drivers/iio/imu/bmi160/bmi160_core.c | 6 +--
drivers/mtd/nand/spi/core.c | 4 --
drivers/net/wireless/marvell/mwifiex/join.c | 2 +
fs/exec.c | 12 +++---
fs/fuse/acl.c | 6 +++
fs/fuse/dir.c | 37 +++++++++++++---
fs/fuse/file.c | 19 +++++----
fs/fuse/fuse_i.h | 12 ++++++
fs/fuse/inode.c | 4 +-
fs/fuse/readdir.c | 4 +-
fs/fuse/xattr.c | 9 ++++
fs/proc/base.c | 10 ++---
include/linux/kdev_t.h | 22 +++++-----
include/linux/rwsem.h | 3 ++
include/linux/sched/signal.h | 11 ++---
init/init_task.c | 2 +-
kernel/events/core.c | 52 +++++++++++------------
kernel/fork.c | 6 +--
kernel/kcmp.c | 30 ++++++-------
kernel/locking/rwsem.c | 40 +++++++++++++++++
24 files changed, 212 insertions(+), 104 deletions(-)
This is the start of the stable review cycle for the 4.14.214 release.
There are 29 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, 09 Jan 2021 14:30:35 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.214-r…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.14.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.14.214-rc1
Zhang Xiaohui <ruc_zhangxiaohui(a)163.com>
mwifiex: Fix possible buffer overflows in mwifiex_cmd_802_11_ad_hoc_start
Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
iio:magnetometer:mag3110: Fix alignment and data leak issues.
Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
iio:imu:bmi160: Fix alignment and data leak issues
Josh Poimboeuf <jpoimboe(a)redhat.com>
kdev_t: always inline major/minor helper functions
Hyeongseok Kim <hyeongseok(a)gmail.com>
dm verity: skip verity work if I/O error when system is shutting down
Takashi Iwai <tiwai(a)suse.de>
ALSA: pcm: Clear the full allocated memory at hw_params
Jessica Yu <jeyu(a)kernel.org>
module: delay kobject uevent until after module init call
Qinglang Miao <miaoqinglang(a)huawei.com>
powerpc: sysdev: add missing iounmap() on error in mpic_msgr_probe()
Jan Kara <jack(a)suse.cz>
quota: Don't overflow quota file offsets
Miroslav Benes <mbenes(a)suse.cz>
module: set MODULE_STATE_GOING state when a module fails to load
Dinghao Liu <dinghao.liu(a)zju.edu.cn>
rtc: sun6i: Fix memleak in sun6i_rtc_clk_init
Takashi Iwai <tiwai(a)suse.de>
ALSA: seq: Use bool for snd_seq_queue internal flags
Mauro Carvalho Chehab <mchehab+huawei(a)kernel.org>
media: gp8psk: initialize stats at power control logic
Anant Thazhemadam <anant.thazhemadam(a)gmail.com>
misc: vmw_vmci: fix kernel info-leak by initializing dbells in vmci_ctx_get_chkpt_doorbells()
Rustam Kovhaev <rkovhaev(a)gmail.com>
reiserfs: add check for an invalid ih_entry_count
Johan Hovold <johan(a)kernel.org>
of: fix linker-section match-table corruption
Petr Vorel <petr.vorel(a)gmail.com>
uapi: move constants from <linux/kernel.h> to <linux/const.h>
Christophe Leroy <christophe.leroy(a)csgroup.eu>
powerpc/bitops: Fix possible undefined behaviour with fls() and fls64()
Johan Hovold <johan(a)kernel.org>
USB: serial: digi_acceleport: fix write-wakeup deadlocks
Stefan Haberland <sth(a)linux.ibm.com>
s390/dasd: fix hanging device offline processing
Eric Auger <eric.auger(a)redhat.com>
vfio/pci: Move dummy_resources_list init in vfio_pci_probe()
Johannes Weiner <hannes(a)cmpxchg.org>
mm: memcontrol: fix excessive complexity in memory.stat reporting
Johannes Weiner <hannes(a)cmpxchg.org>
mm: memcontrol: implement lruvec stat functions on top of each other
Johannes Weiner <hannes(a)cmpxchg.org>
mm: memcontrol: eliminate raw access to stat and event counters
Johan Hovold <johan(a)kernel.org>
ALSA: usb-audio: fix sync-ep altsetting sanity check
Alberto Aguirre <albaguirre(a)gmail.com>
ALSA: usb-audio: simplify set_sync_ep_implicit_fb_quirk
Takashi Iwai <tiwai(a)suse.de>
ALSA: hda/ca0132 - Fix work handling in delayed HP detection
Kevin Vigor <kvigor(a)gmail.com>
md/raid10: initialize r10_bio->read_slot before use.
Jan Beulich <JBeulich(a)suse.com>
x86/entry/64: Add instruction suffix
-------------
Diffstat:
Makefile | 4 +-
arch/powerpc/include/asm/bitops.h | 23 +++-
arch/powerpc/sysdev/mpic_msgr.c | 2 +-
arch/x86/entry/entry_64.S | 2 +-
drivers/iio/imu/bmi160/bmi160_core.c | 13 ++-
drivers/iio/magnetometer/mag3110.c | 13 ++-
drivers/md/dm-verity-target.c | 12 +-
drivers/md/raid10.c | 3 +-
drivers/media/usb/dvb-usb/gp8psk.c | 2 +-
drivers/misc/vmw_vmci/vmci_context.c | 2 +-
drivers/net/wireless/marvell/mwifiex/join.c | 2 +
drivers/rtc/rtc-sun6i.c | 8 +-
drivers/s390/block/dasd_alias.c | 10 +-
drivers/usb/serial/digi_acceleport.c | 45 +++-----
drivers/vfio/pci/vfio_pci.c | 3 +-
fs/quota/quota_tree.c | 8 +-
fs/reiserfs/stree.c | 6 +
include/linux/kdev_t.h | 22 ++--
include/linux/memcontrol.h | 165 +++++++++++++++++-----------
include/linux/of.h | 1 +
include/uapi/linux/const.h | 5 +
include/uapi/linux/ethtool.h | 2 +-
include/uapi/linux/kernel.h | 9 +-
include/uapi/linux/lightnvm.h | 2 +-
include/uapi/linux/mroute6.h | 2 +-
include/uapi/linux/netfilter/x_tables.h | 2 +-
include/uapi/linux/netlink.h | 2 +-
include/uapi/linux/sysctl.h | 2 +-
kernel/module.c | 6 +-
mm/memcontrol.c | 160 +++++++++++++--------------
sound/core/pcm_native.c | 9 +-
sound/core/seq/seq_queue.h | 8 +-
sound/pci/hda/patch_ca0132.c | 16 ++-
sound/usb/pcm.c | 52 ++++-----
34 files changed, 348 insertions(+), 275 deletions(-)