This is the start of the stable review cycle for the 3.18.101 release.
There are 68 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 Wed Mar 21 17:17:59 UTC 2018.
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/v3.x/stable-review/patch-3.18.101-r…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-3.18.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 3.18.101-rc1
Johannes Thumshirn <jthumshirn(a)suse.de>
scsi: sg: only check for dxfer_len greater than 256M
Johannes Thumshirn <jthumshirn(a)suse.de>
scsi: sg: fix static checker warning in sg_is_valid_dxfer
Johannes Thumshirn <jthumshirn(a)suse.de>
scsi: sg: fix SG_DXFER_FROM_DEV transfers
Tejun Heo <tj(a)kernel.org>
fs/aio: Use RCU accessors for kioctx_table->table[]
Tejun Heo <tj(a)kernel.org>
fs/aio: Add explicit RCU grace period when freeing kioctx
Al Viro <viro(a)zeniv.linux.org.uk>
lock_parent() needs to recheck if dentry got __dentry_kill'ed under it
Takashi Iwai <tiwai(a)suse.de>
ALSA: seq: Clear client entry before deleting else at closing
Takashi Iwai <tiwai(a)suse.de>
ALSA: seq: Fix possible UAF in snd_seq_check_queue()
Takashi Iwai <tiwai(a)suse.de>
ALSA: pcm: Fix UAF in snd_pcm_oss_get_formats()
Mimi Zohar <zohar(a)linux.vnet.ibm.com>
ima: relax requiring a file signature for new files with zero length
SeongJae Park <sj38.park(a)gmail.com>
rcutorture/configinit: Fix build directory error message
Dan Carpenter <dan.carpenter(a)oracle.com>
ASoC: nuc900: Fix a loop timeout test
Luca Coelho <luciano.coelho(a)intel.com>
mac80211: remove BUG() when interface type is invalid
Stephen Hemminger <stephen(a)networkplumber.org>
veth: set peer GSO values
Dan Carpenter <dan.carpenter(a)oracle.com>
media: cpia2: Fix a couple off by one bugs
Xose Vazquez Perez <xose.vazquez(a)gmail.com>
scsi: devinfo: apply to HP XP the same flags as Hitachi VSP
Tobias Jordan <Tobias.Jordan(a)elektrobit.com>
spi: sun6i: disable/unprepare clocks on remove
Julien BOIBESSOT <julien.boibessot(a)armadeus.com>
tools/usbip: fixes build with musl libc toolchain
Jagdish Gediya <jagdish.gediya(a)nxp.com>
mtd: nand: ifc: update bufnum mask for ver >= 2.0.0
Andrew F. Davis <afd(a)ti.com>
ARM: dts: omap3-n900: Fix the audio CODEC's reset pin
Andrew F. Davis <afd(a)ti.com>
ARM: dts: am335x-pepper: Fix the audio CODEC's reset pin
Miquel Raynal <miquel.raynal(a)free-electrons.com>
mtd: nand: fix interpretation of NAND_CMD_NONE in nand_command[_lp]()
Lorenzo Colitti <lorenzo(a)google.com>
net: xfrm: allow clearing socket xfrm policies.
Paul E. McKenney <paulmck(a)linux.vnet.ibm.com>
sched: Stop resched_cpu() from sending IPIs to offline CPUs
Jiri Kosina <jkosina(a)suse.cz>
HID: elo: clear BTN_LEFT mapping
Dedy Lansky <qca_dlansky(a)qca.qualcomm.com>
wil6210: fix memory access violation in wil_memcpy_from/toio_32
Masami Hiramatsu <mhiramat(a)kernel.org>
kprobes/x86: Set kprobes pages read-only
Masami Hiramatsu <mhiramat(a)kernel.org>
kprobes/x86: Fix kprobe-booster not to boost far call instructions
Hannes Reinecke <hare(a)suse.de>
scsi: sg: close race condition in sg_remove_sfp_usercontext()
Johannes Thumshirn <jthumshirn(a)suse.de>
scsi: sg: check for valid direction before starting the request
David Carrillo-Cisneros <davidcc(a)google.com>
perf session: Don't rely on evlist in pipe mode
David Carrillo-Cisneros <davidcc(a)google.com>
perf inject: Copy events when reordering events in pipe mode
Yuyang Du <yuyang.du(a)intel.com>
usb: gadget: dummy_hcd: Fix wrong power status bit clear/reset in dummy_hub_control()
Vincent Stehlé <vincent.stehle(a)laposte.net>
regulator: isl9305: fix array size
David Daney <david.daney(a)cavium.com>
MIPS: BPF: Quit clobbering callee saved registers in JIT code.
Christopher James Halse Rogers <christopher.halse.rogers(a)canonical.com>
drm/radeon: Fail fb creation from imported dma-bufs.
Liam Beguin <lbeguin(a)tycoint.com>
video: ARM CLCD: fix dma allocation size
Nate Watterson <nwatters(a)codeaurora.org>
iommu/iova: Fix underflow bug in __alloc_and_insert_iova_range
John Johansen <john.johansen(a)canonical.com>
apparmor: Make path_max parameter readonly
Phil Turnbull <phil.turnbull(a)oracle.com>
fm10k: correctly check if interface is removed
Jan Kara <jack(a)suse.cz>
reiserfs: Make cancel_old_flush() reliable
Andrew Lunn <andrew(a)lunn.ch>
net/faraday: Add missing include of of.h
Anton Blanchard <anton(a)samba.org>
powerpc: Avoid taking a data miss on every userspace instruction miss
Geert Uytterhoeven <geert+renesas(a)glider.be>
ARM: dts: r8a7791: Correct parent of SSI[0-9] clocks
Geert Uytterhoeven <geert+renesas(a)glider.be>
ARM: dts: r8a7790: Correct parent of SSI[0-9] clocks
Samuel Thibault <samuel.thibault(a)ens-lyon.org>
braille-console: Fix value returned by _braille_console_setup
Roger Quadros <rogerq(a)ti.com>
ARM: DRA7: hwmod_data: Prevent wait_target_disable error for usb_otg_ss
Shaohua Li <shli(a)fb.com>
blk-throttle: make sure expire time isn't too big
Kirill A. Shutemov <kirill.shutemov(a)linux.intel.com>
mm: Fix false-positive VM_BUG_ON() in page_cache_{get,add}_speculative()
Gao Feng <fgao(a)ikuai8.com>
tcp: sysctl: Fix a race to avoid unexpected 0 window from space
Akinobu Mita <akinobu.mita(a)gmail.com>
spi: omap2-mcspi: poll OMAP2_MCSPI_CHSTAT_RXS for PIO transfer
Davide Caratti <dcaratti(a)redhat.com>
sched: act_csum: don't mangle TCP and UDP GSO packets
David Engraf <david.engraf(a)sysgo.com>
timers, sched_clock: Update timeout for clock wrap
Janusz Krzysztofik <jmkrzyszt(a)gmail.com>
media: i2c/soc_camera: fix ov6650 sensor getting wrong clock
Brian King <brking(a)linux.vnet.ibm.com>
scsi: ipr: Fix missed EH wakeup
Rob Herring <robh(a)kernel.org>
of: fix of_device_get_modalias returned length when truncating buffers
Andreas Pape <APape(a)phoenixcontact.com>
batman-adv: handle race condition for claims between gateways
Linus Walleij <linus.walleij(a)linaro.org>
ARM: dts: Adjust moxart IRQ controller and flags
Tomasz Kramkowski <tk(a)the-tk.com>
HID: clamp input to logical range if no null state
Mohammed Shafi Shajakhan <mohammed(a)qti.qualcomm.com>
ath10k: disallow DFS simulation if DFS channel is not enabled
Chris Wilson <chris(a)chris-wilson.co.uk>
drm: Defer disabling the vblank IRQ until the next interrupt (for instant-off)
Quan Nguyen <qnguyen(a)apm.com>
drivers: net: xgene: Fix hardware checksum setting
Stephane Eranian <eranian(a)google.com>
perf tools: Make perf_event__synthesize_mmap_events() scale
Alexander Potapenko <glider(a)google.com>
selinux: check for address length in selinux_socket_bind()
Prarit Bhargava <prarit(a)redhat.com>
PCI/MSI: Stop disabling MSI/MSI-X in pci_device_shutdown()
Thomas Petazzoni <thomas.petazzoni(a)free-electrons.com>
net: mvpp2: set dma mask and coherent dma mask on PPv2.2
Valtteri Heikkilä <rnd(a)nic.fi>
HID: reject input outside logical range only if null state is set
H. Nikolaus Schaller <hns(a)goldelico.com>
Input: tsc2007 - check for presence and power down tsc2007 during probe
-------------
Diffstat:
Makefile | 4 +--
arch/arm/boot/dts/am335x-pepper.dts | 2 +-
arch/arm/boot/dts/moxart-uc7112lx.dts | 2 +-
arch/arm/boot/dts/moxart.dtsi | 17 ++++-----
arch/arm/boot/dts/omap3-n900.dts | 4 +--
arch/arm/boot/dts/r8a7790.dtsi | 7 ++--
arch/arm/boot/dts/r8a7791.dtsi | 7 ++--
arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 2 ++
arch/mips/net/bpf_jit.c | 16 ++++++---
arch/powerpc/mm/fault.c | 2 +-
arch/x86/kernel/kprobes/core.c | 6 ++++
arch/x86/kernel/kprobes/opt.c | 3 ++
block/blk-throttle.c | 11 ++++++
drivers/gpu/drm/drm_irq.c | 14 ++++++--
drivers/gpu/drm/radeon/radeon_display.c | 6 ++++
drivers/hid/hid-elo.c | 6 ++++
drivers/hid/hid-input.c | 20 +++++++----
drivers/input/touchscreen/tsc2007.c | 8 +++++
drivers/iommu/iova.c | 2 +-
drivers/media/i2c/soc_camera/ov6650.c | 2 +-
drivers/media/usb/cpia2/cpia2_v4l.c | 4 +--
drivers/mtd/nand/fsl_ifc_nand.c | 7 ++++
drivers/mtd/nand/nand_base.c | 9 +++--
drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | 1 +
drivers/net/ethernet/apm/xgene/xgene_enet_hw.h | 1 +
drivers/net/ethernet/faraday/ftgmac100.c | 1 +
drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 2 +-
drivers/net/ethernet/marvell/mvpp2.c | 14 ++++++++
drivers/net/veth.c | 3 ++
drivers/net/wireless/ath/ath10k/debug.c | 9 +++++
drivers/net/wireless/ath/wil6210/main.c | 20 +++++++++--
drivers/of/device.c | 2 +-
drivers/pci/pci-driver.c | 2 --
drivers/scsi/ipr.c | 16 ++++++---
drivers/scsi/scsi_devinfo.c | 2 +-
drivers/scsi/sg.c | 36 +++++++++++--------
drivers/spi/spi-omap2-mcspi.c | 9 ++---
drivers/spi/spi-sun6i.c | 2 +-
drivers/usb/gadget/udc/dummy_hcd.c | 20 +++++------
drivers/video/fbdev/amba-clcd.c | 4 +--
fs/aio.c | 42 +++++++++++++++-------
fs/dcache.c | 11 ++++--
fs/reiserfs/journal.c | 2 +-
fs/reiserfs/reiserfs.h | 1 +
fs/reiserfs/super.c | 21 +++++++----
include/linux/pagemap.h | 4 +--
include/linux/platform_data/isl9305.h | 2 +-
include/net/tcp.h | 8 +++--
kernel/printk/braille.c | 15 ++++----
kernel/printk/braille.h | 13 +++++--
kernel/sched/core.c | 3 +-
kernel/time/sched_clock.c | 5 +++
net/batman-adv/bridge_loop_avoidance.c | 20 ++++++++---
net/mac80211/iface.c | 2 +-
net/sched/act_csum.c | 12 +++++++
net/xfrm/xfrm_policy.c | 2 +-
net/xfrm/xfrm_state.c | 7 ++++
security/apparmor/lsm.c | 2 +-
security/integrity/ima/ima_appraise.c | 3 +-
security/selinux/hooks.c | 8 +++++
sound/core/oss/pcm_oss.c | 10 +++---
sound/core/seq/seq_clientmgr.c | 4 +--
sound/core/seq/seq_prioq.c | 28 +++++++--------
sound/core/seq/seq_prioq.h | 6 ++--
sound/core/seq/seq_queue.c | 28 +++++----------
sound/soc/nuc900/nuc900-ac97.c | 4 +--
tools/perf/util/event.c | 4 +--
tools/perf/util/ordered-events.c | 3 +-
tools/perf/util/session.c | 17 +++++++--
.../testing/selftests/rcutorture/bin/configinit.sh | 2 +-
tools/usb/usbip/src/usbipd.c | 2 +-
71 files changed, 413 insertions(+), 183 deletions(-)
-Stephen Warren
+Stefan Wahren
On Fri, 09 Feb 2018 09:32:40 +0000
Eric Anholt <eric(a)anholt.net> wrote:
> Boris Brezillon <boris.brezillon(a)bootlin.com> writes:
>
> > On Thu, 08 Feb 2018 15:20:16 +0000
> > Eric Anholt <eric(a)anholt.net> wrote:
> >
> >> Boris Brezillon <boris.brezillon(a)bootlin.com> writes:
> >>
> >> > All bcm2835 PLLs should be gated before their rate can be changed.
> >> > Setting CLK_SET_RATE_GATE will let the core enforce that, but this is
> >> > not enough to make the code work in all situations. Indeed, the
> >> > CLK_SET_RATE_GATE flag prevents a user from changing the rate while
> >> > the clock is enabled, but this check only guarantees there's no Linux
> >> > users. In our case, the clock might have been enabled by the
> >> > bootloader/FW, and, because we have CLK_IGNORE_UNUSED set, Linux never
> >> > disables the PLL. So we have to make sure the PLL is actually disabled
> >> > before changing the rate.
> >> >
> >> > Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain clocks")
> >> > Cc: <stable(a)vger.kernel.org>
> >> > Signed-off-by: Boris Brezillon <boris.brezillon(a)bootlin.com>
> >> > ---
> >> > drivers/clk/bcm/clk-bcm2835.c | 14 +++++++++++++-
> >> > 1 file changed, 13 insertions(+), 1 deletion(-)
> >> >
> >> > diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c
> >> > index 6c5d4a8e426c..051ce769c109 100644
> >> > --- a/drivers/clk/bcm/clk-bcm2835.c
> >> > +++ b/drivers/clk/bcm/clk-bcm2835.c
> >> > @@ -678,6 +678,18 @@ static int bcm2835_pll_set_rate(struct clk_hw *hw,
> >> > u32 ana[4];
> >> > int i;
> >> >
> >> > + /*
> >> > + * Normally, the CLK_SET_RATE_GATE flag prevents a user from changing
> >> > + * the rate while the clock is enabled, but this check only makes sure
> >> > + * there's no Linux users.
> >> > + * In our case, the clock might have been enabled by the bootloader/FW,
> >> > + * and, since CLK_IGNORE_UNUSED flag is set, Linux never disables it.
> >> > + * So we have to make sure the clk is actually disabled before changing
> >> > + * the rate.
> >> > + */
> >> > + if (bcm2835_pll_is_on(hw))
> >> > + bcm2835_pll_off(hw);
> >> > +
> >>
> >> I'm not sure this improves the situation. If the PLL was on, then
> >> presumably there's a divider using it and a CM clock using that, so
> >> we'll probably end up driving some glitches on them.
> >
> > Hm, yes, but if someone is trying to change the rate of the PLL, and the
> > core doesn't know other clks depend on this PLL (which is the case if
> > we reach this point), we're already in big trouble.
> >
> >>
> >> Does the common clk framework have a way to disable unused clocks from
> >> the leaf clocks up to this root, before the general
> >> disable-unused-clocks path happens late in the boot process?
> >
> > Not that I know of. What do you have in mind?
>
> I was hoping that Stephen Boyd or Mike might have an answer for this
> problem.
Having a generic solution for this sort of issue is definitely the
way to go, but I think this temporary hack is needed to make HDMI/SDTV
work properly. If we don't have it and the FW configures and enables
PLLH with a rate that is different from the one the HDMI or SDTV
encoder tries to set, we're screwed, because I doubt the CPRMAN block
allows you to change the rate of the PLL when it's not gated. Which
means the new rate is not applied and the clk user has no way of
knowing that, which in turn means the display output is likely to not
work properly the first time it's enabled.
Of course, this all goes away the second time the HDMI/SDTV encoder is
enabled, because then clk_disable_unprepare() is called which has the
effect of disabling the PLL.
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com
commit 9ff549ffb4fb4cc9a4b24d1de9dc3e68287797c4 upstream.
This patch adds checks for 'ioc->remove_host' in the SCSI error handlers, so
not to access pointers/resources potentially freed in the PCI shutdown/module
unload path. The error handlers may be invoked after shutdown/unload,
depending on other components.
This problem was observed with kexec on a system with a mpt3sas based adapter
and an infiniband adapter which takes long enough to shutdown:
The mpt3sas driver finished shutting down / disabled interrupt handling, thus
some commands have not finished and timed out.
Since the system was still running (waiting for the infiniband adapter to
shutdown), the scsi error handler for task abort of mpt3sas was invoked, and
hit an oops -- either in scsih_abort() because 'ioc->scsi_lookup' was NULL
without commit dbec4c9040ed ("scsi: mpt3sas: lockless command submission"), or
later up in scsih_host_reset() (with or without that commit), because it
eventually called mpt3sas_base_get_iocstate().
After the above commit, the oops in scsih_abort() does not occur anymore
(_scsih_scsi_lookup_find_by_scmd() is no longer called), but that commit is
too big and out of the scope of linux-stable, where this patch might help, so
still go for the changes.
Also, this might help to prevent similar errors in the future, in case code
changes and possibly tries to access freed stuff.
Note the fix in scsih_host_reset() is still important anyway.
Signed-off-by: Mauricio Faria de Oliveira <mauricfo(a)linux.vnet.ibm.com>
Acked-by: Sreekanth Reddy <Sreekanth.Reddy(a)broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen(a)oracle.com>
---
v3: fix domain in email addresses, rebase on top of 4.14.29.
v2: fix line number in hunk 1
drivers/scsi/mpt3sas/mpt3sas_scsih.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index 33ff691..61a780f 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -2471,7 +2471,8 @@ int mpt3sas_scsih_issue_locked_tm(struct MPT3SAS_ADAPTER *ioc, u16 handle,
_scsih_tm_display_info(ioc, scmd);
sas_device_priv_data = scmd->device->hostdata;
- if (!sas_device_priv_data || !sas_device_priv_data->sas_target) {
+ if (!sas_device_priv_data || !sas_device_priv_data->sas_target ||
+ ioc->remove_host) {
sdev_printk(KERN_INFO, scmd->device,
"device been deleted! scmd(%p)\n", scmd);
scmd->result = DID_NO_CONNECT << 16;
@@ -2533,7 +2534,8 @@ int mpt3sas_scsih_issue_locked_tm(struct MPT3SAS_ADAPTER *ioc, u16 handle,
_scsih_tm_display_info(ioc, scmd);
sas_device_priv_data = scmd->device->hostdata;
- if (!sas_device_priv_data || !sas_device_priv_data->sas_target) {
+ if (!sas_device_priv_data || !sas_device_priv_data->sas_target ||
+ ioc->remove_host) {
sdev_printk(KERN_INFO, scmd->device,
"device been deleted! scmd(%p)\n", scmd);
scmd->result = DID_NO_CONNECT << 16;
@@ -2595,7 +2597,8 @@ int mpt3sas_scsih_issue_locked_tm(struct MPT3SAS_ADAPTER *ioc, u16 handle,
_scsih_tm_display_info(ioc, scmd);
sas_device_priv_data = scmd->device->hostdata;
- if (!sas_device_priv_data || !sas_device_priv_data->sas_target) {
+ if (!sas_device_priv_data || !sas_device_priv_data->sas_target ||
+ ioc->remove_host) {
starget_printk(KERN_INFO, starget, "target been deleted! scmd(%p)\n",
scmd);
scmd->result = DID_NO_CONNECT << 16;
@@ -2652,7 +2655,7 @@ int mpt3sas_scsih_issue_locked_tm(struct MPT3SAS_ADAPTER *ioc, u16 handle,
ioc->name, scmd);
scsi_print_command(scmd);
- if (ioc->is_driver_loading) {
+ if (ioc->is_driver_loading || ioc->remove_host) {
pr_info(MPT3SAS_FMT "Blocking the host reset\n",
ioc->name);
r = FAILED;
--
1.8.3.1
The ext4 forced shutdown flag needs to prevent new handles from being
started, but it needs to allow existing handles to complete. So the
forced shutdown flag should not force ext4_journal_get_write_access to
fail.
Signed-off-by: Theodore Ts'o <tytso(a)mit.edu>
Cc: stable(a)vger.kernel.org
---
fs/ext4/ext4_jbd2.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/fs/ext4/ext4_jbd2.c b/fs/ext4/ext4_jbd2.c
index 2d593201cf7a..7c70b08d104c 100644
--- a/fs/ext4/ext4_jbd2.c
+++ b/fs/ext4/ext4_jbd2.c
@@ -166,13 +166,6 @@ int __ext4_journal_get_write_access(const char *where, unsigned int line,
might_sleep();
if (ext4_handle_valid(handle)) {
- struct super_block *sb;
-
- sb = handle->h_transaction->t_journal->j_private;
- if (unlikely(ext4_forced_shutdown(EXT4_SB(sb)))) {
- jbd2_journal_abort_handle(handle);
- return -EIO;
- }
err = jbd2_journal_get_write_access(handle, bh);
if (err)
ext4_journal_abort_handle(where, line, __func__, bh,
--
2.16.1.72.g5be1f00a9a
This is a note to let you know that I've just added the patch titled
oom: improve oom disable handling
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
oom-improve-oom-disable-handling.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Thu Mar 22 14:40:24 CET 2018
From: Michal Hocko <mhocko(a)suse.com>
Date: Wed, 3 May 2017 14:54:57 -0700
Subject: oom: improve oom disable handling
From: Michal Hocko <mhocko(a)suse.com>
[ Upstream commit d75da004c708c9fca7b53f7da293a295522414d9 ]
Tetsuo has reported that sysrq triggered OOM killer will print a
misleading information when no tasks are selected:
sysrq: SysRq : Manual OOM execution
Out of memory: Kill process 4468 ((agetty)) score 0 or sacrifice child
Killed process 4468 ((agetty)) total-vm:43704kB, anon-rss:1760kB, file-rss:0kB, shmem-rss:0kB
sysrq: SysRq : Manual OOM execution
Out of memory: Kill process 4469 (systemd-cgroups) score 0 or sacrifice child
Killed process 4469 (systemd-cgroups) total-vm:10704kB, anon-rss:120kB, file-rss:0kB, shmem-rss:0kB
sysrq: SysRq : Manual OOM execution
sysrq: OOM request ignored because killer is disabled
sysrq: SysRq : Manual OOM execution
sysrq: OOM request ignored because killer is disabled
sysrq: SysRq : Manual OOM execution
sysrq: OOM request ignored because killer is disabled
The real reason is that there are no eligible tasks for the OOM killer
to select but since commit 7c5f64f84483 ("mm: oom: deduplicate victim
selection code for memcg and global oom") the semantic of out_of_memory
has changed without updating moom_callback.
This patch updates moom_callback to tell that no task was eligible which
is the case for both oom killer disabled and no eligible tasks. In
order to help distinguish first case from the second add printk to both
oom_killer_{enable,disable}. This information is useful on its own
because it might help debugging potential memory allocation failures.
Fixes: 7c5f64f84483 ("mm: oom: deduplicate victim selection code for memcg and global oom")
Link: http://lkml.kernel.org/r/20170404134705.6361-1-mhocko@kernel.org
Signed-off-by: Michal Hocko <mhocko(a)suse.com>
Reported-by: Tetsuo Handa <penguin-kernel(a)I-love.SAKURA.ne.jp>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds(a)linux-foundation.org>
Signed-off-by: Sasha Levin <alexander.levin(a)microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/tty/sysrq.c | 2 +-
mm/oom_kill.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/tty/sysrq.c
+++ b/drivers/tty/sysrq.c
@@ -375,7 +375,7 @@ static void moom_callback(struct work_st
mutex_lock(&oom_lock);
if (!out_of_memory(&oc))
- pr_info("OOM request ignored because killer is disabled\n");
+ pr_info("OOM request ignored. No task eligible\n");
mutex_unlock(&oom_lock);
}
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -706,6 +706,7 @@ void exit_oom_victim(void)
void oom_killer_enable(void)
{
oom_killer_disabled = false;
+ pr_info("OOM killer enabled.\n");
}
/**
@@ -742,6 +743,7 @@ bool oom_killer_disable(signed long time
oom_killer_enable();
return false;
}
+ pr_info("OOM killer disabled.\n");
return true;
}
Patches currently in stable-queue which might be from mhocko(a)suse.com are
queue-4.9/mm-fix-check-for-reclaimable-pages-in-pf_memalloc-reclaim-throttling.patch
queue-4.9/oom-improve-oom-disable-handling.patch
Currently it is possible to read and/or write to suspend EB's.
Writing /dev/mtdX or /dev/mtdblockX from several processes may
break the flash state machine.
Taken from cfi_cmdset_0001 driver.
Signed-off-by: Joakim Tjernlund <joakim.tjernlund(a)infinera.com>
Cc: <stable(a)vger.kernel.org>
---
drivers/mtd/chips/cfi_cmdset_0002.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
index 56aa6b75213d..d524a64ed754 100644
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -816,9 +816,10 @@ static int get_chip(struct map_info *map, struct flchip *chip, unsigned long adr
(mode == FL_WRITING && (cfip->EraseSuspend & 0x2))))
goto sleep;
- /* We could check to see if we're trying to access the sector
- * that is currently being erased. However, no user will try
- * anything like that so we just wait for the timeout. */
+ /* Do not allow suspend iff read/write to EB address */
+ if ((adr & chip->in_progress_block_mask) ==
+ chip->in_progress_block_addr)
+ goto sleep;
/* Erase suspend */
/* It's harmless to issue the Erase-Suspend and Erase-Resume
@@ -2267,6 +2268,7 @@ static int __xipram do_erase_chip(struct map_info *map, struct flchip *chip)
chip->state = FL_ERASING;
chip->erase_suspended = 0;
chip->in_progress_block_addr = adr;
+ chip->in_progress_block_mask = ~(map->size - 1);
INVALIDATE_CACHE_UDELAY(map, chip,
adr, map->size,
@@ -2356,6 +2358,7 @@ static int __xipram do_erase_oneblock(struct map_info *map, struct flchip *chip,
chip->state = FL_ERASING;
chip->erase_suspended = 0;
chip->in_progress_block_addr = adr;
+ chip->in_progress_block_mask = ~(len - 1);
INVALIDATE_CACHE_UDELAY(map, chip,
adr, len,
--
2.13.6
This is a note to let you know that I've just added the patch titled
x86: i8259: export legacy_pic symbol
to the 3.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
x86-i8259-export-legacy_pic-symbol.patch
and it can be found in the queue-3.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Thu Mar 22 15:16:04 CET 2018
From: Hans de Goede <hdegoede(a)redhat.com>
Date: Sat, 8 Apr 2017 19:54:20 +0200
Subject: x86: i8259: export legacy_pic symbol
From: Hans de Goede <hdegoede(a)redhat.com>
[ Upstream commit 7ee06cb2f840a96be46233181ed4557901a74385 ]
The classic PC rtc-coms driver has a workaround for broken ACPI device
nodes for it which lack an irq resource. This workaround used to
unconditionally hardcode the irq to 8 in these cases.
This was causing irq conflict problems on systems without a legacy-pic
so a recent patch added an if (nr_legacy_irqs()) guard to the
workaround to avoid this irq conflict.
nr_legacy_irqs() uses the legacy_pic symbol under the hood causing
an undefined symbol error if the rtc-cmos code is build as a module.
This commit exports the legacy_pic symbol to fix this.
Cc: rtc-linux(a)googlegroups.com
Cc: alexandre.belloni(a)free-electrons.com
Signed-off-by: Hans de Goede <hdegoede(a)redhat.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni(a)free-electrons.com>
Signed-off-by: Sasha Levin <alexander.levin(a)microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
arch/x86/kernel/i8259.c | 1 +
1 file changed, 1 insertion(+)
--- a/arch/x86/kernel/i8259.c
+++ b/arch/x86/kernel/i8259.c
@@ -405,6 +405,7 @@ struct legacy_pic default_legacy_pic = {
};
struct legacy_pic *legacy_pic = &default_legacy_pic;
+EXPORT_SYMBOL(legacy_pic);
static int __init i8259A_init_ops(void)
{
Patches currently in stable-queue which might be from hdegoede(a)redhat.com are
queue-3.18/genirq-use-irqd_get_trigger_type-to-compare-the-trigger-type-for-shared-irqs.patch
queue-3.18/x86-i8259-export-legacy_pic-symbol.patch
This is a note to let you know that I've just added the patch titled
wan: pc300too: abort path on failure
to the 3.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
wan-pc300too-abort-path-on-failure.patch
and it can be found in the queue-3.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Thu Mar 22 15:16:04 CET 2018
From: Pan Bian <bianpan2016(a)163.com>
Date: Sun, 23 Apr 2017 17:38:35 +0800
Subject: wan: pc300too: abort path on failure
From: Pan Bian <bianpan2016(a)163.com>
[ Upstream commit 2a39e7aa8a98f777f0732ca7125b6c9668791760 ]
In function pc300_pci_init_one(), on the ioremap error path, function
pc300_pci_remove_one() is called to free the allocated memory. However,
the path is not terminated, and the freed memory will be used later,
resulting in use-after-free bugs. This path fixes the bug.
Signed-off-by: Pan Bian <bianpan2016(a)163.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin(a)microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/wan/pc300too.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/net/wan/pc300too.c
+++ b/drivers/net/wan/pc300too.c
@@ -347,6 +347,7 @@ static int pc300_pci_init_one(struct pci
card->rambase == NULL) {
pr_err("ioremap() failed\n");
pc300_pci_remove_one(pdev);
+ return -ENOMEM;
}
/* PLX PCI 9050 workaround for local configuration register read bug */
Patches currently in stable-queue which might be from bianpan2016(a)163.com are
queue-3.18/rndis_wlan-add-return-value-validation.patch
queue-3.18/qlcnic-fix-unchecked-return-value.patch
queue-3.18/wan-pc300too-abort-path-on-failure.patch