This is the start of the stable review cycle for the 4.19.216 release.
There are 7 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, 06 Nov 2021 14:11:51 +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.216-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.216-rc1
Wang Kefeng <wangkefeng.wang(a)huawei.com>
ARM: 9120/1: Revert "amba: make use of -1 IRQs warn"
Arnd Bergmann <arnd(a)arndb.de>
arch: pgtable: define MAX_POSSIBLE_PHYSMEM_BITS where needed
Erik Ekman <erik(a)kryo.se>
sfc: Fix reading non-legacy supported link modes
Mike Marciniszyn <mike.marciniszyn(a)cornelisnetworks.com>
IB/qib: Protect from buffer overflow in struct qib_user_sdma_pkt fields
Gustavo A. R. Silva <gustavo(a)embeddedor.com>
IB/qib: Use struct_size() helper
Dan Carpenter <dan.carpenter(a)oracle.com>
media: firewire: firedtv-avc: fix a buffer overflow in avc_ca_pmt()
Ming Lei <ming.lei(a)redhat.com>
scsi: core: Put LLD module refcnt after SCSI device is released
-------------
Diffstat:
Makefile | 4 ++--
arch/arc/include/asm/pgtable.h | 2 ++
arch/arm/include/asm/pgtable-2level.h | 2 ++
arch/arm/include/asm/pgtable-3level.h | 2 ++
arch/mips/include/asm/pgtable-32.h | 3 +++
arch/powerpc/include/asm/pte-common.h | 2 ++
arch/riscv/include/asm/pgtable-32.h | 2 ++
drivers/amba/bus.c | 3 ---
drivers/infiniband/hw/qib/qib_user_sdma.c | 34 ++++++++++++++++++++++---------
drivers/media/firewire/firedtv-avc.c | 14 ++++++++++---
drivers/media/firewire/firedtv-ci.c | 2 ++
drivers/net/ethernet/sfc/ethtool.c | 10 ++-------
drivers/scsi/scsi.c | 4 +++-
drivers/scsi/scsi_sysfs.c | 9 ++++++++
include/asm-generic/pgtable.h | 13 ++++++++++++
15 files changed, 79 insertions(+), 27 deletions(-)
This is the start of the stable review cycle for the 5.4.158 release.
There are 9 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, 06 Nov 2021 14:11:51 +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.158-rc…
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.158-rc1
Wang Kefeng <wangkefeng.wang(a)huawei.com>
ARM: 9120/1: Revert "amba: make use of -1 IRQs warn"
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Revert "drm/ttm: fix memleak in ttm_transfered_destroy"
Erik Ekman <erik(a)kryo.se>
sfc: Fix reading non-legacy supported link modes
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Revert "usb: core: hcd: Add support for deferring roothub registration"
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Revert "xhci: Set HCD flag to defer primary roothub registration"
Dan Carpenter <dan.carpenter(a)oracle.com>
media: firewire: firedtv-avc: fix a buffer overflow in avc_ca_pmt()
Yuiko Oshino <yuiko.oshino(a)microchip.com>
net: ethernet: microchip: lan743x: Fix skb allocation failure
Eugene Crosser <crosser(a)average.org>
vrf: Revert "Reset skb conntrack connection..."
Ming Lei <ming.lei(a)redhat.com>
scsi: core: Put LLD module refcnt after SCSI device is released
-------------
Diffstat:
Makefile | 4 ++--
drivers/amba/bus.c | 3 ---
drivers/gpu/drm/ttm/ttm_bo_util.c | 1 -
drivers/media/firewire/firedtv-avc.c | 14 ++++++++++---
drivers/media/firewire/firedtv-ci.c | 2 ++
drivers/net/ethernet/microchip/lan743x_main.c | 10 +++++----
drivers/net/ethernet/sfc/ethtool.c | 10 ++-------
drivers/net/vrf.c | 4 ----
drivers/scsi/scsi.c | 4 +++-
drivers/scsi/scsi_sysfs.c | 9 +++++++++
drivers/usb/core/hcd.c | 29 ++++++---------------------
drivers/usb/host/xhci.c | 1 -
include/linux/usb/hcd.h | 2 --
13 files changed, 41 insertions(+), 52 deletions(-)
This is the start of the stable review cycle for the 5.15.1 release.
There are 12 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, 06 Nov 2021 14:11:51 +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.15.1-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.15.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.15.1-rc1
Takashi Iwai <tiwai(a)suse.de>
ALSA: usb-audio: Add quirk for Audient iD14
Matthew Brost <matthew.brost(a)intel.com>
Revert "drm/i915/gt: Propagate change in error status to children on unhold"
Anson Jacob <Anson.Jacob(a)amd.com>
drm/amd/display: Revert "Directly retrain link from debugfs"
Christian König <christian.koenig(a)amd.com>
drm/amdgpu: revert "Add autodump debugfs node for gpu reset v8"
Bryan O'Donoghue <bryan.odonoghue(a)linaro.org>
Revert "wcn36xx: Disable bmps when encryption is disabled"
Wang Kefeng <wangkefeng.wang(a)huawei.com>
ARM: 9120/1: Revert "amba: make use of -1 IRQs warn"
Lucas Stach <l.stach(a)pengutronix.de>
Revert "soc: imx: gpcv2: move reset assert after requesting domain power up"
Yifan Zhang <yifan1.zhang(a)amd.com>
drm/amdkfd: fix boot failure when iommu is disabled in Picasso.
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Revert "usb: core: hcd: Add support for deferring roothub registration"
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Revert "xhci: Set HCD flag to defer primary roothub registration"
Dan Carpenter <dan.carpenter(a)oracle.com>
media: firewire: firedtv-avc: fix a buffer overflow in avc_ca_pmt()
Erik Ekman <erik(a)kryo.se>
sfc: Fix reading non-legacy supported link modes
-------------
Diffstat:
Makefile | 4 +-
drivers/amba/bus.c | 3 -
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 -
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 80 ----------------------
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.h | 5 --
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ---
drivers/gpu/drm/amd/amdkfd/kfd_device.c | 3 +
.../drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 3 +-
.../gpu/drm/i915/gt/intel_execlists_submission.c | 4 --
drivers/media/firewire/firedtv-avc.c | 14 +++-
drivers/media/firewire/firedtv-ci.c | 2 +
drivers/net/ethernet/sfc/ethtool_common.c | 10 +--
drivers/net/wireless/ath/wcn36xx/main.c | 10 ---
drivers/net/wireless/ath/wcn36xx/pmc.c | 5 +-
drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 1 -
drivers/soc/imx/gpcv2.c | 4 +-
drivers/usb/core/hcd.c | 29 ++------
drivers/usb/host/xhci.c | 1 -
include/linux/usb/hcd.h | 2 -
sound/usb/quirks.c | 2 +
20 files changed, 33 insertions(+), 159 deletions(-)
This is the start of the stable review cycle for the 5.10.78 release.
There are 16 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, 06 Nov 2021 14:11:51 +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.10.78-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.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.10.78-rc1
Takashi Iwai <tiwai(a)suse.de>
ALSA: usb-audio: Add Audient iD14 to mixer map quirk table
Takashi Iwai <tiwai(a)suse.de>
ALSA: usb-audio: Add Schiit Hel device to mixer map quirk table
Bryan O'Donoghue <bryan.odonoghue(a)linaro.org>
Revert "wcn36xx: Disable bmps when encryption is disabled"
Wang Kefeng <wangkefeng.wang(a)huawei.com>
ARM: 9120/1: Revert "amba: make use of -1 IRQs warn"
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Revert "drm/ttm: fix memleak in ttm_transfered_destroy"
Yang Shi <shy828301(a)gmail.com>
mm: khugepaged: skip huge page collapse for special files
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Revert "usb: core: hcd: Add support for deferring roothub registration"
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Revert "xhci: Set HCD flag to defer primary roothub registration"
Dan Carpenter <dan.carpenter(a)oracle.com>
media: firewire: firedtv-avc: fix a buffer overflow in avc_ca_pmt()
Yang Shi <shy828301(a)gmail.com>
mm: filemap: check if THP has hwpoisoned subpage for PMD page fault
Yang Shi <shy828301(a)gmail.com>
mm: hwpoison: remove the unnecessary THP check
Yuiko Oshino <yuiko.oshino(a)microchip.com>
net: ethernet: microchip: lan743x: Fix skb allocation failure
Eugene Crosser <crosser(a)average.org>
vrf: Revert "Reset skb conntrack connection..."
Erik Ekman <erik(a)kryo.se>
sfc: Fix reading non-legacy supported link modes
Lee Jones <lee.jones(a)linaro.org>
Revert "io_uring: reinforce cancel on flush during exit"
Ming Lei <ming.lei(a)redhat.com>
scsi: core: Put LLD module refcnt after SCSI device is released
-------------
Diffstat:
Makefile | 4 ++--
drivers/amba/bus.c | 3 ---
drivers/gpu/drm/ttm/ttm_bo_util.c | 1 -
drivers/media/firewire/firedtv-avc.c | 14 ++++++++++---
drivers/media/firewire/firedtv-ci.c | 2 ++
drivers/net/ethernet/microchip/lan743x_main.c | 10 +++++----
drivers/net/ethernet/sfc/ethtool_common.c | 10 ++-------
drivers/net/vrf.c | 4 ----
drivers/net/wireless/ath/wcn36xx/main.c | 10 ---------
drivers/net/wireless/ath/wcn36xx/pmc.c | 5 +----
drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 1 -
drivers/scsi/scsi.c | 4 +++-
drivers/scsi/scsi_sysfs.c | 9 +++++++++
drivers/usb/core/hcd.c | 29 ++++++---------------------
drivers/usb/host/xhci.c | 1 -
fs/io_uring.c | 3 ++-
include/linux/page-flags.h | 23 +++++++++++++++++++++
include/linux/usb/hcd.h | 2 --
mm/huge_memory.c | 2 ++
mm/khugepaged.c | 17 +++++++++-------
mm/memory-failure.c | 28 +++++++++++++-------------
mm/memory.c | 9 +++++++++
mm/page_alloc.c | 4 +++-
sound/usb/mixer_maps.c | 8 ++++++++
24 files changed, 113 insertions(+), 90 deletions(-)
Stable Maintainers,
Please consider this patch for back-porting to v4.4y and v4.9.y
4c761daf8bb9a ("net: hso: register netdev later to avoid a race condition")
It should apply cleanly to both branches.
Kind regards,
Lee
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
When running as PVH or HVM guest with actual memory < max memory the
hypervisor is using "populate on demand" in order to allow the guest
to balloon down from its maximum memory size. For this to work
correctly the guest must not touch more memory pages than its target
memory size as otherwise the PoD cache will be exhausted and the guest
is crashed as a result of that.
In extreme cases ballooning down might not be finished today before
the init process is started, which can consume lots of memory.
In order to avoid random boot crashes in such cases, add a late init
call to wait for ballooning down having finished for PVH/HVM guests.
Warn on console if initial ballooning fails, panic() after stalling
for more than 3 minutes per default. Add a module parameter for
changing this timeout.
Cc: <stable(a)vger.kernel.org>
Reported-by: Marek Marczykowski-Górecki <marmarek(a)invisiblethingslab.com>
Signed-off-by: Juergen Gross <jgross(a)suse.com>
---
V2:
- add warning and panic() when stalling (Marek Marczykowski-Górecki)
- don't wait if credit > 0
V3:
- issue warning only after ballooning failed (Marek Marczykowski-Górecki)
- make panic() timeout configurable via parameter
V4:
- fix boot parameter (Boris Ostrovsky)
- set new state directly in update_schedule() (Boris Ostrovsky)
---
.../admin-guide/kernel-parameters.txt | 7 ++
drivers/xen/balloon.c | 86 ++++++++++++++-----
2 files changed, 70 insertions(+), 23 deletions(-)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 43dc35fe5bc0..1396fd2d9031 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -6349,6 +6349,13 @@
improve timer resolution at the expense of processing
more timer interrupts.
+ xen.balloon_boot_timeout= [XEN]
+ The time (in seconds) to wait before giving up to boot
+ in case initial ballooning fails to free enough memory.
+ Applies only when running as HVM or PVH guest and
+ started with less memory configured than allowed at
+ max. Default is 180.
+
xen.event_eoi_delay= [XEN]
How long to delay EOI handling in case of event
storms (jiffies). Default is 10.
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
index 3a50f097ed3e..3a661b7697d4 100644
--- a/drivers/xen/balloon.c
+++ b/drivers/xen/balloon.c
@@ -58,6 +58,7 @@
#include <linux/percpu-defs.h>
#include <linux/slab.h>
#include <linux/sysctl.h>
+#include <linux/moduleparam.h>
#include <asm/page.h>
#include <asm/tlb.h>
@@ -73,6 +74,12 @@
#include <xen/page.h>
#include <xen/mem-reservation.h>
+#undef MODULE_PARAM_PREFIX
+#define MODULE_PARAM_PREFIX "xen."
+
+static uint __read_mostly balloon_boot_timeout = 180;
+module_param(balloon_boot_timeout, uint, 0444);
+
static int xen_hotplug_unpopulated;
#ifdef CONFIG_XEN_BALLOON_MEMORY_HOTPLUG
@@ -125,12 +132,12 @@ static struct ctl_table xen_root[] = {
* BP_ECANCELED: error, balloon operation canceled.
*/
-enum bp_state {
+static enum bp_state {
BP_DONE,
BP_WAIT,
BP_EAGAIN,
BP_ECANCELED
-};
+} balloon_state = BP_DONE;
/* Main waiting point for xen-balloon thread. */
static DECLARE_WAIT_QUEUE_HEAD(balloon_thread_wq);
@@ -199,18 +206,15 @@ static struct page *balloon_next_page(struct page *page)
return list_entry(next, struct page, lru);
}
-static enum bp_state update_schedule(enum bp_state state)
+static void update_schedule(void)
{
- if (state == BP_WAIT)
- return BP_WAIT;
-
- if (state == BP_ECANCELED)
- return BP_ECANCELED;
+ if (balloon_state == BP_WAIT || balloon_state == BP_ECANCELED)
+ return;
- if (state == BP_DONE) {
+ if (balloon_state == BP_DONE) {
balloon_stats.schedule_delay = 1;
balloon_stats.retry_count = 1;
- return BP_DONE;
+ return;
}
++balloon_stats.retry_count;
@@ -219,7 +223,8 @@ static enum bp_state update_schedule(enum bp_state state)
balloon_stats.retry_count > balloon_stats.max_retry_count) {
balloon_stats.schedule_delay = 1;
balloon_stats.retry_count = 1;
- return BP_ECANCELED;
+ balloon_state = BP_ECANCELED;
+ return;
}
balloon_stats.schedule_delay <<= 1;
@@ -227,7 +232,7 @@ static enum bp_state update_schedule(enum bp_state state)
if (balloon_stats.schedule_delay > balloon_stats.max_schedule_delay)
balloon_stats.schedule_delay = balloon_stats.max_schedule_delay;
- return BP_EAGAIN;
+ balloon_state = BP_EAGAIN;
}
#ifdef CONFIG_XEN_BALLOON_MEMORY_HOTPLUG
@@ -494,9 +499,9 @@ static enum bp_state decrease_reservation(unsigned long nr_pages, gfp_t gfp)
* Stop waiting if either state is BP_DONE and ballooning action is
* needed, or if the credit has changed while state is not BP_DONE.
*/
-static bool balloon_thread_cond(enum bp_state state, long credit)
+static bool balloon_thread_cond(long credit)
{
- if (state == BP_DONE)
+ if (balloon_state == BP_DONE)
credit = 0;
return current_credit() != credit || kthread_should_stop();
@@ -510,13 +515,12 @@ static bool balloon_thread_cond(enum bp_state state, long credit)
*/
static int balloon_thread(void *unused)
{
- enum bp_state state = BP_DONE;
long credit;
unsigned long timeout;
set_freezable();
for (;;) {
- switch (state) {
+ switch (balloon_state) {
case BP_DONE:
case BP_ECANCELED:
timeout = 3600 * HZ;
@@ -532,7 +536,7 @@ static int balloon_thread(void *unused)
credit = current_credit();
wait_event_freezable_timeout(balloon_thread_wq,
- balloon_thread_cond(state, credit), timeout);
+ balloon_thread_cond(credit), timeout);
if (kthread_should_stop())
return 0;
@@ -543,22 +547,23 @@ static int balloon_thread(void *unused)
if (credit > 0) {
if (balloon_is_inflated())
- state = increase_reservation(credit);
+ balloon_state = increase_reservation(credit);
else
- state = reserve_additional_memory();
+ balloon_state = reserve_additional_memory();
}
if (credit < 0) {
long n_pages;
n_pages = min(-credit, si_mem_available());
- state = decrease_reservation(n_pages, GFP_BALLOON);
- if (state == BP_DONE && n_pages != -credit &&
+ balloon_state = decrease_reservation(n_pages,
+ GFP_BALLOON);
+ if (balloon_state == BP_DONE && n_pages != -credit &&
n_pages < totalreserve_pages)
- state = BP_EAGAIN;
+ balloon_state = BP_EAGAIN;
}
- state = update_schedule(state);
+ update_schedule();
mutex_unlock(&balloon_mutex);
@@ -765,3 +770,38 @@ static int __init balloon_init(void)
return 0;
}
subsys_initcall(balloon_init);
+
+static int __init balloon_wait_finish(void)
+{
+ long credit, last_credit = 0;
+ unsigned long last_changed = 0;
+
+ if (!xen_domain())
+ return -ENODEV;
+
+ /* PV guests don't need to wait. */
+ if (xen_pv_domain() || !current_credit())
+ return 0;
+
+ pr_info("Waiting for initial ballooning down having finished.\n");
+
+ while ((credit = current_credit()) < 0) {
+ if (credit != last_credit) {
+ last_changed = jiffies;
+ last_credit = credit;
+ }
+ if (balloon_state == BP_ECANCELED) {
+ pr_warn_once("Initial ballooning failed, %ld pages need to be freed.\n",
+ -credit);
+ if (jiffies - last_changed >= HZ * balloon_boot_timeout)
+ panic("Initial ballooning failed!\n");
+ }
+
+ schedule_timeout_interruptible(HZ / 10);
+ }
+
+ pr_info("Initial ballooning down finished.\n");
+
+ return 0;
+}
+late_initcall_sync(balloon_wait_finish);
--
2.26.2