This is the start of the stable review cycle for the 4.9.151 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 Thu Jan 17 15:48:25 UTC 2019.
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.9.151-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.9.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.9.151-rc1
Vasily Averin <vvs(a)virtuozzo.com>
sunrpc: use-after-free in svc_process_common()
Theodore Ts'o <tytso(a)mit.edu>
ext4: avoid kernel warning when writing the superblock to a dead device
Theodore Ts'o <tytso(a)mit.edu>
ext4: fix a potential fiemap/page fault deadlock w/ inline_data
Theodore Ts'o <tytso(a)mit.edu>
ext4: make sure enough credits are reserved for dioread_nolock writes
Ilya Dryomov <idryomov(a)gmail.com>
rbd: don't return 0 on unmap if RBD_DEV_FLAG_REMOVING is set
Yi Zeng <yizeng(a)asrmicro.com>
i2c: dev: prevent adapter retries and timeout being set as minus value
Hans de Goede <hdegoede(a)redhat.com>
ACPI: power: Skip duplicate power resource references in _PRx
Jan Stancek <jstancek(a)redhat.com>
mm: page_mapped: don't assume compound page is huge or THP
Christoph Lameter <cl(a)linux.com>
slab: alien caches must not be initialized if the allocation of the alien cache failed
Jack Stocker <jackstocker.93(a)gmail.com>
USB: Add USB_QUIRK_DELAY_CTRL_MSG quirk for Corsair K70 RGB
Icenowy Zheng <icenowy(a)aosc.io>
USB: storage: add quirk for SMI SM3350
Icenowy Zheng <icenowy(a)aosc.io>
USB: storage: don't insert sane sense for SPC3+ when bad sense specified
Daniele Palmas <dnlplm(a)gmail.com>
usb: cdc-acm: send ZLP for Telit 3G Intel based modems
Ross Lagerwall <ross.lagerwall(a)citrix.com>
cifs: Fix potential OOB access of lock element array
Pavel Shilovsky <pshilov(a)microsoft.com>
CIFS: Do not hide EINTR after sending network packets
Kailang Yang <kailang(a)realtek.com>
ALSA: hda/realtek - Disable headset Mic VREF for headset mode of ALC225
-------------
Diffstat:
Makefile | 4 ++--
drivers/acpi/power.c | 22 ++++++++++++++++++++++
drivers/block/rbd.c | 9 ++++-----
drivers/i2c/i2c-dev.c | 6 ++++++
drivers/usb/class/cdc-acm.c | 7 +++++++
drivers/usb/core/quirks.c | 3 ++-
drivers/usb/storage/scsiglue.c | 8 ++++++--
drivers/usb/storage/unusual_devs.h | 12 ++++++++++++
fs/cifs/file.c | 8 ++++----
fs/cifs/smb2file.c | 4 ++--
fs/cifs/transport.c | 2 +-
fs/ext4/inline.c | 6 +++---
fs/ext4/inode.c | 3 ++-
fs/ext4/super.c | 2 +-
include/linux/sunrpc/svc.h | 5 ++++-
mm/slab.c | 6 ++++--
mm/util.c | 2 +-
net/sunrpc/svc.c | 9 ++++++---
net/sunrpc/svc_xprt.c | 5 +++--
net/sunrpc/svcsock.c | 2 +-
sound/pci/hda/patch_realtek.c | 16 +++++++++++++++-
21 files changed, 108 insertions(+), 33 deletions(-)
This is the start of the stable review cycle for the 4.4.171 release.
There are 51 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 Thu Jan 17 15:48:21 UTC 2019.
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.4.171-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.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 4.4.171-rc1
Vasily Averin <vvs(a)virtuozzo.com>
sunrpc: use-after-free in svc_process_common()
Theodore Ts'o <tytso(a)mit.edu>
ext4: fix a potential fiemap/page fault deadlock w/ inline_data
Eric Biggers <ebiggers(a)google.com>
crypto: cts - fix crash on short inputs
Yi Zeng <yizeng(a)asrmicro.com>
i2c: dev: prevent adapter retries and timeout being set as minus value
Hans de Goede <hdegoede(a)redhat.com>
ACPI: power: Skip duplicate power resource references in _PRx
Ley Foon Tan <lftan(a)altera.com>
PCI: altera: Move retrain from fixup to altera_pcie_host_init()
Ley Foon Tan <lftan(a)altera.com>
PCI: altera: Rework config accessors for use without a struct pci_bus
Ley Foon Tan <lftan(a)altera.com>
PCI: altera: Poll for link training status after retraining the link
Ley Foon Tan <lftan(a)altera.com>
PCI: altera: Poll for link up status after retraining the link
Ley Foon Tan <lftan(a)altera.com>
PCI: altera: Check link status before retrain link
Bjorn Helgaas <bhelgaas(a)google.com>
PCI: altera: Reorder read/write functions
Ley Foon Tan <lftan(a)altera.com>
PCI: altera: Fix altera_pcie_link_is_up()
Christoph Lameter <cl(a)linux.com>
slab: alien caches must not be initialized if the allocation of the alien cache failed
Jack Stocker <jackstocker.93(a)gmail.com>
USB: Add USB_QUIRK_DELAY_CTRL_MSG quirk for Corsair K70 RGB
Icenowy Zheng <icenowy(a)aosc.io>
USB: storage: add quirk for SMI SM3350
Icenowy Zheng <icenowy(a)aosc.io>
USB: storage: don't insert sane sense for SPC3+ when bad sense specified
Daniele Palmas <dnlplm(a)gmail.com>
usb: cdc-acm: send ZLP for Telit 3G Intel based modems
Ross Lagerwall <ross.lagerwall(a)citrix.com>
cifs: Fix potential OOB access of lock element array
Pavel Shilovsky <pshilov(a)microsoft.com>
CIFS: Do not hide EINTR after sending network packets
Shaokun Zhang <zhangshaokun(a)hisilicon.com>
btrfs: tree-checker: Fix misleading group system information
Qu Wenruo <wqu(a)suse.com>
btrfs: tree-checker: Check level for leaves and nodes
Qu Wenruo <wqu(a)suse.com>
btrfs: Verify that every chunk has corresponding block group at mount time
Qu Wenruo <wqu(a)suse.com>
btrfs: Check that each block group has corresponding chunk at mount time
Gu Jinxiang <gujx(a)cn.fujitsu.com>
btrfs: validate type when reading a chunk
Qu Wenruo <wqu(a)suse.com>
btrfs: tree-checker: Detect invalid and empty essential trees
Qu Wenruo <wqu(a)suse.com>
btrfs: tree-checker: Verify block_group_item
David Sterba <dsterba(a)suse.com>
btrfs: tree-check: reduce stack consumption in check_dir_item
Arnd Bergmann <arnd(a)arndb.de>
btrfs: tree-checker: use %zu format string for size_t
Qu Wenruo <wqu(a)suse.com>
btrfs: tree-checker: Add checker for dir item
Qu Wenruo <wqu(a)suse.com>
btrfs: tree-checker: Fix false panic for sanity test
Qu Wenruo <quwenruo.btrfs(a)gmx.com>
btrfs: tree-checker: Enhance btrfs_check_node output
Qu Wenruo <quwenruo.btrfs(a)gmx.com>
btrfs: Move leaf and node validation checker to tree-checker.c
Qu Wenruo <quwenruo.btrfs(a)gmx.com>
btrfs: Add checker for EXTENT_CSUM
Qu Wenruo <quwenruo.btrfs(a)gmx.com>
btrfs: Add sanity check for EXTENT_DATA when reading out leaf
Qu Wenruo <quwenruo.btrfs(a)gmx.com>
btrfs: Check if item pointer overlaps with the item itself
Qu Wenruo <quwenruo.btrfs(a)gmx.com>
btrfs: Refactor check_leaf function for later expansion
Jeff Mahoney <jeffm(a)suse.com>
btrfs: struct-funcs, constify readers
Filipe Manana <fdmanana(a)suse.com>
Btrfs: fix emptiness check for dirtied extent buffers at check_leaf()
Liu Bo <bo.li.liu(a)oracle.com>
Btrfs: memset to avoid stale content in btree leaf
Liu Bo <bo.li.liu(a)oracle.com>
Btrfs: kill BUG_ON in run_delayed_tree_ref
Liu Bo <bo.li.liu(a)oracle.com>
Btrfs: improve check_node to avoid reading corrupted nodes
Liu Bo <bo.li.liu(a)oracle.com>
Btrfs: memset to avoid stale content in btree node block
Liu Bo <bo.li.liu(a)oracle.com>
Btrfs: fix BUG_ON in btrfs_mark_buffer_dirty
Liu Bo <bo.li.liu(a)oracle.com>
Btrfs: check btree node's nritems
Liu Bo <bo.li.liu(a)oracle.com>
Btrfs: detect corruption when non-root leaf has zero item
Josef Bacik <jbacik(a)fb.com>
Btrfs: fix em leak in find_first_block_group
Liu Bo <bo.li.liu(a)oracle.com>
Btrfs: check inconsistence between chunk and block group
Liu Bo <bo.li.liu(a)oracle.com>
Btrfs: add validadtion checks for chunk loading
Qu Wenruo <quwenruo(a)cn.fujitsu.com>
btrfs: Enhance chunk validation check
Jeff Mahoney <jeffm(a)suse.com>
btrfs: cleanup, stop casting for extent_map->lookup everywhere
Kailang Yang <kailang(a)realtek.com>
ALSA: hda/realtek - Disable headset Mic VREF for headset mode of ALC225
-------------
Diffstat:
Makefile | 4 +-
crypto/cts.c | 8 +-
drivers/acpi/power.c | 22 ++
drivers/i2c/i2c-dev.c | 6 +
drivers/pci/host/pcie-altera.c | 201 +++++++++---
drivers/usb/class/cdc-acm.c | 7 +
drivers/usb/core/quirks.c | 3 +-
drivers/usb/storage/scsiglue.c | 8 +-
drivers/usb/storage/unusual_devs.h | 12 +
fs/btrfs/Makefile | 2 +-
fs/btrfs/ctree.c | 14 -
fs/btrfs/ctree.h | 141 ++++----
fs/btrfs/dev-replace.c | 2 +-
fs/btrfs/disk-io.c | 80 +----
fs/btrfs/extent-tree.c | 112 ++++++-
fs/btrfs/extent_io.c | 43 ++-
fs/btrfs/extent_io.h | 19 +-
fs/btrfs/extent_map.c | 2 +-
fs/btrfs/extent_map.h | 10 +-
fs/btrfs/scrub.c | 2 +-
fs/btrfs/struct-funcs.c | 9 +-
fs/btrfs/tree-checker.c | 649 +++++++++++++++++++++++++++++++++++++
fs/btrfs/tree-checker.h | 38 +++
fs/btrfs/volumes.c | 139 +++++++-
fs/btrfs/volumes.h | 2 +
fs/cifs/file.c | 8 +-
fs/cifs/smb2file.c | 4 +-
fs/cifs/transport.c | 2 +-
fs/ext4/inline.c | 6 +-
include/linux/sunrpc/svc.h | 5 +-
mm/slab.c | 6 +-
net/sunrpc/svc.c | 10 +-
net/sunrpc/svc_xprt.c | 5 +-
net/sunrpc/svcsock.c | 2 +-
sound/pci/hda/patch_realtek.c | 16 +-
35 files changed, 1324 insertions(+), 275 deletions(-)
power off the phy should be done before populate the phy. Otherwise,
am335x_init() could be called by the phy owner to power on the phy first,
then am335x_phy_probe() turns off the phy again without the caller knowing
it.
Fixes: 2fc711d76352 ("usb: phy: am335x: Enable USB remote wakeup using PHY wakeup")
Cc: stable(a)vger.kernel.org # v3.18+
Signed-off-by: Bin Liu <b-liu(a)ti.com>
---
drivers/usb/phy/phy-am335x.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/usb/phy/phy-am335x.c b/drivers/usb/phy/phy-am335x.c
index 27bdb7222527..f5f0568d8533 100644
--- a/drivers/usb/phy/phy-am335x.c
+++ b/drivers/usb/phy/phy-am335x.c
@@ -61,9 +61,6 @@ static int am335x_phy_probe(struct platform_device *pdev)
if (ret)
return ret;
- ret = usb_add_phy_dev(&am_phy->usb_phy_gen.phy);
- if (ret)
- return ret;
am_phy->usb_phy_gen.phy.init = am335x_init;
am_phy->usb_phy_gen.phy.shutdown = am335x_shutdown;
@@ -82,7 +79,7 @@ static int am335x_phy_probe(struct platform_device *pdev)
device_set_wakeup_enable(dev, false);
phy_ctrl_power(am_phy->phy_ctrl, am_phy->id, am_phy->dr_mode, false);
- return 0;
+ return usb_add_phy_dev(&am_phy->usb_phy_gen.phy);
}
static int am335x_phy_remove(struct platform_device *pdev)
--
2.17.1
From: Bartosz Golaszewski <bgolaszewski(a)baylibre.com>
Nested interrupts run inside the calling thread's context and the top
half handler is never called which means that we never read the
timestamp.
This issue came up when trying to read line events from a gpiochip
using regmap_irq_chip for interrupts.
Fix it by reading the timestamp from the irq thread function if it's
still 0 by the time the second handler is called.
Fixes: d58f2bf261fd ("gpio: Timestamp events in hardirq handler")
Cc: stable(a)vger.kernel.org
Signed-off-by: Bartosz Golaszewski <bgolaszewski(a)baylibre.com>
---
Hi Sasha,
this is a backport for v4.19.y series. The original patch didn't apply
due to a conflict.
drivers/gpio/gpiolib.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index a8e01d99919c..b3ab6c428423 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -817,7 +817,15 @@ static irqreturn_t lineevent_irq_thread(int irq, void *p)
/* Do not leak kernel stack to userspace */
memset(&ge, 0, sizeof(ge));
- ge.timestamp = le->timestamp;
+ /*
+ * We may be running from a nested threaded interrupt in which case
+ * we didn't get the timestamp from lineevent_irq_handler().
+ */
+ if (!le->timestamp)
+ ge.timestamp = ktime_get_real_ns();
+ else
+ ge.timestamp = le->timestamp;
+
level = gpiod_get_value_cansleep(le->desc);
if (le->eflags & GPIOEVENT_REQUEST_RISING_EDGE
--
2.19.1
This is an automatic generated email to let you know that the following patch were queued:
Subject: media: vim2m: only cancel work if it is for right context
Author: Hans Verkuil <hverkuil(a)xs4all.nl>
Date: Fri Jan 11 07:07:25 2019 -0500
cancel_delayed_work_sync() was called for any queue, but it should only
be called for the queue that is associated with the currently running job.
Otherwise, if two filehandles are streaming at the same time, then closing the
first will cancel the work which might still be running for a job from the
second filehandle. As a result the second filehandle will never be able to
finish the job and an attempt to stop streaming on that second filehandle will
stall.
Fixes: 52117be68b82 ("media: vim2m: use cancel_delayed_work_sync instead of flush_schedule_work")
Signed-off-by: Hans Verkuil <hverkuil-cisco(a)xs4all.nl>
Cc: <stable(a)vger.kernel.org> # for v4.20 and up
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung(a)kernel.org>
drivers/media/platform/vim2m.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/drivers/media/platform/vim2m.c b/drivers/media/platform/vim2m.c
index d01821a6906a..89d9c4c21037 100644
--- a/drivers/media/platform/vim2m.c
+++ b/drivers/media/platform/vim2m.c
@@ -807,7 +807,9 @@ static void vim2m_stop_streaming(struct vb2_queue *q)
struct vb2_v4l2_buffer *vbuf;
unsigned long flags;
- cancel_delayed_work_sync(&dev->work_run);
+ if (v4l2_m2m_get_curr_priv(dev->m2m_dev) == ctx)
+ cancel_delayed_work_sync(&dev->work_run);
+
for (;;) {
if (V4L2_TYPE_IS_OUTPUT(q->type))
vbuf = v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx);
This is an automatic generated email to let you know that the following patch were queued:
Subject: media: v4l: ioctl: Validate num_planes for debug messages
Author: Sakari Ailus <sakari.ailus(a)linux.intel.com>
Date: Thu Jan 10 09:24:26 2019 -0500
The num_planes field in struct v4l2_pix_format_mplane is used in a loop
before validating it. As the use is printing a debug message in this case,
just cap the value to the maximum allowed.
Signed-off-by: Sakari Ailus <sakari.ailus(a)linux.intel.com>
Cc: stable(a)vger.kernel.org
Reviewed-by: Thierry Reding <treding(a)nvidia.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco(a)xs4all.nl>
Cc: <stable(a)vger.kernel.org> # for v4.12 and up
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung(a)kernel.org>
drivers/media/v4l2-core/v4l2-ioctl.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
index 44bc7c4f1c11..90aad465f9ed 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -287,6 +287,7 @@ static void v4l_print_format(const void *arg, bool write_only)
const struct v4l2_window *win;
const struct v4l2_sdr_format *sdr;
const struct v4l2_meta_format *meta;
+ u32 planes;
unsigned i;
pr_cont("type=%s", prt_names(p->type, v4l2_type_names));
@@ -317,7 +318,8 @@ static void v4l_print_format(const void *arg, bool write_only)
prt_names(mp->field, v4l2_field_names),
mp->colorspace, mp->num_planes, mp->flags,
mp->ycbcr_enc, mp->quantization, mp->xfer_func);
- for (i = 0; i < mp->num_planes; i++)
+ planes = min_t(u32, mp->num_planes, VIDEO_MAX_PLANES);
+ for (i = 0; i < planes; i++)
printk(KERN_DEBUG "plane %u: bytesperline=%u sizeimage=%u\n", i,
mp->plane_fmt[i].bytesperline,
mp->plane_fmt[i].sizeimage);
Hi Sasha,
On 1/16/19 2:36 PM, Sasha Levin wrote:
> Hi,
>
> [This is an automated email]
>
> This commit has been processed because it contains a -stable tag.
> The stable tag indicates that it's relevant for the following trees: 2.6.26+
>
> The bot has tested the following trees: v4.20.2, v4.19.15, v4.14.93, v4.9.150, v4.4.170, v3.18.132.
>
> v4.20.2: Build OK!
> v4.19.15: Build OK!
> v4.14.93: Build OK!
> v4.9.150: Build OK!
> v4.4.170: Failed to apply! Possible dependencies:
> 2b5f5f5dc114 ("can: bcm: unify bcm_msg_head handling and prepare function parameters")
> 6f3b911d5f29 ("can: bcm: add support for CAN FD frames")
> 72c8a89ad2e4 ("can: bcm: use CAN frame instead of can_frame in comments")
> 95acb490ec51 ("can: bcm: fix indention and other minor style issues")
>
> v3.18.132: Failed to apply! Possible dependencies:
> 069f8457ae52 ("can: fix spelling errors")
> 2b5f5f5dc114 ("can: bcm: unify bcm_msg_head handling and prepare function parameters")
> 6ce8e9ce5989 ("new helper: memcpy_from_msg()")
> 6f3b911d5f29 ("can: bcm: add support for CAN FD frames")
> 72c8a89ad2e4 ("can: bcm: use CAN frame instead of can_frame in comments")
> 95acb490ec51 ("can: bcm: fix indention and other minor style issues")
> ba61a8d9d780 ("can: avoid using timeval for uapi")
>
>
> How should we proceed with this patch?
Applying the patch on e.g. 3.2.102 also leads to
patching file net/can/bcm.c
Hunk #1 FAILED at 67.
Hunk #2 FAILED at 140.
Hunk #3 succeeded at 847 with fuzz 2 (offset -26 lines).
Hunk #4 succeeded at 1018 with fuzz 2 (offset -39 lines).
2 out of 4 hunks FAILED -- saving rejects to file net/can/bcm.c.rej
The first two hunks just adding a define and and function *somewhere* at
the top of the C file.
I can provide patches for the requested stable kernels once we have a
reference for the upstream commit hash.
Would that be ok for you?
Best regards,
Oliver
śr., 16 sty 2019 o 14:35 Sasha Levin <sashal(a)kernel.org> napisał(a):
>
> Hi,
>
> [This is an automated email]
>
> This commit has been processed because it contains a "Fixes:" tag,
> fixing commit: d58f2bf261fd gpio: Timestamp events in hardirq handler.
>
> The bot has tested the following trees: v4.20.2, v4.19.15.
>
> v4.20.2: Build OK!
> v4.19.15: Failed to apply! Possible dependencies:
> Unable to calculate
>
>
> How should we proceed with this patch?
>
I sent a backport of this patch.
Bart
> --
> Thanks,
> Sasha
On 1/16/19 7:35 AM, Sasha Levin wrote:
> Hi,
>
> [This is an automated email]
>
> This commit has been processed because it contains a -stable tag.
> The stable tag indicates that it's relevant for the following trees: all
>
> The bot has tested the following trees: v4.20.2, v4.19.15, v4.14.93, v4.9.150, v4.4.170, v3.18.132.
I'll pull these into my tree.
It sounds like you want this in ASAP, I can do that, though this
interface is
lower priority, I would think, because it's generally root access only.
-corey
>
> v4.20.2: Build OK!
> v4.19.15: Build OK!
> v4.14.93: Failed to apply! Possible dependencies:
> 1c9f98d1bfbd ("ipmi: Make IPMI panic strings always available")
> 3fd32f9ec84f ("ipmi: Convert IPMI GUID over to Linux guid_t")
> 511d57dc71a2 ("ipmi: Get the device id through a function")
> 68e7e50f195f ("ipmi: Don't use BMC product/dev ids in the BMC name")
> 9ca15af3164f ("ipmi: Fix issues with BMC refcounts")
> a2cb600fa22a ("ipmi: Rework BMC registration")
> a9137c3dfae9 ("ipmi: Add a reference from BMC devices to their interfaces")
> aa9c9ab2443e ("ipmi: allow dynamic BMC version information")
> b2cfd8ab4add ("ipmi: Rework device id and guid handling to catch changing BMCs")
> c0734bd594d4 ("ipmi: Retry BMC registration on a failure")
> f33e4df83e00 ("ipmi: Move bmc find routing to below bmc device type")
>
> v4.9.150: Failed to apply! Possible dependencies:
> 1c9f98d1bfbd ("ipmi: Make IPMI panic strings always available")
> 3fd32f9ec84f ("ipmi: Convert IPMI GUID over to Linux guid_t")
> 511d57dc71a2 ("ipmi: Get the device id through a function")
> 68e7e50f195f ("ipmi: Don't use BMC product/dev ids in the BMC name")
> 9ca15af3164f ("ipmi: Fix issues with BMC refcounts")
> a2cb600fa22a ("ipmi: Rework BMC registration")
> a9137c3dfae9 ("ipmi: Add a reference from BMC devices to their interfaces")
> aa9c9ab2443e ("ipmi: allow dynamic BMC version information")
> b2cfd8ab4add ("ipmi: Rework device id and guid handling to catch changing BMCs")
> c0734bd594d4 ("ipmi: Retry BMC registration on a failure")
> f33e4df83e00 ("ipmi: Move bmc find routing to below bmc device type")
>
> v4.4.170: Failed to apply! Possible dependencies:
> 1c9f98d1bfbd ("ipmi: Make IPMI panic strings always available")
> 3fd32f9ec84f ("ipmi: Convert IPMI GUID over to Linux guid_t")
> 511d57dc71a2 ("ipmi: Get the device id through a function")
> 68e7e50f195f ("ipmi: Don't use BMC product/dev ids in the BMC name")
> 9ca15af3164f ("ipmi: Fix issues with BMC refcounts")
> a2cb600fa22a ("ipmi: Rework BMC registration")
> a9137c3dfae9 ("ipmi: Add a reference from BMC devices to their interfaces")
> aa9c9ab2443e ("ipmi: allow dynamic BMC version information")
> b2cfd8ab4add ("ipmi: Rework device id and guid handling to catch changing BMCs")
> bd85f4b37ddf ("ipmi: fix crash on reading version from proc after unregisted bmc")
> c0734bd594d4 ("ipmi: Retry BMC registration on a failure")
> f33e4df83e00 ("ipmi: Move bmc find routing to below bmc device type")
>
> v3.18.132: Failed to apply! Possible dependencies:
> 16639eb08a69 ("ipmi: clean up the device handling for the bmc device")
> 1c9f98d1bfbd ("ipmi: Make IPMI panic strings always available")
> 3fd32f9ec84f ("ipmi: Convert IPMI GUID over to Linux guid_t")
> 5a0e10ec4a82 ("ipmi: Remove useless sysfs_name parameters")
> 9ca15af3164f ("ipmi: Fix issues with BMC refcounts")
> a2cb600fa22a ("ipmi: Rework BMC registration")
> a9137c3dfae9 ("ipmi: Add a reference from BMC devices to their interfaces")
> aa9c9ab2443e ("ipmi: allow dynamic BMC version information")
> b2cfd8ab4add ("ipmi: Rework device id and guid handling to catch changing BMCs")
> bd85f4b37ddf ("ipmi: fix crash on reading version from proc after unregisted bmc")
> c0734bd594d4 ("ipmi: Retry BMC registration on a failure")
> f33e4df83e00 ("ipmi: Move bmc find routing to below bmc device type")
>
>
> How should we proceed with this patch?
>
> --
> Thanks,
> Sasha
The cached writeback mapping is EOF trimmed to try and avoid races
between post-eof block management and writeback that result in
sending cached data to a stale location. The cached mapping is
currently trimmed on the validation check, which leaves a race
window between the time the mapping is cached and when it is trimmed
against the current inode size.
For example, if a new mapping is cached by delalloc conversion on a
blocksize == page size fs, we could cycle various locks, perform
memory allocations, etc. in the writeback codepath before the
associated mapping is eventually trimmed to i_size. This leaves
enough time for a post-eof truncate and file append before the
cached mapping is trimmed. The former event essentially invalidates
a range of the cached mapping and the latter bumps the inode size
such the trim on the next writepage event won't trim all of the
invalid blocks. fstest generic/464 reproduces this scenario
occasionally and causes a lost writeback and stale delalloc blocks
warning on inode inactivation.
To work around this problem, trim the cached writeback mapping as
soon as it is cached in addition to on subsequent validation checks.
This is a minor tweak to tighten the race window as much as possible
until a proper invalidation mechanism is available.
Fixes: 40214d128e07 ("xfs: trim writepage mapping to within eof")
Cc: <stable(a)vger.kernel.org> # v4.14+
Signed-off-by: Brian Foster <bfoster(a)redhat.com>
---
fs/xfs/xfs_aops.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
index 338b9d9984e0..d9048bcea49c 100644
--- a/fs/xfs/xfs_aops.c
+++ b/fs/xfs/xfs_aops.c
@@ -449,6 +449,7 @@ xfs_map_blocks(
}
wpc->imap = imap;
+ xfs_trim_extent_eof(&wpc->imap, ip);
trace_xfs_map_blocks_found(ip, offset, count, wpc->io_type, &imap);
return 0;
allocate_blocks:
@@ -459,6 +460,7 @@ xfs_map_blocks(
ASSERT(whichfork == XFS_COW_FORK || cow_fsb == NULLFILEOFF ||
imap.br_startoff + imap.br_blockcount <= cow_fsb);
wpc->imap = imap;
+ xfs_trim_extent_eof(&wpc->imap, ip);
trace_xfs_map_blocks_alloc(ip, offset, count, wpc->io_type, &imap);
return 0;
}
--
2.17.2
On 1/16/19 2:35 PM, Sasha Levin wrote:
> Hi,
>
> [This is an automated email]
>
> This commit has been processed because it contains a -stable tag.
> The stable tag indicates that it's relevant for the following trees: all
>
> The bot has tested the following trees: v4.20.2, v4.19.15, v4.14.93, v4.9.150, v4.4.170, v3.18.132.
>
> v4.20.2: Build OK!
> v4.19.15: Build OK!
> v4.14.93: Build OK!
> v4.9.150: Failed to apply! Possible dependencies:
> fb9ffa6a7f7e ("[media] v4l: Add metadata buffer type and format")
>
> v4.4.170: Failed to apply! Possible dependencies:
> 0579e6e3a326 ("doc-rst: linux_tv: remove whitespaces")
> 17defc282fe6 ("Documentation: add meta-documentation for Sphinx and kernel-doc")
> 22cba31bae9d ("Documentation/sphinx: add basic working Sphinx configuration and build")
> 234d549662a7 ("doc-rst: video: use reference for VIDIOC_ENUMINPUT")
> 5377d91f3e88 ("doc-rst: linux_tv DocBook to reST migration (docs-next)")
> 7347081e8a52 ("doc-rst: linux_tv: simplify references")
> 789818845202 ("doc-rst: audio: Fix some cross references")
> 94fff0dc5333 ("doc-rst: dmx_fcalls: improve man-like format")
> 9e00ffca8cc7 ("doc-rst: querycap: fix troubles on some references")
> af4a4d0db8ab ("doc-rst: linux_tv: Replace reference names to match ioctls")
> c2b66cafdf02 ("[media] v4l: doc: Remove row numbers from tables")
> e6702ee18e24 ("doc-rst: app-pri: Fix a bad reference")
> fb9ffa6a7f7e ("[media] v4l: Add metadata buffer type and format")
>
> v3.18.132: Failed to apply! Possible dependencies:
> 0579e6e3a326 ("doc-rst: linux_tv: remove whitespaces")
> 17defc282fe6 ("Documentation: add meta-documentation for Sphinx and kernel-doc")
> 22cba31bae9d ("Documentation/sphinx: add basic working Sphinx configuration and build")
> 5377d91f3e88 ("doc-rst: linux_tv DocBook to reST migration (docs-next)")
> 5699f871d2d5 ("scripts/kernel-doc: Adding cross-reference links to html documentation.")
> 7347081e8a52 ("doc-rst: linux_tv: simplify references")
> af4a4d0db8ab ("doc-rst: linux_tv: Replace reference names to match ioctls")
> b479bfd00e46 ("DocBook: Use a fixed encoding for output")
> c2b66cafdf02 ("[media] v4l: doc: Remove row numbers from tables")
> e6702ee18e24 ("doc-rst: app-pri: Fix a bad reference")
> fb9ffa6a7f7e ("[media] v4l: Add metadata buffer type and format")
>
>
> How should we proceed with this patch?
The Cc to stable of this patch in the pending pull request has a 'for v4.12 and up':
https://git.linuxtv.org/hverkuil/media_tree.git/commit/?h=for-v5.0a&id=8015…
So no need to patch pre-4.12 kernels.
Regards,
Hans
This patch fixes a build failure when using GCC 8.1:
/usr/bin/ld: block/partitions/ldm.o: in function `ldm_parse_tocblock':
block/partitions/ldm.c:153: undefined reference to `strcmp'
This is caused by a new optimization which effectively replaces a
strncmp() call with a strcmp() call. This affects a number of strncmp()
call sites in the kernel.
The entire class of optimizations is avoided with -fno-builtin, which
gets enabled by -ffreestanding. This may avoid possible future build
failures in case new optimizations appear in future compilers.
I haven't done any performance measurements with this patch but I did
count the function calls in a defconfig build. For example, there are now
23 more sprintf() calls and 39 fewer strcpy() calls. The effect on the
other libc functions is smaller.
If this harms performance we can tackle that regression by optimizing
the call sites, ideally using semantic patches. That way, clang and ICC
builds might benfit too.
Cc: stable(a)vger.kernel.org
Reference: https://marc.info/?l=linux-m68k&m=154514816222244&w=2
Signed-off-by: Finn Thain <fthain(a)telegraphics.com.au>
---
arch/m68k/Makefile | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/m68k/Makefile b/arch/m68k/Makefile
index 997c9f20ea0f..0a99c276d9a4 100644
--- a/arch/m68k/Makefile
+++ b/arch/m68k/Makefile
@@ -58,7 +58,8 @@ cpuflags-$(CONFIG_M5206e) := $(call cc-option,-mcpu=5206e,-m5200)
cpuflags-$(CONFIG_M5206) := $(call cc-option,-mcpu=5206,-m5200)
KBUILD_AFLAGS += $(cpuflags-y)
-KBUILD_CFLAGS += $(cpuflags-y) -pipe
+KBUILD_CFLAGS += $(cpuflags-y)
+
ifdef CONFIG_MMU
# without -fno-strength-reduce the 53c7xx.c driver fails ;-(
KBUILD_CFLAGS += -fno-strength-reduce -ffixed-a2
@@ -69,6 +70,8 @@ KBUILD_CFLAGS += -D__uClinux__
KBUILD_AFLAGS += -D__uClinux__
endif
+KBUILD_CFLAGS += -pipe -ffreestanding
+
KBUILD_LDFLAGS := -m m68kelf
KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds
--
2.19.2
Hi,
I recently updated the sparc32 root file system in my testbed
with one generated with buildroot.
As a result, sparc32 images no longer boot with v3.16.y and v3.18.y.
The system starts to come up, but stalls while starting syslog.
However, v3.16 and v3.18 do boot.
I bisected v3.18.y and ended up with commit 16c193364b4 ("sparc: Harden
signal return frame checks.") as culprit; bisect results below. Reverting
this commit fixes the problem for both v3.16.y and v3.18.y.
Is it worth spending any time on this, or should I just stop testing
sparc32 boot tests with v3.16.y and v3.18.y ?
Thanks,
Guenter
---
# bad: [fa42fea0d8b49ba65b49a999331950d74827a52d] Linux 3.18.131
# good: [b2776bf7149bddd1f4161f14f79520f17fc1d71d] Linux 3.18
git bisect start 'HEAD' 'v3.18'
# bad: [6e64ac0957e06a81b22f95f3509cc39b07735d3d] usb: increase ohci watchdog delay to 275 msec
git bisect bad 6e64ac0957e06a81b22f95f3509cc39b07735d3d
# good: [3e2003cccc9fb5f73a0d251dbb595f4c6e3a08bd] USB: usbfs: allow URBs to be reaped after disconnection
git bisect good 3e2003cccc9fb5f73a0d251dbb595f4c6e3a08bd
# good: [d6a1481f7411425041271c3084f3c2e399dc6526] ASoC: wm8958: Fix enum ctl accesses in a wrong type
git bisect good d6a1481f7411425041271c3084f3c2e399dc6526
# good: [bc4b57be51fa419cd870398624c763b7afb91154] Btrfs: make btrfs_abort_transaction consider existence of new block groups
git bisect good bc4b57be51fa419cd870398624c763b7afb91154
# bad: [b4d9416d6388fb450b397484e0ab85a154471723] of: fix memory leak related to safe_name()
git bisect bad b4d9416d6388fb450b397484e0ab85a154471723
# good: [35807de76e1c2b7d15eea2f947983fcd043a2db0] clk: rockchip: free memory in error cases when registering clock branches
git bisect good 35807de76e1c2b7d15eea2f947983fcd043a2db0
# bad: [cae1c6c281d8728e98f7e7a8950d6e64746b5bbc] netfilter: arp_tables: simplify translate_compat_table args
git bisect bad cae1c6c281d8728e98f7e7a8950d6e64746b5bbc
# good: [f02212dd4bd88826afccc36146177589eccb699b] tty: vt, return error when con_startup fails
git bisect good f02212dd4bd88826afccc36146177589eccb699b
# bad: [16c193364b4d6ff58c38c209e1e2b5c6fd674123] sparc: Harden signal return frame checks.
git bisect bad 16c193364b4d6ff58c38c209e1e2b5c6fd674123
# good: [09600dd82044bf676e875d3bd9c904193c31c1f0] sfc: on MC reset, clear PIO buffer linkage in TXQs
git bisect good 09600dd82044bf676e875d3bd9c904193c31c1f0
# good: [0396a871c4e3fbbaabb4f2632c1d388a04b68c84] sparc64: Fix numa node distance initialization
git bisect good 0396a871c4e3fbbaabb4f2632c1d388a04b68c84
# good: [2a3e4b3cbee2c53c53e82b6f593160fb6583b24e] sparc/PCI: Fix for panic while enabling SR-IOV
git bisect good 2a3e4b3cbee2c53c53e82b6f593160fb6583b24e
# good: [705de0f20b1751f5816952486589543aaaa0bcbe] sparc64: Take ctx_alloc_lock properly in hugetlb_setup().
git bisect good 705de0f20b1751f5816952486589543aaaa0bcbe
# first bad commit: [16c193364b4d6ff58c38c209e1e2b5c6fd674123] sparc: Harden signal return frame checks.
Changes since v1 [1]:
* Include another patch make sure that function-number zero can be
safely used as an invalid function number (Jeff)
* Add a comment clarifying why zero is an invalid function number (Jeff)
* Pass nfit_mem to cmd_to_func() (Jeff)
* Collect a Tested-by from Sujith
[1]: https://lists.01.org/pipermail/linux-nvdimm/2019-January/019435.html
---
Quote patch2 changelog:
The _DSM function number validation only happens to succeed when the
generic Linux command number translation corresponds with a
DSM-family-specific function number. This breaks NVDIMM-N
implementations that correctly implement _LSR, _LSW, and _LSI, but do
not happen to publish support for DSM function numbers 4, 5, and 6.
Recall that the support for _LS{I,R,W} family of methods results in the
DIMM being marked as supporting those command numbers at
acpi_nfit_register_dimms() time. The DSM function mask is only used for
ND_CMD_CALL support of non-NVDIMM_FAMILY_INTEL devices.
---
Dan Williams (2):
acpi/nfit: Block function zero DSMs
acpi/nfit: Fix command-supported detection
drivers/acpi/nfit/core.c | 53 ++++++++++++++++++++++++++++++++++------------
1 file changed, 39 insertions(+), 14 deletions(-)
The UEFI 2.7 specification sets expectations that the 'updating' flag is
eventually cleared. To date, the libnvdimm core has never adhered to
that protocol. The policy of the core matches the policy of other
multi-device info-block formats like MD-Software-RAID that expect
administrator intervention on inconsistent info-blocks, not automatic
invalidation.
However, some pre-boot environments may unfortunately attempt to "clean
up" the labels and invalidate a set when it fails to find at least one
"non-updating" label in the set. Clear the updating flag after set
updates to minimize the window of vulnerability to aggressive pre-boot
environments.
Ideally implementations would not write to the label area outside of
creating namespaces.
Note that this only minimizes the window, it does not close it as the
system can still crash while clearing the flag and the set can be
subsequently deleted / invalidated by the pre-boot environment.
Fixes: f524bf271a5c ("libnvdimm: write pmem label set")
Cc: <stable(a)vger.kernel.org>
Cc: Kelly Couch <kelly.j.couch(a)intel.com>
Signed-off-by: Dan Williams <dan.j.williams(a)intel.com>
---
drivers/nvdimm/label.c | 23 ++++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/drivers/nvdimm/label.c b/drivers/nvdimm/label.c
index a11bf4e6b451..6d6e9a12150b 100644
--- a/drivers/nvdimm/label.c
+++ b/drivers/nvdimm/label.c
@@ -755,7 +755,7 @@ static const guid_t *to_abstraction_guid(enum nvdimm_claim_class claim_class,
static int __pmem_label_update(struct nd_region *nd_region,
struct nd_mapping *nd_mapping, struct nd_namespace_pmem *nspm,
- int pos)
+ int pos, unsigned long flags)
{
struct nd_namespace_common *ndns = &nspm->nsio.common;
struct nd_interleave_set *nd_set = nd_region->nd_set;
@@ -796,7 +796,7 @@ static int __pmem_label_update(struct nd_region *nd_region,
memcpy(nd_label->uuid, nspm->uuid, NSLABEL_UUID_LEN);
if (nspm->alt_name)
memcpy(nd_label->name, nspm->alt_name, NSLABEL_NAME_LEN);
- nd_label->flags = __cpu_to_le32(NSLABEL_FLAG_UPDATING);
+ nd_label->flags = __cpu_to_le32(flags);
nd_label->nlabel = __cpu_to_le16(nd_region->ndr_mappings);
nd_label->position = __cpu_to_le16(pos);
nd_label->isetcookie = __cpu_to_le64(cookie);
@@ -1249,13 +1249,13 @@ static int del_labels(struct nd_mapping *nd_mapping, u8 *uuid)
int nd_pmem_namespace_label_update(struct nd_region *nd_region,
struct nd_namespace_pmem *nspm, resource_size_t size)
{
- int i;
+ int i, rc;
for (i = 0; i < nd_region->ndr_mappings; i++) {
struct nd_mapping *nd_mapping = &nd_region->mapping[i];
struct nvdimm_drvdata *ndd = to_ndd(nd_mapping);
struct resource *res;
- int rc, count = 0;
+ int count = 0;
if (size == 0) {
rc = del_labels(nd_mapping, nspm->uuid);
@@ -1273,7 +1273,20 @@ int nd_pmem_namespace_label_update(struct nd_region *nd_region,
if (rc < 0)
return rc;
- rc = __pmem_label_update(nd_region, nd_mapping, nspm, i);
+ rc = __pmem_label_update(nd_region, nd_mapping, nspm, i,
+ NSLABEL_FLAG_UPDATING);
+ if (rc)
+ return rc;
+ }
+
+ if (size == 0)
+ return 0;
+
+ /* Clear the UPDATING flag per UEFI 2.7 expectations */
+ for (i = 0; i < nd_region->ndr_mappings; i++) {
+ struct nd_mapping *nd_mapping = &nd_region->mapping[i];
+
+ rc = __pmem_label_update(nd_region, nd_mapping, nspm, i, 0);
if (rc)
return rc;
}
The patch
spi: omap2-mcspi: Fix DMA and FIFO event trigger size mismatch
has been applied to the spi tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From baf8b9f8d260c55a86405f70a384c29cda888476 Mon Sep 17 00:00:00 2001
From: Vignesh R <vigneshr(a)ti.com>
Date: Tue, 15 Jan 2019 12:28:32 +0530
Subject: [PATCH] spi: omap2-mcspi: Fix DMA and FIFO event trigger size
mismatch
Commit b682cffa3ac6 ("spi: omap2-mcspi: Set FIFO DMA trigger level to word length")
broke SPI transfers where bits_per_word != 8. This is because of
mimsatch between McSPI FIFO level event trigger size (SPI word length) and
DMA request size(word length * maxburst). This leads to data
corruption, lockup and errors like:
spi1.0: EOW timed out
Fix this by setting DMA maxburst size to 1 so that
McSPI FIFO level event trigger size matches DMA request size.
Fixes: b682cffa3ac6 ("spi: omap2-mcspi: Set FIFO DMA trigger level to word length")
Cc: stable(a)vger.kernel.org
Reported-by: David Lechner <david(a)lechnology.com>
Tested-by: David Lechner <david(a)lechnology.com>
Signed-off-by: Vignesh R <vigneshr(a)ti.com>
Signed-off-by: Mark Brown <broonie(a)kernel.org>
---
drivers/spi/spi-omap2-mcspi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
index 2fd8881fcd65..8be304379628 100644
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
@@ -623,8 +623,8 @@ omap2_mcspi_txrx_dma(struct spi_device *spi, struct spi_transfer *xfer)
cfg.dst_addr = cs->phys + OMAP2_MCSPI_TX0;
cfg.src_addr_width = width;
cfg.dst_addr_width = width;
- cfg.src_maxburst = es;
- cfg.dst_maxburst = es;
+ cfg.src_maxburst = 1;
+ cfg.dst_maxburst = 1;
rx = xfer->rx_buf;
tx = xfer->tx_buf;
--
2.20.1