The patch below does not apply to the 4.16-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 41387bb7d869e96df4b870e1880ad49f053cc755 Mon Sep 17 00:00:00 2001
From: Matthew Wilcox <mawilcox(a)microsoft.com>
Date: Fri, 2 Mar 2018 10:40:14 -0800
Subject: [PATCH] Documentation/sphinx: Fix Directive import error
Sphinx 1.7 removed sphinx.util.compat.Directive so people
who have upgraded cannot build the documentation. Switch to
docutils.parsers.rst.Directive which has been available since
docutils 0.5 released in 2009.
Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=1083694
Co-developed-by: Takashi Iwai <tiwai(a)suse.de>
Acked-by: Jani Nikula <jani.nikula(a)intel.com>
Cc: stable(a)vger.kernel.org
Signed-off-by: Matthew Wilcox <mawilcox(a)microsoft.com>
Signed-off-by: Jonathan Corbet <corbet(a)lwn.net>
diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerneldoc.py
index 39aa9e8697cc..fbedcc39460b 100644
--- a/Documentation/sphinx/kerneldoc.py
+++ b/Documentation/sphinx/kerneldoc.py
@@ -36,8 +36,7 @@ import glob
from docutils import nodes, statemachine
from docutils.statemachine import ViewList
-from docutils.parsers.rst import directives
-from sphinx.util.compat import Directive
+from docutils.parsers.rst import directives, Directive
from sphinx.ext.autodoc import AutodocReporter
__version__ = '1.0'
Hi Greg,
Upstream commit 0c4c5860e998 ("hwmon: (ina2xx) Fix access to uninitialized
mutex") fixes commit 5d389b125186 ("hwmon: (ina2xx) Make calibration register
value fixed"), which has found its way into v4.4.y, v4.9.y, v4.14.y, and
v4.15.y.
Please apply commit 0c4c5860e998 to all affected releases to fix the
resulting regression.
Maybe Sasha's script could be improved to look for Fixes: tags when
suggesting to apply patches to older releases.
Thanks,
Guenter
在 2018-04-17 18:32,Greg KH 写道:
> On Tue, Apr 17, 2018 at 11:32:42AM +0800, leiwan(a)codeaurora.org wrote:
>>
>> xhci-plat Shutdown callback should check HCD_FLAG_HW_ACCESSIBLE
>> before accessing any register. This should avoid hung with access
>> controllers which support runtime suspend
>>
>> This can fix for issue of https://patchwork.kernel.org/patch/10339317/
>> corresponding upload in CAF:
>> https://source.codeaurora.org/quic/la/kernel/msm-4.4/commit/?h=LV.HB.1.1.5-…
>>
>> full patch refer attachment.
>> diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
>> index 9b27798..bdf914d 100644
>> --- a/drivers/usb/host/xhci.c
>> +++ b/drivers/usb/host/xhci.c
>> @@ -702,6 +702,10 @@ static void xhci_shutdown(struct usb_hcd *hcd)
>> usb_disable_xhci_ports(to_pci_dev(hcd->self.sysdev));
>>
>> spin_lock_irq(&xhci->lock);
>> + if (!HCD_HW_ACCESSIBLE(hcd)) {
>> + spin_unlock_irq(&xhci->lock);
>> + return;
>> + }
>> xhci_halt(xhci);
>
> A blank line after the if statement?
> >> [lei]yes
> What about all of the other places in this driver that you should also
> check for this? Look at the other host controllers, shouldn't you
> mirror what they are doing?
> >> [lei]I checked other usb host module shutdown and suspend workflow.
>> All usb host driver need to check hw accessable before
>> read/write usb register especially in runtime PM case..
> And this needs a Fixes: tag, along with a cc: stable so as to properly
> get backported as this is broken in some stable kernels right now.
> >> [lei] Added by v2 patch
> thanks,
>
> greg k-h
From c03697fa259ab38d1002598ec2ccfac37607ca0b Mon Sep 17 00:00:00 2001
From: Lei wang <leiwan(a)codeaurora.org>
Date: Tue, 17 Apr 2018 10:55:35 +0800
Subject: [PATCH v2] xhci: plat: Fix xhci_plat shutdown hung
xhci-plat Shutdown callback should check HCD_FLAG_HW_ACCESSIBLE
before accessing any register. This should avoid hung with access
controllers which support runtime suspend
Fixes: b07c12517f2a ("xhci: plat: Register shutdown for xhci_plat")
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Lei wang <leiwan(a)codeaurora.org>
---
drivers/usb/host/xhci.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 9b27798..bdf914d 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -702,6 +702,10 @@ static void xhci_shutdown(struct usb_hcd *hcd)
usb_disable_xhci_ports(to_pci_dev(hcd->self.sysdev));
spin_lock_irq(&xhci->lock);
+ if (!HCD_HW_ACCESSIBLE(hcd)) {
+ spin_unlock_irq(&xhci->lock);
+ return;
+ }
xhci_halt(xhci);
/* Workaround for spurious wakeups at shutdown with HSW */
if (xhci->quirks & XHCI_SPURIOUS_WAKEUP)
--
1.9.1
The patch below was submitted to be applied to the 4.16-stable tree.
I fail to see how this patch meets the stable kernel rules as found at
Documentation/process/stable-kernel-rules.rst.
I could be totally wrong, and if so, please respond to
<stable(a)vger.kernel.org> and let me know why this patch should be
applied. Otherwise, it is now dropped from my patch queues, never to be
seen again.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 3140c156e919b0f5fad5c5f6cf7876c39d1d4f06 Mon Sep 17 00:00:00 2001
From: Peng Hao <peng.hao2(a)zte.com.cn>
Date: Mon, 2 Apr 2018 09:15:32 +0800
Subject: [PATCH] kvm: x86: fix a compile warning
fix a "warning: no previous prototype".
Cc: stable(a)vger.kernel.org
Signed-off-by: Peng Hao <peng.hao2(a)zte.com.cn>
Signed-off-by: Paolo Bonzini <pbonzini(a)redhat.com>
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 8f108131d85d..b2ff74b12ec4 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -7943,7 +7943,7 @@ int kvm_task_switch(struct kvm_vcpu *vcpu, u16 tss_selector, int idt_index,
}
EXPORT_SYMBOL_GPL(kvm_task_switch);
-int kvm_valid_sregs(struct kvm_vcpu *vcpu, struct kvm_sregs *sregs)
+static int kvm_valid_sregs(struct kvm_vcpu *vcpu, struct kvm_sregs *sregs)
{
if ((sregs->efer & EFER_LME) && (sregs->cr0 & X86_CR0_PG)) {
/*
The label .Llast_fixup\@ is jumped to on page fault within the final
byte set loop of memset (on < MIPSR6 architectures). For some reason, in
this fault handler, the v1 register is randomly set to a2 & STORMASK.
This clobbers v1 for the calling function. This can be observed with the
following test code:
static int __init __attribute__((optimize("O0"))) test_clear_user(void)
{
register int t asm("v1");
char *test;
int j, k;
pr_info("\n\n\nTesting clear_user\n");
test = vmalloc(PAGE_SIZE);
for (j = 256; j < 512; j++) {
t = 0xa5a5a5a5;
if ((k = clear_user(test + PAGE_SIZE - 256, j)) != j - 256) {
pr_err("clear_user (%px %d) returned %d\n", test + PAGE_SIZE - 256, j, k);
}
if (t != 0xa5a5a5a5) {
pr_err("v1 was clobbered to 0x%x!\n", t);
}
}
return 0;
}
late_initcall(test_clear_user);
Which demonstrates that v1 is indeed clobbered (MIPS64):
Testing clear_user
v1 was clobbered to 0x1!
v1 was clobbered to 0x2!
v1 was clobbered to 0x3!
v1 was clobbered to 0x4!
v1 was clobbered to 0x5!
v1 was clobbered to 0x6!
v1 was clobbered to 0x7!
Since the number of bytes that could not be set is already contained in
a2, the andi placing a value in v1 is not necessary and actively
harmful in clobbering v1.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable(a)vger.kernel.org
Reported-by: James Hogan <jhogan(a)kernel.org>
Signed-off-by: Matt Redfearn <matt.redfearn(a)mips.com>
---
arch/mips/lib/memset.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/lib/memset.S b/arch/mips/lib/memset.S
index fa3bec269331..84e91f4fdf53 100644
--- a/arch/mips/lib/memset.S
+++ b/arch/mips/lib/memset.S
@@ -258,7 +258,7 @@
.Llast_fixup\@:
jr ra
- andi v1, a2, STORMASK
+ nop
.Lsmall_fixup\@:
PTR_SUBU a2, t1, a0
--
2.7.4
The patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 41387bb7d869e96df4b870e1880ad49f053cc755 Mon Sep 17 00:00:00 2001
From: Matthew Wilcox <mawilcox(a)microsoft.com>
Date: Fri, 2 Mar 2018 10:40:14 -0800
Subject: [PATCH] Documentation/sphinx: Fix Directive import error
Sphinx 1.7 removed sphinx.util.compat.Directive so people
who have upgraded cannot build the documentation. Switch to
docutils.parsers.rst.Directive which has been available since
docutils 0.5 released in 2009.
Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=1083694
Co-developed-by: Takashi Iwai <tiwai(a)suse.de>
Acked-by: Jani Nikula <jani.nikula(a)intel.com>
Cc: stable(a)vger.kernel.org
Signed-off-by: Matthew Wilcox <mawilcox(a)microsoft.com>
Signed-off-by: Jonathan Corbet <corbet(a)lwn.net>
diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerneldoc.py
index 39aa9e8697cc..fbedcc39460b 100644
--- a/Documentation/sphinx/kerneldoc.py
+++ b/Documentation/sphinx/kerneldoc.py
@@ -36,8 +36,7 @@ import glob
from docutils import nodes, statemachine
from docutils.statemachine import ViewList
-from docutils.parsers.rst import directives
-from sphinx.util.compat import Directive
+from docutils.parsers.rst import directives, Directive
from sphinx.ext.autodoc import AutodocReporter
__version__ = '1.0'
The patch below does not apply to the 4.15-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 41387bb7d869e96df4b870e1880ad49f053cc755 Mon Sep 17 00:00:00 2001
From: Matthew Wilcox <mawilcox(a)microsoft.com>
Date: Fri, 2 Mar 2018 10:40:14 -0800
Subject: [PATCH] Documentation/sphinx: Fix Directive import error
Sphinx 1.7 removed sphinx.util.compat.Directive so people
who have upgraded cannot build the documentation. Switch to
docutils.parsers.rst.Directive which has been available since
docutils 0.5 released in 2009.
Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=1083694
Co-developed-by: Takashi Iwai <tiwai(a)suse.de>
Acked-by: Jani Nikula <jani.nikula(a)intel.com>
Cc: stable(a)vger.kernel.org
Signed-off-by: Matthew Wilcox <mawilcox(a)microsoft.com>
Signed-off-by: Jonathan Corbet <corbet(a)lwn.net>
diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerneldoc.py
index 39aa9e8697cc..fbedcc39460b 100644
--- a/Documentation/sphinx/kerneldoc.py
+++ b/Documentation/sphinx/kerneldoc.py
@@ -36,8 +36,7 @@ import glob
from docutils import nodes, statemachine
from docutils.statemachine import ViewList
-from docutils.parsers.rst import directives
-from sphinx.util.compat import Directive
+from docutils.parsers.rst import directives, Directive
from sphinx.ext.autodoc import AutodocReporter
__version__ = '1.0'
The patch below does not apply to the 4.16-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 9e7f06c8beee304ee21b791653fefcd713f48b9a Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai(a)suse.de>
Date: Tue, 10 Apr 2018 19:05:13 +0200
Subject: [PATCH] swiotlb: fix unexpected swiotlb_alloc_coherent failures
The code refactoring by commit 0176adb00406 ("swiotlb: refactor coherent
buffer allocation") made swiotlb_alloc_buffer almost always failing due
to a thinko: namely, the function evaluates the dma_coherent_ok call
incorrectly and dealing as if it's invalid. This ends up with weird
errors like iwlwifi probe failure or amdgpu screen flickering.
This patch corrects the logic error.
Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1088658
Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1088902
Fixes: 0176adb00406 ("swiotlb: refactor coherent buffer allocation")
Cc: <stable(a)vger.kernel.org> # v4.16+
Signed-off-by: Takashi Iwai <tiwai(a)suse.de>
Signed-off-by: Christoph Hellwig <hch(a)lst.de>
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index 47aeb04c1997..de7cc540450f 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -719,7 +719,7 @@ swiotlb_alloc_buffer(struct device *dev, size_t size, dma_addr_t *dma_handle,
goto out_warn;
*dma_handle = __phys_to_dma(dev, phys_addr);
- if (dma_coherent_ok(dev, *dma_handle, size))
+ if (!dma_coherent_ok(dev, *dma_handle, size))
goto out_unmap;
memset(phys_to_virt(phys_addr), 0, size);
OSTA UDF specification does not mention whether the CS0 charset in case
of two bytes per character encoding should be treated in UTF-16 or
UCS-2. The sample code in the standard does not treat UTF-16 surrogates
in any special way but on systems such as Windows which work in UTF-16
internally, filenames would be treated as being in UTF-16 effectively.
In Linux it is more difficult to handle characters outside of Base
Multilingual plane (beyond 0xffff) as NLS framework works with 2-byte
characters only. Just make sure we don't leak UTF-16 surrogates into the
resulting string when loading names from the filesystem for now.
CC: stable(a)vger.kernel.org # >= v4.6
Reported-by: Mingye Wang <arthur200126(a)gmail.com>
Signed-off-by: Jan Kara <jack(a)suse.cz>
---
fs/udf/unicode.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/fs/udf/unicode.c b/fs/udf/unicode.c
index f897e55f2cd0..16a8ad21b77e 100644
--- a/fs/udf/unicode.c
+++ b/fs/udf/unicode.c
@@ -28,6 +28,9 @@
#include "udf_sb.h"
+#define SURROGATE_MASK 0xfffff800
+#define SURROGATE_PAIR 0x0000d800
+
static int udf_uni2char_utf8(wchar_t uni,
unsigned char *out,
int boundlen)
@@ -37,6 +40,9 @@ static int udf_uni2char_utf8(wchar_t uni,
if (boundlen <= 0)
return -ENAMETOOLONG;
+ if ((uni & SURROGATE_MASK) == SURROGATE_PAIR)
+ return -EINVAL;
+
if (uni < 0x80) {
out[u_len++] = (unsigned char)uni;
} else if (uni < 0x800) {
--
2.13.6
The patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 452061fd4521b2bf3225fc391dbe536e5f9c05e2 Mon Sep 17 00:00:00 2001
From: Vivek Goyal <vgoyal(a)redhat.com>
Date: Fri, 9 Mar 2018 15:44:41 -0500
Subject: [PATCH] ovl: Set d->last properly during lookup
d->last signifies that this is the last layer we are looking into and there
is no more. And that means this allows for some optimzation opportunities
during lookup. For example, in ovl_lookup_single() we don't have to check
for opaque xattr of a directory is this is the last layer we are looking
into (d->last = true).
But knowing for sure whether we are looking into last layer can be very
tricky. If redirects are not enabled, then we can look at poe->numlower and
figure out if the lookup we are about to is last layer or not. But if
redircts are enabled then it is possible poe->numlower suggests that we are
looking in last layer, but there is an absolute redirect present in found
element and that redirects us to a layer in root and that means lookup will
continue in lower layers further.
For example, consider following.
/upperdir/pure (opaque=y)
/upperdir/pure/foo (opaque=y,redirect=/bar)
/lowerdir/bar
In this case pure is "pure upper". When we look for "foo", that time
poe->numlower=0. But that alone does not mean that we will not search for a
merge candidate in /lowerdir. Absolute redirect changes that.
IOW, d->last should not be set just based on poe->numlower if redirects are
enabled. That can lead to setting d->last while it should not have and that
means we will not check for opaque xattr while we should have.
So do this.
- If redirects are not enabled, then continue to rely on poe->numlower
information to determine if it is last layer or not.
- If redirects are enabled, then set d->last = true only if this is the
last layer in root ovl_entry (roe).
Suggested-by: Amir Goldstein <amir73il(a)gmail.com>
Reviewed-by: Amir Goldstein <amir73il(a)gmail.com>
Signed-off-by: Vivek Goyal <vgoyal(a)redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi(a)redhat.com>
Fixes: 02b69b284cd7 ("ovl: lookup redirects")
Cc: <stable(a)vger.kernel.org> #v4.10
diff --git a/fs/overlayfs/namei.c b/fs/overlayfs/namei.c
index 70fcfcc684cc..03d8c5132477 100644
--- a/fs/overlayfs/namei.c
+++ b/fs/overlayfs/namei.c
@@ -815,7 +815,7 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
.is_dir = false,
.opaque = false,
.stop = false,
- .last = !poe->numlower,
+ .last = ofs->config.redirect_follow ? false : !poe->numlower,
.redirect = NULL,
};
@@ -873,7 +873,11 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
for (i = 0; !d.stop && i < poe->numlower; i++) {
struct ovl_path lower = poe->lowerstack[i];
- d.last = i == poe->numlower - 1;
+ if (!ofs->config.redirect_follow)
+ d.last = i == poe->numlower - 1;
+ else
+ d.last = lower.layer->idx == roe->numlower;
+
err = ovl_lookup_layer(lower.dentry, &d, &this);
if (err)
goto out_put;
The patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From dc7a10ddee0c56c6d891dd18de5c4ee9869545e0 Mon Sep 17 00:00:00 2001
From: Jaegeuk Kim <jaegeuk(a)kernel.org>
Date: Fri, 30 Mar 2018 17:58:13 -0700
Subject: [PATCH] f2fs: truncate preallocated blocks in error case
If write is failed, we must deallocate the blocks that we couldn't write.
Cc: stable(a)vger.kernel.org
Reviewed-by: Chao Yu <yuchao0(a)huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk(a)kernel.org>
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 8068b015ece5..6b94f19b3fa8 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -2911,6 +2911,8 @@ static ssize_t f2fs_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
ret = generic_write_checks(iocb, from);
if (ret > 0) {
+ bool preallocated = false;
+ size_t target_size = 0;
int err;
if (iov_iter_fault_in_readable(from, iov_iter_count(from)))
@@ -2927,6 +2929,9 @@ static ssize_t f2fs_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
}
} else {
+ preallocated = true;
+ target_size = iocb->ki_pos + iov_iter_count(from);
+
err = f2fs_preallocate_blocks(iocb, from);
if (err) {
clear_inode_flag(inode, FI_NO_PREALLOC);
@@ -2939,6 +2944,10 @@ static ssize_t f2fs_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
blk_finish_plug(&plug);
clear_inode_flag(inode, FI_NO_PREALLOC);
+ /* if we couldn't write data, we should deallocate blocks. */
+ if (preallocated && i_size_read(inode) < target_size)
+ f2fs_truncate(inode);
+
if (ret > 0)
f2fs_update_iostat(F2FS_I_SB(inode), APP_WRITE_IO, ret);
}
The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From dc7a10ddee0c56c6d891dd18de5c4ee9869545e0 Mon Sep 17 00:00:00 2001
From: Jaegeuk Kim <jaegeuk(a)kernel.org>
Date: Fri, 30 Mar 2018 17:58:13 -0700
Subject: [PATCH] f2fs: truncate preallocated blocks in error case
If write is failed, we must deallocate the blocks that we couldn't write.
Cc: stable(a)vger.kernel.org
Reviewed-by: Chao Yu <yuchao0(a)huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk(a)kernel.org>
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 8068b015ece5..6b94f19b3fa8 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -2911,6 +2911,8 @@ static ssize_t f2fs_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
ret = generic_write_checks(iocb, from);
if (ret > 0) {
+ bool preallocated = false;
+ size_t target_size = 0;
int err;
if (iov_iter_fault_in_readable(from, iov_iter_count(from)))
@@ -2927,6 +2929,9 @@ static ssize_t f2fs_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
}
} else {
+ preallocated = true;
+ target_size = iocb->ki_pos + iov_iter_count(from);
+
err = f2fs_preallocate_blocks(iocb, from);
if (err) {
clear_inode_flag(inode, FI_NO_PREALLOC);
@@ -2939,6 +2944,10 @@ static ssize_t f2fs_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
blk_finish_plug(&plug);
clear_inode_flag(inode, FI_NO_PREALLOC);
+ /* if we couldn't write data, we should deallocate blocks. */
+ if (preallocated && i_size_read(inode) < target_size)
+ f2fs_truncate(inode);
+
if (ret > 0)
f2fs_update_iostat(F2FS_I_SB(inode), APP_WRITE_IO, ret);
}
On Tue, Apr 17, 2018 at 6:25 AM, Adam Ford <aford173(a)gmail.com> wrote:
>
>
>
> On Tue, Apr 17, 2018 at 5:24 AM, Greg KH <gregkh(a)linuxfoundation.org> wrote:
>>
>> On Tue, Apr 17, 2018 at 10:52:34AM +0200, Juerg Haefliger wrote:
>> > On Mon, Mar 19, 2018 at 4:27 PM, <gregkh(a)linuxfoundation.org> wrote:
>> > >
>> > > This is a note to let you know that I've just added the patch titled
>> > >
>> > > ARM: dts: LogicPD Torpedo: Fix I2C1 pinmux
>> > >
>> > > to the 4.4-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:
>> > > arm-dts-logicpd-torpedo-fix-i2c1-pinmux.patch
>> > > and it can be found in the queue-4.4 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.
>> >
>> >
>> > This commit was reverted in 4.4.122:
>> > 8d02a5519885 Revert "ARM: dts: LogicPD Torpedo: Fix I2C1 pinmux"
>> >
>> > Is this a mistake that it came back again?
>>
>> It showed up in 4.16-rc4. Should it be reverted again in Linus's tree?
>> If so, please do so and I'll take the revert.
>>
The first time it went through to 4.4 it was incorrectly associated to
omap3_pmx_core2 when it should have been associated to omap3_pmx_core.
When it was brought up that the 4.4 backport patch didn't match 4.9
and 4.16, and Greg reverted it. I submitted a second patch with the
corrections to specifically fix 4.4.
This looks correct to me for 4.4
adam
>
>
>>
>> thanks,
>>
>> greg k-h
>
>
This is a note to let you know that I've just added the patch titled
ARM: dts: LogicPD Torpedo: Fix I2C1 pinmux
to the 4.4-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:
arm-dts-logicpd-torpedo-fix-i2c1-pinmux.patch
and it can be found in the queue-4.4 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 74402055a2d3ec998a1ded599e86185a27d9bbf4 Mon Sep 17 00:00:00 2001
From: Adam Ford <aford173(a)gmail.com>
Date: Thu, 25 Jan 2018 14:10:37 -0600
Subject: ARM: dts: LogicPD Torpedo: Fix I2C1 pinmux
From: Adam Ford <aford173(a)gmail.com>
commit 74402055a2d3ec998a1ded599e86185a27d9bbf4 upstream.
The pinmuxing was missing for I2C1 which was causing intermittent issues
with the PMIC which is connected to I2C1. The bootloader did not quite
configure the I2C1 either, so when running at 2.6MHz, it was generating
errors at time.
This correctly sets the I2C1 pinmuxing so it can operate at 2.6MHz
Fixes: 687c27676151 ("ARM: dts: Add minimal support for LogicPD Torpedo
DM3730 devkit")
Signed-off-by: Adam Ford <aford173(a)gmail.com>
Signed-off-by: Tony Lindgren <tony(a)atomide.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
arch/arm/boot/dts/logicpd-torpedo-som.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)
--- a/arch/arm/boot/dts/logicpd-torpedo-som.dtsi
+++ b/arch/arm/boot/dts/logicpd-torpedo-som.dtsi
@@ -90,6 +90,8 @@
};
&i2c1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c1_pins>;
clock-frequency = <2600000>;
twl: twl@48 {
@@ -137,6 +139,12 @@
OMAP3_CORE1_IOPAD(0x218e, PIN_OUTPUT | MUX_MODE4) /* mcbsp1_fsr.gpio_157 */
>;
};
+ i2c1_pins: pinmux_i2c1_pins {
+ pinctrl-single,pins = <
+ OMAP3_CORE1_IOPAD(0x21ba, PIN_INPUT | MUX_MODE0) /* i2c1_scl.i2c1_scl */
+ OMAP3_CORE1_IOPAD(0x21bc, PIN_INPUT | MUX_MODE0) /* i2c1_sda.i2c1_sda */
+ >;
+ };
};
&omap3_pmx_core2 {
Patches currently in stable-queue which might be from aford173(a)gmail.com are
queue-4.4/arm-dts-logicpd-torpedo-fix-i2c1-pinmux.patch
This is an automatic generated email to let you know that the following patch were queued:
Subject: media: v4l2-compat-ioctl32: prevent go past max size
Author: Mauro Carvalho Chehab <mchehab(a)s-opensource.com>
Date: Wed Apr 11 11:47:32 2018 -0400
As warned by smatch:
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:879 put_v4l2_ext_controls32() warn: check for integer overflow 'count'
The access_ok() logic should check for too big arrays too.
Cc: stable(a)vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab(a)s-opensource.com>
drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
index 4312935f1dfc..d03a44d89649 100644
--- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
+++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
@@ -871,7 +871,7 @@ static int put_v4l2_ext_controls32(struct file *file,
get_user(kcontrols, &kp->controls))
return -EFAULT;
- if (!count)
+ if (!count || count > (U32_MAX/sizeof(*ucontrols)))
return 0;
if (get_user(p, &up->controls))
return -EFAULT;
This is an automatic generated email to let you know that the following patch were queued:
Subject: media: v4l2-compat-ioctl32: prevent go past max size
Author: Mauro Carvalho Chehab <mchehab(a)s-opensource.com>
Date: Wed Apr 11 11:47:32 2018 -0400
As warned by smatch:
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:879 put_v4l2_ext_controls32() warn: check for integer overflow 'count'
The access_ok() logic should check for too big arrays too.
Cc: stable(a)vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab(a)s-opensource.com>
drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
index 4312935f1dfc..d03a44d89649 100644
--- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
+++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
@@ -871,7 +871,7 @@ static int put_v4l2_ext_controls32(struct file *file,
get_user(kcontrols, &kp->controls))
return -EFAULT;
- if (!count)
+ if (!count || count > (U32_MAX/sizeof(*ucontrols)))
return 0;
if (get_user(p, &up->controls))
return -EFAULT;
This is an automatic generated email to let you know that the following patch were queued:
Subject: media: dvb_frontend: fix locking issues at dvb_frontend_get_event()
Author: Mauro Carvalho Chehab <mchehab(a)s-opensource.com>
Date: Thu Apr 5 05:30:52 2018 -0400
As warned by smatch:
drivers/media/dvb-core/dvb_frontend.c:314 dvb_frontend_get_event() warn: inconsistent returns 'sem:&fepriv->sem'.
Locked on: line 288
line 295
line 306
line 314
Unlocked on: line 303
The lock implementation for get event is wrong, as, if an
interrupt occurs, down_interruptible() will fail, and the
routine will call up() twice when userspace calls the ioctl
again.
The bad code is there since when Linux migrated to git, in
2005.
Cc: stable(a)vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab(a)s-opensource.com>
drivers/media/dvb-core/dvb_frontend.c | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
---
diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c
index e33414975065..a4ada1ccf0df 100644
--- a/drivers/media/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb-core/dvb_frontend.c
@@ -275,8 +275,20 @@ static void dvb_frontend_add_event(struct dvb_frontend *fe,
wake_up_interruptible (&events->wait_queue);
}
+static int dvb_frontend_test_event(struct dvb_frontend_private *fepriv,
+ struct dvb_fe_events *events)
+{
+ int ret;
+
+ up(&fepriv->sem);
+ ret = events->eventw != events->eventr;
+ down(&fepriv->sem);
+
+ return ret;
+}
+
static int dvb_frontend_get_event(struct dvb_frontend *fe,
- struct dvb_frontend_event *event, int flags)
+ struct dvb_frontend_event *event, int flags)
{
struct dvb_frontend_private *fepriv = fe->frontend_priv;
struct dvb_fe_events *events = &fepriv->events;
@@ -294,13 +306,8 @@ static int dvb_frontend_get_event(struct dvb_frontend *fe,
if (flags & O_NONBLOCK)
return -EWOULDBLOCK;
- up(&fepriv->sem);
-
- ret = wait_event_interruptible (events->wait_queue,
- events->eventw != events->eventr);
-
- if (down_interruptible (&fepriv->sem))
- return -ERESTARTSYS;
+ ret = wait_event_interruptible(events->wait_queue,
+ dvb_frontend_test_event(fepriv, events));
if (ret < 0)
return ret;
This is an automatic generated email to let you know that the following patch were queued:
Subject: media: dvb_frontend: fix locking issues at dvb_frontend_get_event()
Author: Mauro Carvalho Chehab <mchehab(a)s-opensource.com>
Date: Thu Apr 5 05:30:52 2018 -0400
As warned by smatch:
drivers/media/dvb-core/dvb_frontend.c:314 dvb_frontend_get_event() warn: inconsistent returns 'sem:&fepriv->sem'.
Locked on: line 288
line 295
line 306
line 314
Unlocked on: line 303
The lock implementation for get event is wrong, as, if an
interrupt occurs, down_interruptible() will fail, and the
routine will call up() twice when userspace calls the ioctl
again.
The bad code is there since when Linux migrated to git, in
2005.
Cc: stable(a)vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab(a)s-opensource.com>
drivers/media/dvb-core/dvb_frontend.c | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
---
diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c
index e33414975065..a4ada1ccf0df 100644
--- a/drivers/media/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb-core/dvb_frontend.c
@@ -275,8 +275,20 @@ static void dvb_frontend_add_event(struct dvb_frontend *fe,
wake_up_interruptible (&events->wait_queue);
}
+static int dvb_frontend_test_event(struct dvb_frontend_private *fepriv,
+ struct dvb_fe_events *events)
+{
+ int ret;
+
+ up(&fepriv->sem);
+ ret = events->eventw != events->eventr;
+ down(&fepriv->sem);
+
+ return ret;
+}
+
static int dvb_frontend_get_event(struct dvb_frontend *fe,
- struct dvb_frontend_event *event, int flags)
+ struct dvb_frontend_event *event, int flags)
{
struct dvb_frontend_private *fepriv = fe->frontend_priv;
struct dvb_fe_events *events = &fepriv->events;
@@ -294,13 +306,8 @@ static int dvb_frontend_get_event(struct dvb_frontend *fe,
if (flags & O_NONBLOCK)
return -EWOULDBLOCK;
- up(&fepriv->sem);
-
- ret = wait_event_interruptible (events->wait_queue,
- events->eventw != events->eventr);
-
- if (down_interruptible (&fepriv->sem))
- return -ERESTARTSYS;
+ ret = wait_event_interruptible(events->wait_queue,
+ dvb_frontend_test_event(fepriv, events));
if (ret < 0)
return ret;
Since SCSI scanning occurs asynchronously, since sd_revalidate_disk()
is called from sd_probe_async() and since sd_revalidate_disk() calls
sd_zbc_read_zones() it can happen that sd_zbc_read_zones() is called
concurrently with blkdev_report_zones() and/or blkdev_reset_zones().
That can cause these functions to fail with -EIO because
sd_zbc_read_zones() e.g. sets q->nr_zones to zero before restoring it
to the actual value, even if no drive characteristics have changed.
Avoid that this can happen by making the following changes:
- Protect the code that updates zone information with blk_queue_enter()
and blk_queue_exit().
- Modify sd_zbc_setup_seq_zones_bitmap() and sd_zbc_setup() such that
these functions do not modify struct scsi_disk before all zone
information has been obtained.
Note: since commit 055f6e18e08f ("block: Make q_usage_counter also
track legacy requests"; kernel v4.15) the request queue freezing
mechanism also affects legacy request queues.
Signed-off-by: Bart Van Assche <bart.vanassche(a)wdc.com>
Cc: Jens Axboe <axboe(a)kernel.dk>
Cc: Damien Le Moal <damien.lemoal(a)wdc.com>
Cc: Christoph Hellwig <hch(a)lst.de>
Cc: Hannes Reinecke <hare(a)suse.com>
Cc: stable(a)vger.kernel.org
---
drivers/scsi/sd_zbc.c | 140 +++++++++++++++++++++++++++++--------------------
include/linux/blkdev.h | 5 ++
2 files changed, 87 insertions(+), 58 deletions(-)
diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c
index f290e8a9923d..88e1e80fa497 100644
--- a/drivers/scsi/sd_zbc.c
+++ b/drivers/scsi/sd_zbc.c
@@ -378,8 +378,10 @@ static int sd_zbc_check_capacity(struct scsi_disk *sdkp, unsigned char *buf)
*
* Check that all zones of the device are equal. The last zone can however
* be smaller. The zone size must also be a power of two number of LBAs.
+ *
+ * Returns the zone size in bytes upon success or an error code upon failure.
*/
-static int sd_zbc_check_zone_size(struct scsi_disk *sdkp)
+static s64 sd_zbc_check_zone_size(struct scsi_disk *sdkp)
{
u64 zone_blocks = 0;
sector_t block = 0;
@@ -390,8 +392,6 @@ static int sd_zbc_check_zone_size(struct scsi_disk *sdkp)
int ret;
u8 same;
- sdkp->zone_blocks = 0;
-
/* Get a buffer */
buf = kmalloc(SD_ZBC_BUF_SIZE, GFP_KERNEL);
if (!buf)
@@ -423,16 +423,17 @@ static int sd_zbc_check_zone_size(struct scsi_disk *sdkp)
/* Parse zone descriptors */
while (rec < buf + buf_len) {
- zone_blocks = get_unaligned_be64(&rec[8]);
- if (sdkp->zone_blocks == 0) {
- sdkp->zone_blocks = zone_blocks;
- } else if (zone_blocks != sdkp->zone_blocks &&
- (block + zone_blocks < sdkp->capacity
- || zone_blocks > sdkp->zone_blocks)) {
- zone_blocks = 0;
+ u64 this_zone_blocks = get_unaligned_be64(&rec[8]);
+
+ if (zone_blocks == 0) {
+ zone_blocks = this_zone_blocks;
+ } else if (this_zone_blocks != zone_blocks &&
+ (block + this_zone_blocks < sdkp->capacity
+ || this_zone_blocks > zone_blocks)) {
+ this_zone_blocks = 0;
goto out;
}
- block += zone_blocks;
+ block += this_zone_blocks;
rec += 64;
}
@@ -445,8 +446,6 @@ static int sd_zbc_check_zone_size(struct scsi_disk *sdkp)
} while (block < sdkp->capacity);
- zone_blocks = sdkp->zone_blocks;
-
out:
if (!zone_blocks) {
if (sdkp->first_scan)
@@ -466,8 +465,7 @@ static int sd_zbc_check_zone_size(struct scsi_disk *sdkp)
"Zone size too large\n");
ret = -ENODEV;
} else {
- sdkp->zone_blocks = zone_blocks;
- sdkp->zone_shift = ilog2(zone_blocks);
+ ret = zone_blocks;
}
out_free:
@@ -478,15 +476,14 @@ static int sd_zbc_check_zone_size(struct scsi_disk *sdkp)
/**
* sd_zbc_alloc_zone_bitmap - Allocate a zone bitmap (one bit per zone).
- * @sdkp: The disk of the bitmap
+ * @nr_zones: Number of zones to allocate space for.
+ * @numa_node: NUMA node to allocate the memory from.
*/
-static inline unsigned long *sd_zbc_alloc_zone_bitmap(struct scsi_disk *sdkp)
+static inline unsigned long *
+sd_zbc_alloc_zone_bitmap(u32 nr_zones, int numa_node)
{
- struct request_queue *q = sdkp->disk->queue;
-
- return kzalloc_node(BITS_TO_LONGS(sdkp->nr_zones)
- * sizeof(unsigned long),
- GFP_KERNEL, q->node);
+ return kzalloc_node(BITS_TO_LONGS(nr_zones) * sizeof(unsigned long),
+ GFP_KERNEL, numa_node);
}
/**
@@ -494,6 +491,7 @@ static inline unsigned long *sd_zbc_alloc_zone_bitmap(struct scsi_disk *sdkp)
* @sdkp: disk used
* @buf: report reply buffer
* @buflen: length of @buf
+ * @zone_shift: logarithm base 2 of the number of blocks in a zone
* @seq_zones_bitmap: bitmap of sequential zones to set
*
* Parse reported zone descriptors in @buf to identify sequential zones and
@@ -503,7 +501,7 @@ static inline unsigned long *sd_zbc_alloc_zone_bitmap(struct scsi_disk *sdkp)
* Return the LBA after the last zone reported.
*/
static sector_t sd_zbc_get_seq_zones(struct scsi_disk *sdkp, unsigned char *buf,
- unsigned int buflen,
+ unsigned int buflen, u32 zone_shift,
unsigned long *seq_zones_bitmap)
{
sector_t lba, next_lba = sdkp->capacity;
@@ -522,7 +520,7 @@ static sector_t sd_zbc_get_seq_zones(struct scsi_disk *sdkp, unsigned char *buf,
if (type != ZBC_ZONE_TYPE_CONV &&
cond != ZBC_ZONE_COND_READONLY &&
cond != ZBC_ZONE_COND_OFFLINE)
- set_bit(lba >> sdkp->zone_shift, seq_zones_bitmap);
+ set_bit(lba >> zone_shift, seq_zones_bitmap);
next_lba = lba + get_unaligned_be64(&rec[8]);
rec += 64;
}
@@ -531,12 +529,16 @@ static sector_t sd_zbc_get_seq_zones(struct scsi_disk *sdkp, unsigned char *buf,
}
/**
- * sd_zbc_setup_seq_zones_bitmap - Initialize the disk seq zone bitmap.
+ * sd_zbc_setup_seq_zones_bitmap - Initialize a seq zone bitmap.
* @sdkp: target disk
+ * @zone_shift: logarithm base 2 of the number of blocks in a zone
+ * @nr_zones: number of zones to set up a seq zone bitmap for
*
* Allocate a zone bitmap and initialize it by identifying sequential zones.
*/
-static int sd_zbc_setup_seq_zones_bitmap(struct scsi_disk *sdkp)
+static unsigned long *
+sd_zbc_setup_seq_zones_bitmap(struct scsi_disk *sdkp, u32 zone_shift,
+ u32 nr_zones)
{
struct request_queue *q = sdkp->disk->queue;
unsigned long *seq_zones_bitmap;
@@ -544,9 +546,9 @@ static int sd_zbc_setup_seq_zones_bitmap(struct scsi_disk *sdkp)
unsigned char *buf;
int ret = -ENOMEM;
- seq_zones_bitmap = sd_zbc_alloc_zone_bitmap(sdkp);
+ seq_zones_bitmap = sd_zbc_alloc_zone_bitmap(nr_zones, q->node);
if (!seq_zones_bitmap)
- return -ENOMEM;
+ return ERR_PTR(-ENOMEM);
buf = kmalloc(SD_ZBC_BUF_SIZE, GFP_KERNEL);
if (!buf)
@@ -557,7 +559,7 @@ static int sd_zbc_setup_seq_zones_bitmap(struct scsi_disk *sdkp)
if (ret)
goto out;
lba = sd_zbc_get_seq_zones(sdkp, buf, SD_ZBC_BUF_SIZE,
- seq_zones_bitmap);
+ zone_shift, seq_zones_bitmap);
}
if (lba != sdkp->capacity) {
@@ -569,12 +571,9 @@ static int sd_zbc_setup_seq_zones_bitmap(struct scsi_disk *sdkp)
kfree(buf);
if (ret) {
kfree(seq_zones_bitmap);
- return ret;
+ return ERR_PTR(ret);
}
-
- q->seq_zones_bitmap = seq_zones_bitmap;
-
- return 0;
+ return seq_zones_bitmap;
}
static void sd_zbc_cleanup(struct scsi_disk *sdkp)
@@ -590,44 +589,64 @@ static void sd_zbc_cleanup(struct scsi_disk *sdkp)
q->nr_zones = 0;
}
-static int sd_zbc_setup(struct scsi_disk *sdkp)
+static int sd_zbc_setup(struct scsi_disk *sdkp, u32 zone_blocks)
{
struct request_queue *q = sdkp->disk->queue;
+ u32 zone_shift = ilog2(zone_blocks);
+ u32 nr_zones;
int ret;
- /* READ16/WRITE16 is mandatory for ZBC disks */
- sdkp->device->use_16_for_rw = 1;
- sdkp->device->use_10_for_rw = 0;
-
/* chunk_sectors indicates the zone size */
- blk_queue_chunk_sectors(sdkp->disk->queue,
- logical_to_sectors(sdkp->device, sdkp->zone_blocks));
- sdkp->nr_zones =
- round_up(sdkp->capacity, sdkp->zone_blocks) >> sdkp->zone_shift;
+ blk_queue_chunk_sectors(q,
+ logical_to_sectors(sdkp->device, zone_blocks));
+ nr_zones = round_up(sdkp->capacity, zone_blocks) >> zone_shift;
/*
* Initialize the device request queue information if the number
* of zones changed.
*/
- if (sdkp->nr_zones != q->nr_zones) {
-
- sd_zbc_cleanup(sdkp);
-
- q->nr_zones = sdkp->nr_zones;
- if (sdkp->nr_zones) {
- q->seq_zones_wlock = sd_zbc_alloc_zone_bitmap(sdkp);
- if (!q->seq_zones_wlock) {
+ if (nr_zones != sdkp->nr_zones || nr_zones != q->nr_zones) {
+ unsigned long *seq_zones_wlock = NULL, *seq_zones_bitmap = NULL;
+ size_t zone_bitmap_size;
+
+ if (nr_zones) {
+ seq_zones_wlock = sd_zbc_alloc_zone_bitmap(nr_zones,
+ q->node);
+ if (!seq_zones_wlock) {
ret = -ENOMEM;
goto err;
}
- ret = sd_zbc_setup_seq_zones_bitmap(sdkp);
- if (ret) {
- sd_zbc_cleanup(sdkp);
+ seq_zones_bitmap = sd_zbc_setup_seq_zones_bitmap(sdkp,
+ zone_shift, nr_zones);
+ if (IS_ERR(seq_zones_bitmap)) {
+ ret = PTR_ERR(seq_zones_bitmap);
+ kfree(seq_zones_wlock);
goto err;
}
}
-
+ zone_bitmap_size = BITS_TO_LONGS(nr_zones) *
+ sizeof(unsigned long);
+ blk_mq_freeze_queue(q);
+ if (q->nr_zones != nr_zones) {
+ /* READ16/WRITE16 is mandatory for ZBC disks */
+ sdkp->device->use_16_for_rw = 1;
+ sdkp->device->use_10_for_rw = 0;
+
+ sdkp->zone_blocks = zone_blocks;
+ sdkp->zone_shift = zone_shift;
+ sdkp->nr_zones = nr_zones;
+ q->nr_zones = nr_zones;
+ swap(q->seq_zones_wlock, seq_zones_wlock);
+ swap(q->seq_zones_bitmap, seq_zones_bitmap);
+ } else if (memcmp(q->seq_zones_bitmap, seq_zones_bitmap,
+ zone_bitmap_size) != 0) {
+ memcpy(q->seq_zones_bitmap, seq_zones_bitmap,
+ zone_bitmap_size);
+ }
+ blk_mq_unfreeze_queue(q);
+ kfree(seq_zones_wlock);
+ kfree(seq_zones_bitmap);
}
return 0;
@@ -639,6 +658,7 @@ static int sd_zbc_setup(struct scsi_disk *sdkp)
int sd_zbc_read_zones(struct scsi_disk *sdkp, unsigned char *buf)
{
+ int64_t zone_blocks;
int ret;
if (!sd_is_zoned(sdkp))
@@ -675,12 +695,16 @@ int sd_zbc_read_zones(struct scsi_disk *sdkp, unsigned char *buf)
* Check zone size: only devices with a constant zone size (except
* an eventual last runt zone) that is a power of 2 are supported.
*/
- ret = sd_zbc_check_zone_size(sdkp);
- if (ret)
+ zone_blocks = sd_zbc_check_zone_size(sdkp);
+ ret = -EFBIG;
+ if (zone_blocks != (u32)zone_blocks)
+ goto err;
+ ret = zone_blocks;
+ if (ret < 0)
goto err;
/* The drive satisfies the kernel restrictions: set it up */
- ret = sd_zbc_setup(sdkp);
+ ret = sd_zbc_setup(sdkp, zone_blocks);
if (ret)
goto err;
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 9af3e0f430bc..21e21f273a21 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -605,6 +605,11 @@ struct request_queue {
* initialized by the low level device driver (e.g. scsi/sd.c).
* Stacking drivers (device mappers) may or may not initialize
* these fields.
+ *
+ * Reads of this information must be protected with blk_queue_enter() /
+ * blk_queue_exit(). Modifying this information is only allowed while
+ * no requests are being processed. See also blk_mq_freeze_queue() and
+ * blk_mq_unfreeze_queue().
*/
unsigned int nr_zones;
unsigned long *seq_zones_bitmap;
--
2.16.3
A zone reset only fails for conventional zones. Resetting a conventional
zone indicates a bug in the software that submitted the zone reset so
the information about a zone reset failure is useful information. Hence,
do not suppress information about zone reset failures.
Signed-off-by: Bart Van Assche <bart.vanassche(a)wdc.com>
Cc: Damien Le Moal <damien.lemoal(a)wdc.com>
Cc: Christoph Hellwig <hch(a)lst.de>
Cc: Hannes Reinecke <hare(a)suse.com>
Cc: stable(a)vger.kernel.org
---
drivers/scsi/sd_zbc.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c
index 2d0c06f7db3e..f290e8a9923d 100644
--- a/drivers/scsi/sd_zbc.c
+++ b/drivers/scsi/sd_zbc.c
@@ -284,18 +284,6 @@ void sd_zbc_complete(struct scsi_cmnd *cmd, unsigned int good_bytes,
switch (req_op(rq)) {
case REQ_OP_ZONE_RESET:
-
- if (result &&
- sshdr->sense_key == ILLEGAL_REQUEST &&
- sshdr->asc == 0x24)
- /*
- * INVALID FIELD IN CDB error: reset of a conventional
- * zone was attempted. Nothing to worry about, so be
- * quiet about the error.
- */
- rq->rq_flags |= RQF_QUIET;
- break;
-
case REQ_OP_WRITE:
case REQ_OP_WRITE_ZEROES:
case REQ_OP_WRITE_SAME:
--
2.16.3
scsi_io_completion() translates the sense key ILLEGAL REQUEST / ASC
0x21 into ACTION_FAIL. That means that setting cmd->allowed to zero
in sd_zbc_complete() for this sense code / ASC combination is not
necessary. Hence remove the code that resets cmd->allowed from
sd_zbc_complete().
Signed-off-by: Bart Van Assche <bart.vanassche(a)wdc.com>
Cc: Damien Le Moal <damien.lemoal(a)wdc.com>
Cc: Christoph Hellwig <hch(a)lst.de>
Cc: Hannes Reinecke <hare(a)suse.com>
Cc: stable(a)vger.kernel.org
---
drivers/scsi/sd_zbc.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c
index 41df75eea57b..2d0c06f7db3e 100644
--- a/drivers/scsi/sd_zbc.c
+++ b/drivers/scsi/sd_zbc.c
@@ -299,16 +299,6 @@ void sd_zbc_complete(struct scsi_cmnd *cmd, unsigned int good_bytes,
case REQ_OP_WRITE:
case REQ_OP_WRITE_ZEROES:
case REQ_OP_WRITE_SAME:
-
- if (result &&
- sshdr->sense_key == ILLEGAL_REQUEST &&
- sshdr->asc == 0x21)
- /*
- * INVALID ADDRESS FOR WRITE error: It is unlikely that
- * retrying write requests failed with any kind of
- * alignement error will result in success. So don't.
- */
- cmd->allowed = 0;
break;
case REQ_OP_ZONE_REPORT:
--
2.16.3
From: Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
(cherry picked from commit 36268223c1e9981d6cfc33aff8520b3bde4b8114)
As:
1) It's known that hypervisors lie about the environment anyhow (host
mismatch)
2) Even if the hypervisor (Xen, KVM, VMWare, etc) provided a valid
"correct" value, it all gets to be very murky when migration happens
(do you provide the "new" microcode of the machine?).
And in reality the cloud vendors are the ones that should make sure that
the microcode that is running is correct and we should just sing lalalala
and trust them.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com>
Signed-off-by: Thomas Gleixner <tglx(a)linutronix.de>
Reviewed-by: Paolo Bonzini <pbonzini(a)redhat.com>
Cc: Wanpeng Li <kernellwp(a)gmail.com>
Cc: kvm <kvm(a)vger.kernel.org>
Cc: Krčmář <rkrcmar(a)redhat.com>
Cc: Borislav Petkov <bp(a)alien8.de>
CC: "H. Peter Anvin" <hpa(a)zytor.com>
CC: stable(a)vger.kernel.org
Link: https://lkml.kernel.org/r/20180226213019.GE9497@char.us.oracle.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
[Yi Sun: port to 4.4]
Signed-off-by: Yi Sun <yi.y.sun(a)linux.intel.com>
---
arch/x86/kernel/cpu/intel.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index af28610..221c030 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -71,6 +71,13 @@ static bool bad_spectre_microcode(struct cpuinfo_x86 *c)
{
int i;
+ /*
+ * We know that the hypervisor lie to us on the microcode version so
+ * we may as well hope that it is running the correct version.
+ */
+ if (cpu_has(c, X86_FEATURE_HYPERVISOR))
+ return false;
+
for (i = 0; i < ARRAY_SIZE(spectre_bad_microcodes); i++) {
if (c->x86_model == spectre_bad_microcodes[i].model &&
c->x86_mask == spectre_bad_microcodes[i].stepping)
--
1.9.1
From: Paolo Bonzini <pbonzini(a)redhat.com>
commit 946fbbc13dce68902f64515b610eeb2a6c3d7a64 upstream.
vmx_vcpu_run() and svm_vcpu_run() are large functions, and giving
branch hints to the compiler can actually make a substantial cycle
difference by keeping the fast path contiguous in memory.
With this optimization, the retpoline-guest/retpoline-host case is
about 50 cycles faster.
Signed-off-by: Paolo Bonzini <pbonzini(a)redhat.com>
Reviewed-by: Jim Mattson <jmattson(a)google.com>
Cc: David Woodhouse <dwmw(a)amazon.co.uk>
Cc: KarimAllah Ahmed <karahmed(a)amazon.de>
Cc: Linus Torvalds <torvalds(a)linux-foundation.org>
Cc: Peter Zijlstra <peterz(a)infradead.org>
Cc: Radim Krčmář <rkrcmar(a)redhat.com>
Cc: Thomas Gleixner <tglx(a)linutronix.de>
Cc: kvm(a)vger.kernel.org
Cc: stable(a)vger.kernel.org
Link: http://lkml.kernel.org/r/20180222154318.20361-3-pbonzini@redhat.com
Signed-off-by: Ingo Molnar <mingo(a)kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
[Yi Sun: cherry pick to 4.4]
Signed-off-by: Yi Sun <yi.y.sun(a)linux.intel.com>
---
arch/x86/kvm/svm.c | 2 +-
arch/x86/kvm/vmx.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index cb46661..35da1e2 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -4017,7 +4017,7 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu)
* If the L02 MSR bitmap does not intercept the MSR, then we need to
* save it.
*/
- if (!msr_write_intercepted(vcpu, MSR_IA32_SPEC_CTRL))
+ if (unlikely(!msr_write_intercepted(vcpu, MSR_IA32_SPEC_CTRL)))
svm->spec_ctrl = native_read_msr(MSR_IA32_SPEC_CTRL);
if (svm->spec_ctrl)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 6c109df..1f165cc 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -8743,7 +8743,7 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
* If the L02 MSR bitmap does not intercept the MSR, then we need to
* save it.
*/
- if (!msr_write_intercepted(vcpu, MSR_IA32_SPEC_CTRL))
+ if (unlikely(!msr_write_intercepted(vcpu, MSR_IA32_SPEC_CTRL)))
vmx->spec_ctrl = native_read_msr(MSR_IA32_SPEC_CTRL);
if (vmx->spec_ctrl)
--
1.9.1
When looking up the clock we must use the client->dev as device since that
is the one which is probed via DT.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi(a)ti.com>
Cc: stable(a)vger.kernel.org # 4.16+
---
Hi,
Changes since v1:
- Removed the Fixes line and add tag only for v4.16 to avoid possible breakage
in pre v4.16.
Regards,
Peter
drivers/mfd/twl-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index d3133a371e27..c649344fd7f2 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -1177,7 +1177,7 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id)
twl_priv->ready = true;
/* setup clock framework */
- clocks_init(&pdev->dev, pdata ? pdata->clock : NULL);
+ clocks_init(&client->dev, pdata ? pdata->clock : NULL);
/* read TWL IDCODE Register */
if (twl_class_is_4030()) {
--
Peter
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
From: Hector Martin <marcan(a)marcan.st>
[ Upstream commit 188775181bc05f29372b305ef96485840e351fde ]
At least some JMicron controllers issue buggy oversized DMA reads when
fetching context descriptors, always fetching 0x20 bytes at once for
descriptors which are only 0x10 bytes long. This is often harmless, but
can cause page faults on modern systems with IOMMUs:
DMAR: [DMA Read] Request device [05:00.0] fault addr fff56000 [fault reason 06] PTE Read access is not set
firewire_ohci 0000:05:00.0: DMA context IT0 has stopped, error code: evt_descriptor_read
This works around the problem by always leaving 0x10 padding bytes at
the end of descriptor buffer pages, which should be harmless to do
unconditionally for controllers in case others have the same behavior.
Signed-off-by: Hector Martin <marcan(a)marcan.st>
Reviewed-by: Clemens Ladisch <clemens(a)ladisch.de>
Signed-off-by: Stefan Richter <stefanr(a)s5r6.in-berlin.de>
Signed-off-by: Sasha Levin <alexander.levin(a)microsoft.com>
---
drivers/firewire/ohci.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c
index ccf52368a073..45c048751f3b 100644
--- a/drivers/firewire/ohci.c
+++ b/drivers/firewire/ohci.c
@@ -1128,7 +1128,13 @@ static int context_add_buffer(struct context *ctx)
return -ENOMEM;
offset = (void *)&desc->buffer - (void *)desc;
- desc->buffer_size = PAGE_SIZE - offset;
+ /*
+ * Some controllers, like JMicron ones, always issue 0x20-byte DMA reads
+ * for descriptors, even 0x10-byte ones. This can cause page faults when
+ * an IOMMU is in use and the oversized read crosses a page boundary.
+ * Work around this by always leaving at least 0x10 bytes of padding.
+ */
+ desc->buffer_size = PAGE_SIZE - offset - 0x10;
desc->buffer_bus = bus_addr + offset;
desc->used = 0;
--
2.15.1
From: Fabio Estevam <fabio.estevam(a)nxp.com>
imx6ul and imx7 report the following error:
caam_jr 2142000.jr1: 40000789: DECO: desc idx 7:
Protocol Size Error - A protocol has seen an error in size. When
running RSA, pdb size N < (size of F) when no formatting is used; or
pdb size N < (F + 11) when formatting is used.
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at crypto/asymmetric_keys/public_key.c:148
public_key_verify_signature+0x27c/0x2b0
This error happens because the signature contains 257 bytes, including
a leading zero as the first element.
Fix the problem by stripping off the leading zero from input data
before feeding it to the CAAM accelerator.
Fixes: 8c419778ab57e497b5 ("crypto: caam - add support for RSA algorithm")
Cc: <stable(a)vger.kernel.org>
Reported-by: Martin Townsend <mtownsend1973(a)gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam(a)nxp.com>
---
Changes since v2:
- Check if the lenght is zero after calling caam_rsa_drop_leading_zeros()
drivers/crypto/caam/caampkc.c | 45 +++++++++++++++++++++++++++++++++++--------
1 file changed, 37 insertions(+), 8 deletions(-)
diff --git a/drivers/crypto/caam/caampkc.c b/drivers/crypto/caam/caampkc.c
index 7a897209..47467ff 100644
--- a/drivers/crypto/caam/caampkc.c
+++ b/drivers/crypto/caam/caampkc.c
@@ -166,6 +166,14 @@ static void rsa_priv_f3_done(struct device *dev, u32 *desc, u32 err,
akcipher_request_complete(req, err);
}
+static void caam_rsa_drop_leading_zeros(const u8 **ptr, size_t *nbytes)
+{
+ while (!**ptr && *nbytes) {
+ (*ptr)++;
+ (*nbytes)--;
+ }
+}
+
static struct rsa_edesc *rsa_edesc_alloc(struct akcipher_request *req,
size_t desclen)
{
@@ -178,7 +186,36 @@ static struct rsa_edesc *rsa_edesc_alloc(struct akcipher_request *req,
int sgc;
int sec4_sg_index, sec4_sg_len = 0, sec4_sg_bytes;
int src_nents, dst_nents;
+ const u8 *temp;
+ void *buffer;
+ size_t len;
+
+ buffer = kzalloc(req->src_len, GFP_ATOMIC);
+ if (!buffer)
+ return ERR_PTR(-ENOMEM);
+
+ sg_copy_to_buffer(req->src, sg_nents(req->src),
+ buffer, req->src_len);
+ temp = (u8 *)buffer;
+ len = req->src_len;
+ /*
+ * Check if the buffer contains leading zeros and if
+ * it does, drop the leading zeros
+ */
+ if (temp[0] == 0) {
+ caam_rsa_drop_leading_zeros(&temp, &len);
+ if (!len) {
+ kfree(buffer);
+ return ERR_PTR(-ENOMEM);
+ }
+
+ req->src_len = len;
+ sg_copy_from_buffer(req->src, sg_nents(req->src),
+ (void *)temp, req->src_len);
+ }
+
+ kfree(buffer);
src_nents = sg_nents_for_len(req->src, req->src_len);
dst_nents = sg_nents_for_len(req->dst, req->dst_len);
@@ -683,14 +720,6 @@ static void caam_rsa_free_key(struct caam_rsa_key *key)
memset(key, 0, sizeof(*key));
}
-static void caam_rsa_drop_leading_zeros(const u8 **ptr, size_t *nbytes)
-{
- while (!**ptr && *nbytes) {
- (*ptr)++;
- (*nbytes)--;
- }
-}
-
/**
* caam_read_rsa_crt - Used for reading dP, dQ, qInv CRT members.
* dP, dQ and qInv could decode to less than corresponding p, q length, as the
--
2.7.4
The patch below does not apply to the 4.16-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 339b2ae0cd5d4a58f9efe06e4ee36adbeca59228 Mon Sep 17 00:00:00 2001
From: Baoquan He <bhe(a)redhat.com>
Date: Wed, 14 Feb 2018 13:46:53 +0800
Subject: [PATCH] x86/apic: Fix restoring boot IRQ mode in reboot and
kexec/kdump
This is a regression fix.
Before, to fix erratum AVR31, the following commit:
522e66464467 ("x86/apic: Disable I/O APIC before shutdown of the local APIC")
... moved the lapic_shutdown() call to after disable_IO_APIC() in the reboot
and kexec/kdump code paths.
This introduced the following regression: disable_IO_APIC() not only clears
the IO-APIC, but it also restores boot IRQ mode by setting the
LAPIC/APIC/IMCR, calling lapic_shutdown() after disable_IO_APIC() will
disable LAPIC and ruin the possible virtual wire mode setting which
the code has been trying to do all along.
The consequence is that a KVM guest kernel always prints the warning below
during kexec/kdump as the kernel boots up:
[ 0.001000] WARNING: CPU: 0 PID: 0 at arch/x86/kernel/apic/apic.c:1467 setup_local_APIC+0x228/0x330
[ ........]
[ 0.001000] Call Trace:
[ 0.001000] apic_bsp_setup+0x56/0x74
[ 0.001000] x86_late_time_init+0x11/0x16
[ 0.001000] start_kernel+0x3c9/0x486
[ 0.001000] secondary_startup_64+0xa5/0xb0
[ ........]
[ 0.001000] masked ExtINT on CPU#0
To fix this, just call clear_IO_APIC() to stop the IO-APIC where
disable_IO_APIC() was called, and call restore_boot_irq_mode() to
restore boot IRQ mode before a reboot or a kexec/kdump jump.
Signed-off-by: Baoquan He <bhe(a)redhat.com>
Reviewed-by: Eric W. Biederman <ebiederm(a)xmission.com>
Cc: Linus Torvalds <torvalds(a)linux-foundation.org>
Cc: Peter Zijlstra <peterz(a)infradead.org>
Cc: Thomas Gleixner <tglx(a)linutronix.de>
Cc: douly.fnst(a)cn.fujitsu.com
Cc: joro(a)8bytes.org
Cc: prarit(a)redhat.com
Cc: stable(a)vger.kernel.org
Cc: uobergfe(a)redhat.com
Fixes: commit 522e66464467 ("x86/apic: Disable I/O APIC before shutdown of the local APIC")
Link: http://lkml.kernel.org/r/20180214054656.3780-4-bhe@redhat.com
[ Rewrote the changelog. ]
Signed-off-by: Ingo Molnar <mingo(a)kernel.org>
diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c
index 10e74d4778a1..1f6680427ff0 100644
--- a/arch/x86/kernel/crash.c
+++ b/arch/x86/kernel/crash.c
@@ -199,9 +199,10 @@ void native_machine_crash_shutdown(struct pt_regs *regs)
#ifdef CONFIG_X86_IO_APIC
/* Prevent crash_kexec() from deadlocking on ioapic_lock. */
ioapic_zap_locks();
- disable_IO_APIC();
+ clear_IO_APIC();
#endif
lapic_shutdown();
+ restore_boot_irq_mode();
#ifdef CONFIG_HPET_TIMER
hpet_disable();
#endif
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index 2126b9d27c34..725624b6c0c0 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -666,7 +666,7 @@ void native_machine_shutdown(void)
* Even without the erratum, it still makes sense to quiet IO APIC
* before disabling Local APIC.
*/
- disable_IO_APIC();
+ clear_IO_APIC();
#endif
#ifdef CONFIG_SMP
@@ -680,6 +680,7 @@ void native_machine_shutdown(void)
#endif
lapic_shutdown();
+ restore_boot_irq_mode();
#ifdef CONFIG_HPET_TIMER
hpet_disable();
The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From f572a034d9e07157dd07d2b6be3a1459b5574b58 Mon Sep 17 00:00:00 2001
From: Greentime Hu <greentime(a)andestech.com>
Date: Thu, 16 Nov 2017 19:33:35 +0800
Subject: [PATCH] earlycon: add reg-offset to physical address before mapping
It will get the wrong virtual address because port->mapbase is not added
the correct reg-offset yet. We have to update it before earlycon_map()
is called
Signed-off-by: Greentime Hu <greentime(a)andestech.com>
Acked-by: Arnd Bergmann <arnd(a)arndb.de>
Acked-by: Rob Herring <robh(a)kernel.org>
Cc: Peter Hurley <peter(a)hurleysoftware.com>
Cc: stable(a)vger.kernel.org
Fixes: 088da2a17619 ("of: earlycon: Initialize port fields from DT
properties")
diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
index 870e84fb6e39..a24278380fec 100644
--- a/drivers/tty/serial/earlycon.c
+++ b/drivers/tty/serial/earlycon.c
@@ -245,11 +245,12 @@ int __init of_setup_earlycon(const struct earlycon_id *match,
}
port->mapbase = addr;
port->uartclk = BASE_BAUD * 16;
- port->membase = earlycon_map(port->mapbase, SZ_4K);
val = of_get_flat_dt_prop(node, "reg-offset", NULL);
if (val)
port->mapbase += be32_to_cpu(*val);
+ port->membase = earlycon_map(port->mapbase, SZ_4K);
+
val = of_get_flat_dt_prop(node, "reg-shift", NULL);
if (val)
port->regshift = be32_to_cpu(*val);
The patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From f572a034d9e07157dd07d2b6be3a1459b5574b58 Mon Sep 17 00:00:00 2001
From: Greentime Hu <greentime(a)andestech.com>
Date: Thu, 16 Nov 2017 19:33:35 +0800
Subject: [PATCH] earlycon: add reg-offset to physical address before mapping
It will get the wrong virtual address because port->mapbase is not added
the correct reg-offset yet. We have to update it before earlycon_map()
is called
Signed-off-by: Greentime Hu <greentime(a)andestech.com>
Acked-by: Arnd Bergmann <arnd(a)arndb.de>
Acked-by: Rob Herring <robh(a)kernel.org>
Cc: Peter Hurley <peter(a)hurleysoftware.com>
Cc: stable(a)vger.kernel.org
Fixes: 088da2a17619 ("of: earlycon: Initialize port fields from DT
properties")
diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
index 870e84fb6e39..a24278380fec 100644
--- a/drivers/tty/serial/earlycon.c
+++ b/drivers/tty/serial/earlycon.c
@@ -245,11 +245,12 @@ int __init of_setup_earlycon(const struct earlycon_id *match,
}
port->mapbase = addr;
port->uartclk = BASE_BAUD * 16;
- port->membase = earlycon_map(port->mapbase, SZ_4K);
val = of_get_flat_dt_prop(node, "reg-offset", NULL);
if (val)
port->mapbase += be32_to_cpu(*val);
+ port->membase = earlycon_map(port->mapbase, SZ_4K);
+
val = of_get_flat_dt_prop(node, "reg-shift", NULL);
if (val)
port->regshift = be32_to_cpu(*val);
The patch below does not apply to the 4.15-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From f572a034d9e07157dd07d2b6be3a1459b5574b58 Mon Sep 17 00:00:00 2001
From: Greentime Hu <greentime(a)andestech.com>
Date: Thu, 16 Nov 2017 19:33:35 +0800
Subject: [PATCH] earlycon: add reg-offset to physical address before mapping
It will get the wrong virtual address because port->mapbase is not added
the correct reg-offset yet. We have to update it before earlycon_map()
is called
Signed-off-by: Greentime Hu <greentime(a)andestech.com>
Acked-by: Arnd Bergmann <arnd(a)arndb.de>
Acked-by: Rob Herring <robh(a)kernel.org>
Cc: Peter Hurley <peter(a)hurleysoftware.com>
Cc: stable(a)vger.kernel.org
Fixes: 088da2a17619 ("of: earlycon: Initialize port fields from DT
properties")
diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
index 870e84fb6e39..a24278380fec 100644
--- a/drivers/tty/serial/earlycon.c
+++ b/drivers/tty/serial/earlycon.c
@@ -245,11 +245,12 @@ int __init of_setup_earlycon(const struct earlycon_id *match,
}
port->mapbase = addr;
port->uartclk = BASE_BAUD * 16;
- port->membase = earlycon_map(port->mapbase, SZ_4K);
val = of_get_flat_dt_prop(node, "reg-offset", NULL);
if (val)
port->mapbase += be32_to_cpu(*val);
+ port->membase = earlycon_map(port->mapbase, SZ_4K);
+
val = of_get_flat_dt_prop(node, "reg-shift", NULL);
if (val)
port->regshift = be32_to_cpu(*val);
The patch below does not apply to the 4.16-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From f572a034d9e07157dd07d2b6be3a1459b5574b58 Mon Sep 17 00:00:00 2001
From: Greentime Hu <greentime(a)andestech.com>
Date: Thu, 16 Nov 2017 19:33:35 +0800
Subject: [PATCH] earlycon: add reg-offset to physical address before mapping
It will get the wrong virtual address because port->mapbase is not added
the correct reg-offset yet. We have to update it before earlycon_map()
is called
Signed-off-by: Greentime Hu <greentime(a)andestech.com>
Acked-by: Arnd Bergmann <arnd(a)arndb.de>
Acked-by: Rob Herring <robh(a)kernel.org>
Cc: Peter Hurley <peter(a)hurleysoftware.com>
Cc: stable(a)vger.kernel.org
Fixes: 088da2a17619 ("of: earlycon: Initialize port fields from DT
properties")
diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
index 870e84fb6e39..a24278380fec 100644
--- a/drivers/tty/serial/earlycon.c
+++ b/drivers/tty/serial/earlycon.c
@@ -245,11 +245,12 @@ int __init of_setup_earlycon(const struct earlycon_id *match,
}
port->mapbase = addr;
port->uartclk = BASE_BAUD * 16;
- port->membase = earlycon_map(port->mapbase, SZ_4K);
val = of_get_flat_dt_prop(node, "reg-offset", NULL);
if (val)
port->mapbase += be32_to_cpu(*val);
+ port->membase = earlycon_map(port->mapbase, SZ_4K);
+
val = of_get_flat_dt_prop(node, "reg-shift", NULL);
if (val)
port->regshift = be32_to_cpu(*val);
Hi,
Building 4.9.94 in the same way we have been building previous 4.9 releases yields the following error:
DEBUG: tests/code-reading.c: In function 'read_object_code':
DEBUG: tests/code-reading.c:228:19: error: 'KMOD_DECOMP_LEN' undeclared (first use in this function)
DEBUG: char decomp_name[KMOD_DECOMP_LEN];
DEBUG: ^
DEBUG: tests/code-reading.c:228:19: note: each undeclared identifier is reported only once for each
function it appears in
DEBUG: tests/code-reading.c:291:3: warning: implicit declaration of function
'dso__decompress_kmodule_path' [-Wimplicit-function-declaration]
DEBUG: if (dso__decompress_kmodule_path(al.map->dso, objdump_name,
DEBUG: ^
DEBUG: tests/code-reading.c:291:3: warning: nested extern declaration of
'dso__decompress_kmodule_path' [-Wnested-externs]
DEBUG: tests/code-reading.c:228:7: warning: unused variable 'decomp_name' [-Wunused-variable]
DEBUG: char decomp_name[KMOD_DECOMP_LEN];
DEBUG: ^
DEBUG: CC tests/topology.o
DEBUG: CC tests/cpumap.o
DEBUG: CC tests/stat.o
DEBUG: CC tests/event_update.o
DEBUG: mv: cannot stat 'tests/.code-reading.o.tmp': No such file or directory
DEBUG: make[3]: *** [tests/code-reading.o] Error 1
DEBUG: make[3]: *** Waiting for unfinished jobs....
DEBUG: make[2]: *** [util] Error 2
DEBUG: make[1]: *** [libperf-in.o] Error 2
DEBUG: make[1]: *** Waiting for unfinished jobs....
DEBUG: LD bench/perf-in.o
DEBUG: make[2]: *** [tests] Error 2
DEBUG: make[1]: *** [perf-in.o] Error 2
As far as I can see, KMOD_DECOMP_LEN was introduced by 7525a238be8f ("perf tests: Decompress kernel
module before objdump"), but I have zero deep knowledge in this area so I may be very wrong here.
Cheers,
Pavlos Parissis
The normal request completion can be done before or during handling
BLK_EH_RESET_TIMER, and this race may cause the request to never
be completed since driver's .timeout() may always return
BLK_EH_RESET_TIMER.
This issue can't be fixed completely by driver, since the normal
completion can be done between returning .timeout() and handling
BLK_EH_RESET_TIMER.
This patch fixes the race by introducing rq state of MQ_RQ_COMPLETE_IN_RESET,
and reading/writing rq's state by holding queue lock, which can be
per-request actually, but just not necessary to introduce one lock for
so unusual event.
Also handle the timeout requests in two steps:
1) in 1st step, call .timeout(), and reset timer for BLK_EH_RESET_TIMER
2) in 2nd step, sync with normal completion path by holding queue lock
for avoiding race between BLK_EH_RESET_TIMER and normal completion.
Cc: "jianchao.wang" <jianchao.w.wang(a)oracle.com>
Cc: Bart Van Assche <bart.vanassche(a)wdc.com>
Cc: Tejun Heo <tj(a)kernel.org>
Cc: Christoph Hellwig <hch(a)lst.de>
Cc: Ming Lei <ming.lei(a)redhat.com>
Cc: Sagi Grimberg <sagi(a)grimberg.me>
Cc: Israel Rukshin <israelr(a)mellanox.com>,
Cc: Max Gurtovoy <maxg(a)mellanox.com>
Cc: stable(a)vger.kernel.org
Cc: Martin Steigerwald <Martin(a)Lichtvoll.de>
Signed-off-by: Ming Lei <ming.lei(a)redhat.com>
---
block/blk-mq.c | 116 ++++++++++++++++++++++++++++++++++++++++---------
block/blk-mq.h | 1 +
include/linux/blkdev.h | 6 +++
3 files changed, 102 insertions(+), 21 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index d6a21898933d..9415e65302a8 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -630,10 +630,27 @@ void blk_mq_complete_request(struct request *rq)
* However, that would complicate paths which want to synchronize
* against us. Let stay in sync with the issue path so that
* hctx_lock() covers both issue and completion paths.
+ *
+ * Cover complete vs BLK_EH_RESET_TIMER race in slow path with
+ * holding queue lock.
*/
hctx_lock(hctx, &srcu_idx);
if (blk_mq_rq_aborted_gstate(rq) != rq->gstate)
__blk_mq_complete_request(rq);
+ else {
+ unsigned long flags;
+ bool need_complete = false;
+
+ spin_lock_irqsave(q->queue_lock, flags);
+ if (!blk_mq_rq_aborted_gstate(rq))
+ need_complete = true;
+ else
+ blk_mq_rq_update_state(rq, MQ_RQ_COMPLETE_IN_TIMEOUT);
+ spin_unlock_irqrestore(q->queue_lock, flags);
+
+ if (need_complete)
+ __blk_mq_complete_request(rq);
+ }
hctx_unlock(hctx, srcu_idx);
}
EXPORT_SYMBOL(blk_mq_complete_request);
@@ -810,7 +827,7 @@ struct blk_mq_timeout_data {
unsigned int nr_expired;
};
-static void blk_mq_rq_timed_out(struct request *req, bool reserved)
+static void blk_mq_rq_pre_timed_out(struct request *req, bool reserved)
{
const struct blk_mq_ops *ops = req->q->mq_ops;
enum blk_eh_timer_return ret = BLK_EH_RESET_TIMER;
@@ -818,18 +835,44 @@ static void blk_mq_rq_timed_out(struct request *req, bool reserved)
if (ops->timeout)
ret = ops->timeout(req, reserved);
+ if (ret == BLK_EH_RESET_TIMER)
+ blk_add_timer(req);
+
+ req->timeout_ret = ret;
+}
+
+static void blk_mq_rq_timed_out(struct request *req, bool reserved)
+{
+ enum blk_eh_timer_return ret = req->timeout_ret;
+ unsigned long flags;
+
switch (ret) {
case BLK_EH_HANDLED:
+ spin_lock_irqsave(req->q->queue_lock, flags);
+ complete_rq:
+ if (blk_mq_rq_state(req) == MQ_RQ_COMPLETE_IN_TIMEOUT)
+ blk_mq_rq_update_state(req, MQ_RQ_IN_FLIGHT);
+ spin_unlock_irqrestore(req->q->queue_lock, flags);
__blk_mq_complete_request(req);
break;
case BLK_EH_RESET_TIMER:
/*
- * As nothing prevents from completion happening while
- * ->aborted_gstate is set, this may lead to ignored
- * completions and further spurious timeouts.
+ * The normal completion may happen during handling the
+ * timeout, or even after returning from .timeout(), so
+ * once the request has been completed, we can't reset
+ * timer any more since this request may be handled as
+ * BLK_EH_RESET_TIMER in next timeout handling too, and
+ * it has to be completed in this situation.
+ *
+ * Holding the queue lock to cover read/write rq's
+ * aborted_gstate and normal state, so the race can be
+ * avoided completely.
*/
+ spin_lock_irqsave(req->q->queue_lock, flags);
blk_mq_rq_update_aborted_gstate(req, 0);
- blk_add_timer(req);
+ if (blk_mq_rq_state(req) == MQ_RQ_COMPLETE_IN_TIMEOUT)
+ goto complete_rq;
+ spin_unlock_irqrestore(req->q->queue_lock, flags);
break;
case BLK_EH_NOT_HANDLED:
req->rq_flags |= RQF_MQ_TIMEOUT_EXPIRED;
@@ -875,7 +918,7 @@ static void blk_mq_check_expired(struct blk_mq_hw_ctx *hctx,
}
}
-static void blk_mq_terminate_expired(struct blk_mq_hw_ctx *hctx,
+static void blk_mq_prepare_expired(struct blk_mq_hw_ctx *hctx,
struct request *rq, void *priv, bool reserved)
{
/*
@@ -887,9 +930,40 @@ static void blk_mq_terminate_expired(struct blk_mq_hw_ctx *hctx,
*/
if (!(rq->rq_flags & RQF_MQ_TIMEOUT_EXPIRED) &&
READ_ONCE(rq->gstate) == rq->aborted_gstate)
+ blk_mq_rq_pre_timed_out(rq, reserved);
+}
+
+static void blk_mq_terminate_expired(struct blk_mq_hw_ctx *hctx,
+ struct request *rq, void *priv, bool reserved)
+{
+ if (!(rq->rq_flags & RQF_MQ_TIMEOUT_EXPIRED) &&
+ READ_ONCE(rq->gstate) == rq->aborted_gstate)
blk_mq_rq_timed_out(rq, reserved);
}
+static void blk_mq_timeout_synchronize_rcu(struct request_queue *q,
+ bool reset_expired)
+{
+ struct blk_mq_hw_ctx *hctx;
+ int i;
+ bool has_rcu = false;
+
+ queue_for_each_hw_ctx(q, hctx, i) {
+ if (!hctx->nr_expired)
+ continue;
+
+ if (!(hctx->flags & BLK_MQ_F_BLOCKING))
+ has_rcu = true;
+ else
+ synchronize_srcu(hctx->srcu);
+
+ if (reset_expired)
+ hctx->nr_expired = 0;
+ }
+ if (has_rcu)
+ synchronize_rcu();
+}
+
static void blk_mq_timeout_work(struct work_struct *work)
{
struct request_queue *q =
@@ -899,8 +973,6 @@ static void blk_mq_timeout_work(struct work_struct *work)
.next_set = 0,
.nr_expired = 0,
};
- struct blk_mq_hw_ctx *hctx;
- int i;
/* A deadlock might occur if a request is stuck requiring a
* timeout at the same time a queue freeze is waiting
@@ -922,27 +994,26 @@ static void blk_mq_timeout_work(struct work_struct *work)
blk_mq_queue_tag_busy_iter(q, blk_mq_check_expired, &data);
if (data.nr_expired) {
- bool has_rcu = false;
-
/*
* Wait till everyone sees ->aborted_gstate. The
* sequential waits for SRCUs aren't ideal. If this ever
* becomes a problem, we can add per-hw_ctx rcu_head and
* wait in parallel.
*/
- queue_for_each_hw_ctx(q, hctx, i) {
- if (!hctx->nr_expired)
- continue;
+ blk_mq_timeout_synchronize_rcu(q, false);
- if (!(hctx->flags & BLK_MQ_F_BLOCKING))
- has_rcu = true;
- else
- synchronize_srcu(hctx->srcu);
+ /* call .timeout() for timed-out requests */
+ blk_mq_queue_tag_busy_iter(q, blk_mq_prepare_expired, NULL);
- hctx->nr_expired = 0;
- }
- if (has_rcu)
- synchronize_rcu();
+ /*
+ * If .timeout returns BLK_EH_HANDLED, wait till current
+ * completion is done, for avoiding to update state on
+ * completed request.
+ *
+ * If .timeout returns BLK_EH_RESET_TIMER, wait till
+ * blk_add_timer() is commited before completing this rq.
+ */
+ blk_mq_timeout_synchronize_rcu(q, true);
/* terminate the ones we won */
blk_mq_queue_tag_busy_iter(q, blk_mq_terminate_expired, NULL);
@@ -952,6 +1023,9 @@ static void blk_mq_timeout_work(struct work_struct *work)
data.next = blk_rq_timeout(round_jiffies_up(data.next));
mod_timer(&q->timeout, data.next);
} else {
+ struct blk_mq_hw_ctx *hctx;
+ int i;
+
/*
* Request timeouts are handled as a forward rolling timer. If
* we end up here it means that no requests are pending and
diff --git a/block/blk-mq.h b/block/blk-mq.h
index 88c558f71819..0426d048743d 100644
--- a/block/blk-mq.h
+++ b/block/blk-mq.h
@@ -35,6 +35,7 @@ enum mq_rq_state {
MQ_RQ_IDLE = 0,
MQ_RQ_IN_FLIGHT = 1,
MQ_RQ_COMPLETE = 2,
+ MQ_RQ_COMPLETE_IN_TIMEOUT = 3,
MQ_RQ_STATE_BITS = 2,
MQ_RQ_STATE_MASK = (1 << MQ_RQ_STATE_BITS) - 1,
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 9af3e0f430bc..8278f67d39a6 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -252,8 +252,14 @@ struct request {
struct list_head timeout_list;
union {
+ /* used after completion */
struct __call_single_data csd;
+
+ /* used in io scheduler, before dispatch */
u64 fifo_time;
+
+ /* used after dispatch and before completion */
+ int timeout_ret;
};
/*
--
2.9.5
The normal request completion can be done before or during handling
BLK_EH_RESET_TIMER, and this race may cause the request to never
be completed since driver's .timeout() may always return
BLK_EH_RESET_TIMER.
This issue can't be fixed completely by driver, since the normal
completion can be done between returning .timeout() and handling
BLK_EH_RESET_TIMER.
This patch fixes the race by introducing rq state of MQ_RQ_COMPLETE_IN_RESET,
and reading/writing rq's state by holding queue lock, which can be
per-request actually, but just not necessary to introduce one lock for
so unusual event.
Also when .timeout() returns BLK_EH_HANDLED, sync with normal completion
path before completing this timed-out rq finally for avoiding this rq's
state touched by normal completion.
Cc: "jianchao.wang" <jianchao.w.wang(a)oracle.com>
Cc: Bart Van Assche <bart.vanassche(a)wdc.com>
Cc: Tejun Heo <tj(a)kernel.org>
Cc: Christoph Hellwig <hch(a)lst.de>
Cc: Ming Lei <ming.lei(a)redhat.com>
Cc: Sagi Grimberg <sagi(a)grimberg.me>
Cc: Israel Rukshin <israelr(a)mellanox.com>,
Cc: Max Gurtovoy <maxg(a)mellanox.com>
Cc: stable(a)vger.kernel.org
Signed-off-by: Ming Lei <ming.lei(a)redhat.com>
---
V3:
- before completing rq for BLK_EH_HANDLED, sync with normal
completion path
- make sure rq's state updated as MQ_RQ_IN_FLIGHT before completing
V2:
- rename the new flag as MQ_RQ_COMPLETE_IN_TIMEOUT
- fix lock uses in blk_mq_rq_timed_out
- document re-order between blk_add_timer() and
blk_mq_rq_update_aborted_gstate(req, 0)
block/blk-mq.c | 85 +++++++++++++++++++++++++++++++++++++++++++++++-----------
block/blk-mq.h | 1 +
2 files changed, 70 insertions(+), 16 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 0dc9e341c2a7..d70f69a32226 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -198,23 +198,12 @@ void blk_mq_quiesce_queue_nowait(struct request_queue *q)
}
EXPORT_SYMBOL_GPL(blk_mq_quiesce_queue_nowait);
-/**
- * blk_mq_quiesce_queue() - wait until all ongoing dispatches have finished
- * @q: request queue.
- *
- * Note: this function does not prevent that the struct request end_io()
- * callback function is invoked. Once this function is returned, we make
- * sure no dispatch can happen until the queue is unquiesced via
- * blk_mq_unquiesce_queue().
- */
-void blk_mq_quiesce_queue(struct request_queue *q)
+static void blk_mq_queue_synchronize_rcu(struct request_queue *q)
{
struct blk_mq_hw_ctx *hctx;
unsigned int i;
bool rcu = false;
- blk_mq_quiesce_queue_nowait(q);
-
queue_for_each_hw_ctx(q, hctx, i) {
if (hctx->flags & BLK_MQ_F_BLOCKING)
synchronize_srcu(hctx->srcu);
@@ -224,6 +213,21 @@ void blk_mq_quiesce_queue(struct request_queue *q)
if (rcu)
synchronize_rcu();
}
+
+/**
+ * blk_mq_quiesce_queue() - wait until all ongoing dispatches have finished
+ * @q: request queue.
+ *
+ * Note: this function does not prevent that the struct request end_io()
+ * callback function is invoked. Once this function is returned, we make
+ * sure no dispatch can happen until the queue is unquiesced via
+ * blk_mq_unquiesce_queue().
+ */
+void blk_mq_quiesce_queue(struct request_queue *q)
+{
+ blk_mq_quiesce_queue_nowait(q);
+ blk_mq_queue_synchronize_rcu(q);
+}
EXPORT_SYMBOL_GPL(blk_mq_quiesce_queue);
/*
@@ -630,10 +634,27 @@ void blk_mq_complete_request(struct request *rq)
* However, that would complicate paths which want to synchronize
* against us. Let stay in sync with the issue path so that
* hctx_lock() covers both issue and completion paths.
+ *
+ * Cover complete vs BLK_EH_RESET_TIMER race in slow path with
+ * holding queue lock.
*/
hctx_lock(hctx, &srcu_idx);
if (blk_mq_rq_aborted_gstate(rq) != rq->gstate)
__blk_mq_complete_request(rq);
+ else {
+ unsigned long flags;
+ bool need_complete = false;
+
+ spin_lock_irqsave(q->queue_lock, flags);
+ if (!blk_mq_rq_aborted_gstate(rq))
+ need_complete = true;
+ else
+ blk_mq_rq_update_state(rq, MQ_RQ_COMPLETE_IN_TIMEOUT);
+ spin_unlock_irqrestore(q->queue_lock, flags);
+
+ if (need_complete)
+ __blk_mq_complete_request(rq);
+ }
hctx_unlock(hctx, srcu_idx);
}
EXPORT_SYMBOL(blk_mq_complete_request);
@@ -814,6 +835,7 @@ static void blk_mq_rq_timed_out(struct request *req, bool reserved)
{
const struct blk_mq_ops *ops = req->q->mq_ops;
enum blk_eh_timer_return ret = BLK_EH_RESET_TIMER;
+ unsigned long flags;
req->rq_flags |= RQF_MQ_TIMEOUT_EXPIRED;
@@ -822,16 +844,47 @@ static void blk_mq_rq_timed_out(struct request *req, bool reserved)
switch (ret) {
case BLK_EH_HANDLED:
+ /*
+ * If .timeout returns BLK_EH_HANDLED, this rq shouldn't
+ * be completed by normal irq context any more, but for
+ * the sake of safety, sync with normal completion path
+ * before completing this request finally because the
+ * normal completion path may touch this rq's state.
+ */
+ blk_mq_queue_synchronize_rcu(req->q);
+
+ spin_lock_irqsave(req->q->queue_lock, flags);
+ complete_rq:
+ if (blk_mq_rq_state(req) == MQ_RQ_COMPLETE_IN_TIMEOUT)
+ blk_mq_rq_update_state(req, MQ_RQ_IN_FLIGHT);
+ spin_unlock_irqrestore(req->q->queue_lock, flags);
__blk_mq_complete_request(req);
break;
case BLK_EH_RESET_TIMER:
/*
- * As nothing prevents from completion happening while
- * ->aborted_gstate is set, this may lead to ignored
- * completions and further spurious timeouts.
+ * The normal completion may happen during handling the
+ * timeout, or even after returning from .timeout(), so
+ * once the request has been completed, we can't reset
+ * timer any more since this request may be handled as
+ * BLK_EH_RESET_TIMER in next timeout handling too, and
+ * it has to be completed in this situation.
+ *
+ * Holding the queue lock to cover read/write rq's
+ * aborted_gstate and normal state, so the race can be
+ * avoided completely.
+ *
+ * blk_add_timer() may be re-ordered with resetting
+ * aborted_gstate, and the only side-effec is that if this
+ * request is recycled after aborted_gstate is cleared, it
+ * may be timed out a bit late, that is what we can survive
+ * given timeout event is so unusual.
*/
- blk_mq_rq_update_aborted_gstate(req, 0);
+ spin_lock_irqsave(req->q->queue_lock, flags);
+ if (blk_mq_rq_state(req) == MQ_RQ_COMPLETE_IN_TIMEOUT)
+ goto complete_rq;
blk_add_timer(req);
+ blk_mq_rq_update_aborted_gstate(req, 0);
+ spin_unlock_irqrestore(req->q->queue_lock, flags);
break;
case BLK_EH_NOT_HANDLED:
break;
diff --git a/block/blk-mq.h b/block/blk-mq.h
index 88c558f71819..0426d048743d 100644
--- a/block/blk-mq.h
+++ b/block/blk-mq.h
@@ -35,6 +35,7 @@ enum mq_rq_state {
MQ_RQ_IDLE = 0,
MQ_RQ_IN_FLIGHT = 1,
MQ_RQ_COMPLETE = 2,
+ MQ_RQ_COMPLETE_IN_TIMEOUT = 3,
MQ_RQ_STATE_BITS = 2,
MQ_RQ_STATE_MASK = (1 << MQ_RQ_STATE_BITS) - 1,
--
2.9.5
From: Takashi Iwai <tiwai(a)suse.de>
[ Upstream commit d7f910bfedd863d13ea320030fe98e42d0938ed5 ]
For accessing the snd_timer_user queue indices, we take tu->qlock.
But it's forgotten in a couple of places.
The one in snd_timer_user_params() should be safe without the
spinlock as the timer is already stopped. But it's better for
consistency.
The one in poll is just a read-out, so it's not inevitably needed, but
it'd be good to make the result consistent, too.
Tested-by: Alexander Potapenko <glider(a)google.com>
Signed-off-by: Takashi Iwai <tiwai(a)suse.de>
Signed-off-by: Sasha Levin <alexander.levin(a)microsoft.com>
---
sound/core/timer.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sound/core/timer.c b/sound/core/timer.c
index 48eaccba82a3..fd622aa0bb93 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -1771,6 +1771,7 @@ static int snd_timer_user_params(struct file *file,
}
}
}
+ spin_lock_irq(&tu->qlock);
tu->qhead = tu->qtail = tu->qused = 0;
if (tu->timeri->flags & SNDRV_TIMER_IFLG_EARLY_EVENT) {
if (tu->tread) {
@@ -1791,6 +1792,7 @@ static int snd_timer_user_params(struct file *file,
}
tu->filter = params.filter;
tu->ticks = params.ticks;
+ spin_unlock_irq(&tu->qlock);
err = 0;
_end:
if (copy_to_user(_params, ¶ms, sizeof(params)))
@@ -2029,10 +2031,12 @@ static unsigned int snd_timer_user_poll(struct file *file, poll_table * wait)
poll_wait(file, &tu->qchange_sleep, wait);
mask = 0;
+ spin_lock_irq(&tu->qlock);
if (tu->qused)
mask |= POLLIN | POLLRDNORM;
if (tu->disconnected)
mask |= POLLERR;
+ spin_unlock_irq(&tu->qlock);
return mask;
}
--
2.15.1
From: Fabio Estevam <fabio.estevam(a)nxp.com>
imx6ul and imx7 report the following error:
caam_jr 2142000.jr1: 40000789: DECO: desc idx 7:
Protocol Size Error - A protocol has seen an error in size. When
running RSA, pdb size N < (size of F) when no formatting is used; or
pdb size N < (F + 11) when formatting is used.
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at crypto/asymmetric_keys/public_key.c:148
public_key_verify_signature+0x27c/0x2b0
This error happens because the signature contains 257 bytes, including
a leading zero as the first element.
Fix the problem by stripping off the leading zero from input data
before feeding it to the CAAM accelerator.
Fixes: 8c419778ab57e497b5 ("crypto: caam - add support for RSA algorithm")
Cc: <stable(a)vger.kernel.org>
Reported-by: Martin Townsend <mtownsend1973(a)gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam(a)nxp.com>
---
Changes since v1:
- Use a temp pointer
- Assign len to req->src_len , so that more than one leading zero
can be taken into account
drivers/crypto/caam/caampkc.c | 45 +++++++++++++++++++++++++++++++++++--------
1 file changed, 37 insertions(+), 8 deletions(-)
diff --git a/drivers/crypto/caam/caampkc.c b/drivers/crypto/caam/caampkc.c
index 7a897209..5f3e627 100644
--- a/drivers/crypto/caam/caampkc.c
+++ b/drivers/crypto/caam/caampkc.c
@@ -166,6 +166,14 @@ static void rsa_priv_f3_done(struct device *dev, u32 *desc, u32 err,
akcipher_request_complete(req, err);
}
+static void caam_rsa_drop_leading_zeros(const u8 **ptr, size_t *nbytes)
+{
+ while (!**ptr && *nbytes) {
+ (*ptr)++;
+ (*nbytes)--;
+ }
+}
+
static struct rsa_edesc *rsa_edesc_alloc(struct akcipher_request *req,
size_t desclen)
{
@@ -178,7 +186,36 @@ static struct rsa_edesc *rsa_edesc_alloc(struct akcipher_request *req,
int sgc;
int sec4_sg_index, sec4_sg_len = 0, sec4_sg_bytes;
int src_nents, dst_nents;
+ const u8 *temp;
+ void *buffer;
+ size_t len;
+
+ buffer = kzalloc(req->src_len, GFP_ATOMIC);
+ if (!buffer)
+ return ERR_PTR(-ENOMEM);
+
+ sg_copy_to_buffer(req->src, sg_nents(req->src),
+ buffer, req->src_len);
+ temp = (u8 *)buffer;
+ len = req->src_len;
+ /*
+ * Check if the buffer contains leading zeros and if
+ * it does, drop the leading zeros
+ */
+ if (temp[0] == 0) {
+ caam_rsa_drop_leading_zeros(&temp, &len);
+ if (!temp) {
+ kfree(buffer);
+ return ERR_PTR(-ENOMEM);
+ }
+
+ req->src_len = len;
+ sg_copy_from_buffer(req->src, sg_nents(req->src),
+ (void *)temp, req->src_len);
+ }
+
+ kfree(buffer);
src_nents = sg_nents_for_len(req->src, req->src_len);
dst_nents = sg_nents_for_len(req->dst, req->dst_len);
@@ -683,14 +720,6 @@ static void caam_rsa_free_key(struct caam_rsa_key *key)
memset(key, 0, sizeof(*key));
}
-static void caam_rsa_drop_leading_zeros(const u8 **ptr, size_t *nbytes)
-{
- while (!**ptr && *nbytes) {
- (*ptr)++;
- (*nbytes)--;
- }
-}
-
/**
* caam_read_rsa_crt - Used for reading dP, dQ, qInv CRT members.
* dP, dQ and qInv could decode to less than corresponding p, q length, as the
--
2.7.4
When blk_queue_enter() waits for a queue to unfreeze, or unset the
PREEMPT_ONLY flag, do not allow it to be interrupted by a signal.
The PREEMPT_ONLY flag was introduced later in commit 3a0a529971ec
("block, scsi: Make SCSI quiesce and resume work reliably"). Note the SCSI
device is resumed asynchronously, i.e. after un-freezing userspace tasks.
So that commit exposed the bug as a regression in v4.15. A mysterious
SIGBUS (or -EIO) sometimes happened during the time the device was being
resumed. Most frequently, there was no kernel log message, and we saw Xorg
or Xwayland killed by SIGBUS.[1]
[1] E.g. https://bugzilla.redhat.com/show_bug.cgi?id=1553979
Without this fix, I get an IO error in this test:
# dd if=/dev/sda of=/dev/null iflag=direct & \
while killall -SIGUSR1 dd; do sleep 0.1; done & \
echo mem > /sys/power/state ; \
sleep 5; killall dd # stop after 5 seconds
The interruptible wait was added to blk_queue_enter in
commit 3ef28e83ab15 ("block: generic request_queue reference counting").
Before then, the interruptible wait was only in blk-mq, but I don't think
it could ever have been correct.
Cc: stable(a)vger.kernel.org
Signed-off-by: Alan Jenkins <alan.christopher.jenkins(a)gmail.com>
---
block/blk-core.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/block/blk-core.c b/block/blk-core.c
index abcb8684ba67..5a6d20069364 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -915,7 +915,6 @@ int blk_queue_enter(struct request_queue *q, blk_mq_req_flags_t flags)
while (true) {
bool success = false;
- int ret;
rcu_read_lock();
if (percpu_ref_tryget_live(&q->q_usage_counter)) {
@@ -947,14 +946,12 @@ int blk_queue_enter(struct request_queue *q, blk_mq_req_flags_t flags)
*/
smp_rmb();
- ret = wait_event_interruptible(q->mq_freeze_wq,
+ wait_event(q->mq_freeze_wq,
(atomic_read(&q->mq_freeze_depth) == 0 &&
(preempt || !blk_queue_preempt_only(q))) ||
blk_queue_dying(q));
if (blk_queue_dying(q))
return -ENODEV;
- if (ret)
- return ret;
}
}
--
2.14.3
From: Fabio Estevam <fabio.estevam(a)nxp.com>
imx6ul and imx7 report the following error:
caam_jr 2142000.jr1: 40000789: DECO: desc idx 7:
Protocol Size Error - A protocol has seen an error in size. When
running RSA, pdb size N < (size of F) when no formatting is used; or
pdb size N < (F + 11) when formatting is used.
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at crypto/asymmetric_keys/public_key.c:148
public_key_verify_signature+0x27c/0x2b0
This error happens because the signature contains 257 bytes, including
a leading zero as the first element.
Fix the problem by striping off the leading zero from input data
before feeding it to the CAAM accelerator.
Fixes: 8c419778ab57e497b5 ("crypto: caam - add support for RSA algorithm")
Cc: <stable(a)vger.kernel.org>
Reported-by: Martin Townsend <mtownsend1973(a)gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam(a)nxp.com>
---
drivers/crypto/caam/caampkc.c | 43 +++++++++++++++++++++++++++++++++++--------
1 file changed, 35 insertions(+), 8 deletions(-)
diff --git a/drivers/crypto/caam/caampkc.c b/drivers/crypto/caam/caampkc.c
index 7a897209..d2ad547 100644
--- a/drivers/crypto/caam/caampkc.c
+++ b/drivers/crypto/caam/caampkc.c
@@ -166,6 +166,14 @@ static void rsa_priv_f3_done(struct device *dev, u32 *desc, u32 err,
akcipher_request_complete(req, err);
}
+static void caam_rsa_drop_leading_zeros(const u8 **ptr, size_t *nbytes)
+{
+ while (!**ptr && *nbytes) {
+ (*ptr)++;
+ (*nbytes)--;
+ }
+}
+
static struct rsa_edesc *rsa_edesc_alloc(struct akcipher_request *req,
size_t desclen)
{
@@ -178,7 +186,34 @@ static struct rsa_edesc *rsa_edesc_alloc(struct akcipher_request *req,
int sgc;
int sec4_sg_index, sec4_sg_len = 0, sec4_sg_bytes;
int src_nents, dst_nents;
+ const u8 *buffer;
+ size_t len;
+
+ buffer = kzalloc(req->src_len, GFP_ATOMIC);
+ if (!buffer)
+ return ERR_PTR(-ENOMEM);
+
+ sg_copy_to_buffer(req->src, sg_nents(req->src),
+ (void *)buffer, req->src_len);
+ len = req->src_len;
+ /*
+ * Check if the buffer contains leading zero and if
+ * it does, drop the leading zero
+ */
+ if (buffer[0] == 0) {
+ caam_rsa_drop_leading_zeros(&buffer, &len);
+ if (!buffer) {
+ kfree(buffer);
+ return ERR_PTR(-ENOMEM);
+ }
+
+ req->src_len -= 1;
+ sg_copy_from_buffer(req->src, sg_nents(req->src),
+ (void *)buffer, req->src_len);
+ }
+
+ kfree(buffer);
src_nents = sg_nents_for_len(req->src, req->src_len);
dst_nents = sg_nents_for_len(req->dst, req->dst_len);
@@ -683,14 +718,6 @@ static void caam_rsa_free_key(struct caam_rsa_key *key)
memset(key, 0, sizeof(*key));
}
-static void caam_rsa_drop_leading_zeros(const u8 **ptr, size_t *nbytes)
-{
- while (!**ptr && *nbytes) {
- (*ptr)++;
- (*nbytes)--;
- }
-}
-
/**
* caam_read_rsa_crt - Used for reading dP, dQ, qInv CRT members.
* dP, dQ and qInv could decode to less than corresponding p, q length, as the
--
2.7.4
I Sell Sure Spamming Toolz
What we have on Stock Daily
Inbox Webmail
Inbox SMTP
Fresh USA email leads
Fresh Canada email leads
Fresh Loan email leads
Fresh Business emails leads
Real Eastate email leads
Conference delegates email leads
Fresh Job Seaker emails
cPanel HTTP and HTTPs
Shell Zip/Unzipp
Mailer
RDP
All ScamPages
Bank ScamPage
Add me on whatsapp or call me
Watsapp: +2348107268246
Only Real buyers
Hello,
Good day,
I am Mohammed, Our company is interested in your product.
We have gone through your product site online and wish to make order of your
product.
Please do send us details of your products and company to our {email} Also
provide with the recent price
We await your response with quotation and specification.
[1] Payment terms
[2] And your products Warranty
(3] Minimum Order Quantity
Mohammed /Purchasing Manager
Telephone: +966 3 867 1902
Fax: +966 3 867 3435
tr.export.import(a)outlook.com
PAN TRADING EQUIPMENT'S WORLDWIDE
Address: Dallah street, Al Rehab
Saudi Arabia
Hi Greg,
There are two important v4l2-core fixes on the patches merged this week by
Linux.
1) media: v4l2-core: fix size of devnode_nums[] bitarray
This patch correct a regression against Kernel 4.16. It affects notebooks
with advanced Synaptics mice (and similar touch devices). On those devices,
the pad produces an image with is handled via V4L2. Without this patch,
the input driver OOPSes at probing time:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?…
2) v4l2-compat-ioctl32: don't oops on overlay
This patch complements the security fix we've made at the V4L2 core
compat32 logic. It fixes an illegal use of an __user pointer without
first convert into a Kernel pointer with get_user(). It wasn't detect
before, as it uses an obscure streaming mode of V4L2 (overlay mode):
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?…
This one should go all the way down to stable Kernels. Here, I was able
to reproduce the bug with both upstream Kernel and Kernel 3.18. The
patch applied without any conflicts on both.
Could you please add both on your next set of -stable releases?
Thanks,
Mauro
Please queue up the following networking bug fixes for v4.4 and
v4.16 -stable, respectively.
Note, you may wish to take patch "vhost: fix vhost_vq_access_ok() log check"
(upsteam d14d2b78090c7de0557362b26a4ca591aa6a9faa) for v4.15 as well
because the change it is fixing went into v4.15.17
Thanks!
Pixel 2 field testers reported that when they tried to reboot their
phones with some USB devices plugged in, the reboot would get wedged and
eventually trigger watchdog reset. Once the Pixel kernel team found a
reliable repro case, they narrowed it down to this commit's 4.4.y
backport. Reverting the change made the issue go away.
This reverts commit b07c12517f2aed0add8ce18146bb426b14099392.
Cc: stable(a)vger.kernel.org
Signed-off-by: Greg Hackmann <ghackmann(a)google.com>
---
drivers/usb/host/xhci-plat.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index df327dcc2bac..ea089fdda611 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -420,7 +420,6 @@ MODULE_DEVICE_TABLE(acpi, usb_xhci_acpi_match);
static struct platform_driver usb_xhci_driver = {
.probe = xhci_plat_probe,
.remove = xhci_plat_remove,
- .shutdown = usb_hcd_platform_shutdown,
.driver = {
.name = "xhci-hcd",
.pm = &xhci_plat_pm_ops,
--
2.17.0.484.g0c8726318c-goog
The blk-mq timeout handling code ignores completions that occur after
blk_mq_check_expired() has been called and before blk_mq_rq_timed_out()
has reset rq->aborted_gstate. If a block driver timeout handler always
returns BLK_EH_RESET_TIMER then the result will be that the request
never terminates.
Since the request state can be updated from two different contexts,
namely regular completion and request timeout, this race cannot be
fixed with RCU synchronization only. Fix this race as follows:
- Use the deadline instead of the request generation to detect whether
or not a request timer fired after reinitialization of a request.
- Store the request state in the lowest two bits of the deadline instead
of the lowest two bits of 'gstate'.
- Rename MQ_RQ_STATE_MASK into RQ_STATE_MASK and change it from an
enumeration member into a #define such that its type can be changed
into unsigned long. That allows to write & ~RQ_STATE_MASK instead of
~(unsigned long)RQ_STATE_MASK.
- Remove all request member variables that became superfluous due to
this change: gstate, aborted_gstate, gstate_seq and aborted_gstate_sync.
- Remove the request state information that became superfluous due to this
patch, namely RQF_MQ_TIMEOUT_EXPIRED.
- Remove the hctx member that became superfluous due to these changes,
namely nr_expired.
- Remove the code that became superfluous due to this change, namely
the RCU lock and unlock statements in blk_mq_complete_request() and
also the synchronize_rcu() call in the timeout handler.
Signed-off-by: Bart Van Assche <bart.vanassche(a)wdc.com>
Cc: Tejun Heo <tj(a)kernel.org>
Cc: Christoph Hellwig <hch(a)lst.de>
Cc: Ming Lei <ming.lei(a)redhat.com>
Cc: Sagi Grimberg <sagi(a)grimberg.me>
Cc: Israel Rukshin <israelr(a)mellanox.com>,
Cc: Max Gurtovoy <maxg(a)mellanox.com>
Cc: <stable(a)vger.kernel.org> # v4.16
---
Changes compared to v4:
- Addressed multiple review comments from Christoph. The most important are
that atomic_long_cmpxchg() has been changed into cmpxchg() and also that
there is now a nice and clean split between the legacy and blk-mq versions
of blk_add_timer().
- Changed the patch name and modified the patch description because there is
disagreement about whether or not the v4.16 blk-mq core can complete a
single request twice. Kept the "Cc: stable" tag because of
https://bugzilla.kernel.org/show_bug.cgi?id=199077.
Changes compared to v3 (see also https://www.mail-archive.com/linux-block@vger.kernel.org/msg20073.html):
- Removed the spinlock again that was introduced to protect the request state.
v4 uses atomic_long_cmpxchg() instead.
- Split __deadline into two variables - one for the legacy block layer and one
for blk-mq.
Changes compared to v2 (https://www.mail-archive.com/linux-block@vger.kernel.org/msg18338.html):
- Rebased and retested on top of kernel v4.16.
Changes compared to v1 (https://www.mail-archive.com/linux-block@vger.kernel.org/msg18089.html):
- Removed the gstate and aborted_gstate members of struct request and used
the __deadline member to encode both the generation and state information.
block/blk-core.c | 2 -
block/blk-mq-debugfs.c | 1 -
block/blk-mq.c | 174 +++++--------------------------------------------
block/blk-mq.h | 65 ++++++++++--------
block/blk-timeout.c | 89 ++++++++++++++-----------
block/blk.h | 13 ++--
include/linux/blk-mq.h | 1 -
include/linux/blkdev.h | 30 ++-------
8 files changed, 118 insertions(+), 257 deletions(-)
diff --git a/block/blk-core.c b/block/blk-core.c
index 8625ec929fe5..181b1a688a5b 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -200,8 +200,6 @@ void blk_rq_init(struct request_queue *q, struct request *rq)
rq->start_time = jiffies;
set_start_time_ns(rq);
rq->part = NULL;
- seqcount_init(&rq->gstate_seq);
- u64_stats_init(&rq->aborted_gstate_sync);
}
EXPORT_SYMBOL(blk_rq_init);
diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c
index 6f72413b6cab..80c7c585769f 100644
--- a/block/blk-mq-debugfs.c
+++ b/block/blk-mq-debugfs.c
@@ -345,7 +345,6 @@ static const char *const rqf_name[] = {
RQF_NAME(STATS),
RQF_NAME(SPECIAL_PAYLOAD),
RQF_NAME(ZONE_WRITE_LOCKED),
- RQF_NAME(MQ_TIMEOUT_EXPIRED),
RQF_NAME(MQ_POLL_SLEPT),
};
#undef RQF_NAME
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 7816d28b7219..0680977d6d98 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -305,7 +305,6 @@ static struct request *blk_mq_rq_ctx_init(struct blk_mq_alloc_data *data,
rq->special = NULL;
/* tag was already set */
rq->extra_len = 0;
- rq->__deadline = 0;
INIT_LIST_HEAD(&rq->timeout_list);
rq->timeout = 0;
@@ -481,7 +480,8 @@ void blk_mq_free_request(struct request *rq)
if (blk_rq_rl(rq))
blk_put_rl(blk_rq_rl(rq));
- blk_mq_rq_update_state(rq, MQ_RQ_IDLE);
+ if (!blk_mq_change_rq_state(rq, blk_mq_rq_state(rq), MQ_RQ_IDLE))
+ WARN_ON_ONCE(true);
if (rq->tag != -1)
blk_mq_put_tag(hctx, hctx->tags, ctx, rq->tag);
if (sched_tag != -1)
@@ -527,8 +527,7 @@ static void __blk_mq_complete_request(struct request *rq)
bool shared = false;
int cpu;
- WARN_ON_ONCE(blk_mq_rq_state(rq) != MQ_RQ_IN_FLIGHT);
- blk_mq_rq_update_state(rq, MQ_RQ_COMPLETE);
+ WARN_ON_ONCE(blk_mq_rq_state(rq) != MQ_RQ_COMPLETE);
if (rq->internal_tag != -1)
blk_mq_sched_completed_request(rq);
@@ -577,36 +576,6 @@ static void hctx_lock(struct blk_mq_hw_ctx *hctx, int *srcu_idx)
*srcu_idx = srcu_read_lock(hctx->srcu);
}
-static void blk_mq_rq_update_aborted_gstate(struct request *rq, u64 gstate)
-{
- unsigned long flags;
-
- /*
- * blk_mq_rq_aborted_gstate() is used from the completion path and
- * can thus be called from irq context. u64_stats_fetch in the
- * middle of update on the same CPU leads to lockup. Disable irq
- * while updating.
- */
- local_irq_save(flags);
- u64_stats_update_begin(&rq->aborted_gstate_sync);
- rq->aborted_gstate = gstate;
- u64_stats_update_end(&rq->aborted_gstate_sync);
- local_irq_restore(flags);
-}
-
-static u64 blk_mq_rq_aborted_gstate(struct request *rq)
-{
- unsigned int start;
- u64 aborted_gstate;
-
- do {
- start = u64_stats_fetch_begin(&rq->aborted_gstate_sync);
- aborted_gstate = rq->aborted_gstate;
- } while (u64_stats_fetch_retry(&rq->aborted_gstate_sync, start));
-
- return aborted_gstate;
-}
-
/**
* blk_mq_complete_request - end I/O on a request
* @rq: the request being processed
@@ -618,27 +587,12 @@ static u64 blk_mq_rq_aborted_gstate(struct request *rq)
void blk_mq_complete_request(struct request *rq)
{
struct request_queue *q = rq->q;
- struct blk_mq_hw_ctx *hctx = blk_mq_map_queue(q, rq->mq_ctx->cpu);
- int srcu_idx;
if (unlikely(blk_should_fake_timeout(q)))
return;
- /*
- * If @rq->aborted_gstate equals the current instance, timeout is
- * claiming @rq and we lost. This is synchronized through
- * hctx_lock(). See blk_mq_timeout_work() for details.
- *
- * Completion path never blocks and we can directly use RCU here
- * instead of hctx_lock() which can be either RCU or SRCU.
- * However, that would complicate paths which want to synchronize
- * against us. Let stay in sync with the issue path so that
- * hctx_lock() covers both issue and completion paths.
- */
- hctx_lock(hctx, &srcu_idx);
- if (blk_mq_rq_aborted_gstate(rq) != rq->gstate)
+ if (blk_mq_change_rq_state(rq, MQ_RQ_IN_FLIGHT, MQ_RQ_COMPLETE))
__blk_mq_complete_request(rq);
- hctx_unlock(hctx, srcu_idx);
}
EXPORT_SYMBOL(blk_mq_complete_request);
@@ -662,27 +616,7 @@ void blk_mq_start_request(struct request *rq)
wbt_issue(q->rq_wb, &rq->issue_stat);
}
- WARN_ON_ONCE(blk_mq_rq_state(rq) != MQ_RQ_IDLE);
-
- /*
- * Mark @rq in-flight which also advances the generation number,
- * and register for timeout. Protect with a seqcount to allow the
- * timeout path to read both @rq->gstate and @rq->deadline
- * coherently.
- *
- * This is the only place where a request is marked in-flight. If
- * the timeout path reads an in-flight @rq->gstate, the
- * @rq->deadline it reads together under @rq->gstate_seq is
- * guaranteed to be the matching one.
- */
- preempt_disable();
- write_seqcount_begin(&rq->gstate_seq);
-
- blk_mq_rq_update_state(rq, MQ_RQ_IN_FLIGHT);
- blk_add_timer(rq);
-
- write_seqcount_end(&rq->gstate_seq);
- preempt_enable();
+ blk_mq_add_timer(rq, MQ_RQ_IDLE, MQ_RQ_IN_FLIGHT);
if (q->dma_drain_size && blk_rq_bytes(rq)) {
/*
@@ -695,22 +629,19 @@ void blk_mq_start_request(struct request *rq)
}
EXPORT_SYMBOL(blk_mq_start_request);
-/*
- * When we reach here because queue is busy, it's safe to change the state
- * to IDLE without checking @rq->aborted_gstate because we should still be
- * holding the RCU read lock and thus protected against timeout.
- */
static void __blk_mq_requeue_request(struct request *rq)
{
struct request_queue *q = rq->q;
+ enum mq_rq_state old_state = blk_mq_rq_state(rq);
blk_mq_put_driver_tag(rq);
trace_block_rq_requeue(q, rq);
wbt_requeue(q->rq_wb, &rq->issue_stat);
- if (blk_mq_rq_state(rq) != MQ_RQ_IDLE) {
- blk_mq_rq_update_state(rq, MQ_RQ_IDLE);
+ if (old_state != MQ_RQ_IDLE) {
+ if (!blk_mq_change_rq_state(rq, old_state, MQ_RQ_IDLE))
+ WARN_ON_ONCE(true);
if (q->dma_drain_size && blk_rq_bytes(rq))
rq->nr_phys_segments--;
}
@@ -811,7 +742,6 @@ EXPORT_SYMBOL(blk_mq_tag_to_rq);
struct blk_mq_timeout_data {
unsigned long next;
unsigned int next_set;
- unsigned int nr_expired;
};
static void blk_mq_rq_timed_out(struct request *req, bool reserved)
@@ -819,8 +749,6 @@ static void blk_mq_rq_timed_out(struct request *req, bool reserved)
const struct blk_mq_ops *ops = req->q->mq_ops;
enum blk_eh_timer_return ret = BLK_EH_RESET_TIMER;
- req->rq_flags |= RQF_MQ_TIMEOUT_EXPIRED;
-
if (ops->timeout)
ret = ops->timeout(req, reserved);
@@ -829,13 +757,7 @@ static void blk_mq_rq_timed_out(struct request *req, bool reserved)
__blk_mq_complete_request(req);
break;
case BLK_EH_RESET_TIMER:
- /*
- * As nothing prevents from completion happening while
- * ->aborted_gstate is set, this may lead to ignored
- * completions and further spurious timeouts.
- */
- blk_mq_rq_update_aborted_gstate(req, 0);
- blk_add_timer(req);
+ blk_mq_add_timer(req, MQ_RQ_COMPLETE, MQ_RQ_IN_FLIGHT);
break;
case BLK_EH_NOT_HANDLED:
break;
@@ -849,60 +771,23 @@ static void blk_mq_check_expired(struct blk_mq_hw_ctx *hctx,
struct request *rq, void *priv, bool reserved)
{
struct blk_mq_timeout_data *data = priv;
- unsigned long gstate, deadline;
- int start;
-
- might_sleep();
-
- if (rq->rq_flags & RQF_MQ_TIMEOUT_EXPIRED)
- return;
-
- /* read coherent snapshots of @rq->state_gen and @rq->deadline */
- while (true) {
- start = read_seqcount_begin(&rq->gstate_seq);
- gstate = READ_ONCE(rq->gstate);
- deadline = blk_rq_deadline(rq);
- if (!read_seqcount_retry(&rq->gstate_seq, start))
- break;
- cond_resched();
- }
+ unsigned long deadline = blk_rq_deadline(rq);
- /* if in-flight && overdue, mark for abortion */
- if ((gstate & MQ_RQ_STATE_MASK) == MQ_RQ_IN_FLIGHT &&
- time_after_eq(jiffies, deadline)) {
- blk_mq_rq_update_aborted_gstate(rq, gstate);
- data->nr_expired++;
- hctx->nr_expired++;
+ if (time_after_eq(jiffies, deadline) &&
+ blk_mq_change_rq_state(rq, MQ_RQ_IN_FLIGHT, MQ_RQ_COMPLETE)) {
+ blk_mq_rq_timed_out(rq, reserved);
} else if (!data->next_set || time_after(data->next, deadline)) {
data->next = deadline;
data->next_set = 1;
}
-}
-static void blk_mq_terminate_expired(struct blk_mq_hw_ctx *hctx,
- struct request *rq, void *priv, bool reserved)
-{
- /*
- * We marked @rq->aborted_gstate and waited for RCU. If there were
- * completions that we lost to, they would have finished and
- * updated @rq->gstate by now; otherwise, the completion path is
- * now guaranteed to see @rq->aborted_gstate and yield. If
- * @rq->aborted_gstate still matches @rq->gstate, @rq is ours.
- */
- if (!(rq->rq_flags & RQF_MQ_TIMEOUT_EXPIRED) &&
- READ_ONCE(rq->gstate) == rq->aborted_gstate)
- blk_mq_rq_timed_out(rq, reserved);
}
static void blk_mq_timeout_work(struct work_struct *work)
{
struct request_queue *q =
container_of(work, struct request_queue, timeout_work);
- struct blk_mq_timeout_data data = {
- .next = 0,
- .next_set = 0,
- .nr_expired = 0,
- };
+ struct blk_mq_timeout_data data = { };
struct blk_mq_hw_ctx *hctx;
int i;
@@ -925,33 +810,6 @@ static void blk_mq_timeout_work(struct work_struct *work)
/* scan for the expired ones and set their ->aborted_gstate */
blk_mq_queue_tag_busy_iter(q, blk_mq_check_expired, &data);
- if (data.nr_expired) {
- bool has_rcu = false;
-
- /*
- * Wait till everyone sees ->aborted_gstate. The
- * sequential waits for SRCUs aren't ideal. If this ever
- * becomes a problem, we can add per-hw_ctx rcu_head and
- * wait in parallel.
- */
- queue_for_each_hw_ctx(q, hctx, i) {
- if (!hctx->nr_expired)
- continue;
-
- if (!(hctx->flags & BLK_MQ_F_BLOCKING))
- has_rcu = true;
- else
- synchronize_srcu(hctx->srcu);
-
- hctx->nr_expired = 0;
- }
- if (has_rcu)
- synchronize_rcu();
-
- /* terminate the ones we won */
- blk_mq_queue_tag_busy_iter(q, blk_mq_terminate_expired, NULL);
- }
-
if (data.next_set) {
data.next = blk_rq_timeout(round_jiffies_up(data.next));
mod_timer(&q->timeout, data.next);
@@ -2087,8 +1945,6 @@ static int blk_mq_init_request(struct blk_mq_tag_set *set, struct request *rq,
return ret;
}
- seqcount_init(&rq->gstate_seq);
- u64_stats_init(&rq->aborted_gstate_sync);
return 0;
}
diff --git a/block/blk-mq.h b/block/blk-mq.h
index 88c558f71819..368cd73a00bd 100644
--- a/block/blk-mq.h
+++ b/block/blk-mq.h
@@ -27,18 +27,11 @@ struct blk_mq_ctx {
struct kobject kobj;
} ____cacheline_aligned_in_smp;
-/*
- * Bits for request->gstate. The lower two bits carry MQ_RQ_* state value
- * and the upper bits the generation number.
- */
+/* Lowest two bits of request->__deadline. */
enum mq_rq_state {
MQ_RQ_IDLE = 0,
MQ_RQ_IN_FLIGHT = 1,
MQ_RQ_COMPLETE = 2,
-
- MQ_RQ_STATE_BITS = 2,
- MQ_RQ_STATE_MASK = (1 << MQ_RQ_STATE_BITS) - 1,
- MQ_RQ_GEN_INC = 1 << MQ_RQ_STATE_BITS,
};
void blk_mq_freeze_queue(struct request_queue *q);
@@ -100,37 +93,55 @@ extern void blk_mq_hctx_kobj_init(struct blk_mq_hw_ctx *hctx);
void blk_mq_release(struct request_queue *q);
+/*
+ * If the state of request @rq equals @old_state, update deadline and request
+ * state atomically to @time and @new_state. blk-mq only.
+ */
+static inline bool blk_mq_rq_set_deadline(struct request *rq,
+ unsigned long new_time,
+ enum mq_rq_state old_state,
+ enum mq_rq_state new_state)
+{
+ unsigned long old_val, new_val;
+
+ do {
+ old_val = READ_ONCE(rq->__deadline);
+ if ((old_val & RQ_STATE_MASK) != old_state)
+ return false;
+ new_val = (new_time & ~RQ_STATE_MASK) |
+ (new_state & RQ_STATE_MASK);
+ } while (cmpxchg(&rq->__deadline, old_val, new_val) != old_val);
+
+ return true;
+}
+
/**
* blk_mq_rq_state() - read the current MQ_RQ_* state of a request
* @rq: target request.
*/
-static inline int blk_mq_rq_state(struct request *rq)
+static inline enum mq_rq_state blk_mq_rq_state(struct request *rq)
{
- return READ_ONCE(rq->gstate) & MQ_RQ_STATE_MASK;
+ return READ_ONCE(rq->__deadline) & RQ_STATE_MASK;
}
/**
- * blk_mq_rq_update_state() - set the current MQ_RQ_* state of a request
- * @rq: target request.
- * @state: new state to set.
+ * blk_mq_change_rq_state - atomically test and set request state
+ * @rq: Request pointer.
+ * @old_state: Old request state.
+ * @new_state: New request state.
*
- * Set @rq's state to @state. The caller is responsible for ensuring that
- * there are no other updaters. A request can transition into IN_FLIGHT
- * only from IDLE and doing so increments the generation number.
+ * Returns %true if and only if the old state was @old and if the state has
+ * been changed into @new.
*/
-static inline void blk_mq_rq_update_state(struct request *rq,
- enum mq_rq_state state)
+static inline bool blk_mq_change_rq_state(struct request *rq,
+ enum mq_rq_state old_state,
+ enum mq_rq_state new_state)
{
- u64 old_val = READ_ONCE(rq->gstate);
- u64 new_val = (old_val & ~MQ_RQ_STATE_MASK) | state;
-
- if (state == MQ_RQ_IN_FLIGHT) {
- WARN_ON_ONCE((old_val & MQ_RQ_STATE_MASK) != MQ_RQ_IDLE);
- new_val += MQ_RQ_GEN_INC;
- }
+ unsigned long old_val = (READ_ONCE(rq->__deadline) & ~RQ_STATE_MASK) |
+ old_state;
+ unsigned long new_val = (old_val & ~RQ_STATE_MASK) | new_state;
- /* avoid exposing interim values */
- WRITE_ONCE(rq->gstate, new_val);
+ return cmpxchg(&rq->__deadline, old_val, new_val) == old_val;
}
static inline struct blk_mq_ctx *__blk_mq_get_ctx(struct request_queue *q,
diff --git a/block/blk-timeout.c b/block/blk-timeout.c
index 50a191720055..e98da6db7d4b 100644
--- a/block/blk-timeout.c
+++ b/block/blk-timeout.c
@@ -165,8 +165,9 @@ void blk_abort_request(struct request *req)
* immediately and that scan sees the new timeout value.
* No need for fancy synchronizations.
*/
- blk_rq_set_deadline(req, jiffies);
- kblockd_schedule_work(&req->q->timeout_work);
+ if (blk_mq_rq_set_deadline(req, jiffies, MQ_RQ_IN_FLIGHT,
+ MQ_RQ_IN_FLIGHT))
+ kblockd_schedule_work(&req->q->timeout_work);
} else {
if (blk_mark_rq_complete(req))
return;
@@ -187,52 +188,17 @@ unsigned long blk_rq_timeout(unsigned long timeout)
return timeout;
}
-/**
- * blk_add_timer - Start timeout timer for a single request
- * @req: request that is about to start running.
- *
- * Notes:
- * Each request has its own timer, and as it is added to the queue, we
- * set up the timer. When the request completes, we cancel the timer.
- */
-void blk_add_timer(struct request *req)
+static void __blk_add_timer(struct request *req)
{
struct request_queue *q = req->q;
unsigned long expiry;
- if (!q->mq_ops)
- lockdep_assert_held(q->queue_lock);
-
- /* blk-mq has its own handler, so we don't need ->rq_timed_out_fn */
- if (!q->mq_ops && !q->rq_timed_out_fn)
- return;
-
- BUG_ON(!list_empty(&req->timeout_list));
-
- /*
- * Some LLDs, like scsi, peek at the timeout to prevent a
- * command from being retried forever.
- */
- if (!req->timeout)
- req->timeout = q->rq_timeout;
-
- blk_rq_set_deadline(req, jiffies + req->timeout);
- req->rq_flags &= ~RQF_MQ_TIMEOUT_EXPIRED;
-
- /*
- * Only the non-mq case needs to add the request to a protected list.
- * For the mq case we simply scan the tag map.
- */
- if (!q->mq_ops)
- list_add_tail(&req->timeout_list, &req->q->timeout_list);
-
/*
* If the timer isn't already pending or this timeout is earlier
* than an existing one, modify the timer. Round up to next nearest
* second.
*/
expiry = blk_rq_timeout(round_jiffies_up(blk_rq_deadline(req)));
-
if (!timer_pending(&q->timeout) ||
time_before(expiry, q->timeout.expires)) {
unsigned long diff = q->timeout.expires - expiry;
@@ -247,5 +213,52 @@ void blk_add_timer(struct request *req)
if (!timer_pending(&q->timeout) || (diff >= HZ / 2))
mod_timer(&q->timeout, expiry);
}
+}
+
+/**
+ * blk_add_timer - Start timeout timer for a single request
+ * @req: request that is about to start running.
+ *
+ * Notes:
+ * Each request has its own timer, and as it is added to the queue, we
+ * set up the timer. When the request completes, we cancel the timer.
+ */
+void blk_add_timer(struct request *req)
+{
+ struct request_queue *q = req->q;
+
+ lockdep_assert_held(q->queue_lock);
+ if (!q->rq_timed_out_fn)
+ return;
+ if (!req->timeout)
+ req->timeout = q->rq_timeout;
+
+ blk_rq_set_deadline(req, jiffies + req->timeout);
+ list_add_tail(&req->timeout_list, &req->q->timeout_list);
+
+ return __blk_add_timer(req);
+}
+
+/**
+ * blk_mq_add_timer - set the deadline for a single request
+ * @req: request for which to set the deadline.
+ * @old: current request state.
+ * @new: new request state.
+ *
+ * Sets the deadline of a request if and only if it has state @old and
+ * at the same time changes the request state from @old into @new. The caller
+ * must guarantee that the request state won't be modified while this function
+ * is in progress.
+ */
+void blk_mq_add_timer(struct request *req, enum mq_rq_state old,
+ enum mq_rq_state new)
+{
+ struct request_queue *q = req->q;
+
+ if (!req->timeout)
+ req->timeout = q->rq_timeout;
+ if (!blk_mq_rq_set_deadline(req, jiffies + req->timeout, old, new))
+ WARN_ON_ONCE(true);
+ return __blk_add_timer(req);
}
diff --git a/block/blk.h b/block/blk.h
index b034fd2460c4..7cd64f533a46 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -170,6 +170,8 @@ static inline bool bio_integrity_endio(struct bio *bio)
void blk_timeout_work(struct work_struct *work);
unsigned long blk_rq_timeout(unsigned long timeout);
void blk_add_timer(struct request *req);
+void blk_mq_add_timer(struct request *req, enum mq_rq_state old,
+ enum mq_rq_state new);
void blk_delete_timer(struct request *);
@@ -308,18 +310,19 @@ static inline void req_set_nomerge(struct request_queue *q, struct request *req)
}
/*
- * Steal a bit from this field for legacy IO path atomic IO marking. Note that
- * setting the deadline clears the bottom bit, potentially clearing the
- * completed bit. The user has to be OK with this (current ones are fine).
+ * Steal two bits from this field. The legacy IO path uses the lowest bit for
+ * atomic IO marking. Note that setting the deadline clears the bottom bit,
+ * potentially clearing the completed bit. The current legacy block layer is
+ * fine with that. Must be called with the request queue lock held.
*/
static inline void blk_rq_set_deadline(struct request *rq, unsigned long time)
{
- rq->__deadline = time & ~0x1UL;
+ rq->__deadline = time & RQ_STATE_MASK;
}
static inline unsigned long blk_rq_deadline(struct request *rq)
{
- return rq->__deadline & ~0x1UL;
+ return rq->__deadline & ~RQ_STATE_MASK;
}
/*
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h
index 8efcf49796a3..13ccbb418e89 100644
--- a/include/linux/blk-mq.h
+++ b/include/linux/blk-mq.h
@@ -51,7 +51,6 @@ struct blk_mq_hw_ctx {
unsigned int queue_num;
atomic_t nr_active;
- unsigned int nr_expired;
struct hlist_node cpuhp_dead;
struct kobject kobj;
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 6075d1a6760c..302ce237c728 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -27,7 +27,6 @@
#include <linux/percpu-refcount.h>
#include <linux/scatterlist.h>
#include <linux/blkzoned.h>
-#include <linux/seqlock.h>
#include <linux/u64_stats_sync.h>
struct module;
@@ -125,10 +124,8 @@ typedef __u32 __bitwise req_flags_t;
#define RQF_SPECIAL_PAYLOAD ((__force req_flags_t)(1 << 18))
/* The per-zone write lock is held for this request */
#define RQF_ZONE_WRITE_LOCKED ((__force req_flags_t)(1 << 19))
-/* timeout is expired */
-#define RQF_MQ_TIMEOUT_EXPIRED ((__force req_flags_t)(1 << 20))
/* already slept for hybrid poll */
-#define RQF_MQ_POLL_SLEPT ((__force req_flags_t)(1 << 21))
+#define RQF_MQ_POLL_SLEPT ((__force req_flags_t)(1 << 20))
/* flags that prevent us from merging requests: */
#define RQF_NOMERGE_FLAGS \
@@ -226,27 +223,12 @@ struct request {
unsigned int extra_len; /* length of alignment and padding */
/*
- * On blk-mq, the lower bits of ->gstate (generation number and
- * state) carry the MQ_RQ_* state value and the upper bits the
- * generation number which is monotonically incremented and used to
- * distinguish the reuse instances.
- *
- * ->gstate_seq allows updates to ->gstate and other fields
- * (currently ->deadline) during request start to be read
- * atomically from the timeout path, so that it can operate on a
- * coherent set of information.
+ * Access through blk_rq_deadline() and blk_rq_set_deadline(),
+ * blk_mark_rq_complete(), blk_clear_rq_complete() and
+ * blk_rq_is_complete() for legacy queues or blk_mq_rq_state() for
+ * blk-mq queues.
*/
- seqcount_t gstate_seq;
- u64 gstate;
-
- /*
- * ->aborted_gstate is used by the timeout to claim a specific
- * recycle instance of this request. See blk_mq_timeout_work().
- */
- struct u64_stats_sync aborted_gstate_sync;
- u64 aborted_gstate;
-
- /* access through blk_rq_set_deadline, blk_rq_deadline */
+#define RQ_STATE_MASK 0x3UL
unsigned long __deadline;
struct list_head timeout_list;
--
2.16.2
From: Vlastimil Babka <vbabka(a)suse.cz>
Subject: mm, slab: reschedule cache_reap() on the same CPU
cache_reap() is initially scheduled in start_cpu_timer() via
schedule_delayed_work_on(). But then the next iterations are scheduled
via schedule_delayed_work(), i.e. using WORK_CPU_UNBOUND.
Thus since commit ef557180447f ("workqueue: schedule WORK_CPU_UNBOUND work
on wq_unbound_cpumask CPUs") there is no guarantee the future iterations
will run on the originally intended cpu, although it's still preferred. I
was able to demonstrate this with
/sys/module/workqueue/parameters/debug_force_rr_cpu. IIUC, it may also
happen due to migrating timers in nohz context. As a result, some cpu's
would be calling cache_reap() more frequently and others never.
This patch uses schedule_delayed_work_on() with the current cpu when
scheduling the next iteration.
Link: http://lkml.kernel.org/r/20180411070007.32225-1-vbabka@suse.cz
Fixes: ef557180447f ("workqueue: schedule WORK_CPU_UNBOUND work on wq_unbound_cpumask CPUs")
Signed-off-by: Vlastimil Babka <vbabka(a)suse.cz>
Acked-by: Pekka Enberg <penberg(a)kernel.org>
Acked-by: Christoph Lameter <cl(a)linux.com>
Cc: Joonsoo Kim <iamjoonsoo.kim(a)lge.com>
Cc: David Rientjes <rientjes(a)google.com>
Cc: Tejun Heo <tj(a)kernel.org>
Cc: Lai Jiangshan <jiangshanlai(a)gmail.com>
Cc: John Stultz <john.stultz(a)linaro.org>
Cc: Thomas Gleixner <tglx(a)linutronix.de>
Cc: Stephen Boyd <sboyd(a)kernel.org>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/slab.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff -puN mm/slab.c~mm-slab-reschedule-cache_reap-on-the-same-cpu mm/slab.c
--- a/mm/slab.c~mm-slab-reschedule-cache_reap-on-the-same-cpu
+++ a/mm/slab.c
@@ -4086,7 +4086,8 @@ next:
next_reap_node();
out:
/* Set up the next iteration */
- schedule_delayed_work(work, round_jiffies_relative(REAPTIMEOUT_AC));
+ schedule_delayed_work_on(smp_processor_id(), work,
+ round_jiffies_relative(REAPTIMEOUT_AC));
}
void get_slabinfo(struct kmem_cache *cachep, struct slabinfo *sinfo)
_
From: Eric Biggers <ebiggers(a)google.com>
Subject: ipc/shm: fix use-after-free of shm file via remap_file_pages()
syzbot reported a use-after-free of shm_file_data(file)->file->f_op in
shm_get_unmapped_area(), called via sys_remap_file_pages(). Unfortunately
it couldn't generate a reproducer, but I found a bug which I think caused
it. When remap_file_pages() is passed a full System V shared memory
segment, the memory is first unmapped, then a new map is created using the
->vm_file. Between these steps, the shm ID can be removed and reused for
a new shm segment. But, shm_mmap() only checks whether the ID is
currently valid before calling the underlying file's ->mmap(); it doesn't
check whether it was reused. Thus it can use the wrong underlying file,
one that was already freed.
Fix this by making the "outer" shm file (the one that gets put in
->vm_file) hold a reference to the real shm file, and by making
__shm_open() require that the file associated with the shm ID matches the
one associated with the "outer" file. Taking the reference to the real
shm file is needed to fully solve the problem, since otherwise sfd->file
could point to a freed file, which then could be reallocated for the
reused shm ID, causing the wrong shm segment to be mapped (and without the
required permission checks).
Commit 1ac0b6dec656 ("ipc/shm: handle removed segments gracefully in
shm_mmap()") almost fixed this bug, but it didn't go far enough because it
didn't consider the case where the shm ID is reused.
The following program usually reproduces this bug:
#include <stdlib.h>
#include <sys/shm.h>
#include <sys/syscall.h>
#include <unistd.h>
int main()
{
int is_parent = (fork() != 0);
srand(getpid());
for (;;) {
int id = shmget(0xF00F, 4096, IPC_CREAT|0700);
if (is_parent) {
void *addr = shmat(id, NULL, 0);
usleep(rand() % 50);
while (!syscall(__NR_remap_file_pages, addr, 4096, 0, 0, 0));
} else {
usleep(rand() % 50);
shmctl(id, IPC_RMID, NULL);
}
}
}
It causes the following NULL pointer dereference due to a 'struct file'
being used while it's being freed. (I couldn't actually get a KASAN
use-after-free splat like in the syzbot report. But I think it's possible
with this bug; it would just take a more extraordinary race...)
BUG: unable to handle kernel NULL pointer dereference at 0000000000000058
PGD 0 P4D 0
Oops: 0000 [#1] SMP NOPTI
CPU: 9 PID: 258 Comm: syz_ipc Not tainted 4.16.0-05140-gf8cf2f16a7c95 #189
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.0-20171110_100015-anatol 04/01/2014
RIP: 0010:d_inode include/linux/dcache.h:519 [inline]
RIP: 0010:touch_atime+0x25/0xd0 fs/inode.c:1724
[...]
Call Trace:
file_accessed include/linux/fs.h:2063 [inline]
shmem_mmap+0x25/0x40 mm/shmem.c:2149
call_mmap include/linux/fs.h:1789 [inline]
shm_mmap+0x34/0x80 ipc/shm.c:465
call_mmap include/linux/fs.h:1789 [inline]
mmap_region+0x309/0x5b0 mm/mmap.c:1712
do_mmap+0x294/0x4a0 mm/mmap.c:1483
do_mmap_pgoff include/linux/mm.h:2235 [inline]
SYSC_remap_file_pages mm/mmap.c:2853 [inline]
SyS_remap_file_pages+0x232/0x310 mm/mmap.c:2769
do_syscall_64+0x64/0x1a0 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x42/0xb7
[ebiggers(a)google.com: add comment]
Link: http://lkml.kernel.org/r/20180410192850.235835-1-ebiggers3@gmail.com
Link: http://lkml.kernel.org/r/20180409043039.28915-1-ebiggers3@gmail.com
Reported-by: syzbot+d11f321e7f1923157eac80aa990b446596f46439(a)syzkaller.appspotmail.com
Fixes: c8d78c1823f4 ("mm: replace remap_file_pages() syscall with emulation")
Signed-off-by: Eric Biggers <ebiggers(a)google.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov(a)linux.intel.com>
Acked-by: Davidlohr Bueso <dbueso(a)suse.de>
Cc: Manfred Spraul <manfred(a)colorfullife.com>
Cc: "Eric W . Biederman" <ebiederm(a)xmission.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
ipc/shm.c | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
diff -puN ipc/shm.c~ipc-shm-fix-use-after-free-of-shm-file-via-remap_file_pages ipc/shm.c
--- a/ipc/shm.c~ipc-shm-fix-use-after-free-of-shm-file-via-remap_file_pages
+++ a/ipc/shm.c
@@ -225,6 +225,12 @@ static int __shm_open(struct vm_area_str
if (IS_ERR(shp))
return PTR_ERR(shp);
+ if (shp->shm_file != sfd->file) {
+ /* ID was reused */
+ shm_unlock(shp);
+ return -EINVAL;
+ }
+
shp->shm_atim = ktime_get_real_seconds();
ipc_update_pid(&shp->shm_lprid, task_tgid(current));
shp->shm_nattch++;
@@ -455,8 +461,9 @@ static int shm_mmap(struct file *file, s
int ret;
/*
- * In case of remap_file_pages() emulation, the file can represent
- * removed IPC ID: propogate shm_lock() error to caller.
+ * In case of remap_file_pages() emulation, the file can represent an
+ * IPC ID that was removed, and possibly even reused by another shm
+ * segment already. Propagate this case as an error to caller.
*/
ret = __shm_open(vma);
if (ret)
@@ -480,6 +487,7 @@ static int shm_release(struct inode *ino
struct shm_file_data *sfd = shm_file_data(file);
put_ipc_ns(sfd->ns);
+ fput(sfd->file);
shm_file_data(file) = NULL;
kfree(sfd);
return 0;
@@ -1445,7 +1453,16 @@ long do_shmat(int shmid, char __user *sh
file->f_mapping = shp->shm_file->f_mapping;
sfd->id = shp->shm_perm.id;
sfd->ns = get_ipc_ns(ns);
- sfd->file = shp->shm_file;
+ /*
+ * We need to take a reference to the real shm file to prevent the
+ * pointer from becoming stale in cases where the lifetime of the outer
+ * file extends beyond that of the shm segment. It's not usually
+ * possible, but it can happen during remap_file_pages() emulation as
+ * that unmaps the memory, then does ->mmap() via file reference only.
+ * We'll deny the ->mmap() if the shm segment was since removed, but to
+ * detect shm ID reuse we need to compare the file pointers.
+ */
+ sfd->file = get_file(shp->shm_file);
sfd->vm_ops = NULL;
err = security_mmap_file(file, prot, flags);
_
From: "Michael S. Tsirkin" <mst(a)redhat.com>
Subject: get_user_pages_fast(): return -EFAULT on access_ok failure
get_user_pages_fast is supposed to be a faster drop-in equivalent of
get_user_pages. As such, callers expect it to return a negative return
code when passed an invalid address, and never expect it to return 0 when
passed a positive number of pages, since its documentation says:
* Returns number of pages pinned. This may be fewer than the number
* requested. If nr_pages is 0 or negative, returns 0. If no pages
* were pinned, returns -errno.
When get_user_pages_fast fall back on get_user_pages this is exactly what
happens. Unfortunately the implementation is inconsistent: it returns 0
if passed a kernel address, confusing callers: for example, the following
is pretty common but does not appear to do the right thing with a kernel
address:
ret = get_user_pages_fast(addr, 1, writeable, &page);
if (ret < 0)
return ret;
Change get_user_pages_fast to return -EFAULT when supplied a kernel
address to make it match expectations.
All callers have been audited for consistency with the documented
semantics.
Link: http://lkml.kernel.org/r/1522962072-182137-4-git-send-email-mst@redhat.com
Fixes: 5b65c4677a57 ("mm, x86/mm: Fix performance regression in get_user_pages_fast()")
Signed-off-by: Michael S. Tsirkin <mst(a)redhat.com>
Reported-by: syzbot+6304bf97ef436580fede(a)syzkaller.appspotmail.com
Reviewed-by: Andrew Morton <akpm(a)linux-foundation.org>
Cc: Kirill A. Shutemov <kirill.shutemov(a)linux.intel.com>
Cc: Huang Ying <ying.huang(a)intel.com>
Cc: Jonathan Corbet <corbet(a)lwn.net>
Cc: Peter Zijlstra <peterz(a)infradead.org>
Cc: Thomas Gleixner <tglx(a)linutronix.de>
Cc: Thorsten Leemhuis <regressions(a)leemhuis.info>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/gup.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff -puN mm/gup.c~gup-return-efault-on-access_ok-failure mm/gup.c
--- a/mm/gup.c~gup-return-efault-on-access_ok-failure
+++ a/mm/gup.c
@@ -1806,9 +1806,12 @@ int get_user_pages_fast(unsigned long st
len = (unsigned long) nr_pages << PAGE_SHIFT;
end = start + len;
+ if (nr_pages <= 0)
+ return 0;
+
if (unlikely(!access_ok(write ? VERIFY_WRITE : VERIFY_READ,
(void __user *)start, len)))
- return 0;
+ return -EFAULT;
if (gup_fast_permitted(start, nr_pages, write)) {
local_irq_disable();
_
From: "Michael S. Tsirkin" <mst(a)redhat.com>
Subject: mm/gup_benchmark: handle gup failures
Patch series "mm/get_user_pages_fast fixes, cleanups", v2.
Turns out get_user_pages_fast and __get_user_pages_fast return different
values on error when given a single page: __get_user_pages_fast returns 0.
get_user_pages_fast returns either 0 or an error.
Callers of get_user_pages_fast expect an error so fix it up to return an
error consistently.
Stress the difference between get_user_pages_fast and
__get_user_pages_fast to make sure callers aren't confused.
This patch (of 3):
__gup_benchmark_ioctl does not handle the case where get_user_pages_fast
fails:
- a negative return code will cause a buffer overrun
- returning with partial success will cause use of
uninitialized memory.
[akpm(a)linux-foundation.org: simplification]
Link: http://lkml.kernel.org/r/1522962072-182137-3-git-send-email-mst@redhat.com
Signed-off-by: Michael S. Tsirkin <mst(a)redhat.com>
Reviewed-by: Andrew Morton <akpm(a)linux-foundation.org>
Cc: Kirill A. Shutemov <kirill.shutemov(a)linux.intel.com>
Cc: Huang Ying <ying.huang(a)intel.com>
Cc: Jonathan Corbet <corbet(a)lwn.net>
Cc: Linus Torvalds <torvalds(a)linux-foundation.org>
Cc: Peter Zijlstra <peterz(a)infradead.org>
Cc: Thomas Gleixner <tglx(a)linutronix.de>
Cc: Thorsten Leemhuis <regressions(a)leemhuis.info>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/gup_benchmark.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff -puN mm/gup_benchmark.c~mm-gup_benchmark-handle-gup-failures mm/gup_benchmark.c
--- a/mm/gup_benchmark.c~mm-gup_benchmark-handle-gup-failures
+++ a/mm/gup_benchmark.c
@@ -23,7 +23,7 @@ static int __gup_benchmark_ioctl(unsigne
struct page **pages;
nr_pages = gup->size / PAGE_SIZE;
- pages = kvmalloc(sizeof(void *) * nr_pages, GFP_KERNEL);
+ pages = kvzalloc(sizeof(void *) * nr_pages, GFP_KERNEL);
if (!pages)
return -ENOMEM;
@@ -41,6 +41,8 @@ static int __gup_benchmark_ioctl(unsigne
}
nr = get_user_pages_fast(addr, nr, gup->flags & 1, pages + i);
+ if (nr <= 0)
+ break;
i += nr;
}
end_time = ktime_get();
_
From: Takashi Iwai <tiwai(a)suse.de>
Subject: resource: fix integer overflow at reallocation
We've got a bug report indicating a kernel panic at booting on an x86-32
system, and it turned out to be the invalid PCI resource assigned after
reallocation. __find_resource() first aligns the resource start address
and resets the end address with start+size-1 accordingly, then checks
whether it's contained. Here the end address may overflow the integer,
although resource_contains() still returns true because the function
validates only start and end address. So this ends up with returning an
invalid resource (start > end).
There was already an attempt to cover such a problem in the commit
47ea91b4052d ("Resource: fix wrong resource window calculation"), but this
case is an overseen one.
This patch adds the validity check of the newly calculated resource for
avoiding the integer overflow problem.
Bugzilla: http://bugzilla.opensuse.org/show_bug.cgi?id=1086739
Link: http://lkml.kernel.org/r/s5hpo37d5l8.wl-tiwai@suse.de
Fixes: 23c570a67448 ("resource: ability to resize an allocated resource")
Signed-off-by: Takashi Iwai <tiwai(a)suse.de>
Reported-by: Michael Henders <hendersm(a)shaw.ca>
Tested-by: Michael Henders <hendersm(a)shaw.ca>
Reviewed-by: Andrew Morton <akpm(a)linux-foundation.org>
Cc: Ram Pai <linuxram(a)us.ibm.com>
Cc: Bjorn Helgaas <bhelgaas(a)google.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
kernel/resource.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff -puN kernel/resource.c~resource-fix-integer-overflow-at-reallocation-v1 kernel/resource.c
--- a/kernel/resource.c~resource-fix-integer-overflow-at-reallocation-v1
+++ a/kernel/resource.c
@@ -651,7 +651,8 @@ static int __find_resource(struct resour
alloc.start = constraint->alignf(constraint->alignf_data, &avail,
size, constraint->align);
alloc.end = alloc.start + size - 1;
- if (resource_contains(&avail, &alloc)) {
+ if (alloc.start <= alloc.end &&
+ resource_contains(&avail, &alloc)) {
new->start = alloc.start;
new->end = alloc.end;
return 0;
_
The patch titled
Subject: mm-gup_benchmark-handle-gup-failures-fix
has been removed from the -mm tree. Its filename was
mm-gup_benchmark-handle-gup-failures-fix.patch
This patch was dropped because it was folded into mm-gup_benchmark-handle-gup-failures.patch
------------------------------------------------------
From: Andrew Morton <akpm(a)linux-foundation.org>
Subject: mm-gup_benchmark-handle-gup-failures-fix
Cc: Huang Ying <ying.huang(a)intel.com>
Cc: Jonathan Corbet <corbet(a)lwn.net>
Cc: Kirill A. Shutemov <kirill.shutemov(a)linux.intel.com>
Cc: Linus Torvalds <torvalds(a)linux-foundation.org>
Cc: "Michael S. Tsirkin" <mst(a)redhat.com>
Cc: Peter Zijlstra <peterz(a)infradead.org>
Cc: <stable(a)vger.kernel.org>
Cc: Thomas Gleixner <tglx(a)linutronix.de>
Cc: Thorsten Leemhuis <regressions(a)leemhuis.info>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/gup_benchmark.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff -puN mm/gup_benchmark.c~mm-gup_benchmark-handle-gup-failures-fix mm/gup_benchmark.c
--- a/mm/gup_benchmark.c~mm-gup_benchmark-handle-gup-failures-fix
+++ a/mm/gup_benchmark.c
@@ -41,8 +41,9 @@ static int __gup_benchmark_ioctl(unsigne
}
nr = get_user_pages_fast(addr, nr, gup->flags & 1, pages + i);
- if (nr > 0)
- i += nr;
+ if (nr <= 0)
+ break;
+ i += nr;
}
end_time = ktime_get();
_
Patches currently in -mm which might be from akpm(a)linux-foundation.org are
i-need-old-gcc.patch
mm-gup_benchmark-handle-gup-failures.patch
mm-pagemap-fix-swap-offset-value-for-pmd-migration-entry-fix.patch
writeback-safer-lock-nesting-fix.patch
arm-arch-arm-include-asm-pageh-needs-personalityh.patch
ocfs2-without-quota-support-try-to-avoid-calling-quota-recovery-checkpatch-fixes.patch
mm.patch
list_lru-prefetch-neighboring-list-entries-before-acquiring-lock-fix.patch
mm-oom-cgroup-aware-oom-killer-fix.patch
mm-oom-docs-describe-the-cgroup-aware-oom-killer-fix-2-fix.patch
linux-next-rejects.patch
fs-fsnotify-account-fsnotify-metadata-to-kmemcg-fix.patch
kernel-forkc-export-kernel_thread-to-modules.patch
slab-leaks3-default-y.patch
The patch titled
Subject: autofs: mount point create should honour passed in mode
has been added to the -mm tree. Its filename is
autofs-mount-point-create-should-honour-passed-in-mode.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/autofs-mount-point-create-should-h…
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/autofs-mount-point-create-should-h…
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: Ian Kent <raven(a)themaw.net>
Subject: autofs: mount point create should honour passed in mode
The autofs file system mkdir inode operation blindly sets the created
directory mode to S_IFDIR | 0555, ingoring the passed in mode, which can
cause selinux dac_override denials.
But the function also checks if the caller is the daemon (as no-one else
should be able to do anything here) so there's no point in not honouring
the passed in mode, allowing the daemon to set appropriate mode when
required.
Link: http://lkml.kernel.org/r/152361593601.8051.14014139124905996173.stgit@pluto…
Signed-off-by: Ian Kent <raven(a)themaw.net>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
fs/autofs4/root.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN fs/autofs4/root.c~autofs-mount-point-create-should-honour-passed-in-mode fs/autofs4/root.c
--- a/fs/autofs4/root.c~autofs-mount-point-create-should-honour-passed-in-mode
+++ a/fs/autofs4/root.c
@@ -749,7 +749,7 @@ static int autofs4_dir_mkdir(struct inod
autofs4_del_active(dentry);
- inode = autofs4_get_inode(dir->i_sb, S_IFDIR | 0555);
+ inode = autofs4_get_inode(dir->i_sb, S_IFDIR | mode);
if (!inode)
return -ENOMEM;
d_add(dentry, inode);
_
Patches currently in -mm which might be from raven(a)themaw.net are
autofs-mount-point-create-should-honour-passed-in-mode.patch
From: Josef Bacik <jbacik(a)fb.com>
This fixes a use after free bug, we need to do the del_gendisk after we
cleanup the queue on the device.
Fixes: c6a4759ea0c9 ("nbd: add device refcounting")
cc: stable(a)vger.kernel.org
Signed-off-by: Josef Bacik <jbacik(a)fb.com>
---
drivers/block/nbd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 86258b00a1d4..e33da3e6aa20 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -174,8 +174,8 @@ static void nbd_dev_remove(struct nbd_device *nbd)
{
struct gendisk *disk = nbd->disk;
if (disk) {
- del_gendisk(disk);
blk_cleanup_queue(disk->queue);
+ del_gendisk(disk);
blk_mq_free_tag_set(&nbd->tag_set);
disk->private_data = NULL;
put_disk(disk);
--
2.14.3
The normal request completion can be done before or during handling
BLK_EH_RESET_TIMER, and this race may cause the request to never
be completed since driver's .timeout() may always return
BLK_EH_RESET_TIMER.
This issue can't be fixed completely by driver, since the normal
completion can be done between returning .timeout() and handing
BLK_EH_RESET_TIMER.
This patch fixes this race by introducing rq state of MQ_RQ_COMPLETE_IN_RESET,
and reading/writing rq's state by holding queue lock, which can be
per-request actually, but just not necessary to introduce one lock for
so unusual event.
Cc: Bart Van Assche <bart.vanassche(a)wdc.com>
Cc: Tejun Heo <tj(a)kernel.org>
Cc: Christoph Hellwig <hch(a)lst.de>
Cc: Ming Lei <ming.lei(a)redhat.com>
Cc: Sagi Grimberg <sagi(a)grimberg.me>
Cc: Israel Rukshin <israelr(a)mellanox.com>,
Cc: Max Gurtovoy <maxg(a)mellanox.com>
Cc: stable(a)vger.kernel.org
Signed-off-by: Ming Lei <ming.lei(a)redhat.com>
---
This is another way to fix this long-time issue, and turns out this
solution is much simpler.
block/blk-mq.c | 44 +++++++++++++++++++++++++++++++++++++++-----
block/blk-mq.h | 1 +
2 files changed, 40 insertions(+), 5 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 0dc9e341c2a7..12e8850e3905 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -630,10 +630,27 @@ void blk_mq_complete_request(struct request *rq)
* However, that would complicate paths which want to synchronize
* against us. Let stay in sync with the issue path so that
* hctx_lock() covers both issue and completion paths.
+ *
+ * Cover complete vs BLK_EH_RESET_TIMER race in slow path with
+ * helding queue lock.
*/
hctx_lock(hctx, &srcu_idx);
if (blk_mq_rq_aborted_gstate(rq) != rq->gstate)
__blk_mq_complete_request(rq);
+ else {
+ unsigned long flags;
+ bool need_complete = false;
+
+ spin_lock_irqsave(q->queue_lock, flags);
+ if (!blk_mq_rq_aborted_gstate(rq))
+ need_complete = true;
+ else
+ blk_mq_rq_update_state(rq, MQ_RQ_COMPLETE_IN_RESET);
+ spin_unlock_irqrestore(q->queue_lock, flags);
+
+ if (need_complete)
+ __blk_mq_complete_request(rq);
+ }
hctx_unlock(hctx, srcu_idx);
}
EXPORT_SYMBOL(blk_mq_complete_request);
@@ -814,24 +831,41 @@ static void blk_mq_rq_timed_out(struct request *req, bool reserved)
{
const struct blk_mq_ops *ops = req->q->mq_ops;
enum blk_eh_timer_return ret = BLK_EH_RESET_TIMER;
+ unsigned long flags;
req->rq_flags |= RQF_MQ_TIMEOUT_EXPIRED;
if (ops->timeout)
ret = ops->timeout(req, reserved);
+again:
switch (ret) {
case BLK_EH_HANDLED:
__blk_mq_complete_request(req);
break;
case BLK_EH_RESET_TIMER:
/*
- * As nothing prevents from completion happening while
- * ->aborted_gstate is set, this may lead to ignored
- * completions and further spurious timeouts.
+ * The normal completion may happen during handling the
+ * timeout, or even after returning from .timeout(), so
+ * once the request has been completed, we can't reset
+ * timer any more since this request may be handled as
+ * BLK_EH_RESET_TIMER in next timeout handling too, and
+ * it has to be completed in this situation.
+ *
+ * Holding the queue lock to cover read/write rq's
+ * aborted_gstate and normal state, so the race can be
+ * avoided completely.
*/
- blk_mq_rq_update_aborted_gstate(req, 0);
- blk_add_timer(req);
+ spin_lock_irqsave(req->q->queue_lock, flags);
+ if (blk_mq_rq_state(req) != MQ_RQ_COMPLETE_IN_RESET) {
+ blk_mq_rq_update_aborted_gstate(req, 0);
+ blk_add_timer(req);
+ } else {
+ blk_mq_rq_update_state(req, MQ_RQ_IN_FLIGHT);
+ ret = BLK_EH_HANDLED;
+ goto again;
+ }
+ spin_unlock_irqrestore(req->q->queue_lock, flags);
break;
case BLK_EH_NOT_HANDLED:
break;
diff --git a/block/blk-mq.h b/block/blk-mq.h
index 88c558f71819..6dc242fc785a 100644
--- a/block/blk-mq.h
+++ b/block/blk-mq.h
@@ -35,6 +35,7 @@ enum mq_rq_state {
MQ_RQ_IDLE = 0,
MQ_RQ_IN_FLIGHT = 1,
MQ_RQ_COMPLETE = 2,
+ MQ_RQ_COMPLETE_IN_RESET = 3,
MQ_RQ_STATE_BITS = 2,
MQ_RQ_STATE_MASK = (1 << MQ_RQ_STATE_BITS) - 1,
--
2.9.5
Hi,
Not sure if you received my email from last week.
We offer following image editing services:
images cutting out, clipping path, masking
jewelry photos retouching
beauty photos retouching
also wedding photos etc
If you want to test our quality of work.
You may send us one photo with instruction and we will work on it.
Hope to hear from you soon.
Regards,
Ross
The Studio Manager
When event on child inodes are sent to the parent inode mark and
parent inode mark was not marked with FAN_EVENT_ON_CHILD, the event
will not be delivered to the listener process. However, if the same
process also has a mount mark, the event to the parent inode will be
delivered regadless of the mount mark mask.
This behavior is incorrect in the case where the mount mark mask does
not contain the specific event type. For example, the process adds
a mark on a directory with mask FAN_MODIFY (without FAN_EVENT_ON_CHILD)
and a mount mark with mask FAN_CLOSE_NOWRITE (without FAN_ONDIR).
A modify event on a file inside that directory (and inside that mount)
should not create a FAN_MODIFY event, because neither of the marks
requested to get that event on the file.
Fixes: 1968f5eed54c ("fanotify: use both marks when possible")
Cc: stable <stable(a)vger.kernel.org>
Signed-off-by: Amir Goldstein <amir73il(a)gmail.com>
---
fs/notify/fanotify/fanotify.c | 34 +++++++++++++++-------------------
1 file changed, 15 insertions(+), 19 deletions(-)
diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c
index 6702a6a0bbb5..e0e6a9d627df 100644
--- a/fs/notify/fanotify/fanotify.c
+++ b/fs/notify/fanotify/fanotify.c
@@ -92,7 +92,7 @@ static bool fanotify_should_send_event(struct fsnotify_mark *inode_mark,
u32 event_mask,
const void *data, int data_type)
{
- __u32 marks_mask, marks_ignored_mask;
+ __u32 marks_mask = 0, marks_ignored_mask = 0;
const struct path *path = data;
pr_debug("%s: inode_mark=%p vfsmnt_mark=%p mask=%x data=%p"
@@ -108,24 +108,20 @@ static bool fanotify_should_send_event(struct fsnotify_mark *inode_mark,
!d_can_lookup(path->dentry))
return false;
- if (inode_mark && vfsmnt_mark) {
- marks_mask = (vfsmnt_mark->mask | inode_mark->mask);
- marks_ignored_mask = (vfsmnt_mark->ignored_mask | inode_mark->ignored_mask);
- } else if (inode_mark) {
- /*
- * if the event is for a child and this inode doesn't care about
- * events on the child, don't send it!
- */
- if ((event_mask & FS_EVENT_ON_CHILD) &&
- !(inode_mark->mask & FS_EVENT_ON_CHILD))
- return false;
- marks_mask = inode_mark->mask;
- marks_ignored_mask = inode_mark->ignored_mask;
- } else if (vfsmnt_mark) {
- marks_mask = vfsmnt_mark->mask;
- marks_ignored_mask = vfsmnt_mark->ignored_mask;
- } else {
- BUG();
+ /*
+ * if the event is for a child and this inode doesn't care about
+ * events on the child, don't send it!
+ */
+ if (inode_mark &&
+ (!(event_mask & FS_EVENT_ON_CHILD) ||
+ (inode_mark->mask & FS_EVENT_ON_CHILD))) {
+ marks_mask |= inode_mark->mask;
+ marks_ignored_mask |= inode_mark->ignored_mask;
+ }
+
+ if (vfsmnt_mark) {
+ marks_mask |= vfsmnt_mark->mask;
+ marks_ignored_mask |= vfsmnt_mark->ignored_mask;
}
if (d_is_dir(path->dentry) &&
--
2.7.4
Stable team, please backport commit
a306343bcd7d ("drm/i915/edp: Do not do link training fallback or prune modes on EDP")
to v4.13+
Fixes: 9301397a63b3 ("drm/i915: Implement Link Rate fallback on Link training failure")
BR,
Jani.
--
Jani Nikula, Intel Open Source Technology Center
cache_reap() is initially scheduled in start_cpu_timer() via
schedule_delayed_work_on(). But then the next iterations are scheduled via
schedule_delayed_work(), i.e. using WORK_CPU_UNBOUND.
Thus since commit ef557180447f ("workqueue: schedule WORK_CPU_UNBOUND work on
wq_unbound_cpumask CPUs") there is no guarantee the future iterations will run
on the originally intended cpu, although it's still preferred. I was able to
demonstrate this with /sys/module/workqueue/parameters/debug_force_rr_cpu.
IIUC, it may also happen due to migrating timers in nohz context. As a result,
some cpu's would be calling cache_reap() more frequently and others never.
This patch uses schedule_delayed_work_on() with the current cpu when scheduling
the next iteration.
Signed-off-by: Vlastimil Babka <vbabka(a)suse.cz>
Fixes: ef557180447f ("workqueue: schedule WORK_CPU_UNBOUND work on wq_unbound_cpumask CPUs")
CC: <stable(a)vger.kernel.org>
Cc: Joonsoo Kim <iamjoonsoo.kim(a)lge.com>
Cc: David Rientjes <rientjes(a)google.com>
Cc: Pekka Enberg <penberg(a)kernel.org>
Cc: Christoph Lameter <cl(a)linux.com>
Cc: Tejun Heo <tj(a)kernel.org>
Cc: Lai Jiangshan <jiangshanlai(a)gmail.com>
Cc: John Stultz <john.stultz(a)linaro.org>
Cc: Thomas Gleixner <tglx(a)linutronix.de>
Cc: Stephen Boyd <sboyd(a)kernel.org>
---
mm/slab.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mm/slab.c b/mm/slab.c
index 9095c3945425..a76006aae857 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -4074,7 +4074,8 @@ static void cache_reap(struct work_struct *w)
next_reap_node();
out:
/* Set up the next iteration */
- schedule_delayed_work(work, round_jiffies_relative(REAPTIMEOUT_AC));
+ schedule_delayed_work_on(smp_processor_id(), work,
+ round_jiffies_relative(REAPTIMEOUT_AC));
}
void get_slabinfo(struct kmem_cache *cachep, struct slabinfo *sinfo)
--
2.16.3
From: Takashi Iwai <tiwai(a)suse.de>
[ Upstream commit d7f910bfedd863d13ea320030fe98e42d0938ed5 ]
For accessing the snd_timer_user queue indices, we take tu->qlock.
But it's forgotten in a couple of places.
The one in snd_timer_user_params() should be safe without the
spinlock as the timer is already stopped. But it's better for
consistency.
The one in poll is just a read-out, so it's not inevitably needed, but
it'd be good to make the result consistent, too.
Tested-by: Alexander Potapenko <glider(a)google.com>
Signed-off-by: Takashi Iwai <tiwai(a)suse.de>
Signed-off-by: Sasha Levin <alexander.levin(a)microsoft.com>
---
sound/core/timer.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sound/core/timer.c b/sound/core/timer.c
index e5ddc475dca4..bbde1bcdd985 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -1773,6 +1773,7 @@ static int snd_timer_user_params(struct file *file,
}
}
}
+ spin_lock_irq(&tu->qlock);
tu->qhead = tu->qtail = tu->qused = 0;
if (tu->timeri->flags & SNDRV_TIMER_IFLG_EARLY_EVENT) {
if (tu->tread) {
@@ -1793,6 +1794,7 @@ static int snd_timer_user_params(struct file *file,
}
tu->filter = params.filter;
tu->ticks = params.ticks;
+ spin_unlock_irq(&tu->qlock);
err = 0;
_end:
if (copy_to_user(_params, ¶ms, sizeof(params)))
@@ -2034,10 +2036,12 @@ static unsigned int snd_timer_user_poll(struct file *file, poll_table * wait)
poll_wait(file, &tu->qchange_sleep, wait);
mask = 0;
+ spin_lock_irq(&tu->qlock);
if (tu->qused)
mask |= POLLIN | POLLRDNORM;
if (tu->disconnected)
mask |= POLLERR;
+ spin_unlock_irq(&tu->qlock);
return mask;
}
--
2.15.1
The patch titled
Subject: resource: fix integer overflow at reallocation
has been removed from the -mm tree. Its filename was
resource-fix-integer-overflow-at-reallocation.patch
This patch was dropped because an alternative patch was merged
------------------------------------------------------
From: Takashi Iwai <tiwai(a)suse.de>
Subject: resource: fix integer overflow at reallocation
We've got a bug report indicating a kernel panic at booting on an x86-32
system, and it turned out to be the invalid resource assigned after PCI
resource reallocation. __find_resource() first aligns the resource start
address and resets the end address with start+size-1 accordingly, then
checks whether it's contained. Here the end address may overflow the
integer, although resource_contains() still returns true because the
function validates only start and end address. So this ends up with
returning an invalid resource (start > end).
There was already an attempt to cover such a problem in the commit
47ea91b4052d ("Resource: fix wrong resource window calculation"), but this
case is an overseen one.
This patch adds the validity check in resource_contains() to see whether
the given resource has a valid range for avoiding the integer overflow
problem.
Bugzilla: http://bugzilla.opensuse.org/show_bug.cgi?id=1086739
Link: http://lkml.kernel.org/r/20180408072026.27365-1-tiwai@suse.de
Fixes: 23c570a67448 ("resource: ability to resize an allocated resource")
Signed-off-by: Takashi Iwai <tiwai(a)suse.de>
Reported-by: Michael Henders <hendersm(a)shaw.ca>
Tested-by: Michael Henders <hendersm(a)shaw.ca>
Reviewed-by: Ram Pai <linuxram(a)us.ibm.com>
Cc: Bjorn Helgaas <bhelgaas(a)google.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
include/linux/ioport.h | 3 +++
1 file changed, 3 insertions(+)
diff -puN include/linux/ioport.h~resource-fix-integer-overflow-at-reallocation include/linux/ioport.h
--- a/include/linux/ioport.h~resource-fix-integer-overflow-at-reallocation
+++ a/include/linux/ioport.h
@@ -212,6 +212,9 @@ static inline bool resource_contains(str
return false;
if (r1->flags & IORESOURCE_UNSET || r2->flags & IORESOURCE_UNSET)
return false;
+ /* sanity check whether it's a valid resource range */
+ if (r2->end < r2->start)
+ return false;
return r1->start <= r2->start && r1->end >= r2->end;
}
_
Patches currently in -mm which might be from tiwai(a)suse.de are
resource-fix-integer-overflow-at-reallocation-v1.patch
The patch titled
Subject: rapidio: fix rio_dma_transfer error handling
has been added to the -mm tree. Its filename is
rapidio-fix-rio_dma_transfer-error-handling.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/rapidio-fix-rio_dma_transfer-error…
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/rapidio-fix-rio_dma_transfer-error…
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: Ioan Nicu <ioan.nicu.ext(a)nokia.com>
Subject: rapidio: fix rio_dma_transfer error handling
Some of the mport_dma_req structure members were initialized late
inside the do_dma_request() function, just before submitting the
request to the dma engine. But we have some error branches before
that. In case of such an error, the code would return on the error
path and trigger the calling of dma_req_free() with a req structure
which is not completely initialized. This causes a NULL pointer
dereference in dma_req_free().
This patch fixes these error branches by making sure that all
necessary mport_dma_req structure members are initialized in
rio_dma_transfer() immediately after the request structure gets
allocated.
Link: http://lkml.kernel.org/r/20180412150605.GA31409@nokia.com
Signed-off-by: Ioan Nicu <ioan.nicu.ext(a)nokia.com>
Tested-by: Alexander Sverdlin <alexander.sverdlin(a)nokia.com>
Acked-by: Alexandre Bounine <alex.bou9(a)gmail.com>
Cc: Barry Wood <barry.wood(a)idt.com>
Cc: Matt Porter <mporter(a)kernel.crashing.org>
Cc: Christophe JAILLET <christophe.jaillet(a)wanadoo.fr>
Cc: Logan Gunthorpe <logang(a)deltatee.com>
Cc: Chris Wilson <chris(a)chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin(a)intel.com>
Cc: Frank Kunz <frank.kunz(a)nokia.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
drivers/rapidio/devices/rio_mport_cdev.c | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff -puN drivers/rapidio/devices/rio_mport_cdev.c~rapidio-fix-rio_dma_transfer-error-handling drivers/rapidio/devices/rio_mport_cdev.c
--- a/drivers/rapidio/devices/rio_mport_cdev.c~rapidio-fix-rio_dma_transfer-error-handling
+++ a/drivers/rapidio/devices/rio_mport_cdev.c
@@ -740,10 +740,7 @@ static int do_dma_request(struct mport_d
tx->callback = dma_xfer_callback;
tx->callback_param = req;
- req->dmach = chan;
- req->sync = sync;
req->status = DMA_IN_PROGRESS;
- init_completion(&req->req_comp);
kref_get(&req->refcount);
cookie = dmaengine_submit(tx);
@@ -831,13 +828,20 @@ rio_dma_transfer(struct file *filp, u32
if (!req)
return -ENOMEM;
- kref_init(&req->refcount);
-
ret = get_dma_channel(priv);
if (ret) {
kfree(req);
return ret;
}
+ chan = priv->dmach;
+
+ kref_init(&req->refcount);
+ init_completion(&req->req_comp);
+ req->dir = dir;
+ req->filp = filp;
+ req->priv = priv;
+ req->dmach = chan;
+ req->sync = sync;
/*
* If parameter loc_addr != NULL, we are transferring data from/to
@@ -925,11 +929,6 @@ rio_dma_transfer(struct file *filp, u32
xfer->offset, xfer->length);
}
- req->dir = dir;
- req->filp = filp;
- req->priv = priv;
- chan = priv->dmach;
-
nents = dma_map_sg(chan->device->dev,
req->sgt.sgl, req->sgt.nents, dir);
if (nents == 0) {
_
Patches currently in -mm which might be from ioan.nicu.ext(a)nokia.com are
rapidio-fix-rio_dma_transfer-error-handling.patch
Hi,
Hope all is well!
We are a database organization. We provide business executives' contact
information.
Below, I've included a few examples:
Industry-Specific Lists: Agriculture, Business Services, Chambers of
Commerce, Cities, Towns & Municipalities, Construction, Consumer Services,
Cultural, Education, Energy, Utilities & Waste Treatment, Finance,
Government, Healthcare, Hospitality, Insurance, Law Firms & Legal Services,
Manufacturing, Media & Internet, Metals & Mining, Organizations, Real
Estate, Retail, Software, Telecommunications, Transportation, and more!
Technology-Specific Lists: SAP users, PeopleSoft users, SIEBEL customers,
Oracle Application customers, Microsoft Dynamic users, Sales force users,
Microsoft Exchange users, QuickBooks, Lawson users, Act users, JD Edward
users, ASP users, Microsoft GP Applications users, Net Suite users, IBM
DBMS Application users, McAfee users, MS Dynamics GP (Great Plains), and
many more.
Title-Specific Lists: C-level executives: CEO, CFO, CIO, CTO, CMO, CISO,
CSO, COO Key decision-makers: All C-level, VP-level, and Director-level
executives HR Executives: VP of HR, HR Director & HR Manager, etc.
Marketing Executives: CMO, VP of Marketing, Director of Marketing,
Marketing Managers IT Executives: CIO, CTO, CISO, IT-VP, IT-Director, IT
Manager, MIS Manager, etc.
Please keep me informed for any additional details. I look forward to
hearing from you.
Regards,
Joann Kaur
Marketing Executive
This is the start of the stable review cycle for the 3.18.105 release.
There are 121 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 Fri Apr 13 18:34:28 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.105-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.105-rc1
Paolo Abeni <pabeni(a)redhat.com>
ipv6: the entire IPv6 header chain must fit the first fragment
Craig Dillabaugh <cdillaba(a)mojatatu.com>
net sched actions: fix dumping which requires several messages to user space
Heiner Kallweit <hkallweit1(a)gmail.com>
r8169: fix setting driver_data after register_netdev
Eric Dumazet <edumazet(a)google.com>
ip6_tunnel: better validate user provided tunnel names
Eric Dumazet <edumazet(a)google.com>
vti6: better validate user provided tunnel names
Eric Dumazet <edumazet(a)google.com>
ip6_gre: better validate user provided tunnel names
Eric Dumazet <edumazet(a)google.com>
ipv6: sit: better validate user provided tunnel names
Eric Dumazet <edumazet(a)google.com>
ip_tunnel: better validate user provided tunnel names
Eric Dumazet <edumazet(a)google.com>
net: fool proof dev_valid_name()
Xin Long <lucien.xin(a)gmail.com>
bonding: process the err returned by dev_set_allmulti properly in bond_enslave
Xin Long <lucien.xin(a)gmail.com>
bonding: move dev_mc_sync after master_upper_dev_link in bond_enslave
Xin Long <lucien.xin(a)gmail.com>
bonding: fix the err path for dev hwaddr sync in bond_enslave
Jason Wang <jasowang(a)redhat.com>
vhost: correctly remove wait queue during poll failure
Kai-Heng Feng <kai.heng.feng(a)canonical.com>
sky2: Increase D3 delay to sky2 stops working after suspend
Eric Dumazet <edumazet(a)google.com>
sctp: sctp_sockaddr_af must check minimal addr length for AF_INET6
Eric Dumazet <edumazet(a)google.com>
sctp: do not leak kernel memory to user space
Eric Dumazet <edumazet(a)google.com>
pptp: remove a buggy dst release in pptp_connect()
Alexander Potapenko <glider(a)google.com>
netlink: make sure nladdr has correct size in netlink_connect()
Eric Dumazet <edumazet(a)google.com>
net: fix possible out-of-bound read in skb_network_protocol()
Mel Gorman <mgorman(a)suse.de>
futex: Remove requirement for lock_page() in get_futex_key()
Theodore Ts'o <tytso(a)mit.edu>
random: use lockless method of accessing and updating f->reg_idx
Nathan Chancellor <natechancellor(a)gmail.com>
virtio_net: check return value of skb_to_sgvec in one more location
Jason A. Donenfeld <Jason(a)zx2c4.com>
virtio_net: check return value of skb_to_sgvec always
Jason A. Donenfeld <Jason(a)zx2c4.com>
rxrpc: check return value of skb_to_sgvec always
Jason A. Donenfeld <Jason(a)zx2c4.com>
ipsec: check return value of skb_to_sgvec always
Christophe JAILLET <christophe.jaillet(a)wanadoo.fr>
EDAC, mv64x60: Fix an error handling path
Tony Lindgren <tony(a)atomide.com>
tty: n_gsm: Allow ADM response in addition to UA for control dlci
chenxiang <chenxiang66(a)hisilicon.com>
scsi: libsas: initialize sas_phy status according to response of DISCOVER
Jason Yan <yanaijie(a)huawei.com>
scsi: libsas: fix error when getting phy events
Jason Yan <yanaijie(a)huawei.com>
scsi: libsas: fix memory leak in sas_smp_get_phy_events()
Tang Junhui <tang.junhui(a)zte.com.cn>
bcache: segregate flash only volume write streams
Tang Junhui <tang.junhui(a)zte.com.cn>
bcache: stop writeback thread after detaching
Roopa Prabhu <roopa(a)cumulusnetworks.com>
vxlan: dont migrate permanent fdb entries during learn
Bob Moore <robert.moore(a)intel.com>
ACPICA: Disassembler: Abort on an invalid/unknown AML opcode
Lv Zheng <lv.zheng(a)intel.com>
ACPICA: Events: Add runtime stub support for event APIs
Marcel Holtmann <marcel(a)holtmann.org>
Bluetooth: Send HCI Set Event Mask Page 2 command only when needed
Lorenzo Bianconi <lorenzo.bianconi83(a)gmail.com>
iio: magnetometer: st_magn_spi: fix spi_device_id table
Jag Raman <jag.raman(a)oracle.com>
sparc64: ldc abort during vds iso boot
Xin Long <lucien.xin(a)gmail.com>
sctp: fix recursive locking warning in sctp_do_peeloff
Mintz, Yuval <Yuval.Mintz(a)cavium.com>
bnx2x: Allow vfs to disable txvlan offload
Arnd Bergmann <arnd(a)arndb.de>
xen: avoid type warning in xchg_xen_ulong
Namhyung Kim <namhyung(a)kernel.org>
perf tests: Decompress kernel module before objdump
Christian Lamparter <chunkeey(a)googlemail.com>
net: emac: fix reset timeout with AR8035 phy
Marcin Nowakowski <marcin.nowakowski(a)imgtec.com>
MIPS: kprobes: flush_insn_slot should flush only if probe initialised
Marcin Nowakowski <marcin.nowakowski(a)imgtec.com>
MIPS: mm: fixed mappings: correct initialisation
Peter Zijlstra <peterz(a)infradead.org>
perf/core: Correct event creation with PERF_FORMAT_GROUP
Chris Wilson <chris(a)chris-wilson.co.uk>
e1000e: Undo e1000e_pm_freeze if __e1000_shutdown fails
Russell King <rmk+kernel(a)armlinux.org.uk>
net: phy: avoid genphy_aneg_done() for PHYs without clause 22 support
A Sun <as1033x(a)comcast.net>
mceusb: sporadic RX truncation corruption fix
Pan Bian <bianpan2016(a)163.com>
cx25840: fix unchecked return values
Jacob Keller <jacob.e.keller(a)intel.com>
e1000e: fix race condition around skb_tstamp_tx()
Robert Jarzmik <robert.jarzmik(a)free.fr>
tags: honor COMPILED_SOURCE with apart output directory
Milian Wolff <milian.wolff(a)kdab.com>
perf report: Ensure the perf DSO mapping matches what libdw sees
Talat Batheesh <talatb(a)mellanox.com>
net/mlx4: Fix the check in attaching steering rules
Jason A. Donenfeld <Jason(a)zx2c4.com>
skbuff: return -EMSGSIZE in skb_to_sgvec to prevent overflow
Dmitry Monakhov <dmonakhov(a)openvz.org>
bio-integrity: Do not allocate integrity context for bio w/o data
Thomas Bogendoerfer <tsbogend(a)alpha.franken.de>
Fix serial console on SNI RM400 machines
Tomi Valkeinen <tomi.valkeinen(a)ti.com>
drm/omap: fix tiled buffer stride calculations
Jia-Ju Bai <baijiaju1990(a)163.com>
mISDN: Fix a sleep-in-atomic bug
Jia-Ju Bai <baijiaju1990(a)163.com>
qlcnic: Fix a sleep-in-atomic bug in qlcnic_82xx_hw_write_wx_2M and qlcnic_82xx_hw_read_wx_2M
Jiri Olsa <jolsa(a)kernel.org>
perf trace: Add mmap alias for s390
Michael Ellerman <mpe(a)ellerman.id.au>
powerpc/spufs: Fix coredump of SPU contexts
Roman Pen <roman.penyaev(a)profitbricks.com>
KVM: SVM: do not zero out segment attributes if segment is unusable or not present
Gustavo A. R. Silva <garsilva(a)embeddedor.com>
net: freescale: fix potential null pointer dereference
Vaibhav Jain <vaibhav(a)linux.vnet.ibm.com>
rtc: interface: Validate alarm-time before handling rollover
Will Deacon <will.deacon(a)arm.com>
arm64: futex: Fix undefined behaviour with FUTEX_OP_OPARG_SHIFT usage
Ivan Mikhaylov <ivan(a)de.ibm.com>
powerpc/[booke|4xx]: Don't clobber TCR[WP] when setting TCR[DIE]
Miklos Szeredi <mszeredi(a)redhat.com>
ovl: filter trusted xattr for non-admin
Firo Yang <firogm(a)gmail.com>
hdlcdrv: Fix divide by zero in hdlcdrv_ioctl
Colin Ian King <colin.king(a)canonical.com>
wl1251: check return from call to wl1251_acx_arp_ip_filter
Pieter \"PoroCYon\" Sluys <pcy(a)national.shitposting.agency>
vfb: fix video mode and line_length being set when loaded
Rafael David Tinoco <rafael.tinoco(a)canonical.com>
scsi: libiscsi: Allow sd_shutdown on bad transport
Hangbin Liu <liuhangbin(a)gmail.com>
l2tp: fix missing print session offset info
linzhang <xiaolou4617(a)gmail.com>
net: llc: add lock_sock in llc_ui_bind to avoid a race condition
Jan H. Schönherr <jschoenh(a)amazon.de>
KVM: nVMX: Fix handling of lmsw instruction
Nithin Sujir <nsujir(a)tintri.com>
bonding: Don't update slave->link until ready to commit
Roman Kapl <roman.kapl(a)sysgo.com>
net: move somaxconn init from sysctl code
Eryu Guan <eguan(a)redhat.com>
ext4: fix off-by-one on max nr_pages in ext4_find_unwritten_pgoff()
Michael Schmitz <schmitzmic(a)gmail.com>
fix race in drivers/char/random.c:get_reg()
Maurizio Lombardi <mlombard(a)redhat.com>
scsi: bnx2fc: fix race condition in bnx2fc_get_host_stats()
Liping Zhang <zlpnobody(a)gmail.com>
netfilter: ctnetlink: fix incorrect nf_ct_put during hash resize
Dan Carpenter <dan.carpenter(a)oracle.com>
libceph: NULL deref on crush_decode() error path
Dan Carpenter <dan.carpenter(a)oracle.com>
block: fix an error code in add_partition()
Tin Huynh <tnhuynh(a)apm.com>
leds: pca955x: Correct I2C Functionality
Kees Cook <keescook(a)chromium.org>
ray_cs: Avoid reading past end of buffer
Suman Anna <s-anna(a)ti.com>
ARM: davinci: da8xx: Create DSP device only when assigned memory
Antony Antony <antony(a)phenome.org>
xfrm: fix state migration copy replay sequence numbers
Michael Ellerman <mpe(a)ellerman.id.au>
selftests/powerpc: Fix TM resched DSCR test with some compilers
Colin Ian King <colin.king(a)canonical.com>
ath5k: fix memory leak on buf on failed eeprom read
Geert Uytterhoeven <geert+renesas(a)glider.be>
sh_eth: Use platform device for printing before register_netdev()
Alan Stern <stern(a)rowland.harvard.edu>
USB: ene_usb6250: fix SCSI residue overwriting
linzhang <xiaolou4617(a)gmail.com>
net: x25: fix one potential use-after-free issue
Alan Stern <stern(a)rowland.harvard.edu>
USB: ene_usb6250: fix first command execution
Jisheng Zhang <jszhang(a)marvell.com>
usb: chipidea: properly handle host or gadget initialization failure
Ihar Hrachyshka <ihrachys(a)redhat.com>
neighbour: update neigh timestamps iff update is effective
Thomas Petazzoni <thomas.petazzoni(a)free-electrons.com>
ata: libahci: properly propagate return value of platform_get_irq()
Colin Ian King <colin.king(a)canonical.com>
btrfs: fix incorrect error return ret being passed to mapping_set_error
Pan Bian <bianpan2016(a)163.com>
usb: dwc3: keystone: check return value
Anup Patel <anup.patel(a)broadcom.com>
async_tx: Fix DMA_PREP_FENCE usage in do_async_gen_syndrome()
Mahesh Bandewar <maheshb(a)google.com>
ipv6: avoid dad-failures for addresses with NODAD
Fabio Estevam <fabio.estevam(a)nxp.com>
ARM: dts: imx6qdl-wandboard: Fix audio channel swap
Peter Zijlstra <peterz(a)infradead.org>
x86/tsc: Provide 'tsc=unstable' boot parameter
Andrea della Porta <sfaragnaus(a)gmail.com>
staging: wlan-ng: prism2mgmt.c: fixed a double endian conversion before calling hfa384x_drvr_setconfig16, also fixes relative sparse warning
Dan Carpenter <dan.carpenter(a)oracle.com>
PowerCap: Fix an error code in powercap_register_zone()
Christophe JAILLET <christophe.jaillet(a)wanadoo.fr>
SMB2: Fix share type handling
Neil Horman <nhorman(a)tuxdriver.com>
vmxnet3: ensure that adapter is in proper state during force_close
Paul Mackerras <paulus(a)ozlabs.org>
KVM: PPC: Book3S PR: Check copy_to/from_user return values
Colin Ian King <colin.king(a)canonical.com>
netxen_nic: set rcode to the return status from the call to netxen_issue_cmd
Stefan Wahren <stefan.wahren(a)i2se.com>
net: qca_spi: Fix alignment issues in rx path
Rabin Vincent <rabinv(a)axis.com>
CIFS: silence lockdep splat in cifs_relock_file()
Talat Batheesh <talatb(a)mellanox.com>
net/mlx4_en: Avoid adding steering rules with invalid ring
Heiko Carstens <heiko.carstens(a)de.ibm.com>
s390: move _text symbol to address higher than zero
Kirill Tkhai <ktkhai(a)virtuozzo.com>
pidns: disable pid allocation if pid_ns_prepare_proc() is failed in alloc_pid()
J. Bruce Fields <bfields(a)redhat.com>
lockd: fix lockd shutdown race
Grygorii Strashko <grygorii.strashko(a)ti.com>
net: ethernet: ti: cpsw: adjust cpsw fifos depth for fullduplex flow control
Kees Cook <keescook(a)chromium.org>
qlge: Avoid reading past end of buffer
Kees Cook <keescook(a)chromium.org>
bna: Avoid reading past end of buffer
Luca Coelho <luciano.coelho(a)intel.com>
mac80211: bail out from prep_connection() if a reconfig is ongoing
Steffen Klassert <steffen.klassert(a)secunet.com>
af_key: Fix slab-out-of-bounds in pfkey_compile_policy.
Bart Van Assche <bart.vanassche(a)sandisk.com>
IB/srpt: Fix abort handling
Trond Myklebust <trond.myklebust(a)primarydata.com>
NFSv4.1: RECLAIM_COMPLETE must handle NFS4ERR_CONN_NOT_BOUND_TO_SESSION
-------------
Diffstat:
Makefile | 4 +-
arch/arm/boot/dts/imx6qdl-wandboard.dtsi | 1 +
arch/arm/include/asm/xen/events.h | 2 +-
arch/arm/mach-davinci/devices-da8xx.c | 10 +++
arch/arm64/include/asm/futex.h | 8 +-
arch/mips/include/asm/kprobes.h | 3 +-
arch/mips/mm/pgtable-32.c | 6 +-
arch/powerpc/kernel/time.c | 14 +++-
arch/powerpc/kvm/book3s_pr_papr.c | 34 ++++++--
arch/powerpc/platforms/cell/spufs/coredump.c | 2 +
arch/s390/kernel/vmlinux.lds.S | 8 +-
arch/sparc/kernel/ldc.c | 7 +-
arch/x86/kernel/tsc.c | 2 +
arch/x86/kvm/svm.c | 24 +++---
arch/x86/kvm/vmx.c | 7 +-
block/bio-integrity.c | 3 +
block/partition-generic.c | 4 +-
crypto/async_tx/async_pq.c | 5 +-
drivers/acpi/acpica/evxfevnt.c | 18 ++++
drivers/acpi/acpica/psobject.c | 14 ++++
drivers/ata/libahci_platform.c | 5 +-
drivers/char/random.c | 10 ++-
drivers/edac/mv64x60_edac.c | 2 +-
drivers/gpu/drm/omapdrm/omap_gem.c | 4 +-
drivers/iio/magnetometer/st_magn_spi.c | 2 -
drivers/infiniband/ulp/srpt/ib_srpt.c | 6 +-
drivers/isdn/mISDN/stack.c | 2 +-
drivers/leds/leds-pca955x.c | 2 +-
drivers/md/bcache/alloc.c | 19 +++--
drivers/md/bcache/super.c | 6 ++
drivers/media/i2c/cx25840/cx25840-core.c | 36 ++++----
drivers/media/rc/mceusb.c | 9 +-
drivers/net/bonding/bond_main.c | 84 ++++++++++---------
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 19 ++++-
drivers/net/ethernet/brocade/bna/bfa_ioc.c | 2 +-
drivers/net/ethernet/freescale/fsl_pq_mdio.c | 9 +-
drivers/net/ethernet/ibm/emac/core.c | 26 +++++-
drivers/net/ethernet/intel/e1000e/netdev.c | 17 +++-
drivers/net/ethernet/marvell/sky2.c | 2 +-
drivers/net/ethernet/mellanox/mlx4/mcg.c | 15 +++-
drivers/net/ethernet/mellanox/mlx4/qp.c | 13 +++
.../net/ethernet/qlogic/netxen/netxen_nic_ctx.c | 2 +-
drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c | 2 +-
drivers/net/ethernet/qlogic/qlge/qlge_dbg.c | 4 +-
drivers/net/ethernet/qualcomm/qca_spi.c | 10 ++-
drivers/net/ethernet/realtek/r8169.c | 4 +-
drivers/net/ethernet/renesas/sh_eth.c | 2 +-
drivers/net/ethernet/ti/cpsw.c | 16 ++++
drivers/net/hamradio/hdlcdrv.c | 2 +
drivers/net/phy/phy.c | 6 ++
drivers/net/ppp/pptp.c | 1 -
drivers/net/virtio_net.c | 16 +++-
drivers/net/vmxnet3/vmxnet3_drv.c | 5 ++
drivers/net/vxlan.c | 2 +-
drivers/net/wireless/ath/ath5k/debug.c | 5 +-
drivers/net/wireless/ray_cs.c | 7 +-
drivers/net/wireless/ti/wl1251/main.c | 3 +-
drivers/powercap/powercap_sys.c | 1 +
drivers/rtc/interface.c | 9 +-
drivers/scsi/bnx2fc/bnx2fc.h | 1 +
drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 10 ++-
drivers/scsi/libiscsi.c | 24 +++++-
drivers/scsi/libsas/sas_expander.c | 4 +-
drivers/staging/wlan-ng/prism2mgmt.c | 2 +-
drivers/tty/n_gsm.c | 17 +++-
drivers/tty/serial/sccnxp.c | 15 ++--
drivers/usb/chipidea/core.c | 29 +++++--
drivers/usb/dwc3/dwc3-keystone.c | 4 +
drivers/usb/storage/ene_ub6250.c | 11 ++-
drivers/vhost/vhost.c | 3 +-
drivers/video/fbdev/vfb.c | 17 ++++
fs/btrfs/extent_io.c | 2 +-
fs/cifs/file.c | 2 +-
fs/cifs/smb2pdu.c | 14 ++--
fs/ext4/file.c | 2 +-
fs/lockd/svc.c | 6 +-
fs/nfs/nfs4proc.c | 7 +-
fs/nfs/nfs4state.c | 10 ++-
fs/overlayfs/inode.c | 12 ++-
include/linux/mlx4/qp.h | 1 +
include/linux/skbuff.h | 8 +-
include/net/x25.h | 4 +-
kernel/events/core.c | 15 ++--
kernel/futex.c | 98 ++++++++++++++++++++--
kernel/pid.c | 4 +-
net/bluetooth/hci_core.c | 17 +++-
net/ceph/osdmap.c | 1 +
net/core/dev.c | 4 +-
net/core/neighbour.c | 14 +++-
net/core/net_namespace.c | 19 +++++
net/core/skbuff.c | 65 +++++++++-----
net/core/sysctl_net_core.c | 2 -
net/ipv4/ah4.c | 8 +-
net/ipv4/esp4.c | 12 ++-
net/ipv4/ip_tunnel.c | 11 +--
net/ipv6/addrconf.c | 5 +-
net/ipv6/ah6.c | 8 +-
net/ipv6/esp6.c | 12 ++-
net/ipv6/ip6_gre.c | 8 +-
net/ipv6/ip6_output.c | 13 ++-
net/ipv6/ip6_tunnel.c | 7 +-
net/ipv6/ip6_vti.c | 7 +-
net/ipv6/sit.c | 8 +-
net/key/af_key.c | 2 +-
net/l2tp/l2tp_netlink.c | 2 +
net/llc/af_llc.c | 3 +
net/mac80211/mlme.c | 4 +
net/netfilter/nf_conntrack_netlink.c | 7 +-
net/netlink/af_netlink.c | 3 +
net/rxrpc/rxkad.c | 21 +++--
net/sched/act_api.c | 4 +-
net/sctp/ipv6.c | 4 +-
net/sctp/socket.c | 17 ++--
net/x25/af_x25.c | 24 ++++--
net/x25/sysctl_net_x25.c | 5 +-
net/xfrm/xfrm_state.c | 2 +
scripts/tags.sh | 1 +
tools/perf/builtin-trace.c | 4 +
tools/perf/tests/code-reading.c | 20 ++++-
tools/perf/util/unwind-libdw.c | 8 ++
.../testing/selftests/powerpc/tm/tm-resched-dscr.c | 2 +-
121 files changed, 925 insertions(+), 314 deletions(-)
Hi,
[This is an automated email]
This commit has been processed because it contains a "Fixes:" tag,
fixing commit: c71bf099abdd Btrfs: Avoid orphan inodes cleanup while replaying log.
The bot has also determined it's probably a bug fixing patch. (score: 6.2138)
The bot has tested the following trees: v4.16.1, v4.15.16, v4.14.33, v4.9.93, v4.4.127.
v4.16.1: Build OK!
v4.15.16: Build OK!
v4.14.33: Build OK!
v4.9.93: Build failed! Errors:
tree-log.c:2367:24: error: ‘struct btrfs_fs_info’ has no member named ‘sectorsize’
tree-log.c:2367:24: error: ‘struct btrfs_fs_info’ has no member named ‘sectorsize’
tree-log.c:4224:13: error: ‘struct inode’ has no member named ‘flags’; did you mean ‘i_flags’?
tree-log.c:4229:38: error: ‘struct inode’ has no member named ‘vfs_inode’
tree-log.c:4239:4: error: implicit declaration of function ‘refcount_inc’; did you mean ‘i_readcount_inc’? [-Werror=implicit-function-declaration]
v4.4.127: Failed to apply! Possible dependencies:
0132761017e0 ("btrfs: fix string and comment grammatical issues and typos")
--
Thanks,
Sasha
The patch
ASoC: fsl_esai: Fix divisor calculation failure at lower ratio
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.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 c656941df9bc80f7ec65b92ca73c42f8b0b62628 Mon Sep 17 00:00:00 2001
From: Nicolin Chen <nicoleotsuka(a)gmail.com>
Date: Sun, 8 Apr 2018 16:57:35 -0700
Subject: [PATCH] ASoC: fsl_esai: Fix divisor calculation failure at lower
ratio
When the desired ratio is less than 256, the savesub (tolerance)
in the calculation would become 0. This will then fail the loop-
search immediately without reporting any errors.
But if the ratio is smaller enough, there is no need to calculate
the tolerance because PM divisor alone is enough to get the ratio.
So a simple fix could be just to set PM directly instead of going
into the loop-search.
Reported-by: Marek Vasut <marex(a)denx.de>
Signed-off-by: Nicolin Chen <nicoleotsuka(a)gmail.com>
Tested-by: Marek Vasut <marex(a)denx.de>
Reviewed-by: Fabio Estevam <fabio.estevam(a)nxp.com>
Signed-off-by: Mark Brown <broonie(a)kernel.org>
Cc: stable(a)vger.kernel.org
---
sound/soc/fsl/fsl_esai.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c
index 40a700493f4c..da8fd98c7f51 100644
--- a/sound/soc/fsl/fsl_esai.c
+++ b/sound/soc/fsl/fsl_esai.c
@@ -144,6 +144,13 @@ static int fsl_esai_divisor_cal(struct snd_soc_dai *dai, bool tx, u32 ratio,
psr = ratio <= 256 * maxfp ? ESAI_xCCR_xPSR_BYPASS : ESAI_xCCR_xPSR_DIV8;
+ /* Do not loop-search if PM (1 ~ 256) alone can serve the ratio */
+ if (ratio <= 256) {
+ pm = ratio;
+ fp = 1;
+ goto out;
+ }
+
/* Set the max fluctuation -- 0.1% of the max devisor */
savesub = (psr ? 1 : 8) * 256 * maxfp / 1000;
--
2.17.0
Hi,
Did you get a chance to review my below email? Kindly let me know your
requirements and I will get back with detailed information on the same.
Warm Regards,
Annette Ryan
I'm announcing the release of the 4.16.2 kernel.
All users of the 4.16 kernel series must upgrade.
The updated 4.16.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.16.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 +-
drivers/net/ethernet/marvell/sky2.c | 2 +-
drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 9 +++++----
drivers/net/ppp/pptp.c | 1 -
drivers/sbus/char/Kconfig | 3 ++-
net/8021q/vlan_dev.c | 6 +++++-
net/core/dev.c | 2 +-
net/dsa/dsa_priv.h | 8 +++++++-
net/ipv4/arp.c | 2 +-
net/ipv4/ip_tunnel.c | 11 ++++++-----
net/ipv6/ip6_gre.c | 8 +++++---
net/ipv6/ip6_output.c | 7 +++++--
net/ipv6/ip6_tunnel.c | 11 +++++++----
net/ipv6/ip6_vti.c | 7 +++++--
net/ipv6/sit.c | 8 +++++---
net/sched/act_bpf.c | 12 ++++++++----
net/sched/cls_u32.c | 1 +
net/sctp/ipv6.c | 4 +++-
net/sctp/socket.c | 13 ++++++++-----
19 files changed, 76 insertions(+), 41 deletions(-)
Andrew Lunn (1):
net: dsa: Discard frames from unused ports
Cong Wang (1):
net_sched: fix a missing idr_remove() in u32_delete_key()
Davide Caratti (1):
net/sched: fix NULL dereference in the error path of tcf_bpf_init()
Dirk van der Merwe (1):
nfp: use full 40 bits of the NSP buffer address
Eric Dumazet (9):
pptp: remove a buggy dst release in pptp_connect()
sctp: do not leak kernel memory to user space
sctp: sctp_sockaddr_af must check minimal addr length for AF_INET6
net: fool proof dev_valid_name()
ip_tunnel: better validate user provided tunnel names
ipv6: sit: better validate user provided tunnel names
ip6_gre: better validate user provided tunnel names
ip6_tunnel: better validate user provided tunnel names
vti6: better validate user provided tunnel names
Greg Kroah-Hartman (1):
Linux 4.16.2
Guenter Roeck (1):
sparc64: Oracle DAX driver depends on SPARC64
Hangbin Liu (1):
vlan: also check phy_driver ts_info for vlan's real device
Jeff Barnhill (1):
net/ipv6: Increment OUTxxx counters after netfilter hook
Kai-Heng Feng (1):
sky2: Increase D3 delay to sky2 stops working after suspend
Miguel Fadon Perlines (1):
arp: fix arp_filter on l3slave devices
This is the start of the stable review cycle for the 4.16.2 release.
There are 18 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 Apr 12 21:27:41 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/v4.x/stable-review/patch-4.16.2-rc1…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.16.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.16.2-rc1
Dirk van der Merwe <dirk.vandermerwe(a)netronome.com>
nfp: use full 40 bits of the NSP buffer address
Cong Wang <xiyou.wangcong(a)gmail.com>
net_sched: fix a missing idr_remove() in u32_delete_key()
Eric Dumazet <edumazet(a)google.com>
vti6: better validate user provided tunnel names
Eric Dumazet <edumazet(a)google.com>
ip6_tunnel: better validate user provided tunnel names
Eric Dumazet <edumazet(a)google.com>
ip6_gre: better validate user provided tunnel names
Eric Dumazet <edumazet(a)google.com>
ipv6: sit: better validate user provided tunnel names
Eric Dumazet <edumazet(a)google.com>
ip_tunnel: better validate user provided tunnel names
Eric Dumazet <edumazet(a)google.com>
net: fool proof dev_valid_name()
Hangbin Liu <liuhangbin(a)gmail.com>
vlan: also check phy_driver ts_info for vlan's real device
Kai-Heng Feng <kai.heng.feng(a)canonical.com>
sky2: Increase D3 delay to sky2 stops working after suspend
Eric Dumazet <edumazet(a)google.com>
sctp: sctp_sockaddr_af must check minimal addr length for AF_INET6
Eric Dumazet <edumazet(a)google.com>
sctp: do not leak kernel memory to user space
Eric Dumazet <edumazet(a)google.com>
pptp: remove a buggy dst release in pptp_connect()
Davide Caratti <dcaratti(a)redhat.com>
net/sched: fix NULL dereference in the error path of tcf_bpf_init()
Jeff Barnhill <0xeffeff(a)gmail.com>
net/ipv6: Increment OUTxxx counters after netfilter hook
Andrew Lunn <andrew(a)lunn.ch>
net: dsa: Discard frames from unused ports
Miguel Fadon Perlines <mfadon(a)teldat.com>
arp: fix arp_filter on l3slave devices
Guenter Roeck <linux(a)roeck-us.net>
sparc64: Oracle DAX driver depends on SPARC64
-------------
Diffstat:
Makefile | 4 ++--
drivers/net/ethernet/marvell/sky2.c | 2 +-
drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 9 +++++----
drivers/net/ppp/pptp.c | 1 -
drivers/sbus/char/Kconfig | 3 ++-
net/8021q/vlan_dev.c | 6 +++++-
net/core/dev.c | 2 +-
net/dsa/dsa_priv.h | 8 +++++++-
net/ipv4/arp.c | 2 +-
net/ipv4/ip_tunnel.c | 11 ++++++-----
net/ipv6/ip6_gre.c | 8 +++++---
net/ipv6/ip6_output.c | 7 +++++--
net/ipv6/ip6_tunnel.c | 11 +++++++----
net/ipv6/ip6_vti.c | 7 +++++--
net/ipv6/sit.c | 8 +++++---
net/sched/act_bpf.c | 12 ++++++++----
net/sched/cls_u32.c | 1 +
net/sctp/ipv6.c | 4 +++-
net/sctp/socket.c | 13 ++++++++-----
19 files changed, 77 insertions(+), 42 deletions(-)
From: Andy Lutomirski <luto(a)kernel.org>
commit: 9d05041679904b12c12421cbcf9cb5f4860a8d7b upstream
32-bit kernels handle nested NMIs in C. Enable the exact same
handling on 64-bit kernels as well. This isn't currently
necessary, but it will become necessary once the asm code starts
allowing limited nesting.
Signed-off-by: Andy Lutomirski <luto(a)kernel.org>
Reviewed-by: Steven Rostedt <rostedt(a)goodmis.org>
Cc: Borislav Petkov <bp(a)suse.de>
Cc: Linus Torvalds <torvalds(a)linux-foundation.org>
Cc: Peter Zijlstra <peterz(a)infradead.org>
Cc: Thomas Gleixner <tglx(a)linutronix.de>
Cc: stable(a)vger.kernel.org
Signed-off-by: Ingo Molnar <mingo(a)kernel.org>
Backported-by: Chenggang <chenggang.qin(a)linux.alibaba.com>
---
7u/arch/x86/kernel/nmi.c | 122 ++++++++++++++++++++---------------------------
1 file changed, 51 insertions(+), 71 deletions(-)
diff --git a/7u/arch/x86/kernel/nmi.c b/7u/arch/x86/kernel/nmi.c
index 6030805..a735412 100644
--- a/7u/arch/x86/kernel/nmi.c
+++ b/7u/arch/x86/kernel/nmi.c
@@ -359,15 +359,15 @@ static __kprobes void default_do_nmi(struct pt_regs *regs)
}
/*
- * NMIs can hit breakpoints which will cause it to lose its
- * NMI context with the CPU when the breakpoint does an iret.
- */
-#ifdef CONFIG_X86_32
-/*
- * For i386, NMIs use the same stack as the kernel, and we can
- * add a workaround to the iret problem in C (preventing nested
- * NMIs if an NMI takes a trap). Simply have 3 states the NMI
- * can be in:
+ * NMIs can hit breakpoints which will cause it to lose its NMI context
+ * with the CPU when the breakpoint or page fault does an IRET.
+ *
+ * As a result, NMIs can nest if NMIs get unmasked due an IRET during
+ * NMI processing. On x86_64, the asm glue protects us from nested NMIs
+ * if the outer NMI came from kernel mode, but we can still nest if the
+ * outer NMI came from user mode.
+ *
+ * To handle these nested NMIs, we have three states:
*
* 1) not running
* 2) executing
@@ -381,15 +381,14 @@ static __kprobes void default_do_nmi(struct pt_regs *regs)
* (Note, the latch is binary, thus multiple NMIs triggering,
* when one is running, are ignored. Only one NMI is restarted.)
*
- * If an NMI hits a breakpoint that executes an iret, another
- * NMI can preempt it. We do not want to allow this new NMI
- * to run, but we want to execute it when the first one finishes.
- * We set the state to "latched", and the exit of the first NMI will
- * perform a dec_return, if the result is zero (NOT_RUNNING), then
- * it will simply exit the NMI handler. If not, the dec_return
- * would have set the state to NMI_EXECUTING (what we want it to
- * be when we are running). In this case, we simply jump back
- * to rerun the NMI handler again, and restart the 'latched' NMI.
+ * If an NMI executes an iret, another NMI can preempt it. We do not
+ * want to allow this new NMI to run, but we want to execute it when the
+ * first one finishes. We set the state to "latched", and the exit of
+ * the first NMI will perform a dec_return, if the result is zero
+ * (NOT_RUNNING), then it will simply exit the NMI handler. If not, the
+ * dec_return would have set the state to NMI_EXECUTING (what we want it
+ * to be when we are running). In this case, we simply jump back to
+ * rerun the NMI handler again, and restart the 'latched' NMI.
*
* No trap (breakpoint or page fault) should be hit before nmi_restart,
* thus there is no race between the first check of state for NOT_RUNNING
@@ -412,49 +411,36 @@ enum nmi_states {
static DEFINE_PER_CPU(enum nmi_states, nmi_state);
static DEFINE_PER_CPU(unsigned long, nmi_cr2);
-#define nmi_nesting_preprocess(regs) \
- do { \
- if (this_cpu_read(nmi_state) != NMI_NOT_RUNNING) { \
- this_cpu_write(nmi_state, NMI_LATCHED); \
- return; \
- } \
- this_cpu_write(nmi_state, NMI_EXECUTING); \
- this_cpu_write(nmi_cr2, read_cr2()); \
- } while (0); \
- nmi_restart:
-
-#define nmi_nesting_postprocess() \
- do { \
- if (unlikely(this_cpu_read(nmi_cr2) != read_cr2())) \
- write_cr2(this_cpu_read(nmi_cr2)); \
- if (this_cpu_dec_return(nmi_state)) \
- goto nmi_restart; \
- } while (0)
-#else /* x86_64 */
+#ifdef CONFIG_X86_64
/*
- * In x86_64 things are a bit more difficult. This has the same problem
- * where an NMI hitting a breakpoint that calls iret will remove the
- * NMI context, allowing a nested NMI to enter. What makes this more
- * difficult is that both NMIs and breakpoints have their own stack.
- * When a new NMI or breakpoint is executed, the stack is set to a fixed
- * point. If an NMI is nested, it will have its stack set at that same
- * fixed address that the first NMI had, and will start corrupting the
- * stack. This is handled in entry_64.S, but the same problem exists with
- * the breakpoint stack.
+ * In x86_64, we need to handle breakpoint -> NMI -> breakpoint. Without
+ * some care, the inner breakpoint will clobber the outer breakpoint's
+ * stack.
*
- * If a breakpoint is being processed, and the debug stack is being used,
- * if an NMI comes in and also hits a breakpoint, the stack pointer
- * will be set to the same fixed address as the breakpoint that was
- * interrupted, causing that stack to be corrupted. To handle this case,
- * check if the stack that was interrupted is the debug stack, and if
- * so, change the IDT so that new breakpoints will use the current stack
- * and not switch to the fixed address. On return of the NMI, switch back
- * to the original IDT.
+ * If a breakpoint is being processed, and the debug stack is being
+ * used, if an NMI comes in and also hits a breakpoint, the stack
+ * pointer will be set to the same fixed address as the breakpoint that
+ * was interrupted, causing that stack to be corrupted. To handle this
+ * case, check if the stack that was interrupted is the debug stack, and
+ * if so, change the IDT so that new breakpoints will use the current
+ * stack and not switch to the fixed address. On return of the NMI,
+ * switch back to the original IDT.
*/
static DEFINE_PER_CPU(int, update_debug_stack);
+#endif
-static inline void nmi_nesting_preprocess(struct pt_regs *regs)
+dotraplinkage notrace void
+do_nmi(struct pt_regs *regs, long error_code)
{
+ if (this_cpu_read(nmi_state) != NMI_NOT_RUNNING) {
+ this_cpu_write(nmi_state, NMI_LATCHED);
+ return;
+ }
+ this_cpu_write(nmi_state, NMI_EXECUTING);
+ this_cpu_write(nmi_cr2, read_cr2());
+nmi_restart:
+
+#ifdef CONFIG_X86_64
/*
* If we interrupted a breakpoint, it is possible that
* the nmi handler will have breakpoints too. We need to
@@ -465,22 +451,8 @@ static inline void nmi_nesting_preprocess(struct pt_regs *regs)
debug_stack_set_zero();
this_cpu_write(update_debug_stack, 1);
}
-}
-
-static inline void nmi_nesting_postprocess(void)
-{
- if (unlikely(this_cpu_read(update_debug_stack))) {
- debug_stack_reset();
- this_cpu_write(update_debug_stack, 0);
- }
-}
#endif
-dotraplinkage notrace __kprobes void
-do_nmi(struct pt_regs *regs, long error_code)
-{
- nmi_nesting_preprocess(regs);
-
nmi_enter();
inc_irq_stat(__nmi_count);
@@ -489,9 +461,17 @@ do_nmi(struct pt_regs *regs, long error_code)
default_do_nmi(regs);
nmi_exit();
+#ifdef CONFIG_X86_64
+ if (unlikely(this_cpu_read(update_debug_stack))) {
+ debug_stack_reset();
+ this_cpu_write(update_debug_stack, 0);
+ }
+#endif
- /* On i386, may loop back to preprocess */
- nmi_nesting_postprocess();
+ if (unlikely(this_cpu_read(nmi_cr2) != read_cr2()))
+ write_cr2(this_cpu_read(nmi_cr2));
+ if (this_cpu_dec_return(nmi_state))
+ goto nmi_restart;
}
void stop_nmi(void)
--
1.8.3.1
Tree/Branch: v4.15.17
Git describe: v4.15.17
Commit: b22a1fa1b3 Linux 4.15.17
Build Time: 0 min 27 sec
Passed: 0 / 11 ( 0.00 %)
Failed: 11 / 11 (100.00 %)
Errors: 8
Warnings: 0
Section Mismatches: 0
Failed defconfigs:
arm64-allnoconfig
arm64-allmodconfig
arm-multi_v5_defconfig
arm-multi_v7_defconfig
x86_64-defconfig
arm-allmodconfig
arm-allnoconfig
arm-multi_v4t_defconfig
x86_64-allmodconfig
arm64-defconfig
Errors:
arm64-allnoconfig
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_match_flags' undeclared (first use in this function)
../scripts/mod/file2alias.c:103:45: error: 'OFF_tb_service_id_protocol_key' undeclared (first use in this function)
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_protocol_id' undeclared (first use in this function)
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_protocol_version' undeclared (first use in this function)
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_protocol_revision' undeclared (first use in this function)
../scripts/mod/file2alias.c:111:3: error: 'SIZE_tb_service_id' undeclared here (not in a function)
arm64-allmodconfig
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_match_flags' undeclared (first use in this function)
../scripts/mod/file2alias.c:103:45: error: 'OFF_tb_service_id_protocol_key' undeclared (first use in this function)
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_protocol_id' undeclared (first use in this function)
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_protocol_version' undeclared (first use in this function)
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_protocol_revision' undeclared (first use in this function)
../scripts/mod/file2alias.c:111:3: error: 'SIZE_tb_service_id' undeclared here (not in a function)
arm-multi_v5_defconfig
../arch/arm/include/asm/string.h:45:3: error: expected identifier or '(' before '{' token
arm-multi_v7_defconfig
../arch/arm/include/asm/string.h:45:3: error: expected identifier or '(' before '{' token
x86_64-defconfig
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_match_flags' undeclared (first use in this function)
../scripts/mod/file2alias.c:103:45: error: 'OFF_tb_service_id_protocol_key' undeclared (first use in this function)
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_protocol_id' undeclared (first use in this function)
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_protocol_version' undeclared (first use in this function)
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_protocol_revision' undeclared (first use in this function)
../scripts/mod/file2alias.c:111:3: error: 'SIZE_tb_service_id' undeclared here (not in a function)
arm-allmodconfig
../arch/arm/include/asm/string.h:45:3: error: expected identifier or '(' before '{' token
arm-allnoconfig
orc.h:21:27: fatal error: asm/orc_types.h: No such file or directory
orc.h:21:27: fatal error: asm/orc_types.h: No such file or directory
arm-multi_v4t_defconfig
../arch/arm/include/asm/string.h:45:3: error: expected identifier or '(' before '{' token
x86_64-allmodconfig
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_match_flags' undeclared (first use in this function)
../scripts/mod/file2alias.c:103:45: error: 'OFF_tb_service_id_protocol_key' undeclared (first use in this function)
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_protocol_id' undeclared (first use in this function)
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_protocol_version' undeclared (first use in this function)
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_protocol_revision' undeclared (first use in this function)
../scripts/mod/file2alias.c:111:3: error: 'SIZE_tb_service_id' undeclared here (not in a function)
arm64-defconfig
orc.h:21:27: fatal error: asm/orc_types.h: No such file or directory
orc.h:21:27: fatal error: asm/orc_types.h: No such file or directory
orc.h:21:27: fatal error: asm/orc_types.h: No such file or directory
-------------------------------------------------------------------------------
defconfigs with issues (other than build errors):
-------------------------------------------------------------------------------
Errors summary: 8
5 orc.h:21:27: fatal error: asm/orc_types.h: No such file or directory
4 ../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_protocol_version' undeclared (first use in this function)
4 ../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_protocol_revision' undeclared (first use in this function)
4 ../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_protocol_id' undeclared (first use in this function)
4 ../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_match_flags' undeclared (first use in this function)
4 ../scripts/mod/file2alias.c:111:3: error: 'SIZE_tb_service_id' undeclared here (not in a function)
4 ../scripts/mod/file2alias.c:103:45: error: 'OFF_tb_service_id_protocol_key' undeclared (first use in this function)
4 ../arch/arm/include/asm/string.h:45:3: error: expected identifier or '(' before '{' token
===============================================================================
Detailed per-defconfig build reports below:
-------------------------------------------------------------------------------
arm64-allnoconfig : FAIL, 6 errors, 0 warnings, 0 section mismatches
Errors:
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_match_flags' undeclared (first use in this function)
../scripts/mod/file2alias.c:103:45: error: 'OFF_tb_service_id_protocol_key' undeclared (first use in this function)
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_protocol_id' undeclared (first use in this function)
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_protocol_version' undeclared (first use in this function)
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_protocol_revision' undeclared (first use in this function)
../scripts/mod/file2alias.c:111:3: error: 'SIZE_tb_service_id' undeclared here (not in a function)
-------------------------------------------------------------------------------
arm64-allmodconfig : FAIL, 6 errors, 0 warnings, 0 section mismatches
Errors:
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_match_flags' undeclared (first use in this function)
../scripts/mod/file2alias.c:103:45: error: 'OFF_tb_service_id_protocol_key' undeclared (first use in this function)
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_protocol_id' undeclared (first use in this function)
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_protocol_version' undeclared (first use in this function)
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_protocol_revision' undeclared (first use in this function)
../scripts/mod/file2alias.c:111:3: error: 'SIZE_tb_service_id' undeclared here (not in a function)
-------------------------------------------------------------------------------
arm-multi_v5_defconfig : FAIL, 1 errors, 0 warnings, 0 section mismatches
Errors:
../arch/arm/include/asm/string.h:45:3: error: expected identifier or '(' before '{' token
-------------------------------------------------------------------------------
arm-multi_v7_defconfig : FAIL, 1 errors, 0 warnings, 0 section mismatches
Errors:
../arch/arm/include/asm/string.h:45:3: error: expected identifier or '(' before '{' token
-------------------------------------------------------------------------------
x86_64-defconfig : FAIL, 6 errors, 0 warnings, 0 section mismatches
Errors:
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_match_flags' undeclared (first use in this function)
../scripts/mod/file2alias.c:103:45: error: 'OFF_tb_service_id_protocol_key' undeclared (first use in this function)
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_protocol_id' undeclared (first use in this function)
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_protocol_version' undeclared (first use in this function)
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_protocol_revision' undeclared (first use in this function)
../scripts/mod/file2alias.c:111:3: error: 'SIZE_tb_service_id' undeclared here (not in a function)
-------------------------------------------------------------------------------
arm-allmodconfig : FAIL, 1 errors, 0 warnings, 0 section mismatches
Errors:
../arch/arm/include/asm/string.h:45:3: error: expected identifier or '(' before '{' token
-------------------------------------------------------------------------------
arm-allnoconfig : FAIL, 2 errors, 0 warnings, 0 section mismatches
Errors:
orc.h:21:27: fatal error: asm/orc_types.h: No such file or directory
orc.h:21:27: fatal error: asm/orc_types.h: No such file or directory
-------------------------------------------------------------------------------
arm-multi_v4t_defconfig : FAIL, 1 errors, 0 warnings, 0 section mismatches
Errors:
../arch/arm/include/asm/string.h:45:3: error: expected identifier or '(' before '{' token
-------------------------------------------------------------------------------
x86_64-allmodconfig : FAIL, 6 errors, 0 warnings, 0 section mismatches
Errors:
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_match_flags' undeclared (first use in this function)
../scripts/mod/file2alias.c:103:45: error: 'OFF_tb_service_id_protocol_key' undeclared (first use in this function)
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_protocol_id' undeclared (first use in this function)
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_protocol_version' undeclared (first use in this function)
../scripts/mod/file2alias.c:97:68: error: 'OFF_tb_service_id_protocol_revision' undeclared (first use in this function)
../scripts/mod/file2alias.c:111:3: error: 'SIZE_tb_service_id' undeclared here (not in a function)
-------------------------------------------------------------------------------
arm64-defconfig : FAIL, 3 errors, 0 warnings, 0 section mismatches
Errors:
orc.h:21:27: fatal error: asm/orc_types.h: No such file or directory
orc.h:21:27: fatal error: asm/orc_types.h: No such file or directory
orc.h:21:27: fatal error: asm/orc_types.h: No such file or directory
-------------------------------------------------------------------------------
Passed with no errors, warnings or mismatches:
x86_64-allnoconfig
Tree/Branch: v4.14.34
Git describe: v4.14.34
Commit: ffebeb0d7c Linux 4.14.34
Build Time: 0 min 29 sec
Passed: 0 / 11 ( 0.00 %)
Failed: 11 / 11 (100.00 %)
Errors: 2
Warnings: 4
Section Mismatches: 0
Failed defconfigs:
arm-multi_v5_defconfig
arm-multi_v7_defconfig
arm-allmodconfig
arm-multi_v4t_defconfig
arm-allnoconfig
arm64-defconfig
Errors:
arm-multi_v5_defconfig
../arch/arm/include/asm/string.h:45:3: error: expected identifier or '(' before '{' token
arm-multi_v7_defconfig
../arch/arm/include/asm/string.h:45:3: error: expected identifier or '(' before '{' token
arm-allmodconfig
../arch/arm/include/asm/string.h:45:3: error: expected identifier or '(' before '{' token
arm-multi_v4t_defconfig
../arch/arm/include/asm/string.h:45:3: error: expected identifier or '(' before '{' token
arm-allnoconfig
orc.h:21:27: fatal error: asm/orc_types.h: No such file or directory
orc.h:21:27: fatal error: asm/orc_types.h: No such file or directory
orc.h:21:27: fatal error: asm/orc_types.h: No such file or directory
../arch/arm/include/asm/string.h:45:3: error: expected identifier or '(' before '{' token
arm64-defconfig
orc.h:21:27: fatal error: asm/orc_types.h: No such file or directory
orc.h:21:27: fatal error: asm/orc_types.h: No such file or directory
orc.h:21:27: fatal error: asm/orc_types.h: No such file or directory
-------------------------------------------------------------------------------
defconfigs with issues (other than build errors):
4 warnings 0 mismatches : arm-allnoconfig
-------------------------------------------------------------------------------
Errors summary: 2
6 orc.h:21:27: fatal error: asm/orc_types.h: No such file or directory
5 ../arch/arm/include/asm/string.h:45:3: error: expected identifier or '(' before '{' token
Warnings Summary: 4
1 ../arch/arm/include/asm/barrier.h:9:5: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
1 ../arch/arm/include/asm/barrier.h:20:35: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
1 ../arch/arm/include/asm/barrier.h:16:5: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
1 ../arch/arm/include/asm/barrier.h:10:3: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
===============================================================================
Detailed per-defconfig build reports below:
-------------------------------------------------------------------------------
arm-multi_v5_defconfig : FAIL, 1 errors, 0 warnings, 0 section mismatches
Errors:
../arch/arm/include/asm/string.h:45:3: error: expected identifier or '(' before '{' token
-------------------------------------------------------------------------------
arm-multi_v7_defconfig : FAIL, 1 errors, 0 warnings, 0 section mismatches
Errors:
../arch/arm/include/asm/string.h:45:3: error: expected identifier or '(' before '{' token
-------------------------------------------------------------------------------
arm-allmodconfig : FAIL, 1 errors, 0 warnings, 0 section mismatches
Errors:
../arch/arm/include/asm/string.h:45:3: error: expected identifier or '(' before '{' token
-------------------------------------------------------------------------------
arm-multi_v4t_defconfig : FAIL, 1 errors, 0 warnings, 0 section mismatches
Errors:
../arch/arm/include/asm/string.h:45:3: error: expected identifier or '(' before '{' token
-------------------------------------------------------------------------------
arm-allnoconfig : FAIL, 4 errors, 4 warnings, 0 section mismatches
Errors:
orc.h:21:27: fatal error: asm/orc_types.h: No such file or directory
orc.h:21:27: fatal error: asm/orc_types.h: No such file or directory
orc.h:21:27: fatal error: asm/orc_types.h: No such file or directory
../arch/arm/include/asm/string.h:45:3: error: expected identifier or '(' before '{' token
Warnings:
../arch/arm/include/asm/barrier.h:9:5: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
../arch/arm/include/asm/barrier.h:10:3: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
../arch/arm/include/asm/barrier.h:16:5: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
../arch/arm/include/asm/barrier.h:20:35: warning: "__LINUX_ARM_ARCH__" is not defined [-Wundef]
-------------------------------------------------------------------------------
arm64-defconfig : FAIL, 3 errors, 0 warnings, 0 section mismatches
Errors:
orc.h:21:27: fatal error: asm/orc_types.h: No such file or directory
orc.h:21:27: fatal error: asm/orc_types.h: No such file or directory
orc.h:21:27: fatal error: asm/orc_types.h: No such file or directory
-------------------------------------------------------------------------------
Passed with no errors, warnings or mismatches:
x86_64-allnoconfig
arm64-allnoconfig
arm64-allmodconfig
x86_64-allmodconfig
x86_64-defconfig
The normal request completion can be done before or during handling
BLK_EH_RESET_TIMER, and this race may cause the request to never
be completed since driver's .timeout() may always return
BLK_EH_RESET_TIMER.
This issue can't be fixed completely by driver, since the normal
completion can be done between returning .timeout() and handing
BLK_EH_RESET_TIMER.
This patch fixes this race by introducing rq state of MQ_RQ_COMPLETE_IN_RESET,
and reading/writing rq's state by holding queue lock, which can be
per-request actually, but just not necessary to introduce one lock for
so unusual event.
Cc: Bart Van Assche <bart.vanassche(a)wdc.com>
Cc: Tejun Heo <tj(a)kernel.org>
Cc: Christoph Hellwig <hch(a)lst.de>
Cc: Ming Lei <ming.lei(a)redhat.com>
Cc: Sagi Grimberg <sagi(a)grimberg.me>
Cc: Israel Rukshin <israelr(a)mellanox.com>,
Cc: Max Gurtovoy <maxg(a)mellanox.com>
Cc: stable(a)vger.kernel.org
Signed-off-by: Ming Lei <ming.lei(a)redhat.com>
---
V2:
- rename the new flag as MQ_RQ_COMPLETE_IN_TIMEOUT
- fix lock uses in blk_mq_rq_timed_out
- document re-order between blk_add_timer() and
blk_mq_rq_update_aborted_gstate(req, 0)
block/blk-mq.c | 49 ++++++++++++++++++++++++++++++++++++++++++++-----
block/blk-mq.h | 1 +
2 files changed, 45 insertions(+), 5 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 0dc9e341c2a7..db1c84b2bb5e 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -630,10 +630,27 @@ void blk_mq_complete_request(struct request *rq)
* However, that would complicate paths which want to synchronize
* against us. Let stay in sync with the issue path so that
* hctx_lock() covers both issue and completion paths.
+ *
+ * Cover complete vs BLK_EH_RESET_TIMER race in slow path with
+ * helding queue lock.
*/
hctx_lock(hctx, &srcu_idx);
if (blk_mq_rq_aborted_gstate(rq) != rq->gstate)
__blk_mq_complete_request(rq);
+ else {
+ unsigned long flags;
+ bool need_complete = false;
+
+ spin_lock_irqsave(q->queue_lock, flags);
+ if (!blk_mq_rq_aborted_gstate(rq))
+ need_complete = true;
+ else
+ blk_mq_rq_update_state(rq, MQ_RQ_COMPLETE_IN_TIMEOUT);
+ spin_unlock_irqrestore(q->queue_lock, flags);
+
+ if (need_complete)
+ __blk_mq_complete_request(rq);
+ }
hctx_unlock(hctx, srcu_idx);
}
EXPORT_SYMBOL(blk_mq_complete_request);
@@ -814,6 +831,7 @@ static void blk_mq_rq_timed_out(struct request *req, bool reserved)
{
const struct blk_mq_ops *ops = req->q->mq_ops;
enum blk_eh_timer_return ret = BLK_EH_RESET_TIMER;
+ unsigned long flags;
req->rq_flags |= RQF_MQ_TIMEOUT_EXPIRED;
@@ -826,12 +844,33 @@ static void blk_mq_rq_timed_out(struct request *req, bool reserved)
break;
case BLK_EH_RESET_TIMER:
/*
- * As nothing prevents from completion happening while
- * ->aborted_gstate is set, this may lead to ignored
- * completions and further spurious timeouts.
+ * The normal completion may happen during handling the
+ * timeout, or even after returning from .timeout(), so
+ * once the request has been completed, we can't reset
+ * timer any more since this request may be handled as
+ * BLK_EH_RESET_TIMER in next timeout handling too, and
+ * it has to be completed in this situation.
+ *
+ * Holding the queue lock to cover read/write rq's
+ * aborted_gstate and normal state, so the race can be
+ * avoided completely.
+ *
+ * blk_add_timer() may be re-ordered with resetting
+ * aborted_gstate, and the only side-effec is that if this
+ * request is recycled after aborted_gstate is cleared, it
+ * may be timed out a bit late, that is what we can survive
+ * given timeout event is so unusual.
*/
- blk_mq_rq_update_aborted_gstate(req, 0);
- blk_add_timer(req);
+ spin_lock_irqsave(req->q->queue_lock, flags);
+ if (blk_mq_rq_state(req) != MQ_RQ_COMPLETE_IN_TIMEOUT) {
+ blk_add_timer(req);
+ blk_mq_rq_update_aborted_gstate(req, 0);
+ spin_unlock_irqrestore(req->q->queue_lock, flags);
+ } else {
+ blk_mq_rq_update_state(req, MQ_RQ_IN_FLIGHT);
+ spin_unlock_irqrestore(req->q->queue_lock, flags);
+ __blk_mq_complete_request(req);
+ }
break;
case BLK_EH_NOT_HANDLED:
break;
diff --git a/block/blk-mq.h b/block/blk-mq.h
index 88c558f71819..0426d048743d 100644
--- a/block/blk-mq.h
+++ b/block/blk-mq.h
@@ -35,6 +35,7 @@ enum mq_rq_state {
MQ_RQ_IDLE = 0,
MQ_RQ_IN_FLIGHT = 1,
MQ_RQ_COMPLETE = 2,
+ MQ_RQ_COMPLETE_IN_TIMEOUT = 3,
MQ_RQ_STATE_BITS = 2,
MQ_RQ_STATE_MASK = (1 << MQ_RQ_STATE_BITS) - 1,
--
2.9.5
On 14/03/18 09:48, Jan Beulich wrote:
>>>> On 26.02.18 at 15:08, <jgross(a)suse.com> wrote:
>> @@ -35,6 +40,9 @@ void xen_arch_post_suspend(int cancelled)
>>
>> static void xen_vcpu_notify_restore(void *data)
>> {
>> + if (xen_pv_domain() && boot_cpu_has(X86_FEATURE_SPEC_CTRL))
>> + wrmsrl(MSR_IA32_SPEC_CTRL, this_cpu_read(spec_ctrl));
>> +
>> /* Boot processor notified via generic timekeeping_resume() */
>> if (smp_processor_id() == 0)
>> return;
>> @@ -44,7 +52,15 @@ static void xen_vcpu_notify_restore(void *data)
>>
>> static void xen_vcpu_notify_suspend(void *data)
>> {
>> + u64 tmp;
>> +
>> tick_suspend_local();
>> +
>> + if (xen_pv_domain() && boot_cpu_has(X86_FEATURE_SPEC_CTRL)) {
>> + rdmsrl(MSR_IA32_SPEC_CTRL, tmp);
>> + this_cpu_write(spec_ctrl, tmp);
>> + wrmsrl(MSR_IA32_SPEC_CTRL, 0);
>> + }
>> }
>
> While investigating ways how to do something similar on our old,
> non-pvops kernels I've started wondering if this solution is actually
> correct in all cases. Of course discussing this is complicated by the
> fact that the change there might be a conflict with hasn't landed
> in Linus'es tree yet (see e.g.
> https://patchwork.kernel.org/patch/10153843/ for an upstream
> submission; I haven't been able to find any discussion on that
> patch or why it isn't upstream yet), but we have it in our various
> branches. The potential problem I'm seeing is with the clearing
> and re-setting of SPEC_CTRL around CPUs going idle. While the
> active CPU could have preemption disabled (if that isn't the case
> already), the passive CPUs are - afaict - neither under full control
> of drivers/xen/manage.c:do_suspend() nor excluded yet from
> any further scheduling activity. Hence with code like this (taken
> from one of our branches)
>
> static void mwait_idle(void)
> {
> if (!current_set_polling_and_test()) {
> trace_cpu_idle_rcuidle(1, smp_processor_id());
> if (this_cpu_has(X86_BUG_CLFLUSH_MONITOR)) {
> smp_mb(); /* quirk */
> clflush((void *)¤t_thread_info()->flags);
> smp_mb(); /* quirk */
> }
>
> x86_disable_ibrs();
>
> __monitor((void *)¤t_thread_info()->flags, 0, 0);
> if (!need_resched())
> __sti_mwait(0, 0);
> else
> local_irq_enable();
>
> x86_enable_ibrs();
> ...
>
> the MSR might get set to non-zero again after having been
> cleared by the code your patch adds. I therefore think that the
> only race free solution would be to do the clearing from
> stop-machine context. But maybe I'm overlooking something.
Currently and with the above mentioned patch there is no problem: Xen pv
guests always use default_idle(), so mwait_idle() eventually playing
with MSR_IA32_SPEC_CTRL won't affect us.
In order to ensure that won't change in future default_idle() should
never modify MSR_IA32_SPEC_CTRL. In case something like that would be
required we should rather add another idle function doing that.
Juergen
If building a kernel without FTRACE but with TRACING,
ucsi.ko fails to link due to missing trace events. Fix this
by using the correct Kconfig symbol on Makefile.
Reported-by: Tobias Regnery <tobias.regnery(a)gmail.com>
Fixes: c1b0bc2dabfa ("usb: typec: Add support for UCSI interface")
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Heikki Krogerus <heikki.krogerus(a)linux.intel.com>
---
drivers/usb/typec/ucsi/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/typec/ucsi/Makefile b/drivers/usb/typec/ucsi/Makefile
index b57891c1fd31..7afbea512207 100644
--- a/drivers/usb/typec/ucsi/Makefile
+++ b/drivers/usb/typec/ucsi/Makefile
@@ -5,6 +5,6 @@ obj-$(CONFIG_TYPEC_UCSI) += typec_ucsi.o
typec_ucsi-y := ucsi.o
-typec_ucsi-$(CONFIG_FTRACE) += trace.o
+typec_ucsi-$(CONFIG_TRACING) += trace.o
obj-$(CONFIG_UCSI_ACPI) += ucsi_acpi.o
--
2.16.3
Commit fe014d4e6b55 (staging: wilc1000: free memory allocated for general info
message from firmware) introduced bug by using wrong source address in
kmemdup(). 'conn_info.req_ies' is used for source address in kempdup()
instead of 'hif_drv->usr_conn_req.ies'.
This commit fixes the NULL pointer dereference issue in
host_int_parse_assoc_resp_info() by using the correct source address in
kmemdup().
Fixes: fe014d4e6b55 (staging: wilc1000: free memory allocated for
general info message from firmware)
Cc: stable(a)vger.kernel.org
Signed-off-by: Ajay Singh <ajay.kathat(a)microchip.com>
Tested-by: Ajay Singh <ajay.kathat(a)microchip.com>
---
drivers/staging/wilc1000/host_interface.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 316d73c..302e3cb 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1387,7 +1387,7 @@ static inline void host_int_parse_assoc_resp_info(struct wilc_vif *vif,
}
if (hif_drv->usr_conn_req.ies) {
- conn_info.req_ies = kmemdup(conn_info.req_ies,
+ conn_info.req_ies = kmemdup(hif_drv->usr_conn_req.ies,
hif_drv->usr_conn_req.ies_len,
GFP_KERNEL);
if (conn_info.req_ies)
--
2.7.4
The patch titled
Subject: fs/reiserfs/journal.c: add missing resierfs_warning() arg
has been removed from the -mm tree. Its filename was
fs-reiserfs-journalc-add-missing-resierfs_warning-arg.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Andrew Morton <akpm(a)linux-foundation.org>
Subject: fs/reiserfs/journal.c: add missing resierfs_warning() arg
One use of the reiserfs_warning() macro in journal_init_dev() is missing a
parameter, causing the following warning:
REISERFS warning (device loop0): journal_init_dev: Cannot open '%s': %i journal_init_dev:
This also causes a WARN_ONCE() warning in the vsprintf code, and then a
panic if panic_on_warn is set.
Please remove unsupported %/ in format string
WARNING: CPU: 1 PID: 4480 at lib/vsprintf.c:2138 format_decode+0x77f/0x830 lib/vsprintf.c:2138
Kernel panic - not syncing: panic_on_warn set ...
Just add another string argument to the macro invocation.
Addresses https://syzkaller.appspot.com/bug?id=0627d4551fdc39bf1ef5d82cd9eef587047f77…
Link: http://lkml.kernel.org/r/d678ebe1-6f54-8090-df4c-b9affad62293@infradead.org
Signed-off-by: Randy Dunlap <rdunlap(a)infradead.org>
Reported-by: <syzbot+6bd77b88c1977c03f584(a)syzkaller.appspotmail.com>
Tested-by: Randy Dunlap <rdunlap(a)infradead.org>
Acked-by: Jeff Mahoney <jeffm(a)suse.com>
Cc: Alexander Viro <viro(a)zeniv.linux.org.uk>
Cc: Jan Kara <jack(a)suse.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
fs/reiserfs/journal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN fs/reiserfs/journal.c~fs-reiserfs-journalc-add-missing-resierfs_warning-arg fs/reiserfs/journal.c
--- a/fs/reiserfs/journal.c~fs-reiserfs-journalc-add-missing-resierfs_warning-arg
+++ a/fs/reiserfs/journal.c
@@ -2643,7 +2643,7 @@ static int journal_init_dev(struct super
if (IS_ERR(journal->j_dev_bd)) {
result = PTR_ERR(journal->j_dev_bd);
journal->j_dev_bd = NULL;
- reiserfs_warning(super,
+ reiserfs_warning(super, "sh-457",
"journal_init_dev: Cannot open '%s': %i",
jdev_name, result);
return result;
_
Patches currently in -mm which might be from akpm(a)linux-foundation.org are
i-need-old-gcc.patch
mm-gup_benchmark-handle-gup-failures-fix.patch
mm-pagemap-fix-swap-offset-value-for-pmd-migration-entry-fix.patch
writeback-safer-lock-nesting-fix.patch
arm-arch-arm-include-asm-pageh-needs-personalityh.patch
ocfs2-without-quota-support-try-to-avoid-calling-quota-recovery-checkpatch-fixes.patch
mm.patch
list_lru-prefetch-neighboring-list-entries-before-acquiring-lock-fix.patch
mm-oom-cgroup-aware-oom-killer-fix.patch
mm-oom-docs-describe-the-cgroup-aware-oom-killer-fix-2-fix.patch
fs-fsnotify-account-fsnotify-metadata-to-kmemcg-fix.patch
kernel-forkc-export-kernel_thread-to-modules.patch
slab-leaks3-default-y.patch
The patch titled
Subject: task_struct: only use anon struct under randstruct plugin
has been removed from the -mm tree. Its filename was
task_struct-only-use-anon-struct-under-randstruct-plugin.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Kees Cook <keescook(a)chromium.org>
Subject: task_struct: only use anon struct under randstruct plugin
The original intent for always adding the anonymous struct in task_struct
was to make sure we had compiler coverage. However, this caused
pathological padding of 40 bytes at the start of task_struct. Instead,
move the anonymous struct to being only used when struct layout
randomization is enabled.
Link: http://lkml.kernel.org/r/20180327213609.GA2964@beast
Fixes: 29e48ce87f1e ("task_struct: Allow randomized")
Signed-off-by: Kees Cook <keescook(a)chromium.org>
Reported-by: Peter Zijlstra <peterz(a)infradead.org>
Cc: Peter Zijlstra <peterz(a)infradead.org>
Cc: Ingo Molnar <mingo(a)kernel.org>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
include/linux/compiler-clang.h | 3 ---
include/linux/compiler-gcc.h | 12 +++---------
2 files changed, 3 insertions(+), 12 deletions(-)
diff -puN include/linux/compiler-clang.h~task_struct-only-use-anon-struct-under-randstruct-plugin include/linux/compiler-clang.h
--- a/include/linux/compiler-clang.h~task_struct-only-use-anon-struct-under-randstruct-plugin
+++ a/include/linux/compiler-clang.h
@@ -17,9 +17,6 @@
*/
#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
-#define randomized_struct_fields_start struct {
-#define randomized_struct_fields_end };
-
/* all clang versions usable with the kernel support KASAN ABI version 5 */
#define KASAN_ABI_VERSION 5
diff -puN include/linux/compiler-gcc.h~task_struct-only-use-anon-struct-under-randstruct-plugin include/linux/compiler-gcc.h
--- a/include/linux/compiler-gcc.h~task_struct-only-use-anon-struct-under-randstruct-plugin
+++ a/include/linux/compiler-gcc.h
@@ -242,6 +242,9 @@
#if defined(RANDSTRUCT_PLUGIN) && !defined(__CHECKER__)
#define __randomize_layout __attribute__((randomize_layout))
#define __no_randomize_layout __attribute__((no_randomize_layout))
+/* This anon struct can add padding, so only enable it under randstruct. */
+#define randomized_struct_fields_start struct {
+#define randomized_struct_fields_end } __randomize_layout;
#endif
#endif /* GCC_VERSION >= 40500 */
@@ -256,15 +259,6 @@
*/
#define __visible __attribute__((externally_visible))
-/*
- * RANDSTRUCT_PLUGIN wants to use an anonymous struct, but it is only
- * possible since GCC 4.6. To provide as much build testing coverage
- * as possible, this is used for all GCC 4.6+ builds, and not just on
- * RANDSTRUCT_PLUGIN builds.
- */
-#define randomized_struct_fields_start struct {
-#define randomized_struct_fields_end } __randomize_layout;
-
#endif /* GCC_VERSION >= 40600 */
_
Patches currently in -mm which might be from keescook(a)chromium.org are
rslib-remove-vlas-by-setting-upper-bound-on-nroots.patch
fork-unconditionally-clear-stack-on-fork.patch
exofs-avoid-vla-in-structures.patch
The patch titled
Subject: mm/ksm.c: fix inconsistent accounting of zero pages
has been removed from the -mm tree. Its filename was
mm-ksm-fix-inconsistent-accounting-of-zero-pages.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Claudio Imbrenda <imbrenda(a)linux.vnet.ibm.com>
Subject: mm/ksm.c: fix inconsistent accounting of zero pages
When using KSM with use_zero_pages, we replace anonymous pages containing
only zeroes with actual zero pages, which are not anonymous. We need to
do proper accounting of the mm counters, otherwise we will get wrong
values in /proc and a BUG message in dmesg when tearing down the mm.
Link: http://lkml.kernel.org/r/1522931274-15552-1-git-send-email-imbrenda@linux.v…
Fixes: e86c59b1b1 ("mm/ksm: improve deduplication of zero pages with colouring")
Signed-off-by: Claudio Imbrenda <imbrenda(a)linux.vnet.ibm.com>
Reviewed-by: Andrew Morton <akpm(a)linux-foundation.org>
Cc: Andrea Arcangeli <aarcange(a)redhat.com>
Cc: Minchan Kim <minchan(a)kernel.org>
Cc: Kirill A. Shutemov <kirill.shutemov(a)linux.intel.com>
Cc: Hugh Dickins <hughd(a)google.com>
Cc: Christian Borntraeger <borntraeger(a)de.ibm.com>
Cc: Gerald Schaefer <gerald.schaefer(a)de.ibm.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/ksm.c | 7 +++++++
1 file changed, 7 insertions(+)
diff -puN mm/ksm.c~mm-ksm-fix-inconsistent-accounting-of-zero-pages mm/ksm.c
--- a/mm/ksm.c~mm-ksm-fix-inconsistent-accounting-of-zero-pages
+++ a/mm/ksm.c
@@ -1131,6 +1131,13 @@ static int replace_page(struct vm_area_s
} else {
newpte = pte_mkspecial(pfn_pte(page_to_pfn(kpage),
vma->vm_page_prot));
+ /*
+ * We're replacing an anonymous page with a zero page, which is
+ * not anonymous. We need to do proper accounting otherwise we
+ * will get wrong values in /proc, and a BUG message in dmesg
+ * when tearing down the mm.
+ */
+ dec_mm_counter(mm, MM_ANONPAGES);
}
flush_cache_page(vma, addr, pte_pfn(*ptep));
_
Patches currently in -mm which might be from imbrenda(a)linux.vnet.ibm.com are
The patch titled
Subject: mm/hmm: hmm_pfns_bad() was accessing wrong struct
has been removed from the -mm tree. Its filename was
mm-hmm-hmm_pfns_bad-was-accessing-wrong-struct.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Jérôme Glisse <jglisse(a)redhat.com>
Subject: mm/hmm: hmm_pfns_bad() was accessing wrong struct
The private field of mm_walk struct point to an hmm_vma_walk struct and
not to the hmm_range struct desired. Fix to get proper struct pointer.
Link: http://lkml.kernel.org/r/20180323005527.758-6-jglisse@redhat.com
Signed-off-by: Jérôme Glisse <jglisse(a)redhat.com>
Cc: Evgeny Baskakov <ebaskakov(a)nvidia.com>
Cc: Ralph Campbell <rcampbell(a)nvidia.com>
Cc: Mark Hairgrove <mhairgrove(a)nvidia.com>
Cc: John Hubbard <jhubbard(a)nvidia.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/hmm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff -puN mm/hmm.c~mm-hmm-hmm_pfns_bad-was-accessing-wrong-struct mm/hmm.c
--- a/mm/hmm.c~mm-hmm-hmm_pfns_bad-was-accessing-wrong-struct
+++ a/mm/hmm.c
@@ -336,7 +336,8 @@ static int hmm_pfns_bad(unsigned long ad
unsigned long end,
struct mm_walk *walk)
{
- struct hmm_range *range = walk->private;
+ struct hmm_vma_walk *hmm_vma_walk = walk->private;
+ struct hmm_range *range = hmm_vma_walk->range;
hmm_pfn_t *pfns = range->pfns;
unsigned long i;
_
Patches currently in -mm which might be from jglisse(a)redhat.com are
The patch titled
Subject: mm/hmm: fix header file if/else/endif maze
has been removed from the -mm tree. Its filename was
mm-hmm-fix-header-file-if-else-endif-maze-v2.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Jérôme Glisse <jglisse(a)redhat.com>
Subject: mm/hmm: fix header file if/else/endif maze
The #if/#else/#endif for IS_ENABLED(CONFIG_HMM) were wrong. Because of
this after multiple include there was multiple definition of both
hmm_mm_init() and hmm_mm_destroy() leading to build failure if HMM was
enabled (CONFIG_HMM set).
Link: http://lkml.kernel.org/r/20180323005527.758-3-jglisse@redhat.com
Signed-off-by: Jérôme Glisse <jglisse(a)redhat.com>
Acked-by: Balbir Singh <bsingharora(a)gmail.com>
Cc: Andrew Morton <akpm(a)linux-foundation.org>
Cc: Ralph Campbell <rcampbell(a)nvidia.com>
Cc: John Hubbard <jhubbard(a)nvidia.com>
Cc: Evgeny Baskakov <ebaskakov(a)nvidia.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
include/linux/hmm.h | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff -puN include/linux/hmm.h~mm-hmm-fix-header-file-if-else-endif-maze-v2 include/linux/hmm.h
--- a/include/linux/hmm.h~mm-hmm-fix-header-file-if-else-endif-maze-v2
+++ a/include/linux/hmm.h
@@ -498,23 +498,16 @@ struct hmm_device {
struct hmm_device *hmm_device_new(void *drvdata);
void hmm_device_put(struct hmm_device *hmm_device);
#endif /* CONFIG_DEVICE_PRIVATE || CONFIG_DEVICE_PUBLIC */
-#endif /* IS_ENABLED(CONFIG_HMM) */
/* Below are for HMM internal use only! Not to be used by device driver! */
-#if IS_ENABLED(CONFIG_HMM_MIRROR)
void hmm_mm_destroy(struct mm_struct *mm);
static inline void hmm_mm_init(struct mm_struct *mm)
{
mm->hmm = NULL;
}
-#else /* IS_ENABLED(CONFIG_HMM_MIRROR) */
-static inline void hmm_mm_destroy(struct mm_struct *mm) {}
-static inline void hmm_mm_init(struct mm_struct *mm) {}
-#endif /* IS_ENABLED(CONFIG_HMM_MIRROR) */
-
-
#else /* IS_ENABLED(CONFIG_HMM) */
static inline void hmm_mm_destroy(struct mm_struct *mm) {}
static inline void hmm_mm_init(struct mm_struct *mm) {}
+#endif /* IS_ENABLED(CONFIG_HMM) */
#endif /* LINUX_HMM_H */
_
Patches currently in -mm which might be from jglisse(a)redhat.com are
Hi,
[This is an automated email]
This commit has been processed because it contains a "Fixes:" tag,
fixing commit: d9f9b9a4d05f devlink: Add support for resource abstraction.
The bot has tested the following trees: v4.16.1.
v4.16.1: Failed to apply! Possible dependencies:
37923ed6b8ce ("netdevsim: Add simple FIB resource controller via devlink")
3ed898e8cd05 ("mlxsw: spectrum_kvdl: Make some functions static")
4f4bbf7c4e3d ("devlink: Perform cleanup of resource_set cb")
51d3c08e3371 ("mlxsw: spectrum_kvdl: Add support for linear division resources")
7f47b19bd744 ("mlxsw: spectrum_kvdl: Add support for per part occupancy")
88d2fbcda145 ("mlxsw: spectrum: Pass mlxsw_core as arg of mlxsw_sp_kvdl_resources_register()")
c8276dd250e9 ("mlxsw: spectrum_kvdl: Fix handling of resource_size_param")
f9b9120119ca ("mlxsw: Constify devlink_resource_ops")
--
Thanks,
Sasha
The patch titled
Subject: mm, slab: reschedule cache_reap() on the same CPU
has been added to the -mm tree. Its filename is
mm-slab-reschedule-cache_reap-on-the-same-cpu.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-slab-reschedule-cache_reap-on-t…
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-slab-reschedule-cache_reap-on-t…
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: Vlastimil Babka <vbabka(a)suse.cz>
Subject: mm, slab: reschedule cache_reap() on the same CPU
cache_reap() is initially scheduled in start_cpu_timer() via
schedule_delayed_work_on(). But then the next iterations are scheduled
via schedule_delayed_work(), i.e. using WORK_CPU_UNBOUND.
Thus since commit ef557180447f ("workqueue: schedule WORK_CPU_UNBOUND work
on wq_unbound_cpumask CPUs") there is no guarantee the future iterations
will run on the originally intended cpu, although it's still preferred. I
was able to demonstrate this with
/sys/module/workqueue/parameters/debug_force_rr_cpu. IIUC, it may also
happen due to migrating timers in nohz context. As a result, some cpu's
would be calling cache_reap() more frequently and others never.
This patch uses schedule_delayed_work_on() with the current cpu when
scheduling the next iteration.
Link: http://lkml.kernel.org/r/20180411070007.32225-1-vbabka@suse.cz
Fixes: ef557180447f ("workqueue: schedule WORK_CPU_UNBOUND work on wq_unbound_cpumask CPUs")
Signed-off-by: Vlastimil Babka <vbabka(a)suse.cz>
Acked-by: Pekka Enberg <penberg(a)kernel.org>
Acked-by: Christoph Lameter <cl(a)linux.com>
Cc: Joonsoo Kim <iamjoonsoo.kim(a)lge.com>
Cc: David Rientjes <rientjes(a)google.com>
Cc: Tejun Heo <tj(a)kernel.org>
Cc: Lai Jiangshan <jiangshanlai(a)gmail.com>
Cc: John Stultz <john.stultz(a)linaro.org>
Cc: Thomas Gleixner <tglx(a)linutronix.de>
Cc: Stephen Boyd <sboyd(a)kernel.org>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/slab.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff -puN mm/slab.c~mm-slab-reschedule-cache_reap-on-the-same-cpu mm/slab.c
--- a/mm/slab.c~mm-slab-reschedule-cache_reap-on-the-same-cpu
+++ a/mm/slab.c
@@ -4086,7 +4086,8 @@ next:
next_reap_node();
out:
/* Set up the next iteration */
- schedule_delayed_work(work, round_jiffies_relative(REAPTIMEOUT_AC));
+ schedule_delayed_work_on(smp_processor_id(), work,
+ round_jiffies_relative(REAPTIMEOUT_AC));
}
void get_slabinfo(struct kmem_cache *cachep, struct slabinfo *sinfo)
_
Patches currently in -mm which might be from vbabka(a)suse.cz are
mm-slab-reschedule-cache_reap-on-the-same-cpu.patch
Tree/Branch: v4.15.16
Git describe: v4.15.16
Commit: 49859d3c55 Linux 4.15.16
Build Time: 85 min 9 sec
Passed: 5 / 11 ( 45.45 %)
Failed: 6 / 11 ( 54.55 %)
Errors: 57
Warnings: 2
Section Mismatches: 0
Failed defconfigs:
arm64-allmodconfig
arm-multi_v5_defconfig
arm-multi_v7_defconfig
arm-allmodconfig
x86_64-allmodconfig
arm64-defconfig
Errors:
arm64-allmodconfig
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-core.c:230:27: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/linux/build_bug.h:30:45: error: bit-field '<anonymous>' width not an integer constant
../drivers/media/cec/cec-adap.c:136:22: error: 'CEC_EVENT_FL_DROPPED_EVENTS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:160:22: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:161:8: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:167:28: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:178:8: error: 'CEC_EVENT_PIN_HPD_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:710:17: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1403:21: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1563:25: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1798:6: error: implicit declaration of function 'cec_is_cdc_only' [-Werror=implicit-function-declaration]
../drivers/media/cec/cec-adap.c:1878:33: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:2019:33: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-api.c:168:7: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:169:7: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:198:31: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:381:23: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:382:29: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:452:38: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:453:10: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:610:27: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/platform/s5p-cec/s5p_cec.c:232:35: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/platform/vivid/vivid-cec.c:285:54: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
arm-multi_v5_defconfig
../net/socket.c:714:28: error: 'SCM_TIMESTAMPING_PKTINFO' undeclared (first use in this function)
../net/socket.c:770:30: error: 'SCM_TIMESTAMPING_OPT_STATS' undeclared (first use in this function)
../net/core/sock.c:727:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:930:7: error: 'SO_ATTACH_BPF' undeclared (first use in this function)
../net/core/sock.c:943:7: error: 'SO_ATTACH_REUSEPORT_CBPF' undeclared (first use in this function)
../net/core/sock.c:956:7: error: 'SO_ATTACH_REUSEPORT_EBPF' undeclared (first use in this function)
../net/core/sock.c:973:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1012:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1017:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1030:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1040:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1044:7: error: 'SO_CNX_ADVICE' undeclared (first use in this function)
../net/core/sock.c:1049:7: error: 'SO_ZEROCOPY' undeclared (first use in this function)
../net/core/sock.c:1144:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:1250:7: error: 'SO_PEERGROUPS' undeclared (first use in this function)
../net/core/sock.c:1323:7: error: 'SO_GET_FILTER' undeclared (first use in this function)
../net/core/sock.c:1330:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1334:7: error: 'SO_BPF_EXTENSIONS' undeclared (first use in this function)
../net/core/sock.c:1338:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1343:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1348:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1352:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1356:7: error: 'SO_MEMINFO' undeclared (first use in this function)
../net/core/sock.c:1373:7: error: 'SO_INCOMING_NAPI_ID' undeclared (first use in this function)
../net/core/sock.c:1383:7: error: 'SO_COOKIE' undeclared (first use in this function)
../net/core/sock.c:1390:7: error: 'SO_ZEROCOPY' undeclared (first use in this function)
../net/core/filter.c:3214:8: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/sunrpc/xprtsock.c:1774:38: error: 'SO_REUSEPORT' undeclared (first use in this function)
arm-multi_v7_defconfig
../net/socket.c:714:28: error: 'SCM_TIMESTAMPING_PKTINFO' undeclared (first use in this function)
../net/socket.c:770:30: error: 'SCM_TIMESTAMPING_OPT_STATS' undeclared (first use in this function)
../net/core/sock.c:727:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:930:7: error: 'SO_ATTACH_BPF' undeclared (first use in this function)
../net/core/sock.c:943:7: error: 'SO_ATTACH_REUSEPORT_CBPF' undeclared (first use in this function)
../net/core/sock.c:956:7: error: 'SO_ATTACH_REUSEPORT_EBPF' undeclared (first use in this function)
../net/core/sock.c:973:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1012:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1017:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1030:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1040:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1044:7: error: 'SO_CNX_ADVICE' undeclared (first use in this function)
../net/core/sock.c:1049:7: error: 'SO_ZEROCOPY' undeclared (first use in this function)
../net/core/sock.c:1144:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:1250:7: error: 'SO_PEERGROUPS' undeclared (first use in this function)
../net/core/sock.c:1323:7: error: 'SO_GET_FILTER' undeclared (first use in this function)
../net/core/sock.c:1330:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1334:7: error: 'SO_BPF_EXTENSIONS' undeclared (first use in this function)
../net/core/sock.c:1338:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1343:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1348:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1352:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1356:7: error: 'SO_MEMINFO' undeclared (first use in this function)
../net/core/sock.c:1373:7: error: 'SO_INCOMING_NAPI_ID' undeclared (first use in this function)
../net/core/sock.c:1383:7: error: 'SO_COOKIE' undeclared (first use in this function)
../net/core/sock.c:1390:7: error: 'SO_ZEROCOPY' undeclared (first use in this function)
../net/core/filter.c:3214:8: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-core.c:230:27: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/linux/build_bug.h:30:45: error: bit-field '<anonymous>' width not an integer constant
../drivers/media/cec/cec-adap.c:136:22: error: 'CEC_EVENT_FL_DROPPED_EVENTS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:160:22: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:161:8: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:167:28: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:178:8: error: 'CEC_EVENT_PIN_HPD_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:710:17: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1403:21: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1563:25: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1798:6: error: implicit declaration of function 'cec_is_cdc_only' [-Werror=implicit-function-declaration]
../drivers/media/cec/cec-adap.c:1878:33: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:2019:33: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-api.c:168:7: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:169:7: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:198:31: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:381:23: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:382:29: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:452:38: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:453:10: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:610:27: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../net/sunrpc/xprtsock.c:1774:38: error: 'SO_REUSEPORT' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
arm-allmodconfig
../net/socket.c:714:28: error: 'SCM_TIMESTAMPING_PKTINFO' undeclared (first use in this function)
../net/socket.c:770:30: error: 'SCM_TIMESTAMPING_OPT_STATS' undeclared (first use in this function)
../net/core/sock.c:727:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:930:7: error: 'SO_ATTACH_BPF' undeclared (first use in this function)
../net/core/sock.c:943:7: error: 'SO_ATTACH_REUSEPORT_CBPF' undeclared (first use in this function)
../net/core/sock.c:956:7: error: 'SO_ATTACH_REUSEPORT_EBPF' undeclared (first use in this function)
../net/core/sock.c:973:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1012:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1017:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1030:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1040:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1044:7: error: 'SO_CNX_ADVICE' undeclared (first use in this function)
../net/core/sock.c:1049:7: error: 'SO_ZEROCOPY' undeclared (first use in this function)
../net/core/sock.c:1144:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:1250:7: error: 'SO_PEERGROUPS' undeclared (first use in this function)
../net/core/sock.c:1323:7: error: 'SO_GET_FILTER' undeclared (first use in this function)
../net/core/sock.c:1330:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1334:7: error: 'SO_BPF_EXTENSIONS' undeclared (first use in this function)
../net/core/sock.c:1338:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1343:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1348:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1352:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1356:7: error: 'SO_MEMINFO' undeclared (first use in this function)
../net/core/sock.c:1373:7: error: 'SO_INCOMING_NAPI_ID' undeclared (first use in this function)
../net/core/sock.c:1383:7: error: 'SO_COOKIE' undeclared (first use in this function)
../net/core/sock.c:1390:7: error: 'SO_ZEROCOPY' undeclared (first use in this function)
../net/core/filter.c:3214:8: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-core.c:230:27: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/linux/build_bug.h:30:45: error: bit-field '<anonymous>' width not an integer constant
../drivers/media/cec/cec-adap.c:136:22: error: 'CEC_EVENT_FL_DROPPED_EVENTS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:160:22: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:161:8: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:167:28: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:178:8: error: 'CEC_EVENT_PIN_HPD_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:710:17: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1403:21: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1563:25: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1798:6: error: implicit declaration of function 'cec_is_cdc_only' [-Werror=implicit-function-declaration]
../drivers/media/cec/cec-adap.c:1878:33: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:2019:33: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-api.c:168:7: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:169:7: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:198:31: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:381:23: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:382:29: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:452:38: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:453:10: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:581:7: error: 'CEC_EVENT_PIN_HPD_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:610:27: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-pin.c:797:37: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../net/sunrpc/xprtsock.c:1774:38: error: 'SO_REUSEPORT' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/platform/s5p-cec/s5p_cec.c:232:35: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/platform/vivid/vivid-cec.c:285:54: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../arch/arm/include/asm/parport.h:12:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'parport_pc_find_isa_ports'
../arch/arm/include/asm/parport.h:13:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'parport_pc_find_nonpci_ports'
../drivers/parport/parport_pc.c:3070:2: error: implicit declaration of function 'parport_pc_find_nonpci_ports' [-Werror=implicit-function-declaration]
x86_64-allmodconfig
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-core.c:230:27: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/linux/build_bug.h:30:45: error: bit-field '<anonymous>' width not an integer constant
../drivers/media/cec/cec-adap.c:136:22: error: 'CEC_EVENT_FL_DROPPED_EVENTS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:160:22: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:161:8: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:167:28: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:178:8: error: 'CEC_EVENT_PIN_HPD_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:710:17: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1403:21: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1563:25: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1798:6: error: implicit declaration of function 'cec_is_cdc_only' [-Werror=implicit-function-declaration]
../drivers/media/cec/cec-adap.c:1878:33: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:2019:33: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-api.c:168:7: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:169:7: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:198:31: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:381:23: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:382:29: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:452:38: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:453:10: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:610:27: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/platform/s5p-cec/s5p_cec.c:232:35: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/platform/vivid/vivid-cec.c:285:54: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
arm64-defconfig
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-core.c:230:27: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/linux/build_bug.h:30:45: error: bit-field '<anonymous>' width not an integer constant
../drivers/media/cec/cec-adap.c:136:22: error: 'CEC_EVENT_FL_DROPPED_EVENTS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:160:22: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:161:8: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:167:28: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:178:8: error: 'CEC_EVENT_PIN_HPD_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:710:17: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1403:21: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1563:25: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1798:6: error: implicit declaration of function 'cec_is_cdc_only' [-Werror=implicit-function-declaration]
../drivers/media/cec/cec-adap.c:1878:33: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:2019:33: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-api.c:168:7: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:169:7: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:198:31: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:381:23: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:382:29: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:452:38: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:453:10: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:610:27: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
-------------------------------------------------------------------------------
defconfigs with issues (other than build errors):
1 warnings 0 mismatches : arm64-allmodconfig
1 warnings 0 mismatches : arm-multi_v7_defconfig
1 warnings 0 mismatches : arm-allmodconfig
2 warnings 0 mismatches : x86_64-allmodconfig
1 warnings 0 mismatches : arm64-defconfig
-------------------------------------------------------------------------------
Errors summary: 57
175 ../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
5 ../include/linux/build_bug.h:30:45: error: bit-field '<anonymous>' width not an integer constant
5 ../drivers/media/cec/cec-core.c:230:27: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
5 ../drivers/media/cec/cec-api.c:610:27: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
5 ../drivers/media/cec/cec-api.c:453:10: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
5 ../drivers/media/cec/cec-api.c:452:38: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared (first use in this function)
5 ../drivers/media/cec/cec-api.c:382:29: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
5 ../drivers/media/cec/cec-api.c:381:23: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
5 ../drivers/media/cec/cec-api.c:198:31: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
5 ../drivers/media/cec/cec-api.c:169:7: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
5 ../drivers/media/cec/cec-api.c:168:7: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
5 ../drivers/media/cec/cec-adap.c:710:17: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
5 ../drivers/media/cec/cec-adap.c:2019:33: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
5 ../drivers/media/cec/cec-adap.c:1878:33: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
5 ../drivers/media/cec/cec-adap.c:1798:6: error: implicit declaration of function 'cec_is_cdc_only' [-Werror=implicit-function-declaration]
5 ../drivers/media/cec/cec-adap.c:178:8: error: 'CEC_EVENT_PIN_HPD_LOW' undeclared (first use in this function)
5 ../drivers/media/cec/cec-adap.c:167:28: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
5 ../drivers/media/cec/cec-adap.c:161:8: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
5 ../drivers/media/cec/cec-adap.c:160:22: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared (first use in this function)
5 ../drivers/media/cec/cec-adap.c:1563:25: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
5 ../drivers/media/cec/cec-adap.c:1403:21: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
5 ../drivers/media/cec/cec-adap.c:136:22: error: 'CEC_EVENT_FL_DROPPED_EVENTS' undeclared (first use in this function)
3 ../net/sunrpc/xprtsock.c:1774:38: error: 'SO_REUSEPORT' undeclared (first use in this function)
3 ../net/socket.c:770:30: error: 'SCM_TIMESTAMPING_OPT_STATS' undeclared (first use in this function)
3 ../net/socket.c:714:28: error: 'SCM_TIMESTAMPING_PKTINFO' undeclared (first use in this function)
3 ../net/core/sock.c:973:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
3 ../net/core/sock.c:956:7: error: 'SO_ATTACH_REUSEPORT_EBPF' undeclared (first use in this function)
3 ../net/core/sock.c:943:7: error: 'SO_ATTACH_REUSEPORT_CBPF' undeclared (first use in this function)
3 ../net/core/sock.c:930:7: error: 'SO_ATTACH_BPF' undeclared (first use in this function)
3 ../net/core/sock.c:727:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
3 ../net/core/sock.c:1390:7: error: 'SO_ZEROCOPY' undeclared (first use in this function)
3 ../net/core/sock.c:1383:7: error: 'SO_COOKIE' undeclared (first use in this function)
3 ../net/core/sock.c:1373:7: error: 'SO_INCOMING_NAPI_ID' undeclared (first use in this function)
3 ../net/core/sock.c:1356:7: error: 'SO_MEMINFO' undeclared (first use in this function)
3 ../net/core/sock.c:1352:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
3 ../net/core/sock.c:1348:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
3 ../net/core/sock.c:1343:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
3 ../net/core/sock.c:1338:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
3 ../net/core/sock.c:1334:7: error: 'SO_BPF_EXTENSIONS' undeclared (first use in this function)
3 ../net/core/sock.c:1330:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
3 ../net/core/sock.c:1323:7: error: 'SO_GET_FILTER' undeclared (first use in this function)
3 ../net/core/sock.c:1250:7: error: 'SO_PEERGROUPS' undeclared (first use in this function)
3 ../net/core/sock.c:1144:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
3 ../net/core/sock.c:1049:7: error: 'SO_ZEROCOPY' undeclared (first use in this function)
3 ../net/core/sock.c:1044:7: error: 'SO_CNX_ADVICE' undeclared (first use in this function)
3 ../net/core/sock.c:1040:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
3 ../net/core/sock.c:1030:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
3 ../net/core/sock.c:1017:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
3 ../net/core/sock.c:1012:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
3 ../net/core/filter.c:3214:8: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
3 ../drivers/media/platform/vivid/vivid-cec.c:285:54: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
3 ../drivers/media/platform/s5p-cec/s5p_cec.c:232:35: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
1 ../drivers/parport/parport_pc.c:3070:2: error: implicit declaration of function 'parport_pc_find_nonpci_ports' [-Werror=implicit-function-declaration]
1 ../drivers/media/cec/cec-pin.c:797:37: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
1 ../drivers/media/cec/cec-api.c:581:7: error: 'CEC_EVENT_PIN_HPD_LOW' undeclared (first use in this function)
1 ../arch/arm/include/asm/parport.h:13:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'parport_pc_find_nonpci_ports'
1 ../arch/arm/include/asm/parport.h:12:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'parport_pc_find_isa_ports'
Warnings Summary: 2
5 ../drivers/media/cec/cec-adap.c:88:18: warning: unused variable 'max_events' [-Wunused-variable]
1 drivers/target/iscsi/.tmp_iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0x78f: sibling call from callable instruction with modified stack frame
===============================================================================
Detailed per-defconfig build reports below:
-------------------------------------------------------------------------------
arm64-allmodconfig : FAIL, 63 errors, 1 warnings, 0 section mismatches
Errors:
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-core.c:230:27: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/linux/build_bug.h:30:45: error: bit-field '<anonymous>' width not an integer constant
../drivers/media/cec/cec-adap.c:136:22: error: 'CEC_EVENT_FL_DROPPED_EVENTS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:160:22: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:161:8: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:167:28: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:178:8: error: 'CEC_EVENT_PIN_HPD_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:710:17: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1403:21: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1563:25: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1798:6: error: implicit declaration of function 'cec_is_cdc_only' [-Werror=implicit-function-declaration]
../drivers/media/cec/cec-adap.c:1878:33: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:2019:33: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-api.c:168:7: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:169:7: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:198:31: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:381:23: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:382:29: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:452:38: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:453:10: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:610:27: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/platform/s5p-cec/s5p_cec.c:232:35: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/platform/vivid/vivid-cec.c:285:54: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
Warnings:
../drivers/media/cec/cec-adap.c:88:18: warning: unused variable 'max_events' [-Wunused-variable]
-------------------------------------------------------------------------------
arm-multi_v5_defconfig : FAIL, 28 errors, 0 warnings, 0 section mismatches
Errors:
../net/socket.c:714:28: error: 'SCM_TIMESTAMPING_PKTINFO' undeclared (first use in this function)
../net/socket.c:770:30: error: 'SCM_TIMESTAMPING_OPT_STATS' undeclared (first use in this function)
../net/core/sock.c:727:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:930:7: error: 'SO_ATTACH_BPF' undeclared (first use in this function)
../net/core/sock.c:943:7: error: 'SO_ATTACH_REUSEPORT_CBPF' undeclared (first use in this function)
../net/core/sock.c:956:7: error: 'SO_ATTACH_REUSEPORT_EBPF' undeclared (first use in this function)
../net/core/sock.c:973:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1012:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1017:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1030:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1040:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1044:7: error: 'SO_CNX_ADVICE' undeclared (first use in this function)
../net/core/sock.c:1049:7: error: 'SO_ZEROCOPY' undeclared (first use in this function)
../net/core/sock.c:1144:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:1250:7: error: 'SO_PEERGROUPS' undeclared (first use in this function)
../net/core/sock.c:1323:7: error: 'SO_GET_FILTER' undeclared (first use in this function)
../net/core/sock.c:1330:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1334:7: error: 'SO_BPF_EXTENSIONS' undeclared (first use in this function)
../net/core/sock.c:1338:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1343:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1348:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1352:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1356:7: error: 'SO_MEMINFO' undeclared (first use in this function)
../net/core/sock.c:1373:7: error: 'SO_INCOMING_NAPI_ID' undeclared (first use in this function)
../net/core/sock.c:1383:7: error: 'SO_COOKIE' undeclared (first use in this function)
../net/core/sock.c:1390:7: error: 'SO_ZEROCOPY' undeclared (first use in this function)
../net/core/filter.c:3214:8: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/sunrpc/xprtsock.c:1774:38: error: 'SO_REUSEPORT' undeclared (first use in this function)
-------------------------------------------------------------------------------
arm-multi_v7_defconfig : FAIL, 80 errors, 1 warnings, 0 section mismatches
Errors:
../net/socket.c:714:28: error: 'SCM_TIMESTAMPING_PKTINFO' undeclared (first use in this function)
../net/socket.c:770:30: error: 'SCM_TIMESTAMPING_OPT_STATS' undeclared (first use in this function)
../net/core/sock.c:727:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:930:7: error: 'SO_ATTACH_BPF' undeclared (first use in this function)
../net/core/sock.c:943:7: error: 'SO_ATTACH_REUSEPORT_CBPF' undeclared (first use in this function)
../net/core/sock.c:956:7: error: 'SO_ATTACH_REUSEPORT_EBPF' undeclared (first use in this function)
../net/core/sock.c:973:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1012:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1017:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1030:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1040:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1044:7: error: 'SO_CNX_ADVICE' undeclared (first use in this function)
../net/core/sock.c:1049:7: error: 'SO_ZEROCOPY' undeclared (first use in this function)
../net/core/sock.c:1144:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:1250:7: error: 'SO_PEERGROUPS' undeclared (first use in this function)
../net/core/sock.c:1323:7: error: 'SO_GET_FILTER' undeclared (first use in this function)
../net/core/sock.c:1330:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1334:7: error: 'SO_BPF_EXTENSIONS' undeclared (first use in this function)
../net/core/sock.c:1338:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1343:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1348:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1352:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1356:7: error: 'SO_MEMINFO' undeclared (first use in this function)
../net/core/sock.c:1373:7: error: 'SO_INCOMING_NAPI_ID' undeclared (first use in this function)
../net/core/sock.c:1383:7: error: 'SO_COOKIE' undeclared (first use in this function)
../net/core/sock.c:1390:7: error: 'SO_ZEROCOPY' undeclared (first use in this function)
../net/core/filter.c:3214:8: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-core.c:230:27: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/linux/build_bug.h:30:45: error: bit-field '<anonymous>' width not an integer constant
../drivers/media/cec/cec-adap.c:136:22: error: 'CEC_EVENT_FL_DROPPED_EVENTS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:160:22: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:161:8: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:167:28: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:178:8: error: 'CEC_EVENT_PIN_HPD_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:710:17: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1403:21: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1563:25: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1798:6: error: implicit declaration of function 'cec_is_cdc_only' [-Werror=implicit-function-declaration]
../drivers/media/cec/cec-adap.c:1878:33: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:2019:33: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-api.c:168:7: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:169:7: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:198:31: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:381:23: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:382:29: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:452:38: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:453:10: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:610:27: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../net/sunrpc/xprtsock.c:1774:38: error: 'SO_REUSEPORT' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
Warnings:
../drivers/media/cec/cec-adap.c:88:18: warning: unused variable 'max_events' [-Wunused-variable]
-------------------------------------------------------------------------------
arm-allmodconfig : FAIL, 112 errors, 1 warnings, 0 section mismatches
Errors:
../net/socket.c:714:28: error: 'SCM_TIMESTAMPING_PKTINFO' undeclared (first use in this function)
../net/socket.c:770:30: error: 'SCM_TIMESTAMPING_OPT_STATS' undeclared (first use in this function)
../net/core/sock.c:727:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:930:7: error: 'SO_ATTACH_BPF' undeclared (first use in this function)
../net/core/sock.c:943:7: error: 'SO_ATTACH_REUSEPORT_CBPF' undeclared (first use in this function)
../net/core/sock.c:956:7: error: 'SO_ATTACH_REUSEPORT_EBPF' undeclared (first use in this function)
../net/core/sock.c:973:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1012:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1017:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1030:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1040:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1044:7: error: 'SO_CNX_ADVICE' undeclared (first use in this function)
../net/core/sock.c:1049:7: error: 'SO_ZEROCOPY' undeclared (first use in this function)
../net/core/sock.c:1144:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:1250:7: error: 'SO_PEERGROUPS' undeclared (first use in this function)
../net/core/sock.c:1323:7: error: 'SO_GET_FILTER' undeclared (first use in this function)
../net/core/sock.c:1330:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1334:7: error: 'SO_BPF_EXTENSIONS' undeclared (first use in this function)
../net/core/sock.c:1338:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1343:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1348:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1352:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1356:7: error: 'SO_MEMINFO' undeclared (first use in this function)
../net/core/sock.c:1373:7: error: 'SO_INCOMING_NAPI_ID' undeclared (first use in this function)
../net/core/sock.c:1383:7: error: 'SO_COOKIE' undeclared (first use in this function)
../net/core/sock.c:1390:7: error: 'SO_ZEROCOPY' undeclared (first use in this function)
../net/core/filter.c:3214:8: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-core.c:230:27: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/linux/build_bug.h:30:45: error: bit-field '<anonymous>' width not an integer constant
../drivers/media/cec/cec-adap.c:136:22: error: 'CEC_EVENT_FL_DROPPED_EVENTS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:160:22: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:161:8: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:167:28: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:178:8: error: 'CEC_EVENT_PIN_HPD_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:710:17: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1403:21: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1563:25: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1798:6: error: implicit declaration of function 'cec_is_cdc_only' [-Werror=implicit-function-declaration]
../drivers/media/cec/cec-adap.c:1878:33: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:2019:33: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-api.c:168:7: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:169:7: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:198:31: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:381:23: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:382:29: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:452:38: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:453:10: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:581:7: error: 'CEC_EVENT_PIN_HPD_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:610:27: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-pin.c:797:37: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../net/sunrpc/xprtsock.c:1774:38: error: 'SO_REUSEPORT' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/platform/s5p-cec/s5p_cec.c:232:35: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/platform/vivid/vivid-cec.c:285:54: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../arch/arm/include/asm/parport.h:12:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'parport_pc_find_isa_ports'
../arch/arm/include/asm/parport.h:13:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'parport_pc_find_nonpci_ports'
../drivers/parport/parport_pc.c:3070:2: error: implicit declaration of function 'parport_pc_find_nonpci_ports' [-Werror=implicit-function-declaration]
Warnings:
../drivers/media/cec/cec-adap.c:88:18: warning: unused variable 'max_events' [-Wunused-variable]
-------------------------------------------------------------------------------
x86_64-allmodconfig : FAIL, 60 errors, 2 warnings, 0 section mismatches
Errors:
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-core.c:230:27: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/linux/build_bug.h:30:45: error: bit-field '<anonymous>' width not an integer constant
../drivers/media/cec/cec-adap.c:136:22: error: 'CEC_EVENT_FL_DROPPED_EVENTS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:160:22: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:161:8: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:167:28: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:178:8: error: 'CEC_EVENT_PIN_HPD_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:710:17: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1403:21: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1563:25: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1798:6: error: implicit declaration of function 'cec_is_cdc_only' [-Werror=implicit-function-declaration]
../drivers/media/cec/cec-adap.c:1878:33: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:2019:33: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-api.c:168:7: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:169:7: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:198:31: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:381:23: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:382:29: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:452:38: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:453:10: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:610:27: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/platform/s5p-cec/s5p_cec.c:232:35: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/platform/vivid/vivid-cec.c:285:54: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
Warnings:
../drivers/media/cec/cec-adap.c:88:18: warning: unused variable 'max_events' [-Wunused-variable]
drivers/target/iscsi/.tmp_iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0x78f: sibling call from callable instruction with modified stack frame
-------------------------------------------------------------------------------
arm64-defconfig : FAIL, 32 errors, 1 warnings, 0 section mismatches
Errors:
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-core.c:230:27: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../include/linux/build_bug.h:30:45: error: bit-field '<anonymous>' width not an integer constant
../drivers/media/cec/cec-adap.c:136:22: error: 'CEC_EVENT_FL_DROPPED_EVENTS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:160:22: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:161:8: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:167:28: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:178:8: error: 'CEC_EVENT_PIN_HPD_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:710:17: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1403:21: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1563:25: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1798:6: error: implicit declaration of function 'cec_is_cdc_only' [-Werror=implicit-function-declaration]
../drivers/media/cec/cec-adap.c:1878:33: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:2019:33: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-api.c:168:7: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:169:7: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:198:31: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:381:23: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:382:29: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:452:38: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:453:10: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:610:27: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_HPD_HIGH' undeclared here (not in a function)
Warnings:
../drivers/media/cec/cec-adap.c:88:18: warning: unused variable 'max_events' [-Wunused-variable]
-------------------------------------------------------------------------------
Passed with no errors, warnings or mismatches:
x86_64-allnoconfig
arm64-allnoconfig
arm-allnoconfig
arm-multi_v4t_defconfig
x86_64-defconfig
The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 82dd0d2a9a76fc8fa2b18d80b987d455728bf83a Mon Sep 17 00:00:00 2001
From: David Ahern <dsahern(a)gmail.com>
Date: Thu, 29 Mar 2018 12:49:52 -0700
Subject: [PATCH] vrf: Fix use after free and double free in vrf_finish_output
Miguel reported an skb use after free / double free in vrf_finish_output
when neigh_output returns an error. The vrf driver should return after
the call to neigh_output as it takes over the skb on error path as well.
Patch is a simplified version of Miguel's patch which was written for 4.9,
and updated to top of tree.
Fixes: 8f58336d3f78a ("net: Add ethernet header for pass through VRF device")
Signed-off-by: Miguel Fadon Perlines <mfadon(a)teldat.com>
Signed-off-by: David Ahern <dsahern(a)gmail.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
index 139c61c8244a..ac40924fe437 100644
--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
@@ -578,12 +578,13 @@ static int vrf_finish_output(struct net *net, struct sock *sk, struct sk_buff *s
if (!IS_ERR(neigh)) {
sock_confirm_neigh(skb, neigh);
ret = neigh_output(neigh, skb);
+ rcu_read_unlock_bh();
+ return ret;
}
rcu_read_unlock_bh();
err:
- if (unlikely(ret < 0))
- vrf_tx_error(skb->dev, skb);
+ vrf_tx_error(skb->dev, skb);
return ret;
}
Hi,
[This is an automated email]
This commit has been processed because it contains a "Fixes:" tag,
fixing commit: 2516035499b9 mm, thp: remove __GFP_NORETRY from khugepaged and madvised allocations.
The bot has also determined it's probably a bug fixing patch. (score: 12.0224)
The bot has tested the following trees: v4.16, v4.15.15, v4.14.32, v4.9.92.
v4.16: Build OK!
v4.15.15: Build OK!
v4.14.32: Build OK!
v4.9.92: Build OK!
--
Thanks,
Sasha
Tree/Branch: v4.9.93
Git describe: v4.9.93
Commit: d32da5bd9f Linux 4.9.93
Build Time: 82 min 46 sec
Passed: 8 / 11 ( 72.73 %)
Failed: 3 / 11 ( 27.27 %)
Errors: 37
Warnings: 2
Section Mismatches: 0
Failed defconfigs:
arm-multi_v7_defconfig
arm-allmodconfig
arm-multi_v5_defconfig
Errors:
arm-multi_v7_defconfig
../net/core/sock.c:691:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:890:7: error: 'SO_ATTACH_BPF' undeclared (first use in this function)
../net/core/sock.c:903:7: error: 'SO_ATTACH_REUSEPORT_CBPF' undeclared (first use in this function)
../net/core/sock.c:916:7: error: 'SO_ATTACH_REUSEPORT_EBPF' undeclared (first use in this function)
../net/core/sock.c:933:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:972:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:977:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:990:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:996:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1000:7: error: 'SO_CNX_ADVICE' undeclared (first use in this function)
../net/core/sock.c:1073:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:1231:7: error: 'SO_GET_FILTER' undeclared (first use in this function)
../net/core/sock.c:1238:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1242:7: error: 'SO_BPF_EXTENSIONS' undeclared (first use in this function)
../net/core/sock.c:1246:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1251:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1256:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1260:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/sunrpc/xprtsock.c:1758:38: error: 'SO_REUSEPORT' undeclared (first use in this function)
arm-allmodconfig
../net/core/sock.c:691:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:890:7: error: 'SO_ATTACH_BPF' undeclared (first use in this function)
../net/core/sock.c:903:7: error: 'SO_ATTACH_REUSEPORT_CBPF' undeclared (first use in this function)
../net/core/sock.c:916:7: error: 'SO_ATTACH_REUSEPORT_EBPF' undeclared (first use in this function)
../net/core/sock.c:933:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:972:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:977:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:990:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:996:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1000:7: error: 'SO_CNX_ADVICE' undeclared (first use in this function)
../net/core/sock.c:1073:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:1231:7: error: 'SO_GET_FILTER' undeclared (first use in this function)
../net/core/sock.c:1238:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1242:7: error: 'SO_BPF_EXTENSIONS' undeclared (first use in this function)
../net/core/sock.c:1246:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1251:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1256:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1260:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
Error: ../arch/arm/boot/dts/tegra20.dtsi:1.1-9 syntax error
Error: ../arch/arm/boot/dts/omap4.dtsi:9.1-9 syntax error
Error: ../arch/arm/boot/dts/emev2.dtsi:11.1-9 syntax error
Error: ../arch/arm/boot/dts/tegra20.dtsi:1.1-9 syntax error
Error: ../arch/arm/boot/dts/tegra20.dtsi:1.1-9 syntax error
../arch/arm/boot/dts/omap3-gta04.dts:132:57: error: unterminated comment
Error: ../arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts:203.16-17 syntax error
Error: ../arch/arm/boot/dts/tegra30.dtsi:1.1-9 syntax error
Error: ../arch/arm/boot/dts/tegra20.dtsi:1.1-9 syntax error
../arch/arm/boot/dts/ccu8540.dts:13:23: fatal error: dbx5x0.dtsi: No such file or directory
Error: ../arch/arm/boot/dts/r8a7790.dtsi:13.1-9 syntax error
Error: ../arch/arm/boot/dts/vf610-colibri.dts:91.5-6 syntax error
Error: ../arch/arm/boot/dts/tegra30.dtsi:1.1-9 syntax error
Error: ../arch/arm/boot/dts/omap4-panda.dts:10.1-9 syntax error
Error: ../arch/arm/boot/dts/tegra20.dtsi:1.1-9 syntax error
../net/sunrpc/xprtsock.c:1758:38: error: 'SO_REUSEPORT' undeclared (first use in this function)
../arch/arm/include/asm/parport.h:12:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'parport_pc_find_isa_ports'
../arch/arm/include/asm/parport.h:13:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'parport_pc_find_nonpci_ports'
../drivers/parport/parport_pc.c:3070:2: error: implicit declaration of function 'parport_pc_find_nonpci_ports' [-Werror=implicit-function-declaration]
ERROR (phandle_references): Reference to non-existent node or label "tc3589x_gpio"
ERROR (phandle_references): Reference to non-existent node or label "tc3589x_gpio"
ERROR (phandle_references): Reference to non-existent node or label "tc3589x_gpio"
ERROR (phandle_references): Reference to non-existent node or label "tc3589x_gpio"
ERROR: Input tree has errors, aborting (use -f to force output)
ERROR (phandle_references): Reference to non-existent node or label "tc3589x_gpio"
ERROR: Input tree has errors, aborting (use -f to force output)
ERROR (phandle_references): Reference to non-existent node or label "mainpllclk"
ERROR (phandle_references): Reference to non-existent node or label "refclksys"
ERROR (phandle_references): Reference to non-existent node or label "papllclk"
ERROR: Input tree has errors, aborting (use -f to force output)
arm-multi_v5_defconfig
../net/core/sock.c:691:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:890:7: error: 'SO_ATTACH_BPF' undeclared (first use in this function)
../net/core/sock.c:903:7: error: 'SO_ATTACH_REUSEPORT_CBPF' undeclared (first use in this function)
../net/core/sock.c:916:7: error: 'SO_ATTACH_REUSEPORT_EBPF' undeclared (first use in this function)
../net/core/sock.c:933:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:972:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:977:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:990:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:996:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1000:7: error: 'SO_CNX_ADVICE' undeclared (first use in this function)
../net/core/sock.c:1073:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:1231:7: error: 'SO_GET_FILTER' undeclared (first use in this function)
../net/core/sock.c:1238:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1242:7: error: 'SO_BPF_EXTENSIONS' undeclared (first use in this function)
../net/core/sock.c:1246:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1251:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1256:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1260:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/sunrpc/xprtsock.c:1758:38: error: 'SO_REUSEPORT' undeclared (first use in this function)
-------------------------------------------------------------------------------
defconfigs with issues (other than build errors):
1 warnings 0 mismatches : x86_64-allmodconfig
1 warnings 0 mismatches : arm64-allmodconfig
-------------------------------------------------------------------------------
Errors summary: 37
5 Error: ../arch/arm/boot/dts/tegra20.dtsi:1.1-9 syntax error
5 ERROR (phandle_references): Reference to non-existent node or label "tc3589x_gpio"
3 ERROR: Input tree has errors, aborting (use -f to force output)
3 ../net/sunrpc/xprtsock.c:1758:38: error: 'SO_REUSEPORT' undeclared (first use in this function)
3 ../net/core/sock.c:996:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
3 ../net/core/sock.c:990:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
3 ../net/core/sock.c:977:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
3 ../net/core/sock.c:972:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
3 ../net/core/sock.c:933:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
3 ../net/core/sock.c:916:7: error: 'SO_ATTACH_REUSEPORT_EBPF' undeclared (first use in this function)
3 ../net/core/sock.c:903:7: error: 'SO_ATTACH_REUSEPORT_CBPF' undeclared (first use in this function)
3 ../net/core/sock.c:890:7: error: 'SO_ATTACH_BPF' undeclared (first use in this function)
3 ../net/core/sock.c:691:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
3 ../net/core/sock.c:1260:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
3 ../net/core/sock.c:1256:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
3 ../net/core/sock.c:1251:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
3 ../net/core/sock.c:1246:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
3 ../net/core/sock.c:1242:7: error: 'SO_BPF_EXTENSIONS' undeclared (first use in this function)
3 ../net/core/sock.c:1238:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
3 ../net/core/sock.c:1231:7: error: 'SO_GET_FILTER' undeclared (first use in this function)
3 ../net/core/sock.c:1073:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
3 ../net/core/sock.c:1000:7: error: 'SO_CNX_ADVICE' undeclared (first use in this function)
2 Error: ../arch/arm/boot/dts/tegra30.dtsi:1.1-9 syntax error
1 Error: ../arch/arm/boot/dts/vf610-colibri.dts:91.5-6 syntax error
1 Error: ../arch/arm/boot/dts/r8a7790.dtsi:13.1-9 syntax error
1 Error: ../arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts:203.16-17 syntax error
1 Error: ../arch/arm/boot/dts/omap4.dtsi:9.1-9 syntax error
1 Error: ../arch/arm/boot/dts/omap4-panda.dts:10.1-9 syntax error
1 Error: ../arch/arm/boot/dts/emev2.dtsi:11.1-9 syntax error
1 ERROR (phandle_references): Reference to non-existent node or label "refclksys"
1 ERROR (phandle_references): Reference to non-existent node or label "papllclk"
1 ERROR (phandle_references): Reference to non-existent node or label "mainpllclk"
1 ../drivers/parport/parport_pc.c:3070:2: error: implicit declaration of function 'parport_pc_find_nonpci_ports' [-Werror=implicit-function-declaration]
1 ../arch/arm/include/asm/parport.h:13:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'parport_pc_find_nonpci_ports'
1 ../arch/arm/include/asm/parport.h:12:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'parport_pc_find_isa_ports'
1 ../arch/arm/boot/dts/omap3-gta04.dts:132:57: error: unterminated comment
1 ../arch/arm/boot/dts/ccu8540.dts:13:23: fatal error: dbx5x0.dtsi: No such file or directory
Warnings Summary: 2
1 drivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0x78b: sibling call from callable instruction with changed frame pointer
1 ../include/linux/sched.h:2348:56: warning: 'noio_flag' may be used uninitialized in this function [-Wmaybe-uninitialized]
===============================================================================
Detailed per-defconfig build reports below:
-------------------------------------------------------------------------------
x86_64-allmodconfig : PASS, 0 errors, 1 warnings, 0 section mismatches
Warnings:
drivers/target/iscsi/iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0x78b: sibling call from callable instruction with changed frame pointer
-------------------------------------------------------------------------------
arm64-allmodconfig : PASS, 0 errors, 1 warnings, 0 section mismatches
Warnings:
../include/linux/sched.h:2348:56: warning: 'noio_flag' may be used uninitialized in this function [-Wmaybe-uninitialized]
-------------------------------------------------------------------------------
arm-multi_v7_defconfig : FAIL, 19 errors, 0 warnings, 0 section mismatches
Errors:
../net/core/sock.c:691:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:890:7: error: 'SO_ATTACH_BPF' undeclared (first use in this function)
../net/core/sock.c:903:7: error: 'SO_ATTACH_REUSEPORT_CBPF' undeclared (first use in this function)
../net/core/sock.c:916:7: error: 'SO_ATTACH_REUSEPORT_EBPF' undeclared (first use in this function)
../net/core/sock.c:933:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:972:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:977:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:990:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:996:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1000:7: error: 'SO_CNX_ADVICE' undeclared (first use in this function)
../net/core/sock.c:1073:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:1231:7: error: 'SO_GET_FILTER' undeclared (first use in this function)
../net/core/sock.c:1238:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1242:7: error: 'SO_BPF_EXTENSIONS' undeclared (first use in this function)
../net/core/sock.c:1246:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1251:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1256:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1260:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/sunrpc/xprtsock.c:1758:38: error: 'SO_REUSEPORT' undeclared (first use in this function)
-------------------------------------------------------------------------------
arm-allmodconfig : FAIL, 48 errors, 0 warnings, 0 section mismatches
Errors:
../net/core/sock.c:691:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:890:7: error: 'SO_ATTACH_BPF' undeclared (first use in this function)
../net/core/sock.c:903:7: error: 'SO_ATTACH_REUSEPORT_CBPF' undeclared (first use in this function)
../net/core/sock.c:916:7: error: 'SO_ATTACH_REUSEPORT_EBPF' undeclared (first use in this function)
../net/core/sock.c:933:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:972:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:977:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:990:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:996:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1000:7: error: 'SO_CNX_ADVICE' undeclared (first use in this function)
../net/core/sock.c:1073:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:1231:7: error: 'SO_GET_FILTER' undeclared (first use in this function)
../net/core/sock.c:1238:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1242:7: error: 'SO_BPF_EXTENSIONS' undeclared (first use in this function)
../net/core/sock.c:1246:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1251:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1256:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1260:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
Error: ../arch/arm/boot/dts/tegra20.dtsi:1.1-9 syntax error
Error: ../arch/arm/boot/dts/omap4.dtsi:9.1-9 syntax error
Error: ../arch/arm/boot/dts/emev2.dtsi:11.1-9 syntax error
Error: ../arch/arm/boot/dts/tegra20.dtsi:1.1-9 syntax error
Error: ../arch/arm/boot/dts/tegra20.dtsi:1.1-9 syntax error
../arch/arm/boot/dts/omap3-gta04.dts:132:57: error: unterminated comment
Error: ../arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts:203.16-17 syntax error
Error: ../arch/arm/boot/dts/tegra30.dtsi:1.1-9 syntax error
Error: ../arch/arm/boot/dts/tegra20.dtsi:1.1-9 syntax error
../arch/arm/boot/dts/ccu8540.dts:13:23: fatal error: dbx5x0.dtsi: No such file or directory
Error: ../arch/arm/boot/dts/r8a7790.dtsi:13.1-9 syntax error
Error: ../arch/arm/boot/dts/vf610-colibri.dts:91.5-6 syntax error
Error: ../arch/arm/boot/dts/tegra30.dtsi:1.1-9 syntax error
Error: ../arch/arm/boot/dts/omap4-panda.dts:10.1-9 syntax error
Error: ../arch/arm/boot/dts/tegra20.dtsi:1.1-9 syntax error
../net/sunrpc/xprtsock.c:1758:38: error: 'SO_REUSEPORT' undeclared (first use in this function)
../arch/arm/include/asm/parport.h:12:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'parport_pc_find_isa_ports'
../arch/arm/include/asm/parport.h:13:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'parport_pc_find_nonpci_ports'
../drivers/parport/parport_pc.c:3070:2: error: implicit declaration of function 'parport_pc_find_nonpci_ports' [-Werror=implicit-function-declaration]
ERROR (phandle_references): Reference to non-existent node or label "tc3589x_gpio"
ERROR (phandle_references): Reference to non-existent node or label "tc3589x_gpio"
ERROR (phandle_references): Reference to non-existent node or label "tc3589x_gpio"
ERROR (phandle_references): Reference to non-existent node or label "tc3589x_gpio"
ERROR: Input tree has errors, aborting (use -f to force output)
ERROR (phandle_references): Reference to non-existent node or label "tc3589x_gpio"
ERROR: Input tree has errors, aborting (use -f to force output)
ERROR (phandle_references): Reference to non-existent node or label "mainpllclk"
ERROR (phandle_references): Reference to non-existent node or label "refclksys"
ERROR (phandle_references): Reference to non-existent node or label "papllclk"
ERROR: Input tree has errors, aborting (use -f to force output)
-------------------------------------------------------------------------------
arm-multi_v5_defconfig : FAIL, 19 errors, 0 warnings, 0 section mismatches
Errors:
../net/core/sock.c:691:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:890:7: error: 'SO_ATTACH_BPF' undeclared (first use in this function)
../net/core/sock.c:903:7: error: 'SO_ATTACH_REUSEPORT_CBPF' undeclared (first use in this function)
../net/core/sock.c:916:7: error: 'SO_ATTACH_REUSEPORT_EBPF' undeclared (first use in this function)
../net/core/sock.c:933:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:972:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:977:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:990:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:996:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1000:7: error: 'SO_CNX_ADVICE' undeclared (first use in this function)
../net/core/sock.c:1073:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:1231:7: error: 'SO_GET_FILTER' undeclared (first use in this function)
../net/core/sock.c:1238:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1242:7: error: 'SO_BPF_EXTENSIONS' undeclared (first use in this function)
../net/core/sock.c:1246:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1251:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1256:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1260:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/sunrpc/xprtsock.c:1758:38: error: 'SO_REUSEPORT' undeclared (first use in this function)
-------------------------------------------------------------------------------
Passed with no errors, warnings or mismatches:
arm64-allnoconfig
x86_64-defconfig
arm-allnoconfig
x86_64-allnoconfig
arm-multi_v4t_defconfig
arm64-defconfig
This is a note to let you know that I've just added the patch titled
vti6: better validate user provided tunnel names
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:
vti6-better-validate-user-provided-tunnel-names.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 Wed Apr 11 10:26:56 CEST 2018
From: Eric Dumazet <edumazet(a)google.com>
Date: Thu, 5 Apr 2018 06:39:31 -0700
Subject: vti6: better validate user provided tunnel names
From: Eric Dumazet <edumazet(a)google.com>
[ Upstream commit 537b361fbcbcc3cd6fe2bb47069fd292b9256d16 ]
Use valid_name() to make sure user does not provide illegal
device name.
Fixes: ed1efb2aefbb ("ipv6: Add support for IPsec virtual tunnel interfaces")
Signed-off-by: Eric Dumazet <edumazet(a)google.com>
Cc: Steffen Klassert <steffen.klassert(a)secunet.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/ipv6/ip6_vti.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--- a/net/ipv6/ip6_vti.c
+++ b/net/ipv6/ip6_vti.c
@@ -212,10 +212,13 @@ static struct ip6_tnl *vti6_tnl_create(s
char name[IFNAMSIZ];
int err;
- if (p->name[0])
+ if (p->name[0]) {
+ if (!dev_valid_name(p->name))
+ goto failed;
strlcpy(name, p->name, IFNAMSIZ);
- else
+ } else {
sprintf(name, "ip6_vti%%d");
+ }
dev = alloc_netdev(sizeof(*t), name, NET_NAME_UNKNOWN, vti6_dev_setup);
if (!dev)
Patches currently in stable-queue which might be from edumazet(a)google.com are
queue-4.9/tcp-better-validation-of-received-ack-sequences.patch
queue-4.9/sctp-sctp_sockaddr_af-must-check-minimal-addr-length-for-af_inet6.patch
queue-4.9/net-fix-possible-out-of-bound-read-in-skb_network_protocol.patch
queue-4.9/pptp-remove-a-buggy-dst-release-in-pptp_connect.patch
queue-4.9/x86-asm-don-t-use-rbp-as-a-temporary-register-in-csum_partial_copy_generic.patch
queue-4.9/net-fool-proof-dev_valid_name.patch
queue-4.9/ipv6-the-entire-ipv6-header-chain-must-fit-the-first-fragment.patch
queue-4.9/vti6-better-validate-user-provided-tunnel-names.patch
queue-4.9/ipv6-sit-better-validate-user-provided-tunnel-names.patch
queue-4.9/ip6_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.9/sctp-do-not-leak-kernel-memory-to-user-space.patch
queue-4.9/ip_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.9/skbuff-only-inherit-relevant-tx_flags.patch
queue-4.9/netlink-make-sure-nladdr-has-correct-size-in-netlink_connect.patch
queue-4.9/ip6_gre-better-validate-user-provided-tunnel-names.patch
This is a note to let you know that I've just added the patch titled
vhost_net: add missing lock nesting notation
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:
vhost_net-add-missing-lock-nesting-notation.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 Wed Apr 11 10:26:56 CEST 2018
From: Jason Wang <jasowang(a)redhat.com>
Date: Mon, 26 Mar 2018 16:10:23 +0800
Subject: vhost_net: add missing lock nesting notation
From: Jason Wang <jasowang(a)redhat.com>
[ Upstream commit aaa3149bbee9ba9b4e6f0bd6e3e7d191edeae942 ]
We try to hold TX virtqueue mutex in vhost_net_rx_peek_head_len()
after RX virtqueue mutex is held in handle_rx(). This requires an
appropriate lock nesting notation to calm down deadlock detector.
Fixes: 0308813724606 ("vhost_net: basic polling support")
Reported-by: syzbot+7f073540b1384a614e09(a)syzkaller.appspotmail.com
Signed-off-by: Jason Wang <jasowang(a)redhat.com>
Acked-by: Michael S. Tsirkin <mst(a)redhat.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/vhost/net.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -524,7 +524,7 @@ static int vhost_net_rx_peek_head_len(st
if (!len && vq->busyloop_timeout) {
/* Both tx vq and rx socket were polled here */
- mutex_lock(&vq->mutex);
+ mutex_lock_nested(&vq->mutex, 1);
vhost_disable_notify(&net->dev, vq);
preempt_disable();
@@ -657,7 +657,7 @@ static void handle_rx(struct vhost_net *
struct iov_iter fixup;
__virtio16 num_buffers;
- mutex_lock(&vq->mutex);
+ mutex_lock_nested(&vq->mutex, 0);
sock = vq->private_data;
if (!sock)
goto out;
Patches currently in stable-queue which might be from jasowang(a)redhat.com are
queue-4.9/skbuff-return-emsgsize-in-skb_to_sgvec-to-prevent-overflow.patch
queue-4.9/virtio_net-check-return-value-of-skb_to_sgvec-always.patch
queue-4.9/vhost-validate-log-when-iotlb-is-enabled.patch
queue-4.9/vhost_net-add-missing-lock-nesting-notation.patch
queue-4.9/vhost-correctly-remove-wait-queue-during-poll-failure.patch
queue-4.9/virtio_net-check-return-value-of-skb_to_sgvec-in-one-more-location.patch
This is a note to let you know that I've just added the patch titled
vlan: also check phy_driver ts_info for vlan's real device
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:
vlan-also-check-phy_driver-ts_info-for-vlan-s-real-device.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 Wed Apr 11 10:26:56 CEST 2018
From: Hangbin Liu <liuhangbin(a)gmail.com>
Date: Fri, 30 Mar 2018 09:44:00 +0800
Subject: vlan: also check phy_driver ts_info for vlan's real device
From: Hangbin Liu <liuhangbin(a)gmail.com>
[ Upstream commit ec1d8ccb07deaf30fd0508af6755364ac47dc08d ]
Just like function ethtool_get_ts_info(), we should also consider the
phy_driver ts_info call back. For example, driver dp83640.
Fixes: 37dd9255b2f6 ("vlan: Pass ethtool get_ts_info queries to real device.")
Acked-by: Richard Cochran <richardcochran(a)gmail.com>
Signed-off-by: Hangbin Liu <liuhangbin(a)gmail.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/8021q/vlan_dev.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -29,6 +29,7 @@
#include <linux/net_tstamp.h>
#include <linux/etherdevice.h>
#include <linux/ethtool.h>
+#include <linux/phy.h>
#include <net/arp.h>
#include <net/switchdev.h>
@@ -658,8 +659,11 @@ static int vlan_ethtool_get_ts_info(stru
{
const struct vlan_dev_priv *vlan = vlan_dev_priv(dev);
const struct ethtool_ops *ops = vlan->real_dev->ethtool_ops;
+ struct phy_device *phydev = vlan->real_dev->phydev;
- if (ops->get_ts_info) {
+ if (phydev && phydev->drv && phydev->drv->ts_info) {
+ return phydev->drv->ts_info(phydev, info);
+ } else if (ops->get_ts_info) {
return ops->get_ts_info(vlan->real_dev, info);
} else {
info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE |
Patches currently in stable-queue which might be from liuhangbin(a)gmail.com are
queue-4.9/vlan-also-check-phy_driver-ts_info-for-vlan-s-real-device.patch
queue-4.9/l2tp-fix-missing-print-session-offset-info.patch
This is a note to let you know that I've just added the patch titled
vhost: validate log when IOTLB is enabled
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:
vhost-validate-log-when-iotlb-is-enabled.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 Wed Apr 11 10:26:56 CEST 2018
From: Jason Wang <jasowang(a)redhat.com>
Date: Thu, 29 Mar 2018 16:00:04 +0800
Subject: vhost: validate log when IOTLB is enabled
From: Jason Wang <jasowang(a)redhat.com>
[ Upstream commit d65026c6c62e7d9616c8ceb5a53b68bcdc050525 ]
Vq log_base is the userspace address of bitmap which has nothing to do
with IOTLB. So it needs to be validated unconditionally otherwise we
may try use 0 as log_base which may lead to pin pages that will lead
unexpected result (e.g trigger BUG_ON() in set_bit_to_user()).
Fixes: 6b1e6cc7855b0 ("vhost: new device IOTLB API")
Reported-by: syzbot+6304bf97ef436580fede(a)syzkaller.appspotmail.com
Signed-off-by: Jason Wang <jasowang(a)redhat.com>
Acked-by: Michael S. Tsirkin <mst(a)redhat.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/vhost/vhost.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -1175,14 +1175,12 @@ static int vq_log_access_ok(struct vhost
/* Caller should have vq mutex and device mutex */
int vhost_vq_access_ok(struct vhost_virtqueue *vq)
{
- if (vq->iotlb) {
- /* When device IOTLB was used, the access validation
- * will be validated during prefetching.
- */
- return 1;
- }
- return vq_access_ok(vq, vq->num, vq->desc, vq->avail, vq->used) &&
- vq_log_access_ok(vq, vq->log_base);
+ int ret = vq_log_access_ok(vq, vq->log_base);
+
+ if (ret || vq->iotlb)
+ return ret;
+
+ return vq_access_ok(vq, vq->num, vq->desc, vq->avail, vq->used);
}
EXPORT_SYMBOL_GPL(vhost_vq_access_ok);
Patches currently in stable-queue which might be from jasowang(a)redhat.com are
queue-4.9/skbuff-return-emsgsize-in-skb_to_sgvec-to-prevent-overflow.patch
queue-4.9/virtio_net-check-return-value-of-skb_to_sgvec-always.patch
queue-4.9/vhost-validate-log-when-iotlb-is-enabled.patch
queue-4.9/vhost_net-add-missing-lock-nesting-notation.patch
queue-4.9/vhost-correctly-remove-wait-queue-during-poll-failure.patch
queue-4.9/virtio_net-check-return-value-of-skb_to_sgvec-in-one-more-location.patch
This is a note to let you know that I've just added the patch titled
vhost: correctly remove wait queue during poll failure
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:
vhost-correctly-remove-wait-queue-during-poll-failure.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 Wed Apr 11 10:26:56 CEST 2018
From: Jason Wang <jasowang(a)redhat.com>
Date: Tue, 27 Mar 2018 20:50:52 +0800
Subject: vhost: correctly remove wait queue during poll failure
From: Jason Wang <jasowang(a)redhat.com>
[ Upstream commit dc6455a71c7fc5117977e197f67f71b49f27baba ]
We tried to remove vq poll from wait queue, but do not check whether
or not it was in a list before. This will lead double free. Fixing
this by switching to use vhost_poll_stop() which zeros poll->wqh after
removing poll from waitqueue to make sure it won't be freed twice.
Cc: Darren Kenny <darren.kenny(a)oracle.com>
Reported-by: syzbot+c0272972b01b872e604a(a)syzkaller.appspotmail.com
Fixes: 2b8b328b61c79 ("vhost_net: handle polling errors when setting backend")
Signed-off-by: Jason Wang <jasowang(a)redhat.com>
Reviewed-by: Darren Kenny <darren.kenny(a)oracle.com>
Acked-by: Michael S. Tsirkin <mst(a)redhat.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/vhost/vhost.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -211,8 +211,7 @@ int vhost_poll_start(struct vhost_poll *
if (mask)
vhost_poll_wakeup(&poll->wait, 0, 0, (void *)mask);
if (mask & POLLERR) {
- if (poll->wqh)
- remove_wait_queue(poll->wqh, &poll->wait);
+ vhost_poll_stop(poll);
ret = -EINVAL;
}
Patches currently in stable-queue which might be from jasowang(a)redhat.com are
queue-4.9/skbuff-return-emsgsize-in-skb_to_sgvec-to-prevent-overflow.patch
queue-4.9/virtio_net-check-return-value-of-skb_to_sgvec-always.patch
queue-4.9/vhost-validate-log-when-iotlb-is-enabled.patch
queue-4.9/vhost_net-add-missing-lock-nesting-notation.patch
queue-4.9/vhost-correctly-remove-wait-queue-during-poll-failure.patch
queue-4.9/virtio_net-check-return-value-of-skb_to_sgvec-in-one-more-location.patch
This is a note to let you know that I've just added the patch titled
team: move dev_mc_sync after master_upper_dev_link in team_port_add
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:
team-move-dev_mc_sync-after-master_upper_dev_link-in-team_port_add.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 Wed Apr 11 10:26:56 CEST 2018
From: Xin Long <lucien.xin(a)gmail.com>
Date: Mon, 26 Mar 2018 01:25:06 +0800
Subject: team: move dev_mc_sync after master_upper_dev_link in team_port_add
From: Xin Long <lucien.xin(a)gmail.com>
[ Upstream commit 982cf3b3999d39a2eaca0a65542df33c19b5d814 ]
The same fix as in 'bonding: move dev_mc_sync after master_upper_dev_link
in bond_enslave' is needed for team driver.
The panic can be reproduced easily:
ip link add team1 type team
ip link set team1 up
ip link add link team1 vlan1 type vlan id 80
ip link set vlan1 master team1
Fixes: cb41c997d444 ("team: team should sync the port's uc/mc addrs when add a port")
Signed-off-by: Xin Long <lucien.xin(a)gmail.com>
Acked-by: Jiri Pirko <jiri(a)mellanox.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/team/team.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -1203,11 +1203,6 @@ static int team_port_add(struct team *te
goto err_dev_open;
}
- netif_addr_lock_bh(dev);
- dev_uc_sync_multiple(port_dev, dev);
- dev_mc_sync_multiple(port_dev, dev);
- netif_addr_unlock_bh(dev);
-
err = vlan_vids_add_by_dev(port_dev, dev);
if (err) {
netdev_err(dev, "Failed to add vlan ids to device %s\n",
@@ -1247,6 +1242,11 @@ static int team_port_add(struct team *te
goto err_option_port_add;
}
+ netif_addr_lock_bh(dev);
+ dev_uc_sync_multiple(port_dev, dev);
+ dev_mc_sync_multiple(port_dev, dev);
+ netif_addr_unlock_bh(dev);
+
port->index = -1;
list_add_tail_rcu(&port->list, &team->port_list);
team_port_enable(team, port);
@@ -1271,8 +1271,6 @@ err_enable_netpoll:
vlan_vids_del_by_dev(port_dev, dev);
err_vids_add:
- dev_uc_unsync(port_dev, dev);
- dev_mc_unsync(port_dev, dev);
dev_close(port_dev);
err_dev_open:
Patches currently in stable-queue which might be from lucien.xin(a)gmail.com are
queue-4.9/team-move-dev_mc_sync-after-master_upper_dev_link-in-team_port_add.patch
queue-4.9/bonding-process-the-err-returned-by-dev_set_allmulti-properly-in-bond_enslave.patch
queue-4.9/bonding-fix-the-err-path-for-dev-hwaddr-sync-in-bond_enslave.patch
queue-4.9/bonding-move-dev_mc_sync-after-master_upper_dev_link-in-bond_enslave.patch
queue-4.9/route-check-sysctl_fib_multipath_use_neigh-earlier-than-hash.patch
queue-4.9/sctp-fix-recursive-locking-warning-in-sctp_do_peeloff.patch
This is a note to let you know that I've just added the patch titled
strparser: Fix sign of err codes
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:
strparser-fix-sign-of-err-codes.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 Wed Apr 11 10:26:56 CEST 2018
From: Dave Watson <davejwatson(a)fb.com>
Date: Mon, 26 Mar 2018 12:31:21 -0700
Subject: strparser: Fix sign of err codes
From: Dave Watson <davejwatson(a)fb.com>
[ Upstream commit cd00edc179863848abab5cc5683de5b7b5f70954 ]
strp_parser_err is called with a negative code everywhere, which then
calls abort_parser with a negative code. strp_msg_timeout calls
abort_parser directly with a positive code. Negate ETIMEDOUT
to match signed-ness of other calls.
The default abort_parser callback, strp_abort_strp, sets
sk->sk_err to err. Also negate the error here so sk_err always
holds a positive value, as the rest of the net code expects. Currently
a negative sk_err can result in endless loops, or user code that
thinks it actually sent/received err bytes.
Found while testing net/tls_sw recv path.
Fixes: 43a0c6751a322847 ("strparser: Stream parser for messages")
Signed-off-by: Dave Watson <davejwatson(a)fb.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/strparser/strparser.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/net/strparser/strparser.c
+++ b/net/strparser/strparser.c
@@ -59,7 +59,7 @@ static void strp_abort_rx_strp(struct st
strp->rx_stopped = 1;
/* Report an error on the lower socket */
- csk->sk_err = err;
+ csk->sk_err = -err;
csk->sk_error_report(csk);
}
@@ -422,7 +422,7 @@ static void strp_rx_msg_timeout(unsigned
/* Message assembly timed out */
STRP_STATS_INCR(strp->stats.rx_msg_timeouts);
lock_sock(strp->sk);
- strp->cb.abort_parser(strp, ETIMEDOUT);
+ strp->cb.abort_parser(strp, -ETIMEDOUT);
release_sock(strp->sk);
}
Patches currently in stable-queue which might be from davejwatson(a)fb.com are
queue-4.9/strparser-fix-sign-of-err-codes.patch
This is a note to let you know that I've just added the patch titled
sky2: Increase D3 delay to sky2 stops working after suspend
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:
sky2-increase-d3-delay-to-sky2-stops-working-after-suspend.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 Wed Apr 11 10:26:56 CEST 2018
From: Kai-Heng Feng <kai.heng.feng(a)canonical.com>
Date: Sat, 31 Mar 2018 23:42:03 +0800
Subject: sky2: Increase D3 delay to sky2 stops working after suspend
From: Kai-Heng Feng <kai.heng.feng(a)canonical.com>
[ Upstream commit afb133637071be6deeb8b3d0e55593ffbf63c527 ]
The sky2 ethernet stops working after system resume from suspend:
[ 582.852065] sky2 0000:04:00.0: Refused to change power state, currently in D3
The current 150ms delay is not enough, change it to 200ms can solve the
issue.
BugLink: https://bugs.launchpad.net/bugs/1758507
Cc: Stable <stable(a)vger.kernel.org>
Signed-off-by: Kai-Heng Feng <kai.heng.feng(a)canonical.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/ethernet/marvell/sky2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/ethernet/marvell/sky2.c
+++ b/drivers/net/ethernet/marvell/sky2.c
@@ -5079,7 +5079,7 @@ static int sky2_probe(struct pci_dev *pd
INIT_WORK(&hw->restart_work, sky2_restart);
pci_set_drvdata(pdev, hw);
- pdev->d3_delay = 150;
+ pdev->d3_delay = 200;
return 0;
Patches currently in stable-queue which might be from kai.heng.feng(a)canonical.com are
queue-4.9/sky2-increase-d3-delay-to-sky2-stops-working-after-suspend.patch
This is a note to let you know that I've just added the patch titled
sctp: sctp_sockaddr_af must check minimal addr length for AF_INET6
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:
sctp-sctp_sockaddr_af-must-check-minimal-addr-length-for-af_inet6.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 Wed Apr 11 10:26:56 CEST 2018
From: Eric Dumazet <edumazet(a)google.com>
Date: Sun, 8 Apr 2018 07:52:08 -0700
Subject: sctp: sctp_sockaddr_af must check minimal addr length for AF_INET6
From: Eric Dumazet <edumazet(a)google.com>
[ Upstream commit 81e98370293afcb58340ce8bd71af7b97f925c26 ]
Check must happen before call to ipv6_addr_v4mapped()
syzbot report was :
BUG: KMSAN: uninit-value in sctp_sockaddr_af net/sctp/socket.c:359 [inline]
BUG: KMSAN: uninit-value in sctp_do_bind+0x60f/0xdc0 net/sctp/socket.c:384
CPU: 0 PID: 3576 Comm: syzkaller968804 Not tainted 4.16.0+ #82
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x185/0x1d0 lib/dump_stack.c:53
kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067
__msan_warning_32+0x6c/0xb0 mm/kmsan/kmsan_instr.c:676
sctp_sockaddr_af net/sctp/socket.c:359 [inline]
sctp_do_bind+0x60f/0xdc0 net/sctp/socket.c:384
sctp_bind+0x149/0x190 net/sctp/socket.c:332
inet6_bind+0x1fd/0x1820 net/ipv6/af_inet6.c:293
SYSC_bind+0x3f2/0x4b0 net/socket.c:1474
SyS_bind+0x54/0x80 net/socket.c:1460
do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x3d/0xa2
RIP: 0033:0x43fd49
RSP: 002b:00007ffe99df3d28 EFLAGS: 00000213 ORIG_RAX: 0000000000000031
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 000000000043fd49
RDX: 0000000000000010 RSI: 0000000020000000 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 00000000004002c8 R09: 00000000004002c8
R10: 00000000004002c8 R11: 0000000000000213 R12: 0000000000401670
R13: 0000000000401700 R14: 0000000000000000 R15: 0000000000000000
Local variable description: ----address@SYSC_bind
Variable was created at:
SYSC_bind+0x6f/0x4b0 net/socket.c:1461
SyS_bind+0x54/0x80 net/socket.c:1460
Signed-off-by: Eric Dumazet <edumazet(a)google.com>
Cc: Vlad Yasevich <vyasevich(a)gmail.com>
Cc: Neil Horman <nhorman(a)tuxdriver.com>
Reported-by: syzbot <syzkaller(a)googlegroups.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/sctp/socket.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -335,11 +335,14 @@ static struct sctp_af *sctp_sockaddr_af(
if (!opt->pf->af_supported(addr->sa.sa_family, opt))
return NULL;
- /* V4 mapped address are really of AF_INET family */
- if (addr->sa.sa_family == AF_INET6 &&
- ipv6_addr_v4mapped(&addr->v6.sin6_addr) &&
- !opt->pf->af_supported(AF_INET, opt))
- return NULL;
+ if (addr->sa.sa_family == AF_INET6) {
+ if (len < SIN6_LEN_RFC2133)
+ return NULL;
+ /* V4 mapped address are really of AF_INET family */
+ if (ipv6_addr_v4mapped(&addr->v6.sin6_addr) &&
+ !opt->pf->af_supported(AF_INET, opt))
+ return NULL;
+ }
/* If we get this far, af is valid. */
af = sctp_get_af_specific(addr->sa.sa_family);
Patches currently in stable-queue which might be from edumazet(a)google.com are
queue-4.9/tcp-better-validation-of-received-ack-sequences.patch
queue-4.9/sctp-sctp_sockaddr_af-must-check-minimal-addr-length-for-af_inet6.patch
queue-4.9/net-fix-possible-out-of-bound-read-in-skb_network_protocol.patch
queue-4.9/pptp-remove-a-buggy-dst-release-in-pptp_connect.patch
queue-4.9/x86-asm-don-t-use-rbp-as-a-temporary-register-in-csum_partial_copy_generic.patch
queue-4.9/net-fool-proof-dev_valid_name.patch
queue-4.9/ipv6-the-entire-ipv6-header-chain-must-fit-the-first-fragment.patch
queue-4.9/vti6-better-validate-user-provided-tunnel-names.patch
queue-4.9/ipv6-sit-better-validate-user-provided-tunnel-names.patch
queue-4.9/ip6_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.9/sctp-do-not-leak-kernel-memory-to-user-space.patch
queue-4.9/ip_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.9/skbuff-only-inherit-relevant-tx_flags.patch
queue-4.9/netlink-make-sure-nladdr-has-correct-size-in-netlink_connect.patch
queue-4.9/ip6_gre-better-validate-user-provided-tunnel-names.patch
This is a note to let you know that I've just added the patch titled
sctp: do not leak kernel memory to user space
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:
sctp-do-not-leak-kernel-memory-to-user-space.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 Wed Apr 11 10:26:56 CEST 2018
From: Eric Dumazet <edumazet(a)google.com>
Date: Sat, 7 Apr 2018 17:15:22 -0700
Subject: sctp: do not leak kernel memory to user space
From: Eric Dumazet <edumazet(a)google.com>
[ Upstream commit 6780db244d6b1537d139dea0ec8aad10cf9e4adb ]
syzbot produced a nice report [1]
Issue here is that a recvmmsg() managed to leak 8 bytes of kernel memory
to user space, because sin_zero (padding field) was not properly cleared.
[1]
BUG: KMSAN: uninit-value in copy_to_user include/linux/uaccess.h:184 [inline]
BUG: KMSAN: uninit-value in move_addr_to_user+0x32e/0x530 net/socket.c:227
CPU: 1 PID: 3586 Comm: syzkaller481044 Not tainted 4.16.0+ #82
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x185/0x1d0 lib/dump_stack.c:53
kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067
kmsan_internal_check_memory+0x164/0x1d0 mm/kmsan/kmsan.c:1176
kmsan_copy_to_user+0x69/0x160 mm/kmsan/kmsan.c:1199
copy_to_user include/linux/uaccess.h:184 [inline]
move_addr_to_user+0x32e/0x530 net/socket.c:227
___sys_recvmsg+0x4e2/0x810 net/socket.c:2211
__sys_recvmmsg+0x54e/0xdb0 net/socket.c:2313
SYSC_recvmmsg+0x29b/0x3e0 net/socket.c:2394
SyS_recvmmsg+0x76/0xa0 net/socket.c:2378
do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x3d/0xa2
RIP: 0033:0x4401c9
RSP: 002b:00007ffc56f73098 EFLAGS: 00000217 ORIG_RAX: 000000000000012b
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 00000000004401c9
RDX: 0000000000000001 RSI: 0000000020003ac0 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 0000000020003bc0 R09: 0000000000000010
R10: 0000000000000000 R11: 0000000000000217 R12: 0000000000401af0
R13: 0000000000401b80 R14: 0000000000000000 R15: 0000000000000000
Local variable description: ----addr@___sys_recvmsg
Variable was created at:
___sys_recvmsg+0xd5/0x810 net/socket.c:2172
__sys_recvmmsg+0x54e/0xdb0 net/socket.c:2313
Bytes 8-15 of 16 are uninitialized
==================================================================
Kernel panic - not syncing: panic_on_warn set ...
CPU: 1 PID: 3586 Comm: syzkaller481044 Tainted: G B 4.16.0+ #82
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x185/0x1d0 lib/dump_stack.c:53
panic+0x39d/0x940 kernel/panic.c:183
kmsan_report+0x238/0x240 mm/kmsan/kmsan.c:1083
kmsan_internal_check_memory+0x164/0x1d0 mm/kmsan/kmsan.c:1176
kmsan_copy_to_user+0x69/0x160 mm/kmsan/kmsan.c:1199
copy_to_user include/linux/uaccess.h:184 [inline]
move_addr_to_user+0x32e/0x530 net/socket.c:227
___sys_recvmsg+0x4e2/0x810 net/socket.c:2211
__sys_recvmmsg+0x54e/0xdb0 net/socket.c:2313
SYSC_recvmmsg+0x29b/0x3e0 net/socket.c:2394
SyS_recvmmsg+0x76/0xa0 net/socket.c:2378
do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x3d/0xa2
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Eric Dumazet <edumazet(a)google.com>
Cc: Vlad Yasevich <vyasevich(a)gmail.com>
Cc: Neil Horman <nhorman(a)tuxdriver.com>
Reported-by: syzbot <syzkaller(a)googlegroups.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/sctp/ipv6.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -727,8 +727,10 @@ static int sctp_v6_addr_to_user(struct s
sctp_v6_map_v4(addr);
}
- if (addr->sa.sa_family == AF_INET)
+ if (addr->sa.sa_family == AF_INET) {
+ memset(addr->v4.sin_zero, 0, sizeof(addr->v4.sin_zero));
return sizeof(struct sockaddr_in);
+ }
return sizeof(struct sockaddr_in6);
}
Patches currently in stable-queue which might be from edumazet(a)google.com are
queue-4.9/tcp-better-validation-of-received-ack-sequences.patch
queue-4.9/sctp-sctp_sockaddr_af-must-check-minimal-addr-length-for-af_inet6.patch
queue-4.9/net-fix-possible-out-of-bound-read-in-skb_network_protocol.patch
queue-4.9/pptp-remove-a-buggy-dst-release-in-pptp_connect.patch
queue-4.9/x86-asm-don-t-use-rbp-as-a-temporary-register-in-csum_partial_copy_generic.patch
queue-4.9/net-fool-proof-dev_valid_name.patch
queue-4.9/ipv6-the-entire-ipv6-header-chain-must-fit-the-first-fragment.patch
queue-4.9/vti6-better-validate-user-provided-tunnel-names.patch
queue-4.9/ipv6-sit-better-validate-user-provided-tunnel-names.patch
queue-4.9/ip6_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.9/sctp-do-not-leak-kernel-memory-to-user-space.patch
queue-4.9/ip_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.9/skbuff-only-inherit-relevant-tx_flags.patch
queue-4.9/netlink-make-sure-nladdr-has-correct-size-in-netlink_connect.patch
queue-4.9/ip6_gre-better-validate-user-provided-tunnel-names.patch
This is a note to let you know that I've just added the patch titled
route: check sysctl_fib_multipath_use_neigh earlier than hash
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:
route-check-sysctl_fib_multipath_use_neigh-earlier-than-hash.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 Wed Apr 11 10:26:56 CEST 2018
From: Xin Long <lucien.xin(a)gmail.com>
Date: Sun, 1 Apr 2018 22:40:35 +0800
Subject: route: check sysctl_fib_multipath_use_neigh earlier than hash
From: Xin Long <lucien.xin(a)gmail.com>
[ Upstream commit 6174a30df1b902e1fedbd728f5343937e83e64e6 ]
Prior to this patch, when one packet is hashed into path [1]
(hash <= nh_upper_bound) and it's neigh is dead, it will try
path [2]. However, if path [2]'s neigh is alive but it's
hash > nh_upper_bound, it will not return this alive path.
This packet will never be sent even if path [2] is alive.
3.3.3.1/24:
nexthop via 1.1.1.254 dev eth1 weight 1 <--[1] (dead neigh)
nexthop via 2.2.2.254 dev eth2 weight 1 <--[2]
With sysctl_fib_multipath_use_neigh set is supposed to find an
available path respecting to the l3/l4 hash. But if there is
no available route with this hash, it should at least return
an alive route even with other hash.
This patch is to fix it by processing fib_multipath_use_neigh
earlier than the hash check, so that it will at least return
an alive route if there is when fib_multipath_use_neigh is
enabled. It's also compatible with before when there are alive
routes with the l3/l4 hash.
Fixes: a6db4494d218 ("net: ipv4: Consider failed nexthops in multipath routes")
Reported-by: Jianlin Shi <jishi(a)redhat.com>
Signed-off-by: Xin Long <lucien.xin(a)gmail.com>
Acked-by: David Ahern <dsa(a)cumulusnetworks.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/ipv4/fib_semantics.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -1611,18 +1611,20 @@ void fib_select_multipath(struct fib_res
bool first = false;
for_nexthops(fi) {
+ if (net->ipv4.sysctl_fib_multipath_use_neigh) {
+ if (!fib_good_nh(nh))
+ continue;
+ if (!first) {
+ res->nh_sel = nhsel;
+ first = true;
+ }
+ }
+
if (hash > atomic_read(&nh->nh_upper_bound))
continue;
- if (!net->ipv4.sysctl_fib_multipath_use_neigh ||
- fib_good_nh(nh)) {
- res->nh_sel = nhsel;
- return;
- }
- if (!first) {
- res->nh_sel = nhsel;
- first = true;
- }
+ res->nh_sel = nhsel;
+ return;
} endfor_nexthops(fi);
}
#endif
Patches currently in stable-queue which might be from lucien.xin(a)gmail.com are
queue-4.9/team-move-dev_mc_sync-after-master_upper_dev_link-in-team_port_add.patch
queue-4.9/bonding-process-the-err-returned-by-dev_set_allmulti-properly-in-bond_enslave.patch
queue-4.9/bonding-fix-the-err-path-for-dev-hwaddr-sync-in-bond_enslave.patch
queue-4.9/bonding-move-dev_mc_sync-after-master_upper_dev_link-in-bond_enslave.patch
queue-4.9/route-check-sysctl_fib_multipath_use_neigh-earlier-than-hash.patch
queue-4.9/sctp-fix-recursive-locking-warning-in-sctp_do_peeloff.patch
This is a note to let you know that I've just added the patch titled
r8169: fix setting driver_data after register_netdev
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:
r8169-fix-setting-driver_data-after-register_netdev.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 Wed Apr 11 10:26:56 CEST 2018
From: Heiner Kallweit <hkallweit1(a)gmail.com>
Date: Mon, 26 Mar 2018 19:19:30 +0200
Subject: r8169: fix setting driver_data after register_netdev
From: Heiner Kallweit <hkallweit1(a)gmail.com>
[ Upstream commit 19c9ea363a244f85f90a424f9936e6d56449e33c ]
pci_set_drvdata() is called only after registering the net_device,
therefore we could run into a NPE if one of the functions using
driver_data is called before it's set.
Fix this by calling pci_set_drvdata() before registering the
net_device.
This fix is a candidate for stable. As far as I can see the
bug has been there in kernel version 3.2 already, therefore
I can't provide a reference which commit is fixed by it.
The fix may need small adjustments per kernel version because
due to other changes the label which is jumped to if
register_netdev() fails has changed over time.
Reported-by: David Miller <davem(a)davemloft.net>
Signed-off-by: Heiner Kallweit <hkallweit1(a)gmail.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/ethernet/realtek/r8169.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -8446,12 +8446,12 @@ static int rtl_init_one(struct pci_dev *
goto err_out_msi_5;
}
+ pci_set_drvdata(pdev, dev);
+
rc = register_netdev(dev);
if (rc < 0)
goto err_out_cnt_6;
- pci_set_drvdata(pdev, dev);
-
netif_info(tp, probe, dev, "%s at 0x%p, %pM, XID %08x IRQ %d\n",
rtl_chip_infos[chipset].name, ioaddr, dev->dev_addr,
(u32)(RTL_R32(TxConfig) & 0x9cf0f8ff), pdev->irq);
Patches currently in stable-queue which might be from hkallweit1(a)gmail.com are
queue-4.9/r8169-fix-setting-driver_data-after-register_netdev.patch
queue-4.9/pinctrl-meson-gxbb-remove-non-existing-pin-gpiox_22.patch
This is a note to let you know that I've just added the patch titled
pptp: remove a buggy dst release in pptp_connect()
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:
pptp-remove-a-buggy-dst-release-in-pptp_connect.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 Wed Apr 11 10:26:56 CEST 2018
From: Eric Dumazet <edumazet(a)google.com>
Date: Mon, 2 Apr 2018 18:48:37 -0700
Subject: pptp: remove a buggy dst release in pptp_connect()
From: Eric Dumazet <edumazet(a)google.com>
[ Upstream commit bfacfb457b36911a10140b8cb3ce76a74883ac5a ]
Once dst has been cached in socket via sk_setup_caps(),
it is illegal to call ip_rt_put() (or dst_release()),
since sk_setup_caps() did not change dst refcount.
We can still dereference it since we hold socket lock.
Caugth by syzbot :
BUG: KASAN: use-after-free in atomic_dec_return include/asm-generic/atomic-instrumented.h:198 [inline]
BUG: KASAN: use-after-free in dst_release+0x27/0xa0 net/core/dst.c:185
Write of size 4 at addr ffff8801c54dc040 by task syz-executor4/20088
CPU: 1 PID: 20088 Comm: syz-executor4 Not tainted 4.16.0+ #376
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x1a7/0x27d lib/dump_stack.c:53
print_address_description+0x73/0x250 mm/kasan/report.c:256
kasan_report_error mm/kasan/report.c:354 [inline]
kasan_report+0x23c/0x360 mm/kasan/report.c:412
check_memory_region_inline mm/kasan/kasan.c:260 [inline]
check_memory_region+0x137/0x190 mm/kasan/kasan.c:267
kasan_check_write+0x14/0x20 mm/kasan/kasan.c:278
atomic_dec_return include/asm-generic/atomic-instrumented.h:198 [inline]
dst_release+0x27/0xa0 net/core/dst.c:185
sk_dst_set include/net/sock.h:1812 [inline]
sk_dst_reset include/net/sock.h:1824 [inline]
sock_setbindtodevice net/core/sock.c:610 [inline]
sock_setsockopt+0x431/0x1b20 net/core/sock.c:707
SYSC_setsockopt net/socket.c:1845 [inline]
SyS_setsockopt+0x2ff/0x360 net/socket.c:1828
do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x4552d9
RSP: 002b:00007f4878126c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 00007f48781276d4 RCX: 00000000004552d9
RDX: 0000000000000019 RSI: 0000000000000001 RDI: 0000000000000013
RBP: 000000000072bea0 R08: 0000000000000010 R09: 0000000000000000
R10: 00000000200010c0 R11: 0000000000000246 R12: 00000000ffffffff
R13: 0000000000000526 R14: 00000000006fac30 R15: 0000000000000000
Allocated by task 20088:
save_stack+0x43/0xd0 mm/kasan/kasan.c:447
set_track mm/kasan/kasan.c:459 [inline]
kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:552
kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:489
kmem_cache_alloc+0x12e/0x760 mm/slab.c:3542
dst_alloc+0x11f/0x1a0 net/core/dst.c:104
rt_dst_alloc+0xe9/0x540 net/ipv4/route.c:1520
__mkroute_output net/ipv4/route.c:2265 [inline]
ip_route_output_key_hash_rcu+0xa49/0x2c60 net/ipv4/route.c:2493
ip_route_output_key_hash+0x20b/0x370 net/ipv4/route.c:2322
__ip_route_output_key include/net/route.h:126 [inline]
ip_route_output_flow+0x26/0xa0 net/ipv4/route.c:2577
ip_route_output_ports include/net/route.h:163 [inline]
pptp_connect+0xa84/0x1170 drivers/net/ppp/pptp.c:453
SYSC_connect+0x213/0x4a0 net/socket.c:1639
SyS_connect+0x24/0x30 net/socket.c:1620
do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x42/0xb7
Freed by task 20082:
save_stack+0x43/0xd0 mm/kasan/kasan.c:447
set_track mm/kasan/kasan.c:459 [inline]
__kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:520
kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:527
__cache_free mm/slab.c:3486 [inline]
kmem_cache_free+0x83/0x2a0 mm/slab.c:3744
dst_destroy+0x266/0x380 net/core/dst.c:140
dst_destroy_rcu+0x16/0x20 net/core/dst.c:153
__rcu_reclaim kernel/rcu/rcu.h:178 [inline]
rcu_do_batch kernel/rcu/tree.c:2675 [inline]
invoke_rcu_callbacks kernel/rcu/tree.c:2930 [inline]
__rcu_process_callbacks kernel/rcu/tree.c:2897 [inline]
rcu_process_callbacks+0xd6c/0x17b0 kernel/rcu/tree.c:2914
__do_softirq+0x2d7/0xb85 kernel/softirq.c:285
The buggy address belongs to the object at ffff8801c54dc000
which belongs to the cache ip_dst_cache of size 168
The buggy address is located 64 bytes inside of
168-byte region [ffff8801c54dc000, ffff8801c54dc0a8)
The buggy address belongs to the page:
page:ffffea0007153700 count:1 mapcount:0 mapping:ffff8801c54dc000 index:0x0
flags: 0x2fffc0000000100(slab)
raw: 02fffc0000000100 ffff8801c54dc000 0000000000000000 0000000100000010
raw: ffffea0006b34b20 ffffea0006b6c1e0 ffff8801d674a1c0 0000000000000000
page dumped because: kasan: bad access detected
Signed-off-by: Eric Dumazet <edumazet(a)google.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/ppp/pptp.c | 1 -
1 file changed, 1 deletion(-)
--- a/drivers/net/ppp/pptp.c
+++ b/drivers/net/ppp/pptp.c
@@ -465,7 +465,6 @@ static int pptp_connect(struct socket *s
po->chan.mtu = dst_mtu(&rt->dst);
if (!po->chan.mtu)
po->chan.mtu = PPP_MRU;
- ip_rt_put(rt);
po->chan.mtu -= PPTP_HEADER_OVERHEAD;
po->chan.hdrlen = 2 + sizeof(struct pptp_gre_header);
Patches currently in stable-queue which might be from edumazet(a)google.com are
queue-4.9/tcp-better-validation-of-received-ack-sequences.patch
queue-4.9/sctp-sctp_sockaddr_af-must-check-minimal-addr-length-for-af_inet6.patch
queue-4.9/net-fix-possible-out-of-bound-read-in-skb_network_protocol.patch
queue-4.9/pptp-remove-a-buggy-dst-release-in-pptp_connect.patch
queue-4.9/x86-asm-don-t-use-rbp-as-a-temporary-register-in-csum_partial_copy_generic.patch
queue-4.9/net-fool-proof-dev_valid_name.patch
queue-4.9/ipv6-the-entire-ipv6-header-chain-must-fit-the-first-fragment.patch
queue-4.9/vti6-better-validate-user-provided-tunnel-names.patch
queue-4.9/ipv6-sit-better-validate-user-provided-tunnel-names.patch
queue-4.9/ip6_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.9/sctp-do-not-leak-kernel-memory-to-user-space.patch
queue-4.9/ip_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.9/skbuff-only-inherit-relevant-tx_flags.patch
queue-4.9/netlink-make-sure-nladdr-has-correct-size-in-netlink_connect.patch
queue-4.9/ip6_gre-better-validate-user-provided-tunnel-names.patch
This is a note to let you know that I've just added the patch titled
netlink: make sure nladdr has correct size in netlink_connect()
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:
netlink-make-sure-nladdr-has-correct-size-in-netlink_connect.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 Wed Apr 11 10:26:56 CEST 2018
From: Alexander Potapenko <glider(a)google.com>
Date: Fri, 23 Mar 2018 13:49:02 +0100
Subject: netlink: make sure nladdr has correct size in netlink_connect()
From: Alexander Potapenko <glider(a)google.com>
[ Upstream commit 7880287981b60a6808f39f297bb66936e8bdf57a ]
KMSAN reports use of uninitialized memory in the case when |alen| is
smaller than sizeof(struct sockaddr_nl), and therefore |nladdr| isn't
fully copied from the userspace.
Signed-off-by: Alexander Potapenko <glider(a)google.com>
Fixes: 1da177e4c3f41524 ("Linux-2.6.12-rc2")
Reviewed-by: Eric Dumazet <edumazet(a)google.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/netlink/af_netlink.c | 3 +++
1 file changed, 3 insertions(+)
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1054,6 +1054,9 @@ static int netlink_connect(struct socket
if (addr->sa_family != AF_NETLINK)
return -EINVAL;
+ if (alen < sizeof(struct sockaddr_nl))
+ return -EINVAL;
+
if ((nladdr->nl_groups || nladdr->nl_pid) &&
!netlink_allowed(sock, NL_CFG_F_NONROOT_SEND))
return -EPERM;
Patches currently in stable-queue which might be from glider(a)google.com are
queue-4.9/netlink-make-sure-nladdr-has-correct-size-in-netlink_connect.patch
This is a note to let you know that I've just added the patch titled
net sched actions: fix dumping which requires several messages to user space
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:
net-sched-actions-fix-dumping-which-requires-several-messages-to-user-space.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 Wed Apr 11 10:26:56 CEST 2018
From: Craig Dillabaugh <cdillaba(a)mojatatu.com>
Date: Mon, 26 Mar 2018 14:58:32 -0400
Subject: net sched actions: fix dumping which requires several messages to user space
From: Craig Dillabaugh <cdillaba(a)mojatatu.com>
[ Upstream commit 734549eb550c0c720bc89e50501f1b1e98cdd841 ]
Fixes a bug in the tcf_dump_walker function that can cause some actions
to not be reported when dumping a large number of actions. This issue
became more aggrevated when cookies feature was added. In particular
this issue is manifest when large cookie values are assigned to the
actions and when enough actions are created that the resulting table
must be dumped in multiple batches.
The number of actions returned in each batch is limited by the total
number of actions and the memory buffer size. With small cookies
the numeric limit is reached before the buffer size limit, which avoids
the code path triggering this bug. When large cookies are used buffer
fills before the numeric limit, and the erroneous code path is hit.
For example after creating 32 csum actions with the cookie
aaaabbbbccccdddd
$ tc actions ls action csum
total acts 26
action order 0: csum (tcp) action continue
index 1 ref 1 bind 0
cookie aaaabbbbccccdddd
.....
action order 25: csum (tcp) action continue
index 26 ref 1 bind 0
cookie aaaabbbbccccdddd
total acts 6
action order 0: csum (tcp) action continue
index 28 ref 1 bind 0
cookie aaaabbbbccccdddd
......
action order 5: csum (tcp) action continue
index 32 ref 1 bind 0
cookie aaaabbbbccccdddd
Note that the action with index 27 is omitted from the report.
Fixes: 4b3550ef530c ("[NET_SCHED]: Use nla_nest_start/nla_nest_end")"
Signed-off-by: Craig Dillabaugh <cdillaba(a)mojatatu.com>
Acked-by: Jamal Hadi Salim <jhs(a)mojatatu.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/sched/act_api.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -95,8 +95,10 @@ static int tcf_dump_walker(struct tcf_ha
continue;
nest = nla_nest_start(skb, n_i);
- if (nest == NULL)
+ if (nest == NULL) {
+ index--;
goto nla_put_failure;
+ }
err = tcf_action_dump_1(skb, p, 0, 0);
if (err < 0) {
index--;
Patches currently in stable-queue which might be from cdillaba(a)mojatatu.com are
queue-4.9/net-sched-actions-fix-dumping-which-requires-several-messages-to-user-space.patch
This is a note to let you know that I've just added the patch titled
net/mlx5e: Sync netdev vxlan ports at open
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:
net-mlx5e-sync-netdev-vxlan-ports-at-open.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 Wed Apr 11 10:26:56 CEST 2018
From: Shahar Klein <shahark(a)mellanox.com>
Date: Tue, 20 Mar 2018 14:44:40 +0200
Subject: net/mlx5e: Sync netdev vxlan ports at open
From: Shahar Klein <shahark(a)mellanox.com>
[ Upstream commit a117f73dc2430443f23e18367fa545981129c1a6 ]
When mlx5_core is loaded it is expected to sync ports
with all vxlan devices so it can support vxlan encap/decap.
This is done via udp_tunnel_get_rx_info(). Currently this
call is set in mlx5e_nic_enable() and if the netdev is not in
NETREG_REGISTERED state it will not be called.
Normally on load the netdev state is not NETREG_REGISTERED
so udp_tunnel_get_rx_info() will not be called.
Moving udp_tunnel_get_rx_info() to mlx5e_open() so
it will be called on netdev UP event and allow encap/decap.
Fixes: 610e89e05c3f ("net/mlx5e: Don't sync netdev state when not registered")
Signed-off-by: Shahar Klein <shahark(a)mellanox.com>
Reviewed-by: Roi Dayan <roid(a)mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm(a)mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -2741,6 +2741,9 @@ static int set_feature_lro(struct net_de
mutex_unlock(&priv->state_lock);
+ if (mlx5e_vxlan_allowed(priv->mdev))
+ udp_tunnel_get_rx_info(netdev);
+
return err;
}
@@ -3785,13 +3788,6 @@ static void mlx5e_nic_enable(struct mlx5
if (netdev->reg_state != NETREG_REGISTERED)
return;
- /* Device already registered: sync netdev system state */
- if (mlx5e_vxlan_allowed(mdev)) {
- rtnl_lock();
- udp_tunnel_get_rx_info(netdev);
- rtnl_unlock();
- }
-
queue_work(priv->wq, &priv->set_rx_mode_work);
}
Patches currently in stable-queue which might be from shahark(a)mellanox.com are
queue-4.9/net-mlx5e-sync-netdev-vxlan-ports-at-open.patch
This is a note to let you know that I've just added the patch titled
net/mlx4_core: Fix memory leak while delete slave's resources
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:
net-mlx4_core-fix-memory-leak-while-delete-slave-s-resources.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 Wed Apr 11 10:26:56 CEST 2018
From: Moshe Shemesh <moshe(a)mellanox.com>
Date: Tue, 27 Mar 2018 14:41:19 +0300
Subject: net/mlx4_core: Fix memory leak while delete slave's resources
From: Moshe Shemesh <moshe(a)mellanox.com>
[ Upstream commit 461d5f1b59490ce0096dfda45e10038c122a7892 ]
mlx4_delete_all_resources_for_slave in resource tracker should free all
memory allocated for a slave.
While releasing memory of fs_rule, it misses releasing memory of
fs_rule->mirr_mbox.
Fixes: 78efed275117 ('net/mlx4_core: Support mirroring VF DMFS rules on both ports')
Signed-off-by: Moshe Shemesh <moshe(a)mellanox.com>
Signed-off-by: Tariq Toukan <tariqt(a)mellanox.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
+++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
@@ -5048,6 +5048,7 @@ static void rem_slave_fs_rule(struct mlx
&tracker->res_tree[RES_FS_RULE]);
list_del(&fs_rule->com.list);
spin_unlock_irq(mlx4_tlock(dev));
+ kfree(fs_rule->mirr_mbox);
kfree(fs_rule);
state = 0;
break;
Patches currently in stable-queue which might be from moshe(a)mellanox.com are
queue-4.9/net-mlx4_core-fix-memory-leak-while-delete-slave-s-resources.patch
This is a note to let you know that I've just added the patch titled
net/ipv6: Increment OUTxxx counters after netfilter hook
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:
net-ipv6-increment-outxxx-counters-after-netfilter-hook.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 Wed Apr 11 10:26:56 CEST 2018
From: Jeff Barnhill <0xeffeff(a)gmail.com>
Date: Thu, 5 Apr 2018 21:29:47 +0000
Subject: net/ipv6: Increment OUTxxx counters after netfilter hook
From: Jeff Barnhill <0xeffeff(a)gmail.com>
[ Upstream commit 71a1c915238c970cd9bdd5bf158b1279d6b6d55b ]
At the end of ip6_forward(), IPSTATS_MIB_OUTFORWDATAGRAMS and
IPSTATS_MIB_OUTOCTETS are incremented immediately before the NF_HOOK call
for NFPROTO_IPV6 / NF_INET_FORWARD. As a result, these counters get
incremented regardless of whether or not the netfilter hook allows the
packet to continue being processed. This change increments the counters
in ip6_forward_finish() so that it will not happen if the netfilter hook
chooses to terminate the packet, which is similar to how IPv4 works.
Signed-off-by: Jeff Barnhill <0xeffeff(a)gmail.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/ipv6/ip6_output.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -356,6 +356,11 @@ static int ip6_forward_proxy_check(struc
static inline int ip6_forward_finish(struct net *net, struct sock *sk,
struct sk_buff *skb)
{
+ struct dst_entry *dst = skb_dst(skb);
+
+ __IP6_INC_STATS(net, ip6_dst_idev(dst), IPSTATS_MIB_OUTFORWDATAGRAMS);
+ __IP6_ADD_STATS(net, ip6_dst_idev(dst), IPSTATS_MIB_OUTOCTETS, skb->len);
+
return dst_output(net, sk, skb);
}
@@ -549,8 +554,6 @@ int ip6_forward(struct sk_buff *skb)
hdr->hop_limit--;
- __IP6_INC_STATS(net, ip6_dst_idev(dst), IPSTATS_MIB_OUTFORWDATAGRAMS);
- __IP6_ADD_STATS(net, ip6_dst_idev(dst), IPSTATS_MIB_OUTOCTETS, skb->len);
return NF_HOOK(NFPROTO_IPV6, NF_INET_FORWARD,
net, NULL, skb, skb->dev, dst->dev,
ip6_forward_finish);
Patches currently in stable-queue which might be from 0xeffeff(a)gmail.com are
queue-4.9/net-ipv6-increment-outxxx-counters-after-netfilter-hook.patch
This is a note to let you know that I've just added the patch titled
net/ipv6: Fix route leaking between VRFs
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:
net-ipv6-fix-route-leaking-between-vrfs.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 Wed Apr 11 10:26:56 CEST 2018
From: David Ahern <dsahern(a)gmail.com>
Date: Thu, 29 Mar 2018 17:44:57 -0700
Subject: net/ipv6: Fix route leaking between VRFs
From: David Ahern <dsahern(a)gmail.com>
[ Upstream commit b6cdbc85234b072340b8923e69f49ec293f905dc ]
Donald reported that IPv6 route leaking between VRFs is not working.
The root cause is the strict argument in the call to rt6_lookup when
validating the nexthop spec.
ip6_route_check_nh validates the gateway and device (if given) of a
route spec. It in turn could call rt6_lookup (e.g., lookup in a given
table did not succeed so it falls back to a full lookup) and if so
sets the strict argument to 1. That means if the egress device is given,
the route lookup needs to return a result with the same device. This
strict requirement does not work with VRFs (IPv4 or IPv6) because the
oif in the flow struct is overridden with the index of the VRF device
to trigger a match on the l3mdev rule and force the lookup to its table.
The right long term solution is to add an l3mdev index to the flow
struct such that the oif is not overridden. That solution will not
backport well, so this patch aims for a simpler solution to relax the
strict argument if the route spec device is an l3mdev slave. As done
in other places, use the FLOWI_FLAG_SKIP_NH_OIF to know that the
RT6_LOOKUP_F_IFACE flag needs to be removed.
Fixes: ca254490c8df ("net: Add VRF support to IPv6 stack")
Reported-by: Donald Sharp <sharpd(a)cumulusnetworks.com>
Signed-off-by: David Ahern <dsahern(a)gmail.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/ipv6/route.c | 3 +++
1 file changed, 3 insertions(+)
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -856,6 +856,9 @@ static struct rt6_info *ip6_pol_route_lo
struct fib6_node *fn;
struct rt6_info *rt;
+ if (fl6->flowi6_flags & FLOWI_FLAG_SKIP_NH_OIF)
+ flags &= ~RT6_LOOKUP_F_IFACE;
+
read_lock_bh(&table->tb6_lock);
fn = fib6_lookup(&table->tb6_root, &fl6->daddr, &fl6->saddr);
restart:
Patches currently in stable-queue which might be from dsahern(a)gmail.com are
queue-4.9/perf-report-fix-off-by-one-for-non-activation-frames.patch
queue-4.9/perf-trace-add-mmap-alias-for-s390.patch
queue-4.9/ipmr-vrf-find-vifs-using-the-actual-device.patch
queue-4.9/perf-tools-fix-copyfile_offset-update-of-output-offset.patch
queue-4.9/perf-tools-decompress-kernel-module-when-reading-dso-data.patch
queue-4.9/ipv6-avoid-dad-failures-for-addresses-with-nodad.patch
queue-4.9/net-ipv6-fix-route-leaking-between-vrfs.patch
queue-4.9/perf-tests-decompress-kernel-module-before-objdump.patch
queue-4.9/perf-header-set-proper-module-name-when-build-id-event-found.patch
This is a note to let you know that I've just added the patch titled
net: fool proof dev_valid_name()
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:
net-fool-proof-dev_valid_name.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 Wed Apr 11 10:26:56 CEST 2018
From: Eric Dumazet <edumazet(a)google.com>
Date: Thu, 5 Apr 2018 06:39:26 -0700
Subject: net: fool proof dev_valid_name()
From: Eric Dumazet <edumazet(a)google.com>
[ Upstream commit a9d48205d0aedda021fc3728972a9e9934c2b9de ]
We want to use dev_valid_name() to validate tunnel names,
so better use strnlen(name, IFNAMSIZ) than strlen(name) to make
sure to not upset KASAN.
Signed-off-by: Eric Dumazet <edumazet(a)google.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/core/dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -993,7 +993,7 @@ bool dev_valid_name(const char *name)
{
if (*name == '\0')
return false;
- if (strlen(name) >= IFNAMSIZ)
+ if (strnlen(name, IFNAMSIZ) == IFNAMSIZ)
return false;
if (!strcmp(name, ".") || !strcmp(name, ".."))
return false;
Patches currently in stable-queue which might be from edumazet(a)google.com are
queue-4.9/tcp-better-validation-of-received-ack-sequences.patch
queue-4.9/sctp-sctp_sockaddr_af-must-check-minimal-addr-length-for-af_inet6.patch
queue-4.9/net-fix-possible-out-of-bound-read-in-skb_network_protocol.patch
queue-4.9/pptp-remove-a-buggy-dst-release-in-pptp_connect.patch
queue-4.9/x86-asm-don-t-use-rbp-as-a-temporary-register-in-csum_partial_copy_generic.patch
queue-4.9/net-fool-proof-dev_valid_name.patch
queue-4.9/ipv6-the-entire-ipv6-header-chain-must-fit-the-first-fragment.patch
queue-4.9/vti6-better-validate-user-provided-tunnel-names.patch
queue-4.9/ipv6-sit-better-validate-user-provided-tunnel-names.patch
queue-4.9/ip6_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.9/sctp-do-not-leak-kernel-memory-to-user-space.patch
queue-4.9/ip_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.9/skbuff-only-inherit-relevant-tx_flags.patch
queue-4.9/netlink-make-sure-nladdr-has-correct-size-in-netlink_connect.patch
queue-4.9/ip6_gre-better-validate-user-provided-tunnel-names.patch
This is a note to let you know that I've just added the patch titled
net: fix possible out-of-bound read in skb_network_protocol()
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:
net-fix-possible-out-of-bound-read-in-skb_network_protocol.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 Wed Apr 11 10:26:56 CEST 2018
From: Eric Dumazet <edumazet(a)google.com>
Date: Mon, 26 Mar 2018 08:08:07 -0700
Subject: net: fix possible out-of-bound read in skb_network_protocol()
From: Eric Dumazet <edumazet(a)google.com>
[ Upstream commit 1dfe82ebd7d8fd43dba9948fdfb31f145014baa0 ]
skb mac header is not necessarily set at the time skb_network_protocol()
is called. Use skb->data instead.
BUG: KASAN: slab-out-of-bounds in skb_network_protocol+0x46b/0x4b0 net/core/dev.c:2739
Read of size 2 at addr ffff8801b3097a0b by task syz-executor5/14242
CPU: 1 PID: 14242 Comm: syz-executor5 Not tainted 4.16.0-rc6+ #280
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x194/0x24d lib/dump_stack.c:53
print_address_description+0x73/0x250 mm/kasan/report.c:256
kasan_report_error mm/kasan/report.c:354 [inline]
kasan_report+0x23c/0x360 mm/kasan/report.c:412
__asan_report_load_n_noabort+0xf/0x20 mm/kasan/report.c:443
skb_network_protocol+0x46b/0x4b0 net/core/dev.c:2739
harmonize_features net/core/dev.c:2924 [inline]
netif_skb_features+0x509/0x9b0 net/core/dev.c:3011
validate_xmit_skb+0x81/0xb00 net/core/dev.c:3084
validate_xmit_skb_list+0xbf/0x120 net/core/dev.c:3142
packet_direct_xmit+0x117/0x790 net/packet/af_packet.c:256
packet_snd net/packet/af_packet.c:2944 [inline]
packet_sendmsg+0x3aed/0x60b0 net/packet/af_packet.c:2969
sock_sendmsg_nosec net/socket.c:629 [inline]
sock_sendmsg+0xca/0x110 net/socket.c:639
___sys_sendmsg+0x767/0x8b0 net/socket.c:2047
__sys_sendmsg+0xe5/0x210 net/socket.c:2081
Fixes: 19acc327258a ("gso: Handle Trans-Ether-Bridging protocol in skb_network_protocol()")
Signed-off-by: Eric Dumazet <edumazet(a)google.com>
Cc: Pravin B Shelar <pshelar(a)ovn.org>
Reported-by: Reported-by: syzbot <syzkaller(a)googlegroups.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/core/dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2667,7 +2667,7 @@ __be16 skb_network_protocol(struct sk_bu
if (unlikely(!pskb_may_pull(skb, sizeof(struct ethhdr))))
return 0;
- eth = (struct ethhdr *)skb_mac_header(skb);
+ eth = (struct ethhdr *)skb->data;
type = eth->h_proto;
}
Patches currently in stable-queue which might be from edumazet(a)google.com are
queue-4.9/tcp-better-validation-of-received-ack-sequences.patch
queue-4.9/sctp-sctp_sockaddr_af-must-check-minimal-addr-length-for-af_inet6.patch
queue-4.9/net-fix-possible-out-of-bound-read-in-skb_network_protocol.patch
queue-4.9/pptp-remove-a-buggy-dst-release-in-pptp_connect.patch
queue-4.9/x86-asm-don-t-use-rbp-as-a-temporary-register-in-csum_partial_copy_generic.patch
queue-4.9/net-fool-proof-dev_valid_name.patch
queue-4.9/ipv6-the-entire-ipv6-header-chain-must-fit-the-first-fragment.patch
queue-4.9/vti6-better-validate-user-provided-tunnel-names.patch
queue-4.9/ipv6-sit-better-validate-user-provided-tunnel-names.patch
queue-4.9/ip6_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.9/sctp-do-not-leak-kernel-memory-to-user-space.patch
queue-4.9/ip_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.9/skbuff-only-inherit-relevant-tx_flags.patch
queue-4.9/netlink-make-sure-nladdr-has-correct-size-in-netlink_connect.patch
queue-4.9/ip6_gre-better-validate-user-provided-tunnel-names.patch
This is a note to let you know that I've just added the patch titled
ipv6: the entire IPv6 header chain must fit the first fragment
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:
ipv6-the-entire-ipv6-header-chain-must-fit-the-first-fragment.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 Wed Apr 11 10:26:56 CEST 2018
From: Paolo Abeni <pabeni(a)redhat.com>
Date: Fri, 23 Mar 2018 14:47:30 +0100
Subject: ipv6: the entire IPv6 header chain must fit the first fragment
From: Paolo Abeni <pabeni(a)redhat.com>
[ Upstream commit 10b8a3de603df7b96004179b1b33b1708c76d144 ]
While building ipv6 datagram we currently allow arbitrary large
extheaders, even beyond pmtu size. The syzbot has found a way
to exploit the above to trigger the following splat:
kernel BUG at ./include/linux/skbuff.h:2073!
invalid opcode: 0000 [#1] SMP KASAN
Dumping ftrace buffer:
(ftrace buffer empty)
Modules linked in:
CPU: 1 PID: 4230 Comm: syzkaller672661 Not tainted 4.16.0-rc2+ #326
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:__skb_pull include/linux/skbuff.h:2073 [inline]
RIP: 0010:__ip6_make_skb+0x1ac8/0x2190 net/ipv6/ip6_output.c:1636
RSP: 0018:ffff8801bc18f0f0 EFLAGS: 00010293
RAX: ffff8801b17400c0 RBX: 0000000000000738 RCX: ffffffff84f01828
RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffff8801b415ac18
RBP: ffff8801bc18f360 R08: ffff8801b4576844 R09: 0000000000000000
R10: ffff8801bc18f380 R11: ffffed00367aee4e R12: 00000000000000d6
R13: ffff8801b415a740 R14: dffffc0000000000 R15: ffff8801b45767c0
FS: 0000000001535880(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000002000b000 CR3: 00000001b4123001 CR4: 00000000001606e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
ip6_finish_skb include/net/ipv6.h:969 [inline]
udp_v6_push_pending_frames+0x269/0x3b0 net/ipv6/udp.c:1073
udpv6_sendmsg+0x2a96/0x3400 net/ipv6/udp.c:1343
inet_sendmsg+0x11f/0x5e0 net/ipv4/af_inet.c:764
sock_sendmsg_nosec net/socket.c:630 [inline]
sock_sendmsg+0xca/0x110 net/socket.c:640
___sys_sendmsg+0x320/0x8b0 net/socket.c:2046
__sys_sendmmsg+0x1ee/0x620 net/socket.c:2136
SYSC_sendmmsg net/socket.c:2167 [inline]
SyS_sendmmsg+0x35/0x60 net/socket.c:2162
do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x4404c9
RSP: 002b:00007ffdce35f948 EFLAGS: 00000217 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 00000000004404c9
RDX: 0000000000000003 RSI: 0000000020001f00 RDI: 0000000000000003
RBP: 00000000006cb018 R08: 00000000004002c8 R09: 00000000004002c8
R10: 0000000020000080 R11: 0000000000000217 R12: 0000000000401df0
R13: 0000000000401e80 R14: 0000000000000000 R15: 0000000000000000
Code: ff e8 1d 5e b9 fc e9 15 e9 ff ff e8 13 5e b9 fc e9 44 e8 ff ff e8 29
5e b9 fc e9 c0 e6 ff ff e8 3f f3 80 fc 0f 0b e8 38 f3 80 fc <0f> 0b 49 8d
87 80 00 00 00 4d 8d 87 84 00 00 00 48 89 85 20 fe
RIP: __skb_pull include/linux/skbuff.h:2073 [inline] RSP: ffff8801bc18f0f0
RIP: __ip6_make_skb+0x1ac8/0x2190 net/ipv6/ip6_output.c:1636 RSP:
ffff8801bc18f0f0
As stated by RFC 7112 section 5:
When a host fragments an IPv6 datagram, it MUST include the entire
IPv6 Header Chain in the First Fragment.
So this patch addresses the issue dropping datagrams with excessive
extheader length. It also updates the error path to report to the
calling socket nonnegative pmtu values.
The issue apparently predates git history.
v1 -> v2: cleanup error path, as per Eric's suggestion
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reported-by: syzbot+91e6f9932ff122fa4410(a)syzkaller.appspotmail.com
Signed-off-by: Paolo Abeni <pabeni(a)redhat.com>
Reviewed-by: Eric Dumazet <edumazet(a)google.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/ipv6/ip6_output.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1291,7 +1291,7 @@ static int __ip6_append_data(struct sock
const struct sockcm_cookie *sockc)
{
struct sk_buff *skb, *skb_prev = NULL;
- unsigned int maxfraglen, fragheaderlen, mtu, orig_mtu;
+ unsigned int maxfraglen, fragheaderlen, mtu, orig_mtu, pmtu;
int exthdrlen = 0;
int dst_exthdrlen = 0;
int hh_len;
@@ -1327,6 +1327,12 @@ static int __ip6_append_data(struct sock
sizeof(struct frag_hdr) : 0) +
rt->rt6i_nfheader_len;
+ /* as per RFC 7112 section 5, the entire IPv6 Header Chain must fit
+ * the first fragment
+ */
+ if (headersize + transhdrlen > mtu)
+ goto emsgsize;
+
if (cork->length + length > mtu - headersize && ipc6->dontfrag &&
(sk->sk_protocol == IPPROTO_UDP ||
sk->sk_protocol == IPPROTO_RAW)) {
@@ -1342,9 +1348,8 @@ static int __ip6_append_data(struct sock
if (cork->length + length > maxnonfragsize - headersize) {
emsgsize:
- ipv6_local_error(sk, EMSGSIZE, fl6,
- mtu - headersize +
- sizeof(struct ipv6hdr));
+ pmtu = max_t(int, mtu - headersize + sizeof(struct ipv6hdr), 0);
+ ipv6_local_error(sk, EMSGSIZE, fl6, pmtu);
return -EMSGSIZE;
}
Patches currently in stable-queue which might be from pabeni(a)redhat.com are
queue-4.9/ipv6-the-entire-ipv6-header-chain-must-fit-the-first-fragment.patch
This is a note to let you know that I've just added the patch titled
ipv6: sit: better validate user provided tunnel names
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:
ipv6-sit-better-validate-user-provided-tunnel-names.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 Wed Apr 11 10:26:56 CEST 2018
From: Eric Dumazet <edumazet(a)google.com>
Date: Thu, 5 Apr 2018 06:39:28 -0700
Subject: ipv6: sit: better validate user provided tunnel names
From: Eric Dumazet <edumazet(a)google.com>
[ Upstream commit b95211e066fc3494b7c115060b2297b4ba21f025 ]
Use dev_valid_name() to make sure user does not provide illegal
device name.
syzbot caught the following bug :
BUG: KASAN: stack-out-of-bounds in strlcpy include/linux/string.h:300 [inline]
BUG: KASAN: stack-out-of-bounds in ipip6_tunnel_locate+0x63b/0xaa0 net/ipv6/sit.c:254
Write of size 33 at addr ffff8801b64076d8 by task syzkaller932654/4453
CPU: 0 PID: 4453 Comm: syzkaller932654 Not tainted 4.16.0+ #1
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x1b9/0x29f lib/dump_stack.c:53
print_address_description+0x6c/0x20b mm/kasan/report.c:256
kasan_report_error mm/kasan/report.c:354 [inline]
kasan_report.cold.7+0xac/0x2f5 mm/kasan/report.c:412
check_memory_region_inline mm/kasan/kasan.c:260 [inline]
check_memory_region+0x13e/0x1b0 mm/kasan/kasan.c:267
memcpy+0x37/0x50 mm/kasan/kasan.c:303
strlcpy include/linux/string.h:300 [inline]
ipip6_tunnel_locate+0x63b/0xaa0 net/ipv6/sit.c:254
ipip6_tunnel_ioctl+0xe71/0x241b net/ipv6/sit.c:1221
dev_ifsioc+0x43e/0xb90 net/core/dev_ioctl.c:334
dev_ioctl+0x69a/0xcc0 net/core/dev_ioctl.c:525
sock_ioctl+0x47e/0x680 net/socket.c:1015
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:500 [inline]
do_vfs_ioctl+0x1cf/0x1650 fs/ioctl.c:684
ksys_ioctl+0xa9/0xd0 fs/ioctl.c:701
SYSC_ioctl fs/ioctl.c:708 [inline]
SyS_ioctl+0x24/0x30 fs/ioctl.c:706
do_syscall_64+0x29e/0x9d0 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x42/0xb7
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Eric Dumazet <edumazet(a)google.com>
Reported-by: syzbot <syzkaller(a)googlegroups.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/ipv6/sit.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -244,11 +244,13 @@ static struct ip_tunnel *ipip6_tunnel_lo
if (!create)
goto failed;
- if (parms->name[0])
+ if (parms->name[0]) {
+ if (!dev_valid_name(parms->name))
+ goto failed;
strlcpy(name, parms->name, IFNAMSIZ);
- else
+ } else {
strcpy(name, "sit%d");
-
+ }
dev = alloc_netdev(sizeof(*t), name, NET_NAME_UNKNOWN,
ipip6_tunnel_setup);
if (!dev)
Patches currently in stable-queue which might be from edumazet(a)google.com are
queue-4.9/tcp-better-validation-of-received-ack-sequences.patch
queue-4.9/sctp-sctp_sockaddr_af-must-check-minimal-addr-length-for-af_inet6.patch
queue-4.9/net-fix-possible-out-of-bound-read-in-skb_network_protocol.patch
queue-4.9/pptp-remove-a-buggy-dst-release-in-pptp_connect.patch
queue-4.9/x86-asm-don-t-use-rbp-as-a-temporary-register-in-csum_partial_copy_generic.patch
queue-4.9/net-fool-proof-dev_valid_name.patch
queue-4.9/ipv6-the-entire-ipv6-header-chain-must-fit-the-first-fragment.patch
queue-4.9/vti6-better-validate-user-provided-tunnel-names.patch
queue-4.9/ipv6-sit-better-validate-user-provided-tunnel-names.patch
queue-4.9/ip6_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.9/sctp-do-not-leak-kernel-memory-to-user-space.patch
queue-4.9/ip_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.9/skbuff-only-inherit-relevant-tx_flags.patch
queue-4.9/netlink-make-sure-nladdr-has-correct-size-in-netlink_connect.patch
queue-4.9/ip6_gre-better-validate-user-provided-tunnel-names.patch
This is a note to let you know that I've just added the patch titled
ip_tunnel: better validate user provided tunnel names
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:
ip_tunnel-better-validate-user-provided-tunnel-names.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 Wed Apr 11 10:26:56 CEST 2018
From: Eric Dumazet <edumazet(a)google.com>
Date: Thu, 5 Apr 2018 06:39:27 -0700
Subject: ip_tunnel: better validate user provided tunnel names
From: Eric Dumazet <edumazet(a)google.com>
[ Upstream commit 9cb726a212a82c88c98aa9f0037fd04777cd8fe5 ]
Use dev_valid_name() to make sure user does not provide illegal
device name.
syzbot caught the following bug :
BUG: KASAN: stack-out-of-bounds in strlcpy include/linux/string.h:300 [inline]
BUG: KASAN: stack-out-of-bounds in __ip_tunnel_create+0xca/0x6b0 net/ipv4/ip_tunnel.c:257
Write of size 20 at addr ffff8801ac79f810 by task syzkaller268107/4482
CPU: 0 PID: 4482 Comm: syzkaller268107 Not tainted 4.16.0+ #1
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x1b9/0x29f lib/dump_stack.c:53
print_address_description+0x6c/0x20b mm/kasan/report.c:256
kasan_report_error mm/kasan/report.c:354 [inline]
kasan_report.cold.7+0xac/0x2f5 mm/kasan/report.c:412
check_memory_region_inline mm/kasan/kasan.c:260 [inline]
check_memory_region+0x13e/0x1b0 mm/kasan/kasan.c:267
memcpy+0x37/0x50 mm/kasan/kasan.c:303
strlcpy include/linux/string.h:300 [inline]
__ip_tunnel_create+0xca/0x6b0 net/ipv4/ip_tunnel.c:257
ip_tunnel_create net/ipv4/ip_tunnel.c:352 [inline]
ip_tunnel_ioctl+0x818/0xd40 net/ipv4/ip_tunnel.c:861
ipip_tunnel_ioctl+0x1c5/0x420 net/ipv4/ipip.c:350
dev_ifsioc+0x43e/0xb90 net/core/dev_ioctl.c:334
dev_ioctl+0x69a/0xcc0 net/core/dev_ioctl.c:525
sock_ioctl+0x47e/0x680 net/socket.c:1015
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:500 [inline]
do_vfs_ioctl+0x1cf/0x1650 fs/ioctl.c:684
ksys_ioctl+0xa9/0xd0 fs/ioctl.c:701
SYSC_ioctl fs/ioctl.c:708 [inline]
SyS_ioctl+0x24/0x30 fs/ioctl.c:706
do_syscall_64+0x29e/0x9d0 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x42/0xb7
Fixes: c54419321455 ("GRE: Refactor GRE tunneling code.")
Signed-off-by: Eric Dumazet <edumazet(a)google.com>
Reported-by: syzbot <syzkaller(a)googlegroups.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/ipv4/ip_tunnel.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
--- a/net/ipv4/ip_tunnel.c
+++ b/net/ipv4/ip_tunnel.c
@@ -253,13 +253,14 @@ static struct net_device *__ip_tunnel_cr
struct net_device *dev;
char name[IFNAMSIZ];
- if (parms->name[0])
+ err = -E2BIG;
+ if (parms->name[0]) {
+ if (!dev_valid_name(parms->name))
+ goto failed;
strlcpy(name, parms->name, IFNAMSIZ);
- else {
- if (strlen(ops->kind) > (IFNAMSIZ - 3)) {
- err = -E2BIG;
+ } else {
+ if (strlen(ops->kind) > (IFNAMSIZ - 3))
goto failed;
- }
strlcpy(name, ops->kind, IFNAMSIZ);
strncat(name, "%d", 2);
}
Patches currently in stable-queue which might be from edumazet(a)google.com are
queue-4.9/tcp-better-validation-of-received-ack-sequences.patch
queue-4.9/sctp-sctp_sockaddr_af-must-check-minimal-addr-length-for-af_inet6.patch
queue-4.9/net-fix-possible-out-of-bound-read-in-skb_network_protocol.patch
queue-4.9/pptp-remove-a-buggy-dst-release-in-pptp_connect.patch
queue-4.9/x86-asm-don-t-use-rbp-as-a-temporary-register-in-csum_partial_copy_generic.patch
queue-4.9/net-fool-proof-dev_valid_name.patch
queue-4.9/ipv6-the-entire-ipv6-header-chain-must-fit-the-first-fragment.patch
queue-4.9/vti6-better-validate-user-provided-tunnel-names.patch
queue-4.9/ipv6-sit-better-validate-user-provided-tunnel-names.patch
queue-4.9/ip6_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.9/sctp-do-not-leak-kernel-memory-to-user-space.patch
queue-4.9/ip_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.9/skbuff-only-inherit-relevant-tx_flags.patch
queue-4.9/netlink-make-sure-nladdr-has-correct-size-in-netlink_connect.patch
queue-4.9/ip6_gre-better-validate-user-provided-tunnel-names.patch
This is a note to let you know that I've just added the patch titled
ip6_tunnel: better validate user provided tunnel names
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:
ip6_tunnel-better-validate-user-provided-tunnel-names.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 Wed Apr 11 10:26:56 CEST 2018
From: Eric Dumazet <edumazet(a)google.com>
Date: Thu, 5 Apr 2018 06:39:30 -0700
Subject: ip6_tunnel: better validate user provided tunnel names
From: Eric Dumazet <edumazet(a)google.com>
[ Upstream commit db7a65e3ab78e5b1c4b17c0870ebee35a4ee3257 ]
Use valid_name() to make sure user does not provide illegal
device name.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Eric Dumazet <edumazet(a)google.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/ipv6/ip6_tunnel.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -298,13 +298,16 @@ static struct ip6_tnl *ip6_tnl_create(st
struct net_device *dev;
struct ip6_tnl *t;
char name[IFNAMSIZ];
- int err = -ENOMEM;
+ int err = -E2BIG;
- if (p->name[0])
+ if (p->name[0]) {
+ if (!dev_valid_name(p->name))
+ goto failed;
strlcpy(name, p->name, IFNAMSIZ);
- else
+ } else {
sprintf(name, "ip6tnl%%d");
-
+ }
+ err = -ENOMEM;
dev = alloc_netdev(sizeof(*t), name, NET_NAME_UNKNOWN,
ip6_tnl_dev_setup);
if (!dev)
Patches currently in stable-queue which might be from edumazet(a)google.com are
queue-4.9/tcp-better-validation-of-received-ack-sequences.patch
queue-4.9/sctp-sctp_sockaddr_af-must-check-minimal-addr-length-for-af_inet6.patch
queue-4.9/net-fix-possible-out-of-bound-read-in-skb_network_protocol.patch
queue-4.9/pptp-remove-a-buggy-dst-release-in-pptp_connect.patch
queue-4.9/x86-asm-don-t-use-rbp-as-a-temporary-register-in-csum_partial_copy_generic.patch
queue-4.9/net-fool-proof-dev_valid_name.patch
queue-4.9/ipv6-the-entire-ipv6-header-chain-must-fit-the-first-fragment.patch
queue-4.9/vti6-better-validate-user-provided-tunnel-names.patch
queue-4.9/ipv6-sit-better-validate-user-provided-tunnel-names.patch
queue-4.9/ip6_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.9/sctp-do-not-leak-kernel-memory-to-user-space.patch
queue-4.9/ip_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.9/skbuff-only-inherit-relevant-tx_flags.patch
queue-4.9/netlink-make-sure-nladdr-has-correct-size-in-netlink_connect.patch
queue-4.9/ip6_gre-better-validate-user-provided-tunnel-names.patch
This is a note to let you know that I've just added the patch titled
ip6_gre: better validate user provided tunnel names
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:
ip6_gre-better-validate-user-provided-tunnel-names.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 Wed Apr 11 10:26:56 CEST 2018
From: Eric Dumazet <edumazet(a)google.com>
Date: Thu, 5 Apr 2018 06:39:29 -0700
Subject: ip6_gre: better validate user provided tunnel names
From: Eric Dumazet <edumazet(a)google.com>
[ Upstream commit 5f42df013b8bc1b6511af7a04bf93b014884ae2a ]
Use dev_valid_name() to make sure user does not provide illegal
device name.
syzbot caught the following bug :
BUG: KASAN: stack-out-of-bounds in strlcpy include/linux/string.h:300 [inline]
BUG: KASAN: stack-out-of-bounds in ip6gre_tunnel_locate+0x334/0x860 net/ipv6/ip6_gre.c:339
Write of size 20 at addr ffff8801afb9f7b8 by task syzkaller851048/4466
CPU: 1 PID: 4466 Comm: syzkaller851048 Not tainted 4.16.0+ #1
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x1b9/0x29f lib/dump_stack.c:53
print_address_description+0x6c/0x20b mm/kasan/report.c:256
kasan_report_error mm/kasan/report.c:354 [inline]
kasan_report.cold.7+0xac/0x2f5 mm/kasan/report.c:412
check_memory_region_inline mm/kasan/kasan.c:260 [inline]
check_memory_region+0x13e/0x1b0 mm/kasan/kasan.c:267
memcpy+0x37/0x50 mm/kasan/kasan.c:303
strlcpy include/linux/string.h:300 [inline]
ip6gre_tunnel_locate+0x334/0x860 net/ipv6/ip6_gre.c:339
ip6gre_tunnel_ioctl+0x69d/0x12e0 net/ipv6/ip6_gre.c:1195
dev_ifsioc+0x43e/0xb90 net/core/dev_ioctl.c:334
dev_ioctl+0x69a/0xcc0 net/core/dev_ioctl.c:525
sock_ioctl+0x47e/0x680 net/socket.c:1015
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:500 [inline]
do_vfs_ioctl+0x1cf/0x1650 fs/ioctl.c:684
ksys_ioctl+0xa9/0xd0 fs/ioctl.c:701
SYSC_ioctl fs/ioctl.c:708 [inline]
SyS_ioctl+0x24/0x30 fs/ioctl.c:706
do_syscall_64+0x29e/0x9d0 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x42/0xb7
Fixes: c12b395a4664 ("gre: Support GRE over IPv6")
Signed-off-by: Eric Dumazet <edumazet(a)google.com>
Reported-by: syzbot <syzkaller(a)googlegroups.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/ipv6/ip6_gre.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -319,11 +319,13 @@ static struct ip6_tnl *ip6gre_tunnel_loc
if (t || !create)
return t;
- if (parms->name[0])
+ if (parms->name[0]) {
+ if (!dev_valid_name(parms->name))
+ return NULL;
strlcpy(name, parms->name, IFNAMSIZ);
- else
+ } else {
strcpy(name, "ip6gre%d");
-
+ }
dev = alloc_netdev(sizeof(*t), name, NET_NAME_UNKNOWN,
ip6gre_tunnel_setup);
if (!dev)
Patches currently in stable-queue which might be from edumazet(a)google.com are
queue-4.9/tcp-better-validation-of-received-ack-sequences.patch
queue-4.9/sctp-sctp_sockaddr_af-must-check-minimal-addr-length-for-af_inet6.patch
queue-4.9/net-fix-possible-out-of-bound-read-in-skb_network_protocol.patch
queue-4.9/pptp-remove-a-buggy-dst-release-in-pptp_connect.patch
queue-4.9/x86-asm-don-t-use-rbp-as-a-temporary-register-in-csum_partial_copy_generic.patch
queue-4.9/net-fool-proof-dev_valid_name.patch
queue-4.9/ipv6-the-entire-ipv6-header-chain-must-fit-the-first-fragment.patch
queue-4.9/vti6-better-validate-user-provided-tunnel-names.patch
queue-4.9/ipv6-sit-better-validate-user-provided-tunnel-names.patch
queue-4.9/ip6_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.9/sctp-do-not-leak-kernel-memory-to-user-space.patch
queue-4.9/ip_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.9/skbuff-only-inherit-relevant-tx_flags.patch
queue-4.9/netlink-make-sure-nladdr-has-correct-size-in-netlink_connect.patch
queue-4.9/ip6_gre-better-validate-user-provided-tunnel-names.patch
This is a note to let you know that I've just added the patch titled
bonding: process the err returned by dev_set_allmulti properly in bond_enslave
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:
bonding-process-the-err-returned-by-dev_set_allmulti-properly-in-bond_enslave.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 Wed Apr 11 10:26:56 CEST 2018
From: Xin Long <lucien.xin(a)gmail.com>
Date: Mon, 26 Mar 2018 01:16:47 +0800
Subject: bonding: process the err returned by dev_set_allmulti properly in bond_enslave
From: Xin Long <lucien.xin(a)gmail.com>
[ Upstream commit 9f5a90c107741b864398f4ac0014711a8c1d8474 ]
When dev_set_promiscuity(1) succeeds but dev_set_allmulti(1) fails,
dev_set_promiscuity(-1) should be done before going to the err path.
Otherwise, dev->promiscuity will leak.
Fixes: 7e1a1ac1fbaa ("bonding: Check return of dev_set_promiscuity/allmulti")
Signed-off-by: Xin Long <lucien.xin(a)gmail.com>
Acked-by: Andy Gospodarek <andy(a)greyhouse.net>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/bonding/bond_main.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1700,8 +1700,11 @@ int bond_enslave(struct net_device *bond
/* set allmulti level to new slave */
if (bond_dev->flags & IFF_ALLMULTI) {
res = dev_set_allmulti(slave_dev, 1);
- if (res)
+ if (res) {
+ if (bond_dev->flags & IFF_PROMISC)
+ dev_set_promiscuity(slave_dev, -1);
goto err_sysfs_del;
+ }
}
netif_addr_lock_bh(bond_dev);
Patches currently in stable-queue which might be from lucien.xin(a)gmail.com are
queue-4.9/team-move-dev_mc_sync-after-master_upper_dev_link-in-team_port_add.patch
queue-4.9/bonding-process-the-err-returned-by-dev_set_allmulti-properly-in-bond_enslave.patch
queue-4.9/bonding-fix-the-err-path-for-dev-hwaddr-sync-in-bond_enslave.patch
queue-4.9/bonding-move-dev_mc_sync-after-master_upper_dev_link-in-bond_enslave.patch
queue-4.9/route-check-sysctl_fib_multipath_use_neigh-earlier-than-hash.patch
queue-4.9/sctp-fix-recursive-locking-warning-in-sctp_do_peeloff.patch
This is a note to let you know that I've just added the patch titled
bonding: move dev_mc_sync after master_upper_dev_link in bond_enslave
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:
bonding-move-dev_mc_sync-after-master_upper_dev_link-in-bond_enslave.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 Wed Apr 11 10:26:56 CEST 2018
From: Xin Long <lucien.xin(a)gmail.com>
Date: Mon, 26 Mar 2018 01:16:46 +0800
Subject: bonding: move dev_mc_sync after master_upper_dev_link in bond_enslave
From: Xin Long <lucien.xin(a)gmail.com>
[ Upstream commit ae42cc62a9f07f1f6979054ed92606b9c30f4a2e ]
Beniamino found a crash when adding vlan as slave of bond which is also
the parent link:
ip link add bond1 type bond
ip link set bond1 up
ip link add link bond1 vlan1 type vlan id 80
ip link set vlan1 master bond1
The call trace is as below:
[<ffffffffa850842a>] queued_spin_lock_slowpath+0xb/0xf
[<ffffffffa8515680>] _raw_spin_lock+0x20/0x30
[<ffffffffa83f6f07>] dev_mc_sync+0x37/0x80
[<ffffffffc08687dc>] vlan_dev_set_rx_mode+0x1c/0x30 [8021q]
[<ffffffffa83efd2a>] __dev_set_rx_mode+0x5a/0xa0
[<ffffffffa83f7138>] dev_mc_sync_multiple+0x78/0x80
[<ffffffffc084127c>] bond_enslave+0x67c/0x1190 [bonding]
[<ffffffffa8401909>] do_setlink+0x9c9/0xe50
[<ffffffffa8403bf2>] rtnl_newlink+0x522/0x880
[<ffffffffa8403ff7>] rtnetlink_rcv_msg+0xa7/0x260
[<ffffffffa8424ecb>] netlink_rcv_skb+0xab/0xc0
[<ffffffffa83fe498>] rtnetlink_rcv+0x28/0x30
[<ffffffffa8424850>] netlink_unicast+0x170/0x210
[<ffffffffa8424bf8>] netlink_sendmsg+0x308/0x420
[<ffffffffa83cc396>] sock_sendmsg+0xb6/0xf0
This is actually a dead lock caused by sync slave hwaddr from master when
the master is the slave's 'slave'. This dead loop check is actually done
by netdev_master_upper_dev_link. However, Commit 1f718f0f4f97 ("bonding:
populate neighbour's private on enslave") moved it after dev_mc_sync.
This patch is to fix it by moving dev_mc_sync after master_upper_dev_link,
so that this loop check would be earlier than dev_mc_sync. It also moves
if (mode == BOND_MODE_8023AD) into if (!bond_uses_primary) clause as an
improvement.
Note team driver also has this issue, I will fix it in another patch.
Fixes: 1f718f0f4f97 ("bonding: populate neighbour's private on enslave")
Reported-by: Beniamino Galvani <bgalvani(a)redhat.com>
Signed-off-by: Xin Long <lucien.xin(a)gmail.com>
Acked-by: Andy Gospodarek <andy(a)greyhouse.net>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/bonding/bond_main.c | 73 +++++++++++++++++++---------------------
1 file changed, 35 insertions(+), 38 deletions(-)
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1524,44 +1524,11 @@ int bond_enslave(struct net_device *bond
goto err_close;
}
- /* If the mode uses primary, then the following is handled by
- * bond_change_active_slave().
- */
- if (!bond_uses_primary(bond)) {
- /* set promiscuity level to new slave */
- if (bond_dev->flags & IFF_PROMISC) {
- res = dev_set_promiscuity(slave_dev, 1);
- if (res)
- goto err_close;
- }
-
- /* set allmulti level to new slave */
- if (bond_dev->flags & IFF_ALLMULTI) {
- res = dev_set_allmulti(slave_dev, 1);
- if (res)
- goto err_close;
- }
-
- netif_addr_lock_bh(bond_dev);
-
- dev_mc_sync_multiple(slave_dev, bond_dev);
- dev_uc_sync_multiple(slave_dev, bond_dev);
-
- netif_addr_unlock_bh(bond_dev);
- }
-
- if (BOND_MODE(bond) == BOND_MODE_8023AD) {
- /* add lacpdu mc addr to mc list */
- u8 lacpdu_multicast[ETH_ALEN] = MULTICAST_LACPDU_ADDR;
-
- dev_mc_add(slave_dev, lacpdu_multicast);
- }
-
res = vlan_vids_add_by_dev(slave_dev, bond_dev);
if (res) {
netdev_err(bond_dev, "Couldn't add bond vlan ids to %s\n",
slave_dev->name);
- goto err_hwaddr_unsync;
+ goto err_close;
}
prev_slave = bond_last_slave(bond);
@@ -1719,6 +1686,37 @@ int bond_enslave(struct net_device *bond
goto err_upper_unlink;
}
+ /* If the mode uses primary, then the following is handled by
+ * bond_change_active_slave().
+ */
+ if (!bond_uses_primary(bond)) {
+ /* set promiscuity level to new slave */
+ if (bond_dev->flags & IFF_PROMISC) {
+ res = dev_set_promiscuity(slave_dev, 1);
+ if (res)
+ goto err_sysfs_del;
+ }
+
+ /* set allmulti level to new slave */
+ if (bond_dev->flags & IFF_ALLMULTI) {
+ res = dev_set_allmulti(slave_dev, 1);
+ if (res)
+ goto err_sysfs_del;
+ }
+
+ netif_addr_lock_bh(bond_dev);
+ dev_mc_sync_multiple(slave_dev, bond_dev);
+ dev_uc_sync_multiple(slave_dev, bond_dev);
+ netif_addr_unlock_bh(bond_dev);
+
+ if (BOND_MODE(bond) == BOND_MODE_8023AD) {
+ /* add lacpdu mc addr to mc list */
+ u8 lacpdu_multicast[ETH_ALEN] = MULTICAST_LACPDU_ADDR;
+
+ dev_mc_add(slave_dev, lacpdu_multicast);
+ }
+ }
+
bond->slave_cnt++;
bond_compute_features(bond);
bond_set_carrier(bond);
@@ -1742,6 +1740,9 @@ int bond_enslave(struct net_device *bond
return 0;
/* Undo stages on error */
+err_sysfs_del:
+ bond_sysfs_slave_del(new_slave);
+
err_upper_unlink:
bond_upper_dev_unlink(bond, new_slave);
@@ -1762,10 +1763,6 @@ err_detach:
synchronize_rcu();
slave_disable_netpoll(new_slave);
-err_hwaddr_unsync:
- if (!bond_uses_primary(bond))
- bond_hw_addr_flush(bond_dev, slave_dev);
-
err_close:
slave_dev->priv_flags &= ~IFF_BONDING;
dev_close(slave_dev);
Patches currently in stable-queue which might be from lucien.xin(a)gmail.com are
queue-4.9/team-move-dev_mc_sync-after-master_upper_dev_link-in-team_port_add.patch
queue-4.9/bonding-process-the-err-returned-by-dev_set_allmulti-properly-in-bond_enslave.patch
queue-4.9/bonding-fix-the-err-path-for-dev-hwaddr-sync-in-bond_enslave.patch
queue-4.9/bonding-move-dev_mc_sync-after-master_upper_dev_link-in-bond_enslave.patch
queue-4.9/route-check-sysctl_fib_multipath_use_neigh-earlier-than-hash.patch
queue-4.9/sctp-fix-recursive-locking-warning-in-sctp_do_peeloff.patch
This is a note to let you know that I've just added the patch titled
bonding: fix the err path for dev hwaddr sync in bond_enslave
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:
bonding-fix-the-err-path-for-dev-hwaddr-sync-in-bond_enslave.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 Wed Apr 11 10:26:56 CEST 2018
From: Xin Long <lucien.xin(a)gmail.com>
Date: Mon, 26 Mar 2018 01:16:45 +0800
Subject: bonding: fix the err path for dev hwaddr sync in bond_enslave
From: Xin Long <lucien.xin(a)gmail.com>
[ Upstream commit 5c78f6bfae2b10ff70e21d343e64584ea6280c26 ]
vlan_vids_add_by_dev is called right after dev hwaddr sync, so on
the err path it should unsync dev hwaddr. Otherwise, the slave
dev's hwaddr will never be unsync when this err happens.
Fixes: 1ff412ad7714 ("bonding: change the bond's vlan syncing functions with the standard ones")
Signed-off-by: Xin Long <lucien.xin(a)gmail.com>
Reviewed-by: Nikolay Aleksandrov <nikolay(a)cumulusnetworks.com>
Acked-by: Andy Gospodarek <andy(a)greyhouse.net>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/bonding/bond_main.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1561,7 +1561,7 @@ int bond_enslave(struct net_device *bond
if (res) {
netdev_err(bond_dev, "Couldn't add bond vlan ids to %s\n",
slave_dev->name);
- goto err_close;
+ goto err_hwaddr_unsync;
}
prev_slave = bond_last_slave(bond);
@@ -1749,9 +1749,6 @@ err_unregister:
netdev_rx_handler_unregister(slave_dev);
err_detach:
- if (!bond_uses_primary(bond))
- bond_hw_addr_flush(bond_dev, slave_dev);
-
vlan_vids_del_by_dev(slave_dev, bond_dev);
if (rcu_access_pointer(bond->primary_slave) == new_slave)
RCU_INIT_POINTER(bond->primary_slave, NULL);
@@ -1765,6 +1762,10 @@ err_detach:
synchronize_rcu();
slave_disable_netpoll(new_slave);
+err_hwaddr_unsync:
+ if (!bond_uses_primary(bond))
+ bond_hw_addr_flush(bond_dev, slave_dev);
+
err_close:
slave_dev->priv_flags &= ~IFF_BONDING;
dev_close(slave_dev);
Patches currently in stable-queue which might be from lucien.xin(a)gmail.com are
queue-4.9/team-move-dev_mc_sync-after-master_upper_dev_link-in-team_port_add.patch
queue-4.9/bonding-process-the-err-returned-by-dev_set_allmulti-properly-in-bond_enslave.patch
queue-4.9/bonding-fix-the-err-path-for-dev-hwaddr-sync-in-bond_enslave.patch
queue-4.9/bonding-move-dev_mc_sync-after-master_upper_dev_link-in-bond_enslave.patch
queue-4.9/route-check-sysctl_fib_multipath_use_neigh-earlier-than-hash.patch
queue-4.9/sctp-fix-recursive-locking-warning-in-sctp_do_peeloff.patch
This is a note to let you know that I've just added the patch titled
arp: fix arp_filter on l3slave devices
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:
arp-fix-arp_filter-on-l3slave-devices.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 Wed Apr 11 10:26:56 CEST 2018
From: Miguel Fadon Perlines <mfadon(a)teldat.com>
Date: Thu, 5 Apr 2018 10:25:38 +0200
Subject: arp: fix arp_filter on l3slave devices
From: Miguel Fadon Perlines <mfadon(a)teldat.com>
[ Upstream commit 58b35f27689b5eb514fc293c332966c226b1b6e4 ]
arp_filter performs an ip_route_output search for arp source address and
checks if output device is the same where the arp request was received,
if it is not, the arp request is not answered.
This route lookup is always done on main route table so l3slave devices
never find the proper route and arp is not answered.
Passing l3mdev_master_ifindex_rcu(dev) return value as oif fixes the
lookup for l3slave devices while maintaining same behavior for non
l3slave devices as this function returns 0 in that case.
Fixes: 613d09b30f8b ("net: Use VRF device index for lookups on TX")
Signed-off-by: Miguel Fadon Perlines <mfadon(a)teldat.com>
Acked-by: David Ahern <dsa(a)cumulusnetworks.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/ipv4/arp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -437,7 +437,7 @@ static int arp_filter(__be32 sip, __be32
/*unsigned long now; */
struct net *net = dev_net(dev);
- rt = ip_route_output(net, sip, tip, 0, 0);
+ rt = ip_route_output(net, sip, tip, 0, l3mdev_master_ifindex_rcu(dev));
if (IS_ERR(rt))
return 1;
if (rt->dst.dev != dev) {
Patches currently in stable-queue which might be from mfadon(a)teldat.com are
queue-4.9/arp-fix-arp_filter-on-l3slave-devices.patch
On Tue, Apr 10, 2018 at 7:44 PM Wang Long <wanglong19(a)meituan.com> wrote:
> > Hi,
> >
> > [This is an automated email]
> >
> > This commit has been processed by the -stable helper bot and determined
> > to be a high probability candidate for -stable trees. (score: 44.5575)
> >
> > The bot has tested the following trees: v4.16.1, v4.15.16, v4.14.33,
v4.9.93, v4.4.127.
> >
> > v4.16.1: Build OK!
> > v4.15.16: Build OK!
> > v4.14.33: Build OK!
> > v4.9.93: Build OK!
> > v4.4.127: Failed to apply! Possible dependencies:
> > 62cccb8c8e7a ("mm: simplify lock_page_memcg()")
> Hi Sasha,
> I test the memory cgroup in lts v4.4, for this issue, 62cccb8c8e7a ("mm:
> simplify lock_page_memcg()")
> need to adjust and there are several other places that need to be fixed.
> I will make the patch for lts v4.4 if no one did.
I'm testing a 4.4-stable patch right now. ETA is a few hours.
lock_page_memcg()/unlock_page_memcg() use spin_lock_irqsave/restore() if
the page's memcg is undergoing move accounting, which occurs when a
process leaves its memcg for a new one that has
memory.move_charge_at_immigrate set.
unlocked_inode_to_wb_begin,end() use spin_lock_irq/spin_unlock_irq() if the
given inode is switching writeback domains. Switches occur when enough
writes are issued from a new domain.
This existing pattern is thus suspicious:
lock_page_memcg(page);
unlocked_inode_to_wb_begin(inode, &locked);
...
unlocked_inode_to_wb_end(inode, locked);
unlock_page_memcg(page);
If both inode switch and process memcg migration are both in-flight then
unlocked_inode_to_wb_end() will unconditionally enable interrupts while
still holding the lock_page_memcg() irq spinlock. This suggests the
possibility of deadlock if an interrupt occurs before
unlock_page_memcg().
truncate
__cancel_dirty_page
lock_page_memcg
unlocked_inode_to_wb_begin
unlocked_inode_to_wb_end
<interrupts mistakenly enabled>
<interrupt>
end_page_writeback
test_clear_page_writeback
lock_page_memcg
<deadlock>
unlock_page_memcg
Due to configuration limitations this deadlock is not currently possible
because we don't mix cgroup writeback (a cgroupv2 feature) and
memory.move_charge_at_immigrate (a cgroupv1 feature).
If the kernel is hacked to always claim inode switching and memcg
moving_account, then this script triggers lockup in less than a minute:
cd /mnt/cgroup/memory
mkdir a b
echo 1 > a/memory.move_charge_at_immigrate
echo 1 > b/memory.move_charge_at_immigrate
(
echo $BASHPID > a/cgroup.procs
while true; do
dd if=/dev/zero of=/mnt/big bs=1M count=256
done
) &
while true; do
sync
done &
sleep 1h &
SLEEP=$!
while true; do
echo $SLEEP > a/cgroup.procs
echo $SLEEP > b/cgroup.procs
done
The deadlock does not seem possible, so it's debatable if there's
any reason to modify the kernel. I suggest we should to prevent future
surprises. And Wang Long said "this deadlock occurs three times in our
environment", so there's more reason to apply this, even to stable.
Stable 4.4 has minor conflicts applying this patch.
For a clean 4.4 patch see "[PATCH for-4.4] writeback: safer lock nesting"
https://lkml.org/lkml/2018/4/11/146
Fixes: 682aa8e1a6a1 ("writeback: implement unlocked_inode_to_wb transaction and use it for stat updates")
Cc: stable(a)vger.kernel.org # v4.2+
Reported-by: Wang Long <wanglong19(a)meituan.com>
Signed-off-by: Greg Thelen <gthelen(a)google.com>
Acked-by: Michal Hocko <mhocko(a)suse.com>
Acked-by: Wang Long <wanglong19(a)meituan.com>
---
Changelog since v3:
- initialize wb_lock_cookie wiht {} rather than {0}.
- comment grammar fix
- commit log footer cleanup (-Change-Id, +Fixes, +Acks, +stable), though patch
does not cleanly apply to 4.4. I'll post a 4.4-stable specific patch.
Changelog since v2:
- explicitly initialize wb_lock_cookie to silence compiler warnings.
Changelog since v1:
- add wb_lock_cookie to record lock context.
fs/fs-writeback.c | 7 ++++---
include/linux/backing-dev-defs.h | 5 +++++
include/linux/backing-dev.h | 31 +++++++++++++++++--------------
mm/page-writeback.c | 18 +++++++++---------
4 files changed, 35 insertions(+), 26 deletions(-)
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 1280f915079b..b1178acfcb08 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -745,11 +745,12 @@ int inode_congested(struct inode *inode, int cong_bits)
*/
if (inode && inode_to_wb_is_valid(inode)) {
struct bdi_writeback *wb;
- bool locked, congested;
+ struct wb_lock_cookie lock_cookie = {};
+ bool congested;
- wb = unlocked_inode_to_wb_begin(inode, &locked);
+ wb = unlocked_inode_to_wb_begin(inode, &lock_cookie);
congested = wb_congested(wb, cong_bits);
- unlocked_inode_to_wb_end(inode, locked);
+ unlocked_inode_to_wb_end(inode, &lock_cookie);
return congested;
}
diff --git a/include/linux/backing-dev-defs.h b/include/linux/backing-dev-defs.h
index bfe86b54f6c1..0bd432a4d7bd 100644
--- a/include/linux/backing-dev-defs.h
+++ b/include/linux/backing-dev-defs.h
@@ -223,6 +223,11 @@ static inline void set_bdi_congested(struct backing_dev_info *bdi, int sync)
set_wb_congested(bdi->wb.congested, sync);
}
+struct wb_lock_cookie {
+ bool locked;
+ unsigned long flags;
+};
+
#ifdef CONFIG_CGROUP_WRITEBACK
/**
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h
index 3e4ce54d84ab..96f4a3ddfb81 100644
--- a/include/linux/backing-dev.h
+++ b/include/linux/backing-dev.h
@@ -346,7 +346,7 @@ static inline struct bdi_writeback *inode_to_wb(const struct inode *inode)
/**
* unlocked_inode_to_wb_begin - begin unlocked inode wb access transaction
* @inode: target inode
- * @lockedp: temp bool output param, to be passed to the end function
+ * @cookie: output param, to be passed to the end function
*
* The caller wants to access the wb associated with @inode but isn't
* holding inode->i_lock, mapping->tree_lock or wb->list_lock. This
@@ -354,12 +354,12 @@ static inline struct bdi_writeback *inode_to_wb(const struct inode *inode)
* association doesn't change until the transaction is finished with
* unlocked_inode_to_wb_end().
*
- * The caller must call unlocked_inode_to_wb_end() with *@lockdep
- * afterwards and can't sleep during transaction. IRQ may or may not be
- * disabled on return.
+ * The caller must call unlocked_inode_to_wb_end() with *@cookie afterwards and
+ * can't sleep during the transaction. IRQs may or may not be disabled on
+ * return.
*/
static inline struct bdi_writeback *
-unlocked_inode_to_wb_begin(struct inode *inode, bool *lockedp)
+unlocked_inode_to_wb_begin(struct inode *inode, struct wb_lock_cookie *cookie)
{
rcu_read_lock();
@@ -367,10 +367,10 @@ unlocked_inode_to_wb_begin(struct inode *inode, bool *lockedp)
* Paired with store_release in inode_switch_wb_work_fn() and
* ensures that we see the new wb if we see cleared I_WB_SWITCH.
*/
- *lockedp = smp_load_acquire(&inode->i_state) & I_WB_SWITCH;
+ cookie->locked = smp_load_acquire(&inode->i_state) & I_WB_SWITCH;
- if (unlikely(*lockedp))
- spin_lock_irq(&inode->i_mapping->tree_lock);
+ if (unlikely(cookie->locked))
+ spin_lock_irqsave(&inode->i_mapping->tree_lock, cookie->flags);
/*
* Protected by either !I_WB_SWITCH + rcu_read_lock() or tree_lock.
@@ -382,12 +382,14 @@ unlocked_inode_to_wb_begin(struct inode *inode, bool *lockedp)
/**
* unlocked_inode_to_wb_end - end inode wb access transaction
* @inode: target inode
- * @locked: *@lockedp from unlocked_inode_to_wb_begin()
+ * @cookie: @cookie from unlocked_inode_to_wb_begin()
*/
-static inline void unlocked_inode_to_wb_end(struct inode *inode, bool locked)
+static inline void unlocked_inode_to_wb_end(struct inode *inode,
+ struct wb_lock_cookie *cookie)
{
- if (unlikely(locked))
- spin_unlock_irq(&inode->i_mapping->tree_lock);
+ if (unlikely(cookie->locked))
+ spin_unlock_irqrestore(&inode->i_mapping->tree_lock,
+ cookie->flags);
rcu_read_unlock();
}
@@ -434,12 +436,13 @@ static inline struct bdi_writeback *inode_to_wb(struct inode *inode)
}
static inline struct bdi_writeback *
-unlocked_inode_to_wb_begin(struct inode *inode, bool *lockedp)
+unlocked_inode_to_wb_begin(struct inode *inode, struct wb_lock_cookie *cookie)
{
return inode_to_wb(inode);
}
-static inline void unlocked_inode_to_wb_end(struct inode *inode, bool locked)
+static inline void unlocked_inode_to_wb_end(struct inode *inode,
+ struct wb_lock_cookie *cookie)
{
}
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 586f31261c83..8369572e1f7d 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -2501,13 +2501,13 @@ void account_page_redirty(struct page *page)
if (mapping && mapping_cap_account_dirty(mapping)) {
struct inode *inode = mapping->host;
struct bdi_writeback *wb;
- bool locked;
+ struct wb_lock_cookie cookie = {};
- wb = unlocked_inode_to_wb_begin(inode, &locked);
+ wb = unlocked_inode_to_wb_begin(inode, &cookie);
current->nr_dirtied--;
dec_node_page_state(page, NR_DIRTIED);
dec_wb_stat(wb, WB_DIRTIED);
- unlocked_inode_to_wb_end(inode, locked);
+ unlocked_inode_to_wb_end(inode, &cookie);
}
}
EXPORT_SYMBOL(account_page_redirty);
@@ -2613,15 +2613,15 @@ void __cancel_dirty_page(struct page *page)
if (mapping_cap_account_dirty(mapping)) {
struct inode *inode = mapping->host;
struct bdi_writeback *wb;
- bool locked;
+ struct wb_lock_cookie cookie = {};
lock_page_memcg(page);
- wb = unlocked_inode_to_wb_begin(inode, &locked);
+ wb = unlocked_inode_to_wb_begin(inode, &cookie);
if (TestClearPageDirty(page))
account_page_cleaned(page, mapping, wb);
- unlocked_inode_to_wb_end(inode, locked);
+ unlocked_inode_to_wb_end(inode, &cookie);
unlock_page_memcg(page);
} else {
ClearPageDirty(page);
@@ -2653,7 +2653,7 @@ int clear_page_dirty_for_io(struct page *page)
if (mapping && mapping_cap_account_dirty(mapping)) {
struct inode *inode = mapping->host;
struct bdi_writeback *wb;
- bool locked;
+ struct wb_lock_cookie cookie = {};
/*
* Yes, Virginia, this is indeed insane.
@@ -2690,14 +2690,14 @@ int clear_page_dirty_for_io(struct page *page)
* always locked coming in here, so we get the desired
* exclusion.
*/
- wb = unlocked_inode_to_wb_begin(inode, &locked);
+ wb = unlocked_inode_to_wb_begin(inode, &cookie);
if (TestClearPageDirty(page)) {
dec_lruvec_page_state(page, NR_FILE_DIRTY);
dec_zone_page_state(page, NR_ZONE_WRITE_PENDING);
dec_wb_stat(wb, WB_RECLAIMABLE);
ret = 1;
}
- unlocked_inode_to_wb_end(inode, locked);
+ unlocked_inode_to_wb_end(inode, &cookie);
return ret;
}
return TestClearPageDirty(page);
--
2.17.0.484.g0c8726318c-goog
The patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 82dd0d2a9a76fc8fa2b18d80b987d455728bf83a Mon Sep 17 00:00:00 2001
From: David Ahern <dsahern(a)gmail.com>
Date: Thu, 29 Mar 2018 12:49:52 -0700
Subject: [PATCH] vrf: Fix use after free and double free in vrf_finish_output
Miguel reported an skb use after free / double free in vrf_finish_output
when neigh_output returns an error. The vrf driver should return after
the call to neigh_output as it takes over the skb on error path as well.
Patch is a simplified version of Miguel's patch which was written for 4.9,
and updated to top of tree.
Fixes: 8f58336d3f78a ("net: Add ethernet header for pass through VRF device")
Signed-off-by: Miguel Fadon Perlines <mfadon(a)teldat.com>
Signed-off-by: David Ahern <dsahern(a)gmail.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
index 139c61c8244a..ac40924fe437 100644
--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
@@ -578,12 +578,13 @@ static int vrf_finish_output(struct net *net, struct sock *sk, struct sk_buff *s
if (!IS_ERR(neigh)) {
sock_confirm_neigh(skb, neigh);
ret = neigh_output(neigh, skb);
+ rcu_read_unlock_bh();
+ return ret;
}
rcu_read_unlock_bh();
err:
- if (unlikely(ret < 0))
- vrf_tx_error(skb->dev, skb);
+ vrf_tx_error(skb->dev, skb);
return ret;
}
This patch set is based on v4.16. (I should have realized these issues in
v4.16-rc cycle though...)
Yoshihiro Shimoda (4):
usb: gadget: udc: renesas_usb3: fix double phy_put()
usb: gadget: udc: renesas_usb3: should remove debugfs
usb: gadget: udc: renesas_usb3: should call pm_runtime_enable() before
add udc
usb: gadget: udc: renesas_usb3: should call devm_phy_get() before add
udc
drivers/usb/gadget/udc/renesas_usb3.c | 28 ++++++++++++++++------------
1 file changed, 16 insertions(+), 12 deletions(-)
--
1.9.1
Tree/Branch: v4.4.127
Git describe: v4.4.127
Commit: 2cad7a1d13 Linux 4.4.127
Build Time: 60 min 20 sec
Passed: 7 / 10 ( 70.00 %)
Failed: 3 / 10 ( 30.00 %)
Errors: 37
Warnings: 0
Section Mismatches: 0
Failed defconfigs:
arm-allmodconfig
arm-multi_v7_defconfig
arm-multi_v5_defconfig
Errors:
arm-allmodconfig
../net/core/sock.c:724:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:922:7: error: 'SO_ATTACH_BPF' undeclared (first use in this function)
../net/core/sock.c:939:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:978:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:983:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:996:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1002:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1075:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:1233:7: error: 'SO_GET_FILTER' undeclared (first use in this function)
../net/core/sock.c:1240:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1244:7: error: 'SO_BPF_EXTENSIONS' undeclared (first use in this function)
../net/core/sock.c:1248:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1253:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1258:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1262:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
Error: ../arch/arm/boot/dts/uniphier-ph1-pro4-sanji.dts:0.55-1.1 syntax error
Error: ../arch/arm/boot/dts/tegra30.dtsi:1.1-9 syntax error
Error: ../arch/arm/boot/dts/omap4-panda.dts:10.1-9 syntax error
Error: ../arch/arm/boot/dts/tegra20.dtsi:1.1-9 syntax error
Error: ../arch/arm/boot/dts/emev2.dtsi:11.1-9 syntax error
Error: ../arch/arm/boot/dts/tegra20.dtsi:1.1-9 syntax error
Error: ../arch/arm/boot/dts/tegra20.dtsi:1.1-9 syntax error
../arch/arm/boot/dts/omap3-gta04.dts:132:57: error: unterminated comment
../arch/arm/boot/dts/ccu8540.dts:13:23: fatal error: dbx5x0.dtsi: No such file or directory
Error: ../arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts:203.16-17 syntax error
Error: ../arch/arm/boot/dts/uniphier-ph1-pro4-ace.dts:0.53-1.1 syntax error
Error: ../arch/arm/boot/dts/arm-realview-eb-11mp-revb.dts:0.57-1.1 syntax error
Error: ../arch/arm/boot/dts/tegra20.dtsi:1.1-9 syntax error
Error: ../arch/arm/boot/dts/tegra30.dtsi:1.1-9 syntax error
Error: ../arch/arm/boot/dts/tegra20.dtsi:1.1-9 syntax error
Error: ../arch/arm/boot/dts/r8a7790.dtsi:13.1-9 syntax error
Error: ../arch/arm/boot/dts/omap4.dtsi:9.1-9 syntax error
Error: ../arch/arm/boot/dts/vf610-colibri.dts:91.5-6 syntax error
../net/sunrpc/xprtsock.c:1738:38: error: 'SO_REUSEPORT' undeclared (first use in this function)
../arch/arm/include/asm/parport.h:12:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'parport_pc_find_isa_ports'
../arch/arm/include/asm/parport.h:13:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'parport_pc_find_nonpci_ports'
../drivers/parport/parport_pc.c:3070:2: error: implicit declaration of function 'parport_pc_find_nonpci_ports' [-Werror=implicit-function-declaration]
ERROR (phandle_references): Reference to non-existent node or label "tc3589x_gpio"
ERROR (phandle_references): Reference to non-existent node or label "tc3589x_gpio"
ERROR (phandle_references): Reference to non-existent node or label "tc3589x_gpio"
ERROR (phandle_references): Reference to non-existent node or label "tc3589x_gpio"
ERROR: Input tree has errors, aborting (use -f to force output)
ERROR (phandle_references): Reference to non-existent node or label "tc3589x_gpio"
ERROR: Input tree has errors, aborting (use -f to force output)
ERROR (phandle_references): Reference to non-existent node or label "mainpllclk"
ERROR (phandle_references): Reference to non-existent node or label "refclksys"
ERROR (phandle_references): Reference to non-existent node or label "papllclk"
ERROR: Input tree has errors, aborting (use -f to force output)
arm-multi_v7_defconfig
../net/core/sock.c:724:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:922:7: error: 'SO_ATTACH_BPF' undeclared (first use in this function)
../net/core/sock.c:939:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:978:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:983:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:996:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1002:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1075:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:1233:7: error: 'SO_GET_FILTER' undeclared (first use in this function)
../net/core/sock.c:1240:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1244:7: error: 'SO_BPF_EXTENSIONS' undeclared (first use in this function)
../net/core/sock.c:1248:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1253:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1258:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1262:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/sunrpc/xprtsock.c:1738:38: error: 'SO_REUSEPORT' undeclared (first use in this function)
arm-multi_v5_defconfig
../net/core/sock.c:724:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:922:7: error: 'SO_ATTACH_BPF' undeclared (first use in this function)
../net/core/sock.c:939:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:978:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:983:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:996:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1002:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1075:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:1233:7: error: 'SO_GET_FILTER' undeclared (first use in this function)
../net/core/sock.c:1240:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1244:7: error: 'SO_BPF_EXTENSIONS' undeclared (first use in this function)
../net/core/sock.c:1248:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1253:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1258:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1262:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/sunrpc/xprtsock.c:1738:38: error: 'SO_REUSEPORT' undeclared (first use in this function)
-------------------------------------------------------------------------------
defconfigs with issues (other than build errors):
-------------------------------------------------------------------------------
Errors summary: 37
5 Error: ../arch/arm/boot/dts/tegra20.dtsi:1.1-9 syntax error
5 ERROR (phandle_references): Reference to non-existent node or label "tc3589x_gpio"
3 ERROR: Input tree has errors, aborting (use -f to force output)
3 ../net/sunrpc/xprtsock.c:1738:38: error: 'SO_REUSEPORT' undeclared (first use in this function)
3 ../net/core/sock.c:996:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
3 ../net/core/sock.c:983:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
3 ../net/core/sock.c:978:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
3 ../net/core/sock.c:939:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
3 ../net/core/sock.c:922:7: error: 'SO_ATTACH_BPF' undeclared (first use in this function)
3 ../net/core/sock.c:724:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
3 ../net/core/sock.c:1262:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
3 ../net/core/sock.c:1258:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
3 ../net/core/sock.c:1253:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
3 ../net/core/sock.c:1248:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
3 ../net/core/sock.c:1244:7: error: 'SO_BPF_EXTENSIONS' undeclared (first use in this function)
3 ../net/core/sock.c:1240:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
3 ../net/core/sock.c:1233:7: error: 'SO_GET_FILTER' undeclared (first use in this function)
3 ../net/core/sock.c:1075:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
3 ../net/core/sock.c:1002:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
2 Error: ../arch/arm/boot/dts/tegra30.dtsi:1.1-9 syntax error
1 Error: ../arch/arm/boot/dts/vf610-colibri.dts:91.5-6 syntax error
1 Error: ../arch/arm/boot/dts/uniphier-ph1-pro4-sanji.dts:0.55-1.1 syntax error
1 Error: ../arch/arm/boot/dts/uniphier-ph1-pro4-ace.dts:0.53-1.1 syntax error
1 Error: ../arch/arm/boot/dts/r8a7790.dtsi:13.1-9 syntax error
1 Error: ../arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts:203.16-17 syntax error
1 Error: ../arch/arm/boot/dts/omap4.dtsi:9.1-9 syntax error
1 Error: ../arch/arm/boot/dts/omap4-panda.dts:10.1-9 syntax error
1 Error: ../arch/arm/boot/dts/emev2.dtsi:11.1-9 syntax error
1 Error: ../arch/arm/boot/dts/arm-realview-eb-11mp-revb.dts:0.57-1.1 syntax error
1 ERROR (phandle_references): Reference to non-existent node or label "refclksys"
1 ERROR (phandle_references): Reference to non-existent node or label "papllclk"
1 ERROR (phandle_references): Reference to non-existent node or label "mainpllclk"
1 ../drivers/parport/parport_pc.c:3070:2: error: implicit declaration of function 'parport_pc_find_nonpci_ports' [-Werror=implicit-function-declaration]
1 ../arch/arm/include/asm/parport.h:13:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'parport_pc_find_nonpci_ports'
1 ../arch/arm/include/asm/parport.h:12:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'parport_pc_find_isa_ports'
1 ../arch/arm/boot/dts/omap3-gta04.dts:132:57: error: unterminated comment
1 ../arch/arm/boot/dts/ccu8540.dts:13:23: fatal error: dbx5x0.dtsi: No such file or directory
===============================================================================
Detailed per-defconfig build reports below:
-------------------------------------------------------------------------------
arm-allmodconfig : FAIL, 48 errors, 0 warnings, 0 section mismatches
Errors:
../net/core/sock.c:724:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:922:7: error: 'SO_ATTACH_BPF' undeclared (first use in this function)
../net/core/sock.c:939:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:978:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:983:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:996:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1002:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1075:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:1233:7: error: 'SO_GET_FILTER' undeclared (first use in this function)
../net/core/sock.c:1240:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1244:7: error: 'SO_BPF_EXTENSIONS' undeclared (first use in this function)
../net/core/sock.c:1248:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1253:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1258:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1262:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
Error: ../arch/arm/boot/dts/uniphier-ph1-pro4-sanji.dts:0.55-1.1 syntax error
Error: ../arch/arm/boot/dts/tegra30.dtsi:1.1-9 syntax error
Error: ../arch/arm/boot/dts/omap4-panda.dts:10.1-9 syntax error
Error: ../arch/arm/boot/dts/tegra20.dtsi:1.1-9 syntax error
Error: ../arch/arm/boot/dts/emev2.dtsi:11.1-9 syntax error
Error: ../arch/arm/boot/dts/tegra20.dtsi:1.1-9 syntax error
Error: ../arch/arm/boot/dts/tegra20.dtsi:1.1-9 syntax error
../arch/arm/boot/dts/omap3-gta04.dts:132:57: error: unterminated comment
../arch/arm/boot/dts/ccu8540.dts:13:23: fatal error: dbx5x0.dtsi: No such file or directory
Error: ../arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts:203.16-17 syntax error
Error: ../arch/arm/boot/dts/uniphier-ph1-pro4-ace.dts:0.53-1.1 syntax error
Error: ../arch/arm/boot/dts/arm-realview-eb-11mp-revb.dts:0.57-1.1 syntax error
Error: ../arch/arm/boot/dts/tegra20.dtsi:1.1-9 syntax error
Error: ../arch/arm/boot/dts/tegra30.dtsi:1.1-9 syntax error
Error: ../arch/arm/boot/dts/tegra20.dtsi:1.1-9 syntax error
Error: ../arch/arm/boot/dts/r8a7790.dtsi:13.1-9 syntax error
Error: ../arch/arm/boot/dts/omap4.dtsi:9.1-9 syntax error
Error: ../arch/arm/boot/dts/vf610-colibri.dts:91.5-6 syntax error
../net/sunrpc/xprtsock.c:1738:38: error: 'SO_REUSEPORT' undeclared (first use in this function)
../arch/arm/include/asm/parport.h:12:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'parport_pc_find_isa_ports'
../arch/arm/include/asm/parport.h:13:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'parport_pc_find_nonpci_ports'
../drivers/parport/parport_pc.c:3070:2: error: implicit declaration of function 'parport_pc_find_nonpci_ports' [-Werror=implicit-function-declaration]
ERROR (phandle_references): Reference to non-existent node or label "tc3589x_gpio"
ERROR (phandle_references): Reference to non-existent node or label "tc3589x_gpio"
ERROR (phandle_references): Reference to non-existent node or label "tc3589x_gpio"
ERROR (phandle_references): Reference to non-existent node or label "tc3589x_gpio"
ERROR: Input tree has errors, aborting (use -f to force output)
ERROR (phandle_references): Reference to non-existent node or label "tc3589x_gpio"
ERROR: Input tree has errors, aborting (use -f to force output)
ERROR (phandle_references): Reference to non-existent node or label "mainpllclk"
ERROR (phandle_references): Reference to non-existent node or label "refclksys"
ERROR (phandle_references): Reference to non-existent node or label "papllclk"
ERROR: Input tree has errors, aborting (use -f to force output)
-------------------------------------------------------------------------------
arm-multi_v7_defconfig : FAIL, 16 errors, 0 warnings, 0 section mismatches
Errors:
../net/core/sock.c:724:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:922:7: error: 'SO_ATTACH_BPF' undeclared (first use in this function)
../net/core/sock.c:939:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:978:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:983:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:996:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1002:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1075:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:1233:7: error: 'SO_GET_FILTER' undeclared (first use in this function)
../net/core/sock.c:1240:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1244:7: error: 'SO_BPF_EXTENSIONS' undeclared (first use in this function)
../net/core/sock.c:1248:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1253:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1258:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1262:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/sunrpc/xprtsock.c:1738:38: error: 'SO_REUSEPORT' undeclared (first use in this function)
-------------------------------------------------------------------------------
arm-multi_v5_defconfig : FAIL, 16 errors, 0 warnings, 0 section mismatches
Errors:
../net/core/sock.c:724:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:922:7: error: 'SO_ATTACH_BPF' undeclared (first use in this function)
../net/core/sock.c:939:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:978:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:983:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:996:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1002:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1075:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:1233:7: error: 'SO_GET_FILTER' undeclared (first use in this function)
../net/core/sock.c:1240:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1244:7: error: 'SO_BPF_EXTENSIONS' undeclared (first use in this function)
../net/core/sock.c:1248:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1253:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1258:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1262:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/sunrpc/xprtsock.c:1738:38: error: 'SO_REUSEPORT' undeclared (first use in this function)
-------------------------------------------------------------------------------
Passed with no errors, warnings or mismatches:
arm64-allnoconfig
arm64-allmodconfig
x86_64-defconfig
arm-allnoconfig
x86_64-allnoconfig
x86_64-allmodconfig
arm64-defconfig
From: Matthew Wilcox <mawilcox(a)microsoft.com>
f2fs specifies the __GFP_ZERO flag for allocating some of its pages.
Unfortunately, the page cache also uses the mapping's GFP flags for
allocating radix tree nodes. It always masked off the __GFP_HIGHMEM
flag, and masks off __GFP_ZERO in some paths, but not all. That causes
radix tree nodes to be allocated with a NULL list_head, which causes
backtraces like:
[<ffffff80086f4de0>] __list_del_entry+0x30/0xd0
[<ffffff8008362018>] list_lru_del+0xac/0x1ac
[<ffffff800830f04c>] page_cache_tree_insert+0xd8/0x110
The __GFP_DMA and __GFP_DMA32 flags would also be able to sneak through
if they are ever used. Fix them all by using GFP_RECLAIM_MASK at the
innermost location, and remove it from earlier in the callchain.
Fixes: 449dd6984d0e ("mm: keep page cache radix tree nodes in check")
Reported-by: Chris Fries <cfries(a)google.com>
Debugged-by: Minchan Kim <minchan(a)kernel.org>
Signed-off-by: Matthew Wilcox <mawilcox(a)microsoft.com>
Acked-by: Johannes Weiner <hannes(a)cmpxchg.org>
Acked-by: Michal Hocko <mhocko(a)suse.com>
Reviewed-by: Jan Kara <jack(a)suse.cz>
Cc: stable(a)vger.kernel.org
---
mm/filemap.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/mm/filemap.c b/mm/filemap.c
index c2147682f4c3..1a4bfc5ed3dc 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -785,7 +785,7 @@ int replace_page_cache_page(struct page *old, struct page *new, gfp_t gfp_mask)
VM_BUG_ON_PAGE(!PageLocked(new), new);
VM_BUG_ON_PAGE(new->mapping, new);
- error = radix_tree_preload(gfp_mask & ~__GFP_HIGHMEM);
+ error = radix_tree_preload(gfp_mask & GFP_RECLAIM_MASK);
if (!error) {
struct address_space *mapping = old->mapping;
void (*freepage)(struct page *);
@@ -841,7 +841,7 @@ static int __add_to_page_cache_locked(struct page *page,
return error;
}
- error = radix_tree_maybe_preload(gfp_mask & ~__GFP_HIGHMEM);
+ error = radix_tree_maybe_preload(gfp_mask & GFP_RECLAIM_MASK);
if (error) {
if (!huge)
mem_cgroup_cancel_charge(page, memcg, false);
@@ -1574,8 +1574,7 @@ struct page *pagecache_get_page(struct address_space *mapping, pgoff_t offset,
if (fgp_flags & FGP_ACCESSED)
__SetPageReferenced(page);
- err = add_to_page_cache_lru(page, mapping, offset,
- gfp_mask & GFP_RECLAIM_MASK);
+ err = add_to_page_cache_lru(page, mapping, offset, gfp_mask);
if (unlikely(err)) {
put_page(page);
page = NULL;
@@ -2378,7 +2377,7 @@ static int page_cache_read(struct file *file, pgoff_t offset, gfp_t gfp_mask)
if (!page)
return -ENOMEM;
- ret = add_to_page_cache_lru(page, mapping, offset, gfp_mask & GFP_KERNEL);
+ ret = add_to_page_cache_lru(page, mapping, offset, gfp_mask);
if (ret == 0)
ret = mapping->a_ops->readpage(file, page);
else if (ret == -EEXIST)
--
2.16.3
From: Andrew Morton <akpm(a)linux-foundation.org>
Subject: fs/reiserfs/journal.c: add missing resierfs_warning() arg
One use of the reiserfs_warning() macro in journal_init_dev() is missing a
parameter, causing the following warning:
REISERFS warning (device loop0): journal_init_dev: Cannot open '%s': %i journal_init_dev:
This also causes a WARN_ONCE() warning in the vsprintf code, and then a
panic if panic_on_warn is set.
Please remove unsupported %/ in format string
WARNING: CPU: 1 PID: 4480 at lib/vsprintf.c:2138 format_decode+0x77f/0x830 lib/vsprintf.c:2138
Kernel panic - not syncing: panic_on_warn set ...
Just add another string argument to the macro invocation.
Addresses https://syzkaller.appspot.com/bug?id=0627d4551fdc39bf1ef5d82cd9eef587047f77…
Link: http://lkml.kernel.org/r/d678ebe1-6f54-8090-df4c-b9affad62293@infradead.org
Signed-off-by: Randy Dunlap <rdunlap(a)infradead.org>
Reported-by: <syzbot+6bd77b88c1977c03f584(a)syzkaller.appspotmail.com>
Tested-by: Randy Dunlap <rdunlap(a)infradead.org>
Acked-by: Jeff Mahoney <jeffm(a)suse.com>
Cc: Alexander Viro <viro(a)zeniv.linux.org.uk>
Cc: Jan Kara <jack(a)suse.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
fs/reiserfs/journal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN fs/reiserfs/journal.c~fs-reiserfs-journalc-add-missing-resierfs_warning-arg fs/reiserfs/journal.c
--- a/fs/reiserfs/journal.c~fs-reiserfs-journalc-add-missing-resierfs_warning-arg
+++ a/fs/reiserfs/journal.c
@@ -2643,7 +2643,7 @@ static int journal_init_dev(struct super
if (IS_ERR(journal->j_dev_bd)) {
result = PTR_ERR(journal->j_dev_bd);
journal->j_dev_bd = NULL;
- reiserfs_warning(super,
+ reiserfs_warning(super, "sh-457",
"journal_init_dev: Cannot open '%s': %i",
jdev_name, result);
return result;
_
From: Kees Cook <keescook(a)chromium.org>
Subject: task_struct: only use anon struct under randstruct plugin
The original intent for always adding the anonymous struct in task_struct
was to make sure we had compiler coverage. However, this caused
pathological padding of 40 bytes at the start of task_struct. Instead,
move the anonymous struct to being only used when struct layout
randomization is enabled.
Link: http://lkml.kernel.org/r/20180327213609.GA2964@beast
Fixes: 29e48ce87f1e ("task_struct: Allow randomized")
Signed-off-by: Kees Cook <keescook(a)chromium.org>
Reported-by: Peter Zijlstra <peterz(a)infradead.org>
Cc: Peter Zijlstra <peterz(a)infradead.org>
Cc: Ingo Molnar <mingo(a)kernel.org>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
include/linux/compiler-clang.h | 3 ---
include/linux/compiler-gcc.h | 12 +++---------
2 files changed, 3 insertions(+), 12 deletions(-)
diff -puN include/linux/compiler-clang.h~task_struct-only-use-anon-struct-under-randstruct-plugin include/linux/compiler-clang.h
--- a/include/linux/compiler-clang.h~task_struct-only-use-anon-struct-under-randstruct-plugin
+++ a/include/linux/compiler-clang.h
@@ -17,9 +17,6 @@
*/
#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
-#define randomized_struct_fields_start struct {
-#define randomized_struct_fields_end };
-
/* all clang versions usable with the kernel support KASAN ABI version 5 */
#define KASAN_ABI_VERSION 5
diff -puN include/linux/compiler-gcc.h~task_struct-only-use-anon-struct-under-randstruct-plugin include/linux/compiler-gcc.h
--- a/include/linux/compiler-gcc.h~task_struct-only-use-anon-struct-under-randstruct-plugin
+++ a/include/linux/compiler-gcc.h
@@ -242,6 +242,9 @@
#if defined(RANDSTRUCT_PLUGIN) && !defined(__CHECKER__)
#define __randomize_layout __attribute__((randomize_layout))
#define __no_randomize_layout __attribute__((no_randomize_layout))
+/* This anon struct can add padding, so only enable it under randstruct. */
+#define randomized_struct_fields_start struct {
+#define randomized_struct_fields_end } __randomize_layout;
#endif
#endif /* GCC_VERSION >= 40500 */
@@ -256,15 +259,6 @@
*/
#define __visible __attribute__((externally_visible))
-/*
- * RANDSTRUCT_PLUGIN wants to use an anonymous struct, but it is only
- * possible since GCC 4.6. To provide as much build testing coverage
- * as possible, this is used for all GCC 4.6+ builds, and not just on
- * RANDSTRUCT_PLUGIN builds.
- */
-#define randomized_struct_fields_start struct {
-#define randomized_struct_fields_end } __randomize_layout;
-
#endif /* GCC_VERSION >= 40600 */
_
From: Claudio Imbrenda <imbrenda(a)linux.vnet.ibm.com>
Subject: mm/ksm.c: fix inconsistent accounting of zero pages
When using KSM with use_zero_pages, we replace anonymous pages containing
only zeroes with actual zero pages, which are not anonymous. We need to
do proper accounting of the mm counters, otherwise we will get wrong
values in /proc and a BUG message in dmesg when tearing down the mm.
Link: http://lkml.kernel.org/r/1522931274-15552-1-git-send-email-imbrenda@linux.v…
Fixes: e86c59b1b1 ("mm/ksm: improve deduplication of zero pages with colouring")
Signed-off-by: Claudio Imbrenda <imbrenda(a)linux.vnet.ibm.com>
Reviewed-by: Andrew Morton <akpm(a)linux-foundation.org>
Cc: Andrea Arcangeli <aarcange(a)redhat.com>
Cc: Minchan Kim <minchan(a)kernel.org>
Cc: Kirill A. Shutemov <kirill.shutemov(a)linux.intel.com>
Cc: Hugh Dickins <hughd(a)google.com>
Cc: Christian Borntraeger <borntraeger(a)de.ibm.com>
Cc: Gerald Schaefer <gerald.schaefer(a)de.ibm.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/ksm.c | 7 +++++++
1 file changed, 7 insertions(+)
diff -puN mm/ksm.c~mm-ksm-fix-inconsistent-accounting-of-zero-pages mm/ksm.c
--- a/mm/ksm.c~mm-ksm-fix-inconsistent-accounting-of-zero-pages
+++ a/mm/ksm.c
@@ -1131,6 +1131,13 @@ static int replace_page(struct vm_area_s
} else {
newpte = pte_mkspecial(pfn_pte(page_to_pfn(kpage),
vma->vm_page_prot));
+ /*
+ * We're replacing an anonymous page with a zero page, which is
+ * not anonymous. We need to do proper accounting otherwise we
+ * will get wrong values in /proc, and a BUG message in dmesg
+ * when tearing down the mm.
+ */
+ dec_mm_counter(mm, MM_ANONPAGES);
}
flush_cache_page(vma, addr, pte_pfn(*ptep));
_
Tree/Branch: v4.14.33
Git describe: v4.14.33
Commit: b867b7a7e5 Linux 4.14.33
Build Time: 82 min 46 sec
Passed: 5 / 11 ( 45.45 %)
Failed: 6 / 11 ( 54.55 %)
Errors: 75
Warnings: 2
Section Mismatches: 0
Failed defconfigs:
arm64-allmodconfig
arm-multi_v5_defconfig
arm-multi_v7_defconfig
arm-allmodconfig
x86_64-allmodconfig
arm64-defconfig
Errors:
arm64-allmodconfig
Error: ../arch/arm64/boot/dts/socionext/uniphier-ph1-ld20-ref.dts:0.65-1.1 syntax error
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-core.c:234:27: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/linux/build_bug.h:30:45: error: bit-field '<anonymous>' width not an integer constant
../drivers/media/cec/cec-adap.c:136:22: error: 'CEC_EVENT_FL_DROPPED_EVENTS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:161:8: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:167:28: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:694:17: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1387:21: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1547:25: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1782:6: error: implicit declaration of function 'cec_is_cdc_only' [-Werror=implicit-function-declaration]
../drivers/media/cec/cec-adap.c:1862:33: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:2003:33: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-api.c:167:7: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:168:7: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:197:31: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:380:23: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:381:29: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:452:10: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:599:27: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../drivers/media/platform/s5p-cec/s5p_cec.c:232:35: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../drivers/media/platform/vivid/vivid-cec.c:285:54: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
arm-multi_v5_defconfig
../net/socket.c:708:28: error: 'SCM_TIMESTAMPING_PKTINFO' undeclared (first use in this function)
../net/socket.c:764:30: error: 'SCM_TIMESTAMPING_OPT_STATS' undeclared (first use in this function)
../net/core/sock.c:727:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:930:7: error: 'SO_ATTACH_BPF' undeclared (first use in this function)
../net/core/sock.c:943:7: error: 'SO_ATTACH_REUSEPORT_CBPF' undeclared (first use in this function)
../net/core/sock.c:956:7: error: 'SO_ATTACH_REUSEPORT_EBPF' undeclared (first use in this function)
../net/core/sock.c:973:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1012:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1017:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1030:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1040:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1044:7: error: 'SO_CNX_ADVICE' undeclared (first use in this function)
../net/core/sock.c:1049:7: error: 'SO_ZEROCOPY' undeclared (first use in this function)
../net/core/sock.c:1144:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:1250:7: error: 'SO_PEERGROUPS' undeclared (first use in this function)
../net/core/sock.c:1323:7: error: 'SO_GET_FILTER' undeclared (first use in this function)
../net/core/sock.c:1330:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1334:7: error: 'SO_BPF_EXTENSIONS' undeclared (first use in this function)
../net/core/sock.c:1338:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1343:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1348:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1352:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1356:7: error: 'SO_MEMINFO' undeclared (first use in this function)
../net/core/sock.c:1373:7: error: 'SO_INCOMING_NAPI_ID' undeclared (first use in this function)
../net/core/sock.c:1383:7: error: 'SO_COOKIE' undeclared (first use in this function)
../net/core/sock.c:1390:7: error: 'SO_ZEROCOPY' undeclared (first use in this function)
../net/core/filter.c:3090:8: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/sunrpc/xprtsock.c:1772:38: error: 'SO_REUSEPORT' undeclared (first use in this function)
arm-multi_v7_defconfig
../net/socket.c:708:28: error: 'SCM_TIMESTAMPING_PKTINFO' undeclared (first use in this function)
../net/socket.c:764:30: error: 'SCM_TIMESTAMPING_OPT_STATS' undeclared (first use in this function)
../net/core/sock.c:727:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:930:7: error: 'SO_ATTACH_BPF' undeclared (first use in this function)
../net/core/sock.c:943:7: error: 'SO_ATTACH_REUSEPORT_CBPF' undeclared (first use in this function)
../net/core/sock.c:956:7: error: 'SO_ATTACH_REUSEPORT_EBPF' undeclared (first use in this function)
../net/core/sock.c:973:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1012:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1017:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1030:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1040:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1044:7: error: 'SO_CNX_ADVICE' undeclared (first use in this function)
../net/core/sock.c:1049:7: error: 'SO_ZEROCOPY' undeclared (first use in this function)
../net/core/sock.c:1144:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:1250:7: error: 'SO_PEERGROUPS' undeclared (first use in this function)
../net/core/sock.c:1323:7: error: 'SO_GET_FILTER' undeclared (first use in this function)
../net/core/sock.c:1330:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1334:7: error: 'SO_BPF_EXTENSIONS' undeclared (first use in this function)
../net/core/sock.c:1338:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1343:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1348:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1352:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1356:7: error: 'SO_MEMINFO' undeclared (first use in this function)
../net/core/sock.c:1373:7: error: 'SO_INCOMING_NAPI_ID' undeclared (first use in this function)
../net/core/sock.c:1383:7: error: 'SO_COOKIE' undeclared (first use in this function)
../net/core/sock.c:1390:7: error: 'SO_ZEROCOPY' undeclared (first use in this function)
../net/core/filter.c:3090:8: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/sunrpc/xprtsock.c:1772:38: error: 'SO_REUSEPORT' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
arm-allmodconfig
../net/socket.c:708:28: error: 'SCM_TIMESTAMPING_PKTINFO' undeclared (first use in this function)
../net/socket.c:764:30: error: 'SCM_TIMESTAMPING_OPT_STATS' undeclared (first use in this function)
Error: ../arch/arm/boot/dts/tegra20.dtsi:2.1-9 syntax error
Error: ../arch/arm/boot/dts/uniphier-proxstream2-gentil.dts:0.59-1.1 syntax error
Error: ../arch/arm/boot/dts/tegra20.dtsi:2.1-9 syntax error
../arch/arm/boot/dts/omap3-gta04.dts:132:57: error: unterminated comment
Error: ../arch/arm/boot/dts/tegra20.dtsi:2.1-9 syntax error
Error: ../arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts:203.16-17 syntax error
Error: ../arch/arm/boot/dts/uniphier-ph1-pro4-ref.dts:0.53-1.1 syntax error
Error: ../arch/arm/boot/dts/uniphier-ph1-sld8-ref.dts:0.53-1.1 syntax error
Error: ../arch/arm/boot/dts/uniphier-ph1-ld6b-ref.dts:0.53-1.1 syntax error
Error: ../arch/arm/boot/dts/uniphier-ph1-pro4-ace.dts:0.53-1.1 syntax error
Error: ../arch/arm/boot/dts/uniphier-proxstream2-vodka.dts:0.58-1.1 syntax error
Error: ../arch/arm/boot/dts/uniphier-ph1-pro4-sanji.dts:0.55-1.1 syntax error
Error: ../arch/arm/boot/dts/tegra30.dtsi:2.1-9 syntax error
Error: ../arch/arm/boot/dts/uniphier-ph1-ld4-ref.dts:0.52-1.1 syntax error
Error: ../arch/arm/boot/dts/tegra20.dtsi:2.1-9 syntax error
../arch/arm/boot/dts/ccu8540.dts:13:23: fatal error: dbx5x0.dtsi: No such file or directory
Error: ../arch/arm/boot/dts/r8a7790.dtsi:13.1-9 syntax error
Error: ../arch/arm/boot/dts/arm-realview-eb-11mp-revb.dts:0.57-1.1 syntax error
Error: ../arch/arm/boot/dts/vf610-colibri.dts:91.5-6 syntax error
Error: ../arch/arm/boot/dts/uniphier-ph1-sld3-ref.dts:0.53-1.1 syntax error
Error: ../arch/arm/boot/dts/tegra30.dtsi:2.1-9 syntax error
Error: ../arch/arm/boot/dts/omap4-panda.dts:10.1-9 syntax error
Error: ../arch/arm/boot/dts/tegra20.dtsi:2.1-9 syntax error
Error: ../arch/arm/boot/dts/omap4.dtsi:9.1-9 syntax error
Error: ../arch/arm/boot/dts/emev2.dtsi:11.1-9 syntax error
../net/core/sock.c:727:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:930:7: error: 'SO_ATTACH_BPF' undeclared (first use in this function)
../net/core/sock.c:943:7: error: 'SO_ATTACH_REUSEPORT_CBPF' undeclared (first use in this function)
../net/core/sock.c:956:7: error: 'SO_ATTACH_REUSEPORT_EBPF' undeclared (first use in this function)
../net/core/sock.c:973:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1012:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1017:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1030:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1040:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1044:7: error: 'SO_CNX_ADVICE' undeclared (first use in this function)
../net/core/sock.c:1049:7: error: 'SO_ZEROCOPY' undeclared (first use in this function)
../net/core/sock.c:1144:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:1250:7: error: 'SO_PEERGROUPS' undeclared (first use in this function)
../net/core/sock.c:1323:7: error: 'SO_GET_FILTER' undeclared (first use in this function)
../net/core/sock.c:1330:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1334:7: error: 'SO_BPF_EXTENSIONS' undeclared (first use in this function)
../net/core/sock.c:1338:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1343:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1348:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1352:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1356:7: error: 'SO_MEMINFO' undeclared (first use in this function)
../net/core/sock.c:1373:7: error: 'SO_INCOMING_NAPI_ID' undeclared (first use in this function)
../net/core/sock.c:1383:7: error: 'SO_COOKIE' undeclared (first use in this function)
../net/core/sock.c:1390:7: error: 'SO_ZEROCOPY' undeclared (first use in this function)
../net/core/filter.c:3090:8: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../net/sunrpc/xprtsock.c:1772:38: error: 'SO_REUSEPORT' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-core.c:234:27: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/linux/build_bug.h:30:45: error: bit-field '<anonymous>' width not an integer constant
../drivers/media/cec/cec-adap.c:136:22: error: 'CEC_EVENT_FL_DROPPED_EVENTS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:161:8: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:167:28: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:694:17: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1387:21: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1547:25: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1782:6: error: implicit declaration of function 'cec_is_cdc_only' [-Werror=implicit-function-declaration]
../drivers/media/cec/cec-adap.c:1862:33: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:2003:33: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-api.c:167:7: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:168:7: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:197:31: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:380:23: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:381:29: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:452:10: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:599:27: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-pin.c:789:37: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../arch/arm/include/asm/parport.h:12:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'parport_pc_find_isa_ports'
../arch/arm/include/asm/parport.h:13:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'parport_pc_find_nonpci_ports'
../drivers/parport/parport_pc.c:3070:2: error: implicit declaration of function 'parport_pc_find_nonpci_ports' [-Werror=implicit-function-declaration]
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../drivers/media/platform/s5p-cec/s5p_cec.c:232:35: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../drivers/media/platform/vivid/vivid-cec.c:285:54: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
ERROR: Input tree has errors, aborting (use -f to force output)
ERROR: Input tree has errors, aborting (use -f to force output)
ERROR: Input tree has errors, aborting (use -f to force output)
x86_64-allmodconfig
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-core.c:234:27: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/linux/build_bug.h:30:45: error: bit-field '<anonymous>' width not an integer constant
../drivers/media/cec/cec-adap.c:136:22: error: 'CEC_EVENT_FL_DROPPED_EVENTS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:161:8: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:167:28: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:694:17: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1387:21: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1547:25: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1782:6: error: implicit declaration of function 'cec_is_cdc_only' [-Werror=implicit-function-declaration]
../drivers/media/cec/cec-adap.c:1862:33: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:2003:33: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-api.c:167:7: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:168:7: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:197:31: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:380:23: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:381:29: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:452:10: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:599:27: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../drivers/media/platform/s5p-cec/s5p_cec.c:232:35: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../drivers/media/platform/vivid/vivid-cec.c:285:54: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
arm64-defconfig
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
-------------------------------------------------------------------------------
defconfigs with issues (other than build errors):
1 warnings 0 mismatches : arm64-allmodconfig
1 warnings 0 mismatches : arm-allmodconfig
2 warnings 0 mismatches : x86_64-allmodconfig
-------------------------------------------------------------------------------
Errors summary: 75
134 ../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
5 Error: ../arch/arm/boot/dts/tegra20.dtsi:2.1-9 syntax error
3 ERROR: Input tree has errors, aborting (use -f to force output)
3 ../net/sunrpc/xprtsock.c:1772:38: error: 'SO_REUSEPORT' undeclared (first use in this function)
3 ../net/socket.c:764:30: error: 'SCM_TIMESTAMPING_OPT_STATS' undeclared (first use in this function)
3 ../net/socket.c:708:28: error: 'SCM_TIMESTAMPING_PKTINFO' undeclared (first use in this function)
3 ../net/core/sock.c:973:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
3 ../net/core/sock.c:956:7: error: 'SO_ATTACH_REUSEPORT_EBPF' undeclared (first use in this function)
3 ../net/core/sock.c:943:7: error: 'SO_ATTACH_REUSEPORT_CBPF' undeclared (first use in this function)
3 ../net/core/sock.c:930:7: error: 'SO_ATTACH_BPF' undeclared (first use in this function)
3 ../net/core/sock.c:727:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
3 ../net/core/sock.c:1390:7: error: 'SO_ZEROCOPY' undeclared (first use in this function)
3 ../net/core/sock.c:1383:7: error: 'SO_COOKIE' undeclared (first use in this function)
3 ../net/core/sock.c:1373:7: error: 'SO_INCOMING_NAPI_ID' undeclared (first use in this function)
3 ../net/core/sock.c:1356:7: error: 'SO_MEMINFO' undeclared (first use in this function)
3 ../net/core/sock.c:1352:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
3 ../net/core/sock.c:1348:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
3 ../net/core/sock.c:1343:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
3 ../net/core/sock.c:1338:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
3 ../net/core/sock.c:1334:7: error: 'SO_BPF_EXTENSIONS' undeclared (first use in this function)
3 ../net/core/sock.c:1330:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
3 ../net/core/sock.c:1323:7: error: 'SO_GET_FILTER' undeclared (first use in this function)
3 ../net/core/sock.c:1250:7: error: 'SO_PEERGROUPS' undeclared (first use in this function)
3 ../net/core/sock.c:1144:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
3 ../net/core/sock.c:1049:7: error: 'SO_ZEROCOPY' undeclared (first use in this function)
3 ../net/core/sock.c:1044:7: error: 'SO_CNX_ADVICE' undeclared (first use in this function)
3 ../net/core/sock.c:1040:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
3 ../net/core/sock.c:1030:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
3 ../net/core/sock.c:1017:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
3 ../net/core/sock.c:1012:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
3 ../net/core/filter.c:3090:8: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
3 ../include/linux/build_bug.h:30:45: error: bit-field '<anonymous>' width not an integer constant
3 ../drivers/media/platform/vivid/vivid-cec.c:285:54: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
3 ../drivers/media/platform/s5p-cec/s5p_cec.c:232:35: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
3 ../drivers/media/cec/cec-core.c:234:27: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
3 ../drivers/media/cec/cec-api.c:599:27: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
3 ../drivers/media/cec/cec-api.c:452:10: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
3 ../drivers/media/cec/cec-api.c:381:29: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
3 ../drivers/media/cec/cec-api.c:380:23: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
3 ../drivers/media/cec/cec-api.c:197:31: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
3 ../drivers/media/cec/cec-api.c:168:7: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
3 ../drivers/media/cec/cec-api.c:167:7: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
3 ../drivers/media/cec/cec-adap.c:694:17: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
3 ../drivers/media/cec/cec-adap.c:2003:33: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
3 ../drivers/media/cec/cec-adap.c:1862:33: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
3 ../drivers/media/cec/cec-adap.c:1782:6: error: implicit declaration of function 'cec_is_cdc_only' [-Werror=implicit-function-declaration]
3 ../drivers/media/cec/cec-adap.c:167:28: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
3 ../drivers/media/cec/cec-adap.c:161:8: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
3 ../drivers/media/cec/cec-adap.c:1547:25: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
3 ../drivers/media/cec/cec-adap.c:1387:21: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
3 ../drivers/media/cec/cec-adap.c:136:22: error: 'CEC_EVENT_FL_DROPPED_EVENTS' undeclared (first use in this function)
2 Error: ../arch/arm/boot/dts/tegra30.dtsi:2.1-9 syntax error
1 Error: ../arch/arm64/boot/dts/socionext/uniphier-ph1-ld20-ref.dts:0.65-1.1 syntax error
1 Error: ../arch/arm/boot/dts/vf610-colibri.dts:91.5-6 syntax error
1 Error: ../arch/arm/boot/dts/uniphier-proxstream2-vodka.dts:0.58-1.1 syntax error
1 Error: ../arch/arm/boot/dts/uniphier-proxstream2-gentil.dts:0.59-1.1 syntax error
1 Error: ../arch/arm/boot/dts/uniphier-ph1-sld8-ref.dts:0.53-1.1 syntax error
1 Error: ../arch/arm/boot/dts/uniphier-ph1-sld3-ref.dts:0.53-1.1 syntax error
1 Error: ../arch/arm/boot/dts/uniphier-ph1-pro4-sanji.dts:0.55-1.1 syntax error
1 Error: ../arch/arm/boot/dts/uniphier-ph1-pro4-ref.dts:0.53-1.1 syntax error
1 Error: ../arch/arm/boot/dts/uniphier-ph1-pro4-ace.dts:0.53-1.1 syntax error
1 Error: ../arch/arm/boot/dts/uniphier-ph1-ld6b-ref.dts:0.53-1.1 syntax error
1 Error: ../arch/arm/boot/dts/uniphier-ph1-ld4-ref.dts:0.52-1.1 syntax error
1 Error: ../arch/arm/boot/dts/r8a7790.dtsi:13.1-9 syntax error
1 Error: ../arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts:203.16-17 syntax error
1 Error: ../arch/arm/boot/dts/omap4.dtsi:9.1-9 syntax error
1 Error: ../arch/arm/boot/dts/omap4-panda.dts:10.1-9 syntax error
1 Error: ../arch/arm/boot/dts/emev2.dtsi:11.1-9 syntax error
1 Error: ../arch/arm/boot/dts/arm-realview-eb-11mp-revb.dts:0.57-1.1 syntax error
1 ../drivers/parport/parport_pc.c:3070:2: error: implicit declaration of function 'parport_pc_find_nonpci_ports' [-Werror=implicit-function-declaration]
1 ../drivers/media/cec/cec-pin.c:789:37: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
1 ../arch/arm/include/asm/parport.h:13:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'parport_pc_find_nonpci_ports'
1 ../arch/arm/include/asm/parport.h:12:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'parport_pc_find_isa_ports'
1 ../arch/arm/boot/dts/omap3-gta04.dts:132:57: error: unterminated comment
1 ../arch/arm/boot/dts/ccu8540.dts:13:23: fatal error: dbx5x0.dtsi: No such file or directory
Warnings Summary: 2
3 ../drivers/media/cec/cec-adap.c:88:18: warning: unused variable 'max_events' [-Wunused-variable]
1 drivers/target/iscsi/.tmp_iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0x78f: sibling call from callable instruction with modified stack frame
===============================================================================
Detailed per-defconfig build reports below:
-------------------------------------------------------------------------------
arm64-allmodconfig : FAIL, 55 errors, 1 warnings, 0 section mismatches
Errors:
Error: ../arch/arm64/boot/dts/socionext/uniphier-ph1-ld20-ref.dts:0.65-1.1 syntax error
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-core.c:234:27: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/linux/build_bug.h:30:45: error: bit-field '<anonymous>' width not an integer constant
../drivers/media/cec/cec-adap.c:136:22: error: 'CEC_EVENT_FL_DROPPED_EVENTS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:161:8: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:167:28: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:694:17: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1387:21: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1547:25: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1782:6: error: implicit declaration of function 'cec_is_cdc_only' [-Werror=implicit-function-declaration]
../drivers/media/cec/cec-adap.c:1862:33: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:2003:33: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-api.c:167:7: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:168:7: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:197:31: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:380:23: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:381:29: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:452:10: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:599:27: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../drivers/media/platform/s5p-cec/s5p_cec.c:232:35: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../drivers/media/platform/vivid/vivid-cec.c:285:54: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
Warnings:
../drivers/media/cec/cec-adap.c:88:18: warning: unused variable 'max_events' [-Wunused-variable]
-------------------------------------------------------------------------------
arm-multi_v5_defconfig : FAIL, 28 errors, 0 warnings, 0 section mismatches
Errors:
../net/socket.c:708:28: error: 'SCM_TIMESTAMPING_PKTINFO' undeclared (first use in this function)
../net/socket.c:764:30: error: 'SCM_TIMESTAMPING_OPT_STATS' undeclared (first use in this function)
../net/core/sock.c:727:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:930:7: error: 'SO_ATTACH_BPF' undeclared (first use in this function)
../net/core/sock.c:943:7: error: 'SO_ATTACH_REUSEPORT_CBPF' undeclared (first use in this function)
../net/core/sock.c:956:7: error: 'SO_ATTACH_REUSEPORT_EBPF' undeclared (first use in this function)
../net/core/sock.c:973:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1012:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1017:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1030:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1040:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1044:7: error: 'SO_CNX_ADVICE' undeclared (first use in this function)
../net/core/sock.c:1049:7: error: 'SO_ZEROCOPY' undeclared (first use in this function)
../net/core/sock.c:1144:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:1250:7: error: 'SO_PEERGROUPS' undeclared (first use in this function)
../net/core/sock.c:1323:7: error: 'SO_GET_FILTER' undeclared (first use in this function)
../net/core/sock.c:1330:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1334:7: error: 'SO_BPF_EXTENSIONS' undeclared (first use in this function)
../net/core/sock.c:1338:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1343:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1348:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1352:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1356:7: error: 'SO_MEMINFO' undeclared (first use in this function)
../net/core/sock.c:1373:7: error: 'SO_INCOMING_NAPI_ID' undeclared (first use in this function)
../net/core/sock.c:1383:7: error: 'SO_COOKIE' undeclared (first use in this function)
../net/core/sock.c:1390:7: error: 'SO_ZEROCOPY' undeclared (first use in this function)
../net/core/filter.c:3090:8: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/sunrpc/xprtsock.c:1772:38: error: 'SO_REUSEPORT' undeclared (first use in this function)
-------------------------------------------------------------------------------
arm-multi_v7_defconfig : FAIL, 51 errors, 0 warnings, 0 section mismatches
Errors:
../net/socket.c:708:28: error: 'SCM_TIMESTAMPING_PKTINFO' undeclared (first use in this function)
../net/socket.c:764:30: error: 'SCM_TIMESTAMPING_OPT_STATS' undeclared (first use in this function)
../net/core/sock.c:727:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:930:7: error: 'SO_ATTACH_BPF' undeclared (first use in this function)
../net/core/sock.c:943:7: error: 'SO_ATTACH_REUSEPORT_CBPF' undeclared (first use in this function)
../net/core/sock.c:956:7: error: 'SO_ATTACH_REUSEPORT_EBPF' undeclared (first use in this function)
../net/core/sock.c:973:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1012:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1017:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1030:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1040:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1044:7: error: 'SO_CNX_ADVICE' undeclared (first use in this function)
../net/core/sock.c:1049:7: error: 'SO_ZEROCOPY' undeclared (first use in this function)
../net/core/sock.c:1144:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:1250:7: error: 'SO_PEERGROUPS' undeclared (first use in this function)
../net/core/sock.c:1323:7: error: 'SO_GET_FILTER' undeclared (first use in this function)
../net/core/sock.c:1330:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1334:7: error: 'SO_BPF_EXTENSIONS' undeclared (first use in this function)
../net/core/sock.c:1338:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1343:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1348:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1352:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1356:7: error: 'SO_MEMINFO' undeclared (first use in this function)
../net/core/sock.c:1373:7: error: 'SO_INCOMING_NAPI_ID' undeclared (first use in this function)
../net/core/sock.c:1383:7: error: 'SO_COOKIE' undeclared (first use in this function)
../net/core/sock.c:1390:7: error: 'SO_ZEROCOPY' undeclared (first use in this function)
../net/core/filter.c:3090:8: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/sunrpc/xprtsock.c:1772:38: error: 'SO_REUSEPORT' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
-------------------------------------------------------------------------------
arm-allmodconfig : FAIL, 121 errors, 1 warnings, 0 section mismatches
Errors:
../net/socket.c:708:28: error: 'SCM_TIMESTAMPING_PKTINFO' undeclared (first use in this function)
../net/socket.c:764:30: error: 'SCM_TIMESTAMPING_OPT_STATS' undeclared (first use in this function)
Error: ../arch/arm/boot/dts/tegra20.dtsi:2.1-9 syntax error
Error: ../arch/arm/boot/dts/uniphier-proxstream2-gentil.dts:0.59-1.1 syntax error
Error: ../arch/arm/boot/dts/tegra20.dtsi:2.1-9 syntax error
../arch/arm/boot/dts/omap3-gta04.dts:132:57: error: unterminated comment
Error: ../arch/arm/boot/dts/tegra20.dtsi:2.1-9 syntax error
Error: ../arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts:203.16-17 syntax error
Error: ../arch/arm/boot/dts/uniphier-ph1-pro4-ref.dts:0.53-1.1 syntax error
Error: ../arch/arm/boot/dts/uniphier-ph1-sld8-ref.dts:0.53-1.1 syntax error
Error: ../arch/arm/boot/dts/uniphier-ph1-ld6b-ref.dts:0.53-1.1 syntax error
Error: ../arch/arm/boot/dts/uniphier-ph1-pro4-ace.dts:0.53-1.1 syntax error
Error: ../arch/arm/boot/dts/uniphier-proxstream2-vodka.dts:0.58-1.1 syntax error
Error: ../arch/arm/boot/dts/uniphier-ph1-pro4-sanji.dts:0.55-1.1 syntax error
Error: ../arch/arm/boot/dts/tegra30.dtsi:2.1-9 syntax error
Error: ../arch/arm/boot/dts/uniphier-ph1-ld4-ref.dts:0.52-1.1 syntax error
Error: ../arch/arm/boot/dts/tegra20.dtsi:2.1-9 syntax error
../arch/arm/boot/dts/ccu8540.dts:13:23: fatal error: dbx5x0.dtsi: No such file or directory
Error: ../arch/arm/boot/dts/r8a7790.dtsi:13.1-9 syntax error
Error: ../arch/arm/boot/dts/arm-realview-eb-11mp-revb.dts:0.57-1.1 syntax error
Error: ../arch/arm/boot/dts/vf610-colibri.dts:91.5-6 syntax error
Error: ../arch/arm/boot/dts/uniphier-ph1-sld3-ref.dts:0.53-1.1 syntax error
Error: ../arch/arm/boot/dts/tegra30.dtsi:2.1-9 syntax error
Error: ../arch/arm/boot/dts/omap4-panda.dts:10.1-9 syntax error
Error: ../arch/arm/boot/dts/tegra20.dtsi:2.1-9 syntax error
Error: ../arch/arm/boot/dts/omap4.dtsi:9.1-9 syntax error
Error: ../arch/arm/boot/dts/emev2.dtsi:11.1-9 syntax error
../net/core/sock.c:727:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:930:7: error: 'SO_ATTACH_BPF' undeclared (first use in this function)
../net/core/sock.c:943:7: error: 'SO_ATTACH_REUSEPORT_CBPF' undeclared (first use in this function)
../net/core/sock.c:956:7: error: 'SO_ATTACH_REUSEPORT_EBPF' undeclared (first use in this function)
../net/core/sock.c:973:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1012:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1017:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1030:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1040:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1044:7: error: 'SO_CNX_ADVICE' undeclared (first use in this function)
../net/core/sock.c:1049:7: error: 'SO_ZEROCOPY' undeclared (first use in this function)
../net/core/sock.c:1144:7: error: 'SO_REUSEPORT' undeclared (first use in this function)
../net/core/sock.c:1250:7: error: 'SO_PEERGROUPS' undeclared (first use in this function)
../net/core/sock.c:1323:7: error: 'SO_GET_FILTER' undeclared (first use in this function)
../net/core/sock.c:1330:7: error: 'SO_LOCK_FILTER' undeclared (first use in this function)
../net/core/sock.c:1334:7: error: 'SO_BPF_EXTENSIONS' undeclared (first use in this function)
../net/core/sock.c:1338:7: error: 'SO_SELECT_ERR_QUEUE' undeclared (first use in this function)
../net/core/sock.c:1343:7: error: 'SO_BUSY_POLL' undeclared (first use in this function)
../net/core/sock.c:1348:7: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../net/core/sock.c:1352:7: error: 'SO_INCOMING_CPU' undeclared (first use in this function)
../net/core/sock.c:1356:7: error: 'SO_MEMINFO' undeclared (first use in this function)
../net/core/sock.c:1373:7: error: 'SO_INCOMING_NAPI_ID' undeclared (first use in this function)
../net/core/sock.c:1383:7: error: 'SO_COOKIE' undeclared (first use in this function)
../net/core/sock.c:1390:7: error: 'SO_ZEROCOPY' undeclared (first use in this function)
../net/core/filter.c:3090:8: error: 'SO_MAX_PACING_RATE' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../net/sunrpc/xprtsock.c:1772:38: error: 'SO_REUSEPORT' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-core.c:234:27: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/linux/build_bug.h:30:45: error: bit-field '<anonymous>' width not an integer constant
../drivers/media/cec/cec-adap.c:136:22: error: 'CEC_EVENT_FL_DROPPED_EVENTS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:161:8: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:167:28: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:694:17: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1387:21: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1547:25: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1782:6: error: implicit declaration of function 'cec_is_cdc_only' [-Werror=implicit-function-declaration]
../drivers/media/cec/cec-adap.c:1862:33: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:2003:33: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-api.c:167:7: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:168:7: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:197:31: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:380:23: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:381:29: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:452:10: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:599:27: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-pin.c:789:37: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../arch/arm/include/asm/parport.h:12:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'parport_pc_find_isa_ports'
../arch/arm/include/asm/parport.h:13:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'parport_pc_find_nonpci_ports'
../drivers/parport/parport_pc.c:3070:2: error: implicit declaration of function 'parport_pc_find_nonpci_ports' [-Werror=implicit-function-declaration]
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../drivers/media/platform/s5p-cec/s5p_cec.c:232:35: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../drivers/media/platform/vivid/vivid-cec.c:285:54: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
ERROR: Input tree has errors, aborting (use -f to force output)
ERROR: Input tree has errors, aborting (use -f to force output)
ERROR: Input tree has errors, aborting (use -f to force output)
Warnings:
../drivers/media/cec/cec-adap.c:88:18: warning: unused variable 'max_events' [-Wunused-variable]
-------------------------------------------------------------------------------
x86_64-allmodconfig : FAIL, 53 errors, 2 warnings, 0 section mismatches
Errors:
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-core.c:234:27: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/linux/build_bug.h:30:45: error: bit-field '<anonymous>' width not an integer constant
../drivers/media/cec/cec-adap.c:136:22: error: 'CEC_EVENT_FL_DROPPED_EVENTS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:161:8: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:167:28: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:694:17: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1387:21: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1547:25: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:1782:6: error: implicit declaration of function 'cec_is_cdc_only' [-Werror=implicit-function-declaration]
../drivers/media/cec/cec-adap.c:1862:33: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-adap.c:2003:33: error: 'CEC_MSG_FL_REPLY_TO_FOLLOWERS' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../drivers/media/cec/cec-api.c:167:7: error: 'CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:168:7: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:197:31: error: 'CEC_LOG_ADDRS_FL_CDC_ONLY' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:380:23: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:381:29: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:452:10: error: 'CEC_EVENT_PIN_CEC_LOW' undeclared (first use in this function)
../drivers/media/cec/cec-api.c:599:27: error: 'CEC_MODE_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../drivers/media/platform/s5p-cec/s5p_cec.c:232:35: error: 'CEC_CAP_NEEDS_HPD' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../drivers/media/platform/vivid/vivid-cec.c:285:54: error: 'CEC_CAP_MONITOR_PIN' undeclared (first use in this function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
Warnings:
../drivers/media/cec/cec-adap.c:88:18: warning: unused variable 'max_events' [-Wunused-variable]
drivers/target/iscsi/.tmp_iscsi_target.o: warning: objtool: iscsit_handle_task_mgt_cmd()+0x78f: sibling call from callable instruction with modified stack frame
-------------------------------------------------------------------------------
arm64-defconfig : FAIL, 3 errors, 0 warnings, 0 section mismatches
Errors:
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
../include/media/cec.h:94:24: error: 'CEC_EVENT_PIN_CEC_HIGH' undeclared here (not in a function)
-------------------------------------------------------------------------------
Passed with no errors, warnings or mismatches:
x86_64-allnoconfig
arm64-allnoconfig
arm-allnoconfig
arm-multi_v4t_defconfig
x86_64-defconfig
The new ACPI _LSx methods moved the 'dimm locked' error status from the
result of ND_CMD_GET_CONFIG_SIZE to an error status result of
ND_CMD_GET_CONFIG_DATA. Error code translation prevents the proper error
code from making it back to the 'nd_dimm' driver.
Fix the error code propagation and add some unit test infrastructure for
regression testing this case.
---
Dan Williams (5):
libnvdimm, dimm: handle EACCES failures from label reads
tools/testing/nvdimm: allow custom error code injection
tools/testing/nvdimm: support nfit_test_dimm attributes under nfit_test.1
tools/testing/nvdimm: fix missing newline in nfit_test_dimm 'handle' attribute
tools/testing/nvdimm: enable labels for nfit_test.1 dimms
drivers/nvdimm/dimm_devs.c | 22 +++++-----
tools/testing/nvdimm/test/nfit.c | 84 +++++++++++++++++++++++++++++---------
2 files changed, 77 insertions(+), 29 deletions(-)
This is a note to let you know that I've just added the patch titled
clk: at91: fix clk-generated compilation
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:
clk-at91-fix-clk-generated-compilation.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 4a5f06a01cfd1f7a9141bdb760bf5b68cca7f224 Mon Sep 17 00:00:00 2001
From: Alexandre Belloni <alexandre.belloni(a)free-electrons.com>
Date: Mon, 5 Jun 2017 00:02:57 +0200
Subject: clk: at91: fix clk-generated compilation
From: Alexandre Belloni <alexandre.belloni(a)free-electrons.com>
commit 4a5f06a01cfd1f7a9141bdb760bf5b68cca7f224 upstream.
Fix missing }
Signed-off-by: Alexandre Belloni <alexandre.belloni(a)free-electrons.com>
Signed-off-by: Stephen Boyd <sboyd(a)codeaurora.org>
Cc: Amit Pundir <amit.pundir(a)linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/clk/at91/clk-generated.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/clk/at91/clk-generated.c
+++ b/drivers/clk/at91/clk-generated.c
@@ -266,6 +266,7 @@ at91_clk_register_generated(struct regma
if (ret) {
kfree(gck);
hw = ERR_PTR(ret);
+ }
return hw;
}
Patches currently in stable-queue which might be from alexandre.belloni(a)free-electrons.com are
queue-4.9/clk-at91-fix-clk-generated-parenting.patch
queue-4.9/rtc-interface-validate-alarm-time-before-handling-rollover.patch
queue-4.9/rtc-m41t80-fix-sqw-dividers-override-when-setting-a-date.patch
queue-4.9/rtc-snvs-fix-an-incorrect-check-of-return-value.patch
queue-4.9/clk-at91-fix-clk-generated-compilation.patch
queue-4.9/rtc-opal-handle-disabled-tpo-in-opal_get_tpo_time.patch
This is a note to let you know that I've just added the patch titled
vlan: also check phy_driver ts_info for vlan's real device
to the 4.16-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:
vlan-also-check-phy_driver-ts_info-for-vlan-s-real-device.patch
and it can be found in the queue-4.16 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 Tue Apr 10 23:19:25 CEST 2018
From: Hangbin Liu <liuhangbin(a)gmail.com>
Date: Fri, 30 Mar 2018 09:44:00 +0800
Subject: vlan: also check phy_driver ts_info for vlan's real device
From: Hangbin Liu <liuhangbin(a)gmail.com>
[ Upstream commit ec1d8ccb07deaf30fd0508af6755364ac47dc08d ]
Just like function ethtool_get_ts_info(), we should also consider the
phy_driver ts_info call back. For example, driver dp83640.
Fixes: 37dd9255b2f6 ("vlan: Pass ethtool get_ts_info queries to real device.")
Acked-by: Richard Cochran <richardcochran(a)gmail.com>
Signed-off-by: Hangbin Liu <liuhangbin(a)gmail.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/8021q/vlan_dev.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -29,6 +29,7 @@
#include <linux/net_tstamp.h>
#include <linux/etherdevice.h>
#include <linux/ethtool.h>
+#include <linux/phy.h>
#include <net/arp.h>
#include <net/switchdev.h>
@@ -665,8 +666,11 @@ static int vlan_ethtool_get_ts_info(stru
{
const struct vlan_dev_priv *vlan = vlan_dev_priv(dev);
const struct ethtool_ops *ops = vlan->real_dev->ethtool_ops;
+ struct phy_device *phydev = vlan->real_dev->phydev;
- if (ops->get_ts_info) {
+ if (phydev && phydev->drv && phydev->drv->ts_info) {
+ return phydev->drv->ts_info(phydev, info);
+ } else if (ops->get_ts_info) {
return ops->get_ts_info(vlan->real_dev, info);
} else {
info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE |
Patches currently in stable-queue which might be from liuhangbin(a)gmail.com are
queue-4.16/vlan-also-check-phy_driver-ts_info-for-vlan-s-real-device.patch
This is a note to let you know that I've just added the patch titled
sky2: Increase D3 delay to sky2 stops working after suspend
to the 4.16-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:
sky2-increase-d3-delay-to-sky2-stops-working-after-suspend.patch
and it can be found in the queue-4.16 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 Tue Apr 10 23:19:25 CEST 2018
From: Kai-Heng Feng <kai.heng.feng(a)canonical.com>
Date: Sat, 31 Mar 2018 23:42:03 +0800
Subject: sky2: Increase D3 delay to sky2 stops working after suspend
From: Kai-Heng Feng <kai.heng.feng(a)canonical.com>
[ Upstream commit afb133637071be6deeb8b3d0e55593ffbf63c527 ]
The sky2 ethernet stops working after system resume from suspend:
[ 582.852065] sky2 0000:04:00.0: Refused to change power state, currently in D3
The current 150ms delay is not enough, change it to 200ms can solve the
issue.
BugLink: https://bugs.launchpad.net/bugs/1758507
Cc: Stable <stable(a)vger.kernel.org>
Signed-off-by: Kai-Heng Feng <kai.heng.feng(a)canonical.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/ethernet/marvell/sky2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/ethernet/marvell/sky2.c
+++ b/drivers/net/ethernet/marvell/sky2.c
@@ -5087,7 +5087,7 @@ static int sky2_probe(struct pci_dev *pd
INIT_WORK(&hw->restart_work, sky2_restart);
pci_set_drvdata(pdev, hw);
- pdev->d3_delay = 150;
+ pdev->d3_delay = 200;
return 0;
Patches currently in stable-queue which might be from kai.heng.feng(a)canonical.com are
queue-4.16/sky2-increase-d3-delay-to-sky2-stops-working-after-suspend.patch
This is a note to let you know that I've just added the patch titled
vti6: better validate user provided tunnel names
to the 4.16-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:
vti6-better-validate-user-provided-tunnel-names.patch
and it can be found in the queue-4.16 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 Tue Apr 10 23:19:25 CEST 2018
From: Eric Dumazet <edumazet(a)google.com>
Date: Thu, 5 Apr 2018 06:39:31 -0700
Subject: vti6: better validate user provided tunnel names
From: Eric Dumazet <edumazet(a)google.com>
[ Upstream commit 537b361fbcbcc3cd6fe2bb47069fd292b9256d16 ]
Use valid_name() to make sure user does not provide illegal
device name.
Fixes: ed1efb2aefbb ("ipv6: Add support for IPsec virtual tunnel interfaces")
Signed-off-by: Eric Dumazet <edumazet(a)google.com>
Cc: Steffen Klassert <steffen.klassert(a)secunet.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/ipv6/ip6_vti.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--- a/net/ipv6/ip6_vti.c
+++ b/net/ipv6/ip6_vti.c
@@ -212,10 +212,13 @@ static struct ip6_tnl *vti6_tnl_create(s
char name[IFNAMSIZ];
int err;
- if (p->name[0])
+ if (p->name[0]) {
+ if (!dev_valid_name(p->name))
+ goto failed;
strlcpy(name, p->name, IFNAMSIZ);
- else
+ } else {
sprintf(name, "ip6_vti%%d");
+ }
dev = alloc_netdev(sizeof(*t), name, NET_NAME_UNKNOWN, vti6_dev_setup);
if (!dev)
Patches currently in stable-queue which might be from edumazet(a)google.com are
queue-4.16/sctp-sctp_sockaddr_af-must-check-minimal-addr-length-for-af_inet6.patch
queue-4.16/pptp-remove-a-buggy-dst-release-in-pptp_connect.patch
queue-4.16/net-fool-proof-dev_valid_name.patch
queue-4.16/vti6-better-validate-user-provided-tunnel-names.patch
queue-4.16/ipv6-sit-better-validate-user-provided-tunnel-names.patch
queue-4.16/ip6_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.16/sctp-do-not-leak-kernel-memory-to-user-space.patch
queue-4.16/ip_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.16/ip6_gre-better-validate-user-provided-tunnel-names.patch
This is a note to let you know that I've just added the patch titled
sctp: sctp_sockaddr_af must check minimal addr length for AF_INET6
to the 4.16-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:
sctp-sctp_sockaddr_af-must-check-minimal-addr-length-for-af_inet6.patch
and it can be found in the queue-4.16 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 Tue Apr 10 23:19:25 CEST 2018
From: Eric Dumazet <edumazet(a)google.com>
Date: Sun, 8 Apr 2018 07:52:08 -0700
Subject: sctp: sctp_sockaddr_af must check minimal addr length for AF_INET6
From: Eric Dumazet <edumazet(a)google.com>
[ Upstream commit 81e98370293afcb58340ce8bd71af7b97f925c26 ]
Check must happen before call to ipv6_addr_v4mapped()
syzbot report was :
BUG: KMSAN: uninit-value in sctp_sockaddr_af net/sctp/socket.c:359 [inline]
BUG: KMSAN: uninit-value in sctp_do_bind+0x60f/0xdc0 net/sctp/socket.c:384
CPU: 0 PID: 3576 Comm: syzkaller968804 Not tainted 4.16.0+ #82
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x185/0x1d0 lib/dump_stack.c:53
kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067
__msan_warning_32+0x6c/0xb0 mm/kmsan/kmsan_instr.c:676
sctp_sockaddr_af net/sctp/socket.c:359 [inline]
sctp_do_bind+0x60f/0xdc0 net/sctp/socket.c:384
sctp_bind+0x149/0x190 net/sctp/socket.c:332
inet6_bind+0x1fd/0x1820 net/ipv6/af_inet6.c:293
SYSC_bind+0x3f2/0x4b0 net/socket.c:1474
SyS_bind+0x54/0x80 net/socket.c:1460
do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x3d/0xa2
RIP: 0033:0x43fd49
RSP: 002b:00007ffe99df3d28 EFLAGS: 00000213 ORIG_RAX: 0000000000000031
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 000000000043fd49
RDX: 0000000000000010 RSI: 0000000020000000 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 00000000004002c8 R09: 00000000004002c8
R10: 00000000004002c8 R11: 0000000000000213 R12: 0000000000401670
R13: 0000000000401700 R14: 0000000000000000 R15: 0000000000000000
Local variable description: ----address@SYSC_bind
Variable was created at:
SYSC_bind+0x6f/0x4b0 net/socket.c:1461
SyS_bind+0x54/0x80 net/socket.c:1460
Signed-off-by: Eric Dumazet <edumazet(a)google.com>
Cc: Vlad Yasevich <vyasevich(a)gmail.com>
Cc: Neil Horman <nhorman(a)tuxdriver.com>
Reported-by: syzbot <syzkaller(a)googlegroups.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/sctp/socket.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -354,11 +354,14 @@ static struct sctp_af *sctp_sockaddr_af(
if (!opt->pf->af_supported(addr->sa.sa_family, opt))
return NULL;
- /* V4 mapped address are really of AF_INET family */
- if (addr->sa.sa_family == AF_INET6 &&
- ipv6_addr_v4mapped(&addr->v6.sin6_addr) &&
- !opt->pf->af_supported(AF_INET, opt))
- return NULL;
+ if (addr->sa.sa_family == AF_INET6) {
+ if (len < SIN6_LEN_RFC2133)
+ return NULL;
+ /* V4 mapped address are really of AF_INET family */
+ if (ipv6_addr_v4mapped(&addr->v6.sin6_addr) &&
+ !opt->pf->af_supported(AF_INET, opt))
+ return NULL;
+ }
/* If we get this far, af is valid. */
af = sctp_get_af_specific(addr->sa.sa_family);
Patches currently in stable-queue which might be from edumazet(a)google.com are
queue-4.16/sctp-sctp_sockaddr_af-must-check-minimal-addr-length-for-af_inet6.patch
queue-4.16/pptp-remove-a-buggy-dst-release-in-pptp_connect.patch
queue-4.16/net-fool-proof-dev_valid_name.patch
queue-4.16/vti6-better-validate-user-provided-tunnel-names.patch
queue-4.16/ipv6-sit-better-validate-user-provided-tunnel-names.patch
queue-4.16/ip6_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.16/sctp-do-not-leak-kernel-memory-to-user-space.patch
queue-4.16/ip_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.16/ip6_gre-better-validate-user-provided-tunnel-names.patch
This is a note to let you know that I've just added the patch titled
sctp: do not leak kernel memory to user space
to the 4.16-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:
sctp-do-not-leak-kernel-memory-to-user-space.patch
and it can be found in the queue-4.16 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 Tue Apr 10 23:19:25 CEST 2018
From: Eric Dumazet <edumazet(a)google.com>
Date: Sat, 7 Apr 2018 17:15:22 -0700
Subject: sctp: do not leak kernel memory to user space
From: Eric Dumazet <edumazet(a)google.com>
[ Upstream commit 6780db244d6b1537d139dea0ec8aad10cf9e4adb ]
syzbot produced a nice report [1]
Issue here is that a recvmmsg() managed to leak 8 bytes of kernel memory
to user space, because sin_zero (padding field) was not properly cleared.
[1]
BUG: KMSAN: uninit-value in copy_to_user include/linux/uaccess.h:184 [inline]
BUG: KMSAN: uninit-value in move_addr_to_user+0x32e/0x530 net/socket.c:227
CPU: 1 PID: 3586 Comm: syzkaller481044 Not tainted 4.16.0+ #82
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x185/0x1d0 lib/dump_stack.c:53
kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067
kmsan_internal_check_memory+0x164/0x1d0 mm/kmsan/kmsan.c:1176
kmsan_copy_to_user+0x69/0x160 mm/kmsan/kmsan.c:1199
copy_to_user include/linux/uaccess.h:184 [inline]
move_addr_to_user+0x32e/0x530 net/socket.c:227
___sys_recvmsg+0x4e2/0x810 net/socket.c:2211
__sys_recvmmsg+0x54e/0xdb0 net/socket.c:2313
SYSC_recvmmsg+0x29b/0x3e0 net/socket.c:2394
SyS_recvmmsg+0x76/0xa0 net/socket.c:2378
do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x3d/0xa2
RIP: 0033:0x4401c9
RSP: 002b:00007ffc56f73098 EFLAGS: 00000217 ORIG_RAX: 000000000000012b
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 00000000004401c9
RDX: 0000000000000001 RSI: 0000000020003ac0 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 0000000020003bc0 R09: 0000000000000010
R10: 0000000000000000 R11: 0000000000000217 R12: 0000000000401af0
R13: 0000000000401b80 R14: 0000000000000000 R15: 0000000000000000
Local variable description: ----addr@___sys_recvmsg
Variable was created at:
___sys_recvmsg+0xd5/0x810 net/socket.c:2172
__sys_recvmmsg+0x54e/0xdb0 net/socket.c:2313
Bytes 8-15 of 16 are uninitialized
==================================================================
Kernel panic - not syncing: panic_on_warn set ...
CPU: 1 PID: 3586 Comm: syzkaller481044 Tainted: G B 4.16.0+ #82
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x185/0x1d0 lib/dump_stack.c:53
panic+0x39d/0x940 kernel/panic.c:183
kmsan_report+0x238/0x240 mm/kmsan/kmsan.c:1083
kmsan_internal_check_memory+0x164/0x1d0 mm/kmsan/kmsan.c:1176
kmsan_copy_to_user+0x69/0x160 mm/kmsan/kmsan.c:1199
copy_to_user include/linux/uaccess.h:184 [inline]
move_addr_to_user+0x32e/0x530 net/socket.c:227
___sys_recvmsg+0x4e2/0x810 net/socket.c:2211
__sys_recvmmsg+0x54e/0xdb0 net/socket.c:2313
SYSC_recvmmsg+0x29b/0x3e0 net/socket.c:2394
SyS_recvmmsg+0x76/0xa0 net/socket.c:2378
do_syscall_64+0x309/0x430 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x3d/0xa2
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Eric Dumazet <edumazet(a)google.com>
Cc: Vlad Yasevich <vyasevich(a)gmail.com>
Cc: Neil Horman <nhorman(a)tuxdriver.com>
Reported-by: syzbot <syzkaller(a)googlegroups.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/sctp/ipv6.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -728,8 +728,10 @@ static int sctp_v6_addr_to_user(struct s
sctp_v6_map_v4(addr);
}
- if (addr->sa.sa_family == AF_INET)
+ if (addr->sa.sa_family == AF_INET) {
+ memset(addr->v4.sin_zero, 0, sizeof(addr->v4.sin_zero));
return sizeof(struct sockaddr_in);
+ }
return sizeof(struct sockaddr_in6);
}
Patches currently in stable-queue which might be from edumazet(a)google.com are
queue-4.16/sctp-sctp_sockaddr_af-must-check-minimal-addr-length-for-af_inet6.patch
queue-4.16/pptp-remove-a-buggy-dst-release-in-pptp_connect.patch
queue-4.16/net-fool-proof-dev_valid_name.patch
queue-4.16/vti6-better-validate-user-provided-tunnel-names.patch
queue-4.16/ipv6-sit-better-validate-user-provided-tunnel-names.patch
queue-4.16/ip6_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.16/sctp-do-not-leak-kernel-memory-to-user-space.patch
queue-4.16/ip_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.16/ip6_gre-better-validate-user-provided-tunnel-names.patch
This is a note to let you know that I've just added the patch titled
pptp: remove a buggy dst release in pptp_connect()
to the 4.16-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:
pptp-remove-a-buggy-dst-release-in-pptp_connect.patch
and it can be found in the queue-4.16 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 Tue Apr 10 23:19:25 CEST 2018
From: Eric Dumazet <edumazet(a)google.com>
Date: Mon, 2 Apr 2018 18:48:37 -0700
Subject: pptp: remove a buggy dst release in pptp_connect()
From: Eric Dumazet <edumazet(a)google.com>
[ Upstream commit bfacfb457b36911a10140b8cb3ce76a74883ac5a ]
Once dst has been cached in socket via sk_setup_caps(),
it is illegal to call ip_rt_put() (or dst_release()),
since sk_setup_caps() did not change dst refcount.
We can still dereference it since we hold socket lock.
Caugth by syzbot :
BUG: KASAN: use-after-free in atomic_dec_return include/asm-generic/atomic-instrumented.h:198 [inline]
BUG: KASAN: use-after-free in dst_release+0x27/0xa0 net/core/dst.c:185
Write of size 4 at addr ffff8801c54dc040 by task syz-executor4/20088
CPU: 1 PID: 20088 Comm: syz-executor4 Not tainted 4.16.0+ #376
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x1a7/0x27d lib/dump_stack.c:53
print_address_description+0x73/0x250 mm/kasan/report.c:256
kasan_report_error mm/kasan/report.c:354 [inline]
kasan_report+0x23c/0x360 mm/kasan/report.c:412
check_memory_region_inline mm/kasan/kasan.c:260 [inline]
check_memory_region+0x137/0x190 mm/kasan/kasan.c:267
kasan_check_write+0x14/0x20 mm/kasan/kasan.c:278
atomic_dec_return include/asm-generic/atomic-instrumented.h:198 [inline]
dst_release+0x27/0xa0 net/core/dst.c:185
sk_dst_set include/net/sock.h:1812 [inline]
sk_dst_reset include/net/sock.h:1824 [inline]
sock_setbindtodevice net/core/sock.c:610 [inline]
sock_setsockopt+0x431/0x1b20 net/core/sock.c:707
SYSC_setsockopt net/socket.c:1845 [inline]
SyS_setsockopt+0x2ff/0x360 net/socket.c:1828
do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x4552d9
RSP: 002b:00007f4878126c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 00007f48781276d4 RCX: 00000000004552d9
RDX: 0000000000000019 RSI: 0000000000000001 RDI: 0000000000000013
RBP: 000000000072bea0 R08: 0000000000000010 R09: 0000000000000000
R10: 00000000200010c0 R11: 0000000000000246 R12: 00000000ffffffff
R13: 0000000000000526 R14: 00000000006fac30 R15: 0000000000000000
Allocated by task 20088:
save_stack+0x43/0xd0 mm/kasan/kasan.c:447
set_track mm/kasan/kasan.c:459 [inline]
kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:552
kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:489
kmem_cache_alloc+0x12e/0x760 mm/slab.c:3542
dst_alloc+0x11f/0x1a0 net/core/dst.c:104
rt_dst_alloc+0xe9/0x540 net/ipv4/route.c:1520
__mkroute_output net/ipv4/route.c:2265 [inline]
ip_route_output_key_hash_rcu+0xa49/0x2c60 net/ipv4/route.c:2493
ip_route_output_key_hash+0x20b/0x370 net/ipv4/route.c:2322
__ip_route_output_key include/net/route.h:126 [inline]
ip_route_output_flow+0x26/0xa0 net/ipv4/route.c:2577
ip_route_output_ports include/net/route.h:163 [inline]
pptp_connect+0xa84/0x1170 drivers/net/ppp/pptp.c:453
SYSC_connect+0x213/0x4a0 net/socket.c:1639
SyS_connect+0x24/0x30 net/socket.c:1620
do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x42/0xb7
Freed by task 20082:
save_stack+0x43/0xd0 mm/kasan/kasan.c:447
set_track mm/kasan/kasan.c:459 [inline]
__kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:520
kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:527
__cache_free mm/slab.c:3486 [inline]
kmem_cache_free+0x83/0x2a0 mm/slab.c:3744
dst_destroy+0x266/0x380 net/core/dst.c:140
dst_destroy_rcu+0x16/0x20 net/core/dst.c:153
__rcu_reclaim kernel/rcu/rcu.h:178 [inline]
rcu_do_batch kernel/rcu/tree.c:2675 [inline]
invoke_rcu_callbacks kernel/rcu/tree.c:2930 [inline]
__rcu_process_callbacks kernel/rcu/tree.c:2897 [inline]
rcu_process_callbacks+0xd6c/0x17b0 kernel/rcu/tree.c:2914
__do_softirq+0x2d7/0xb85 kernel/softirq.c:285
The buggy address belongs to the object at ffff8801c54dc000
which belongs to the cache ip_dst_cache of size 168
The buggy address is located 64 bytes inside of
168-byte region [ffff8801c54dc000, ffff8801c54dc0a8)
The buggy address belongs to the page:
page:ffffea0007153700 count:1 mapcount:0 mapping:ffff8801c54dc000 index:0x0
flags: 0x2fffc0000000100(slab)
raw: 02fffc0000000100 ffff8801c54dc000 0000000000000000 0000000100000010
raw: ffffea0006b34b20 ffffea0006b6c1e0 ffff8801d674a1c0 0000000000000000
page dumped because: kasan: bad access detected
Signed-off-by: Eric Dumazet <edumazet(a)google.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/ppp/pptp.c | 1 -
1 file changed, 1 deletion(-)
--- a/drivers/net/ppp/pptp.c
+++ b/drivers/net/ppp/pptp.c
@@ -464,7 +464,6 @@ static int pptp_connect(struct socket *s
po->chan.mtu = dst_mtu(&rt->dst);
if (!po->chan.mtu)
po->chan.mtu = PPP_MRU;
- ip_rt_put(rt);
po->chan.mtu -= PPTP_HEADER_OVERHEAD;
po->chan.hdrlen = 2 + sizeof(struct pptp_gre_header);
Patches currently in stable-queue which might be from edumazet(a)google.com are
queue-4.16/sctp-sctp_sockaddr_af-must-check-minimal-addr-length-for-af_inet6.patch
queue-4.16/pptp-remove-a-buggy-dst-release-in-pptp_connect.patch
queue-4.16/net-fool-proof-dev_valid_name.patch
queue-4.16/vti6-better-validate-user-provided-tunnel-names.patch
queue-4.16/ipv6-sit-better-validate-user-provided-tunnel-names.patch
queue-4.16/ip6_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.16/sctp-do-not-leak-kernel-memory-to-user-space.patch
queue-4.16/ip_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.16/ip6_gre-better-validate-user-provided-tunnel-names.patch
This is a note to let you know that I've just added the patch titled
nfp: use full 40 bits of the NSP buffer address
to the 4.16-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:
nfp-use-full-40-bits-of-the-nsp-buffer-address.patch
and it can be found in the queue-4.16 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 Tue Apr 10 23:19:25 CEST 2018
From: Dirk van der Merwe <dirk.vandermerwe(a)netronome.com>
Date: Tue, 3 Apr 2018 17:24:23 -0700
Subject: nfp: use full 40 bits of the NSP buffer address
From: Dirk van der Merwe <dirk.vandermerwe(a)netronome.com>
[ Upstream commit 1489bbd10e16079ce30a53d3c22a431fd47af791 ]
The NSP default buffer is a piece of NFP memory where additional
command data can be placed. Its format has been copied from
host buffer, but the PCIe selection bits do not make sense in
this case. If those get masked out from a NFP address - writes
to random place in the chip memory may be issued and crash the
device.
Even in the general NSP buffer case, it doesn't make sense to have the
PCIe selection bits there anymore. These are unused at the moment, and
when it becomes necessary, the PCIe selection bits should rather be
moved to another register to utilise more bits for the buffer address.
This has never been an issue because the buffer used to be
allocated in memory with less-than-38-bit-long address but that
is about to change.
Fixes: 1a64821c6af7 ("nfp: add support for service processor access")
Signed-off-by: Dirk van der Merwe <dirk.vandermerwe(a)netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski(a)netronome.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--- a/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c
+++ b/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c
@@ -71,10 +71,11 @@
/* CPP address to retrieve the data from */
#define NSP_BUFFER 0x10
#define NSP_BUFFER_CPP GENMASK_ULL(63, 40)
-#define NSP_BUFFER_PCIE GENMASK_ULL(39, 38)
-#define NSP_BUFFER_ADDRESS GENMASK_ULL(37, 0)
+#define NSP_BUFFER_ADDRESS GENMASK_ULL(39, 0)
#define NSP_DFLT_BUFFER 0x18
+#define NSP_DFLT_BUFFER_CPP GENMASK_ULL(63, 40)
+#define NSP_DFLT_BUFFER_ADDRESS GENMASK_ULL(39, 0)
#define NSP_DFLT_BUFFER_CONFIG 0x20
#define NSP_DFLT_BUFFER_SIZE_MB GENMASK_ULL(7, 0)
@@ -427,8 +428,8 @@ __nfp_nsp_command_buf(struct nfp_nsp *ns
if (err < 0)
return err;
- cpp_id = FIELD_GET(NSP_BUFFER_CPP, reg) << 8;
- cpp_buf = FIELD_GET(NSP_BUFFER_ADDRESS, reg);
+ cpp_id = FIELD_GET(NSP_DFLT_BUFFER_CPP, reg) << 8;
+ cpp_buf = FIELD_GET(NSP_DFLT_BUFFER_ADDRESS, reg);
if (in_buf && in_size) {
err = nfp_cpp_write(cpp, cpp_id, cpp_buf, in_buf, in_size);
Patches currently in stable-queue which might be from dirk.vandermerwe(a)netronome.com are
queue-4.16/nfp-use-full-40-bits-of-the-nsp-buffer-address.patch
This is a note to let you know that I've just added the patch titled
net_sched: fix a missing idr_remove() in u32_delete_key()
to the 4.16-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:
net_sched-fix-a-missing-idr_remove-in-u32_delete_key.patch
and it can be found in the queue-4.16 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 Tue Apr 10 23:19:25 CEST 2018
From: Cong Wang <xiyou.wangcong(a)gmail.com>
Date: Fri, 6 Apr 2018 17:19:41 -0700
Subject: net_sched: fix a missing idr_remove() in u32_delete_key()
From: Cong Wang <xiyou.wangcong(a)gmail.com>
[ Upstream commit f12c643209db0626f2f54780d86bb93bfa7a9c2d ]
When we delete a u32 key via u32_delete_key(), we forget to
call idr_remove() to remove its handle from IDR.
Fixes: e7614370d6f0 ("net_sched: use idr to allocate u32 filter handles")
Reported-by: Marcin Kabiesz <admin(a)hostcenter.eu>
Tested-by: Marcin Kabiesz <admin(a)hostcenter.eu>
Signed-off-by: Cong Wang <xiyou.wangcong(a)gmail.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/sched/cls_u32.c | 1 +
1 file changed, 1 insertion(+)
--- a/net/sched/cls_u32.c
+++ b/net/sched/cls_u32.c
@@ -489,6 +489,7 @@ static int u32_delete_key(struct tcf_pro
RCU_INIT_POINTER(*kp, key->next);
tcf_unbind_filter(tp, &key->res);
+ idr_remove(&ht->handle_idr, key->handle);
tcf_exts_get_net(&key->exts);
call_rcu(&key->rcu, u32_delete_key_freepf_rcu);
return 0;
Patches currently in stable-queue which might be from xiyou.wangcong(a)gmail.com are
queue-4.16/net_sched-fix-a-missing-idr_remove-in-u32_delete_key.patch
This is a note to let you know that I've just added the patch titled
net/ipv6: Increment OUTxxx counters after netfilter hook
to the 4.16-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:
net-ipv6-increment-outxxx-counters-after-netfilter-hook.patch
and it can be found in the queue-4.16 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 Tue Apr 10 23:19:25 CEST 2018
From: Jeff Barnhill <0xeffeff(a)gmail.com>
Date: Thu, 5 Apr 2018 21:29:47 +0000
Subject: net/ipv6: Increment OUTxxx counters after netfilter hook
From: Jeff Barnhill <0xeffeff(a)gmail.com>
[ Upstream commit 71a1c915238c970cd9bdd5bf158b1279d6b6d55b ]
At the end of ip6_forward(), IPSTATS_MIB_OUTFORWDATAGRAMS and
IPSTATS_MIB_OUTOCTETS are incremented immediately before the NF_HOOK call
for NFPROTO_IPV6 / NF_INET_FORWARD. As a result, these counters get
incremented regardless of whether or not the netfilter hook allows the
packet to continue being processed. This change increments the counters
in ip6_forward_finish() so that it will not happen if the netfilter hook
chooses to terminate the packet, which is similar to how IPv4 works.
Signed-off-by: Jeff Barnhill <0xeffeff(a)gmail.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/ipv6/ip6_output.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -375,6 +375,11 @@ static int ip6_forward_proxy_check(struc
static inline int ip6_forward_finish(struct net *net, struct sock *sk,
struct sk_buff *skb)
{
+ struct dst_entry *dst = skb_dst(skb);
+
+ __IP6_INC_STATS(net, ip6_dst_idev(dst), IPSTATS_MIB_OUTFORWDATAGRAMS);
+ __IP6_ADD_STATS(net, ip6_dst_idev(dst), IPSTATS_MIB_OUTOCTETS, skb->len);
+
return dst_output(net, sk, skb);
}
@@ -569,8 +574,6 @@ int ip6_forward(struct sk_buff *skb)
hdr->hop_limit--;
- __IP6_INC_STATS(net, ip6_dst_idev(dst), IPSTATS_MIB_OUTFORWDATAGRAMS);
- __IP6_ADD_STATS(net, ip6_dst_idev(dst), IPSTATS_MIB_OUTOCTETS, skb->len);
return NF_HOOK(NFPROTO_IPV6, NF_INET_FORWARD,
net, NULL, skb, skb->dev, dst->dev,
ip6_forward_finish);
Patches currently in stable-queue which might be from 0xeffeff(a)gmail.com are
queue-4.16/net-ipv6-increment-outxxx-counters-after-netfilter-hook.patch
This is a note to let you know that I've just added the patch titled
net: dsa: Discard frames from unused ports
to the 4.16-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:
net-dsa-discard-frames-from-unused-ports.patch
and it can be found in the queue-4.16 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 Tue Apr 10 23:19:25 CEST 2018
From: Andrew Lunn <andrew(a)lunn.ch>
Date: Sat, 7 Apr 2018 20:37:40 +0200
Subject: net: dsa: Discard frames from unused ports
From: Andrew Lunn <andrew(a)lunn.ch>
[ Upstream commit fc5f33768cca7144f8d793205b229d46740d183b ]
The Marvell switches under some conditions will pass a frame to the
host with the port being the CPU port. Such frames are invalid, and
should be dropped. Not dropping them can result in a crash when
incrementing the receive statistics for an invalid port.
Reported-by: Chris Healy <cphealy(a)gmail.com>
Fixes: 91da11f870f0 ("net: Distributed Switch Architecture protocol support")
Signed-off-by: Andrew Lunn <andrew(a)lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli(a)gmail.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/dsa/dsa_priv.h | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/net/dsa/dsa_priv.h
+++ b/net/dsa/dsa_priv.h
@@ -126,6 +126,7 @@ static inline struct net_device *dsa_mas
struct dsa_port *cpu_dp = dev->dsa_ptr;
struct dsa_switch_tree *dst = cpu_dp->dst;
struct dsa_switch *ds;
+ struct dsa_port *slave_port;
if (device < 0 || device >= DSA_MAX_SWITCHES)
return NULL;
@@ -137,7 +138,12 @@ static inline struct net_device *dsa_mas
if (port < 0 || port >= ds->num_ports)
return NULL;
- return ds->ports[port].slave;
+ slave_port = &ds->ports[port];
+
+ if (unlikely(slave_port->type != DSA_PORT_TYPE_USER))
+ return NULL;
+
+ return slave_port->slave;
}
/* port.c */
Patches currently in stable-queue which might be from andrew(a)lunn.ch are
queue-4.16/net-dsa-discard-frames-from-unused-ports.patch
This is a note to let you know that I've just added the patch titled
net: fool proof dev_valid_name()
to the 4.16-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:
net-fool-proof-dev_valid_name.patch
and it can be found in the queue-4.16 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 Tue Apr 10 23:19:25 CEST 2018
From: Eric Dumazet <edumazet(a)google.com>
Date: Thu, 5 Apr 2018 06:39:26 -0700
Subject: net: fool proof dev_valid_name()
From: Eric Dumazet <edumazet(a)google.com>
[ Upstream commit a9d48205d0aedda021fc3728972a9e9934c2b9de ]
We want to use dev_valid_name() to validate tunnel names,
so better use strnlen(name, IFNAMSIZ) than strlen(name) to make
sure to not upset KASAN.
Signed-off-by: Eric Dumazet <edumazet(a)google.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/core/dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1027,7 +1027,7 @@ bool dev_valid_name(const char *name)
{
if (*name == '\0')
return false;
- if (strlen(name) >= IFNAMSIZ)
+ if (strnlen(name, IFNAMSIZ) == IFNAMSIZ)
return false;
if (!strcmp(name, ".") || !strcmp(name, ".."))
return false;
Patches currently in stable-queue which might be from edumazet(a)google.com are
queue-4.16/sctp-sctp_sockaddr_af-must-check-minimal-addr-length-for-af_inet6.patch
queue-4.16/pptp-remove-a-buggy-dst-release-in-pptp_connect.patch
queue-4.16/net-fool-proof-dev_valid_name.patch
queue-4.16/vti6-better-validate-user-provided-tunnel-names.patch
queue-4.16/ipv6-sit-better-validate-user-provided-tunnel-names.patch
queue-4.16/ip6_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.16/sctp-do-not-leak-kernel-memory-to-user-space.patch
queue-4.16/ip_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.16/ip6_gre-better-validate-user-provided-tunnel-names.patch
This is a note to let you know that I've just added the patch titled
ipv6: sit: better validate user provided tunnel names
to the 4.16-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:
ipv6-sit-better-validate-user-provided-tunnel-names.patch
and it can be found in the queue-4.16 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 Tue Apr 10 23:19:25 CEST 2018
From: Eric Dumazet <edumazet(a)google.com>
Date: Thu, 5 Apr 2018 06:39:28 -0700
Subject: ipv6: sit: better validate user provided tunnel names
From: Eric Dumazet <edumazet(a)google.com>
[ Upstream commit b95211e066fc3494b7c115060b2297b4ba21f025 ]
Use dev_valid_name() to make sure user does not provide illegal
device name.
syzbot caught the following bug :
BUG: KASAN: stack-out-of-bounds in strlcpy include/linux/string.h:300 [inline]
BUG: KASAN: stack-out-of-bounds in ipip6_tunnel_locate+0x63b/0xaa0 net/ipv6/sit.c:254
Write of size 33 at addr ffff8801b64076d8 by task syzkaller932654/4453
CPU: 0 PID: 4453 Comm: syzkaller932654 Not tainted 4.16.0+ #1
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x1b9/0x29f lib/dump_stack.c:53
print_address_description+0x6c/0x20b mm/kasan/report.c:256
kasan_report_error mm/kasan/report.c:354 [inline]
kasan_report.cold.7+0xac/0x2f5 mm/kasan/report.c:412
check_memory_region_inline mm/kasan/kasan.c:260 [inline]
check_memory_region+0x13e/0x1b0 mm/kasan/kasan.c:267
memcpy+0x37/0x50 mm/kasan/kasan.c:303
strlcpy include/linux/string.h:300 [inline]
ipip6_tunnel_locate+0x63b/0xaa0 net/ipv6/sit.c:254
ipip6_tunnel_ioctl+0xe71/0x241b net/ipv6/sit.c:1221
dev_ifsioc+0x43e/0xb90 net/core/dev_ioctl.c:334
dev_ioctl+0x69a/0xcc0 net/core/dev_ioctl.c:525
sock_ioctl+0x47e/0x680 net/socket.c:1015
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:500 [inline]
do_vfs_ioctl+0x1cf/0x1650 fs/ioctl.c:684
ksys_ioctl+0xa9/0xd0 fs/ioctl.c:701
SYSC_ioctl fs/ioctl.c:708 [inline]
SyS_ioctl+0x24/0x30 fs/ioctl.c:706
do_syscall_64+0x29e/0x9d0 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x42/0xb7
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Eric Dumazet <edumazet(a)google.com>
Reported-by: syzbot <syzkaller(a)googlegroups.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/ipv6/sit.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -250,11 +250,13 @@ static struct ip_tunnel *ipip6_tunnel_lo
if (!create)
goto failed;
- if (parms->name[0])
+ if (parms->name[0]) {
+ if (!dev_valid_name(parms->name))
+ goto failed;
strlcpy(name, parms->name, IFNAMSIZ);
- else
+ } else {
strcpy(name, "sit%d");
-
+ }
dev = alloc_netdev(sizeof(*t), name, NET_NAME_UNKNOWN,
ipip6_tunnel_setup);
if (!dev)
Patches currently in stable-queue which might be from edumazet(a)google.com are
queue-4.16/sctp-sctp_sockaddr_af-must-check-minimal-addr-length-for-af_inet6.patch
queue-4.16/pptp-remove-a-buggy-dst-release-in-pptp_connect.patch
queue-4.16/net-fool-proof-dev_valid_name.patch
queue-4.16/vti6-better-validate-user-provided-tunnel-names.patch
queue-4.16/ipv6-sit-better-validate-user-provided-tunnel-names.patch
queue-4.16/ip6_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.16/sctp-do-not-leak-kernel-memory-to-user-space.patch
queue-4.16/ip_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.16/ip6_gre-better-validate-user-provided-tunnel-names.patch
This is a note to let you know that I've just added the patch titled
ip_tunnel: better validate user provided tunnel names
to the 4.16-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:
ip_tunnel-better-validate-user-provided-tunnel-names.patch
and it can be found in the queue-4.16 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 Tue Apr 10 23:19:25 CEST 2018
From: Eric Dumazet <edumazet(a)google.com>
Date: Thu, 5 Apr 2018 06:39:27 -0700
Subject: ip_tunnel: better validate user provided tunnel names
From: Eric Dumazet <edumazet(a)google.com>
[ Upstream commit 9cb726a212a82c88c98aa9f0037fd04777cd8fe5 ]
Use dev_valid_name() to make sure user does not provide illegal
device name.
syzbot caught the following bug :
BUG: KASAN: stack-out-of-bounds in strlcpy include/linux/string.h:300 [inline]
BUG: KASAN: stack-out-of-bounds in __ip_tunnel_create+0xca/0x6b0 net/ipv4/ip_tunnel.c:257
Write of size 20 at addr ffff8801ac79f810 by task syzkaller268107/4482
CPU: 0 PID: 4482 Comm: syzkaller268107 Not tainted 4.16.0+ #1
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x1b9/0x29f lib/dump_stack.c:53
print_address_description+0x6c/0x20b mm/kasan/report.c:256
kasan_report_error mm/kasan/report.c:354 [inline]
kasan_report.cold.7+0xac/0x2f5 mm/kasan/report.c:412
check_memory_region_inline mm/kasan/kasan.c:260 [inline]
check_memory_region+0x13e/0x1b0 mm/kasan/kasan.c:267
memcpy+0x37/0x50 mm/kasan/kasan.c:303
strlcpy include/linux/string.h:300 [inline]
__ip_tunnel_create+0xca/0x6b0 net/ipv4/ip_tunnel.c:257
ip_tunnel_create net/ipv4/ip_tunnel.c:352 [inline]
ip_tunnel_ioctl+0x818/0xd40 net/ipv4/ip_tunnel.c:861
ipip_tunnel_ioctl+0x1c5/0x420 net/ipv4/ipip.c:350
dev_ifsioc+0x43e/0xb90 net/core/dev_ioctl.c:334
dev_ioctl+0x69a/0xcc0 net/core/dev_ioctl.c:525
sock_ioctl+0x47e/0x680 net/socket.c:1015
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:500 [inline]
do_vfs_ioctl+0x1cf/0x1650 fs/ioctl.c:684
ksys_ioctl+0xa9/0xd0 fs/ioctl.c:701
SYSC_ioctl fs/ioctl.c:708 [inline]
SyS_ioctl+0x24/0x30 fs/ioctl.c:706
do_syscall_64+0x29e/0x9d0 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x42/0xb7
Fixes: c54419321455 ("GRE: Refactor GRE tunneling code.")
Signed-off-by: Eric Dumazet <edumazet(a)google.com>
Reported-by: syzbot <syzkaller(a)googlegroups.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/ipv4/ip_tunnel.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
--- a/net/ipv4/ip_tunnel.c
+++ b/net/ipv4/ip_tunnel.c
@@ -253,13 +253,14 @@ static struct net_device *__ip_tunnel_cr
struct net_device *dev;
char name[IFNAMSIZ];
- if (parms->name[0])
+ err = -E2BIG;
+ if (parms->name[0]) {
+ if (!dev_valid_name(parms->name))
+ goto failed;
strlcpy(name, parms->name, IFNAMSIZ);
- else {
- if (strlen(ops->kind) > (IFNAMSIZ - 3)) {
- err = -E2BIG;
+ } else {
+ if (strlen(ops->kind) > (IFNAMSIZ - 3))
goto failed;
- }
strlcpy(name, ops->kind, IFNAMSIZ);
strncat(name, "%d", 2);
}
Patches currently in stable-queue which might be from edumazet(a)google.com are
queue-4.16/sctp-sctp_sockaddr_af-must-check-minimal-addr-length-for-af_inet6.patch
queue-4.16/pptp-remove-a-buggy-dst-release-in-pptp_connect.patch
queue-4.16/net-fool-proof-dev_valid_name.patch
queue-4.16/vti6-better-validate-user-provided-tunnel-names.patch
queue-4.16/ipv6-sit-better-validate-user-provided-tunnel-names.patch
queue-4.16/ip6_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.16/sctp-do-not-leak-kernel-memory-to-user-space.patch
queue-4.16/ip_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.16/ip6_gre-better-validate-user-provided-tunnel-names.patch
This is a note to let you know that I've just added the patch titled
ip6_tunnel: better validate user provided tunnel names
to the 4.16-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:
ip6_tunnel-better-validate-user-provided-tunnel-names.patch
and it can be found in the queue-4.16 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 Tue Apr 10 23:19:25 CEST 2018
From: Eric Dumazet <edumazet(a)google.com>
Date: Thu, 5 Apr 2018 06:39:30 -0700
Subject: ip6_tunnel: better validate user provided tunnel names
From: Eric Dumazet <edumazet(a)google.com>
[ Upstream commit db7a65e3ab78e5b1c4b17c0870ebee35a4ee3257 ]
Use valid_name() to make sure user does not provide illegal
device name.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Eric Dumazet <edumazet(a)google.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/ipv6/ip6_tunnel.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -297,13 +297,16 @@ static struct ip6_tnl *ip6_tnl_create(st
struct net_device *dev;
struct ip6_tnl *t;
char name[IFNAMSIZ];
- int err = -ENOMEM;
+ int err = -E2BIG;
- if (p->name[0])
+ if (p->name[0]) {
+ if (!dev_valid_name(p->name))
+ goto failed;
strlcpy(name, p->name, IFNAMSIZ);
- else
+ } else {
sprintf(name, "ip6tnl%%d");
-
+ }
+ err = -ENOMEM;
dev = alloc_netdev(sizeof(*t), name, NET_NAME_UNKNOWN,
ip6_tnl_dev_setup);
if (!dev)
Patches currently in stable-queue which might be from edumazet(a)google.com are
queue-4.16/sctp-sctp_sockaddr_af-must-check-minimal-addr-length-for-af_inet6.patch
queue-4.16/pptp-remove-a-buggy-dst-release-in-pptp_connect.patch
queue-4.16/net-fool-proof-dev_valid_name.patch
queue-4.16/vti6-better-validate-user-provided-tunnel-names.patch
queue-4.16/ipv6-sit-better-validate-user-provided-tunnel-names.patch
queue-4.16/ip6_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.16/sctp-do-not-leak-kernel-memory-to-user-space.patch
queue-4.16/ip_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.16/ip6_gre-better-validate-user-provided-tunnel-names.patch
This is a note to let you know that I've just added the patch titled
ip6_gre: better validate user provided tunnel names
to the 4.16-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:
ip6_gre-better-validate-user-provided-tunnel-names.patch
and it can be found in the queue-4.16 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 Tue Apr 10 23:19:25 CEST 2018
From: Eric Dumazet <edumazet(a)google.com>
Date: Thu, 5 Apr 2018 06:39:29 -0700
Subject: ip6_gre: better validate user provided tunnel names
From: Eric Dumazet <edumazet(a)google.com>
[ Upstream commit 5f42df013b8bc1b6511af7a04bf93b014884ae2a ]
Use dev_valid_name() to make sure user does not provide illegal
device name.
syzbot caught the following bug :
BUG: KASAN: stack-out-of-bounds in strlcpy include/linux/string.h:300 [inline]
BUG: KASAN: stack-out-of-bounds in ip6gre_tunnel_locate+0x334/0x860 net/ipv6/ip6_gre.c:339
Write of size 20 at addr ffff8801afb9f7b8 by task syzkaller851048/4466
CPU: 1 PID: 4466 Comm: syzkaller851048 Not tainted 4.16.0+ #1
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x1b9/0x29f lib/dump_stack.c:53
print_address_description+0x6c/0x20b mm/kasan/report.c:256
kasan_report_error mm/kasan/report.c:354 [inline]
kasan_report.cold.7+0xac/0x2f5 mm/kasan/report.c:412
check_memory_region_inline mm/kasan/kasan.c:260 [inline]
check_memory_region+0x13e/0x1b0 mm/kasan/kasan.c:267
memcpy+0x37/0x50 mm/kasan/kasan.c:303
strlcpy include/linux/string.h:300 [inline]
ip6gre_tunnel_locate+0x334/0x860 net/ipv6/ip6_gre.c:339
ip6gre_tunnel_ioctl+0x69d/0x12e0 net/ipv6/ip6_gre.c:1195
dev_ifsioc+0x43e/0xb90 net/core/dev_ioctl.c:334
dev_ioctl+0x69a/0xcc0 net/core/dev_ioctl.c:525
sock_ioctl+0x47e/0x680 net/socket.c:1015
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:500 [inline]
do_vfs_ioctl+0x1cf/0x1650 fs/ioctl.c:684
ksys_ioctl+0xa9/0xd0 fs/ioctl.c:701
SYSC_ioctl fs/ioctl.c:708 [inline]
SyS_ioctl+0x24/0x30 fs/ioctl.c:706
do_syscall_64+0x29e/0x9d0 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x42/0xb7
Fixes: c12b395a4664 ("gre: Support GRE over IPv6")
Signed-off-by: Eric Dumazet <edumazet(a)google.com>
Reported-by: syzbot <syzkaller(a)googlegroups.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/ipv6/ip6_gre.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -335,11 +335,13 @@ static struct ip6_tnl *ip6gre_tunnel_loc
if (t || !create)
return t;
- if (parms->name[0])
+ if (parms->name[0]) {
+ if (!dev_valid_name(parms->name))
+ return NULL;
strlcpy(name, parms->name, IFNAMSIZ);
- else
+ } else {
strcpy(name, "ip6gre%d");
-
+ }
dev = alloc_netdev(sizeof(*t), name, NET_NAME_UNKNOWN,
ip6gre_tunnel_setup);
if (!dev)
Patches currently in stable-queue which might be from edumazet(a)google.com are
queue-4.16/sctp-sctp_sockaddr_af-must-check-minimal-addr-length-for-af_inet6.patch
queue-4.16/pptp-remove-a-buggy-dst-release-in-pptp_connect.patch
queue-4.16/net-fool-proof-dev_valid_name.patch
queue-4.16/vti6-better-validate-user-provided-tunnel-names.patch
queue-4.16/ipv6-sit-better-validate-user-provided-tunnel-names.patch
queue-4.16/ip6_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.16/sctp-do-not-leak-kernel-memory-to-user-space.patch
queue-4.16/ip_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.16/ip6_gre-better-validate-user-provided-tunnel-names.patch
This is a note to let you know that I've just added the patch titled
arp: fix arp_filter on l3slave devices
to the 4.16-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:
arp-fix-arp_filter-on-l3slave-devices.patch
and it can be found in the queue-4.16 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 Tue Apr 10 23:19:25 CEST 2018
From: Miguel Fadon Perlines <mfadon(a)teldat.com>
Date: Thu, 5 Apr 2018 10:25:38 +0200
Subject: arp: fix arp_filter on l3slave devices
From: Miguel Fadon Perlines <mfadon(a)teldat.com>
[ Upstream commit 58b35f27689b5eb514fc293c332966c226b1b6e4 ]
arp_filter performs an ip_route_output search for arp source address and
checks if output device is the same where the arp request was received,
if it is not, the arp request is not answered.
This route lookup is always done on main route table so l3slave devices
never find the proper route and arp is not answered.
Passing l3mdev_master_ifindex_rcu(dev) return value as oif fixes the
lookup for l3slave devices while maintaining same behavior for non
l3slave devices as this function returns 0 in that case.
Fixes: 613d09b30f8b ("net: Use VRF device index for lookups on TX")
Signed-off-by: Miguel Fadon Perlines <mfadon(a)teldat.com>
Acked-by: David Ahern <dsa(a)cumulusnetworks.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/ipv4/arp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -437,7 +437,7 @@ static int arp_filter(__be32 sip, __be32
/*unsigned long now; */
struct net *net = dev_net(dev);
- rt = ip_route_output(net, sip, tip, 0, 0);
+ rt = ip_route_output(net, sip, tip, 0, l3mdev_master_ifindex_rcu(dev));
if (IS_ERR(rt))
return 1;
if (rt->dst.dev != dev) {
Patches currently in stable-queue which might be from mfadon(a)teldat.com are
queue-4.16/arp-fix-arp_filter-on-l3slave-devices.patch
This is a note to let you know that I've just added the patch titled
vti6: better validate user provided tunnel names
to the 4.15-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:
vti6-better-validate-user-provided-tunnel-names.patch
and it can be found in the queue-4.15 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 Tue Apr 10 23:19:36 CEST 2018
From: Eric Dumazet <edumazet(a)google.com>
Date: Thu, 5 Apr 2018 06:39:31 -0700
Subject: vti6: better validate user provided tunnel names
From: Eric Dumazet <edumazet(a)google.com>
[ Upstream commit 537b361fbcbcc3cd6fe2bb47069fd292b9256d16 ]
Use valid_name() to make sure user does not provide illegal
device name.
Fixes: ed1efb2aefbb ("ipv6: Add support for IPsec virtual tunnel interfaces")
Signed-off-by: Eric Dumazet <edumazet(a)google.com>
Cc: Steffen Klassert <steffen.klassert(a)secunet.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/ipv6/ip6_vti.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--- a/net/ipv6/ip6_vti.c
+++ b/net/ipv6/ip6_vti.c
@@ -212,10 +212,13 @@ static struct ip6_tnl *vti6_tnl_create(s
char name[IFNAMSIZ];
int err;
- if (p->name[0])
+ if (p->name[0]) {
+ if (!dev_valid_name(p->name))
+ goto failed;
strlcpy(name, p->name, IFNAMSIZ);
- else
+ } else {
sprintf(name, "ip6_vti%%d");
+ }
dev = alloc_netdev(sizeof(*t), name, NET_NAME_UNKNOWN, vti6_dev_setup);
if (!dev)
Patches currently in stable-queue which might be from edumazet(a)google.com are
queue-4.15/sctp-sctp_sockaddr_af-must-check-minimal-addr-length-for-af_inet6.patch
queue-4.15/net-fix-possible-out-of-bound-read-in-skb_network_protocol.patch
queue-4.15/pptp-remove-a-buggy-dst-release-in-pptp_connect.patch
queue-4.15/net-fool-proof-dev_valid_name.patch
queue-4.15/ipv6-the-entire-ipv6-header-chain-must-fit-the-first-fragment.patch
queue-4.15/vti6-better-validate-user-provided-tunnel-names.patch
queue-4.15/ipv6-sit-better-validate-user-provided-tunnel-names.patch
queue-4.15/ip6_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.15/sctp-do-not-leak-kernel-memory-to-user-space.patch
queue-4.15/ip_tunnel-better-validate-user-provided-tunnel-names.patch
queue-4.15/netlink-make-sure-nladdr-has-correct-size-in-netlink_connect.patch
queue-4.15/ip6_gre-better-validate-user-provided-tunnel-names.patch
This is a note to let you know that I've just added the patch titled
vrf: Fix use after free and double free in vrf_finish_output
to the 4.15-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:
vrf-fix-use-after-free-and-double-free-in-vrf_finish_output.patch
and it can be found in the queue-4.15 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 Tue Apr 10 23:19:36 CEST 2018
From: David Ahern <dsahern(a)gmail.com>
Date: Thu, 29 Mar 2018 12:49:52 -0700
Subject: vrf: Fix use after free and double free in vrf_finish_output
From: David Ahern <dsahern(a)gmail.com>
[ Upstream commit 82dd0d2a9a76fc8fa2b18d80b987d455728bf83a ]
Miguel reported an skb use after free / double free in vrf_finish_output
when neigh_output returns an error. The vrf driver should return after
the call to neigh_output as it takes over the skb on error path as well.
Patch is a simplified version of Miguel's patch which was written for 4.9,
and updated to top of tree.
Fixes: 8f58336d3f78a ("net: Add ethernet header for pass through VRF device")
Signed-off-by: Miguel Fadon Perlines <mfadon(a)teldat.com>
Signed-off-by: David Ahern <dsahern(a)gmail.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/vrf.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
@@ -578,12 +578,13 @@ static int vrf_finish_output(struct net
if (!IS_ERR(neigh)) {
sock_confirm_neigh(skb, neigh);
ret = neigh_output(neigh, skb);
+ rcu_read_unlock_bh();
+ return ret;
}
rcu_read_unlock_bh();
err:
- if (unlikely(ret < 0))
- vrf_tx_error(skb->dev, skb);
+ vrf_tx_error(skb->dev, skb);
return ret;
}
Patches currently in stable-queue which might be from dsahern(a)gmail.com are
queue-4.15/perf-evsel-fix-swap-for-samples-with-raw-data.patch
queue-4.15/perf-tools-fix-copyfile_offset-update-of-output-offset.patch
queue-4.15/net-ipv6-fix-route-leaking-between-vrfs.patch
queue-4.15/vrf-fix-use-after-free-and-double-free-in-vrf_finish_output.patch
This is a note to let you know that I've just added the patch titled
vlan: also check phy_driver ts_info for vlan's real device
to the 4.15-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:
vlan-also-check-phy_driver-ts_info-for-vlan-s-real-device.patch
and it can be found in the queue-4.15 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 Tue Apr 10 23:19:36 CEST 2018
From: Hangbin Liu <liuhangbin(a)gmail.com>
Date: Fri, 30 Mar 2018 09:44:00 +0800
Subject: vlan: also check phy_driver ts_info for vlan's real device
From: Hangbin Liu <liuhangbin(a)gmail.com>
[ Upstream commit ec1d8ccb07deaf30fd0508af6755364ac47dc08d ]
Just like function ethtool_get_ts_info(), we should also consider the
phy_driver ts_info call back. For example, driver dp83640.
Fixes: 37dd9255b2f6 ("vlan: Pass ethtool get_ts_info queries to real device.")
Acked-by: Richard Cochran <richardcochran(a)gmail.com>
Signed-off-by: Hangbin Liu <liuhangbin(a)gmail.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
net/8021q/vlan_dev.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -29,6 +29,7 @@
#include <linux/net_tstamp.h>
#include <linux/etherdevice.h>
#include <linux/ethtool.h>
+#include <linux/phy.h>
#include <net/arp.h>
#include <net/switchdev.h>
@@ -665,8 +666,11 @@ static int vlan_ethtool_get_ts_info(stru
{
const struct vlan_dev_priv *vlan = vlan_dev_priv(dev);
const struct ethtool_ops *ops = vlan->real_dev->ethtool_ops;
+ struct phy_device *phydev = vlan->real_dev->phydev;
- if (ops->get_ts_info) {
+ if (phydev && phydev->drv && phydev->drv->ts_info) {
+ return phydev->drv->ts_info(phydev, info);
+ } else if (ops->get_ts_info) {
return ops->get_ts_info(vlan->real_dev, info);
} else {
info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE |
Patches currently in stable-queue which might be from liuhangbin(a)gmail.com are
queue-4.15/vlan-also-check-phy_driver-ts_info-for-vlan-s-real-device.patch
queue-4.15/l2tp-fix-missing-print-session-offset-info.patch
This is a note to let you know that I've just added the patch titled
vhost_net: add missing lock nesting notation
to the 4.15-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:
vhost_net-add-missing-lock-nesting-notation.patch
and it can be found in the queue-4.15 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 Tue Apr 10 23:19:36 CEST 2018
From: Jason Wang <jasowang(a)redhat.com>
Date: Mon, 26 Mar 2018 16:10:23 +0800
Subject: vhost_net: add missing lock nesting notation
From: Jason Wang <jasowang(a)redhat.com>
[ Upstream commit aaa3149bbee9ba9b4e6f0bd6e3e7d191edeae942 ]
We try to hold TX virtqueue mutex in vhost_net_rx_peek_head_len()
after RX virtqueue mutex is held in handle_rx(). This requires an
appropriate lock nesting notation to calm down deadlock detector.
Fixes: 0308813724606 ("vhost_net: basic polling support")
Reported-by: syzbot+7f073540b1384a614e09(a)syzkaller.appspotmail.com
Signed-off-by: Jason Wang <jasowang(a)redhat.com>
Acked-by: Michael S. Tsirkin <mst(a)redhat.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/vhost/net.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -618,7 +618,7 @@ static int vhost_net_rx_peek_head_len(st
if (!len && vq->busyloop_timeout) {
/* Both tx vq and rx socket were polled here */
- mutex_lock(&vq->mutex);
+ mutex_lock_nested(&vq->mutex, 1);
vhost_disable_notify(&net->dev, vq);
preempt_disable();
@@ -751,7 +751,7 @@ static void handle_rx(struct vhost_net *
struct iov_iter fixup;
__virtio16 num_buffers;
- mutex_lock(&vq->mutex);
+ mutex_lock_nested(&vq->mutex, 0);
sock = vq->private_data;
if (!sock)
goto out;
Patches currently in stable-queue which might be from jasowang(a)redhat.com are
queue-4.15/vhost-validate-log-when-iotlb-is-enabled.patch
queue-4.15/vhost_net-add-missing-lock-nesting-notation.patch
queue-4.15/vhost-correctly-remove-wait-queue-during-poll-failure.patch
This is a note to let you know that I've just added the patch titled
vhost: correctly remove wait queue during poll failure
to the 4.15-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:
vhost-correctly-remove-wait-queue-during-poll-failure.patch
and it can be found in the queue-4.15 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 Tue Apr 10 23:19:36 CEST 2018
From: Jason Wang <jasowang(a)redhat.com>
Date: Tue, 27 Mar 2018 20:50:52 +0800
Subject: vhost: correctly remove wait queue during poll failure
From: Jason Wang <jasowang(a)redhat.com>
[ Upstream commit dc6455a71c7fc5117977e197f67f71b49f27baba ]
We tried to remove vq poll from wait queue, but do not check whether
or not it was in a list before. This will lead double free. Fixing
this by switching to use vhost_poll_stop() which zeros poll->wqh after
removing poll from waitqueue to make sure it won't be freed twice.
Cc: Darren Kenny <darren.kenny(a)oracle.com>
Reported-by: syzbot+c0272972b01b872e604a(a)syzkaller.appspotmail.com
Fixes: 2b8b328b61c79 ("vhost_net: handle polling errors when setting backend")
Signed-off-by: Jason Wang <jasowang(a)redhat.com>
Reviewed-by: Darren Kenny <darren.kenny(a)oracle.com>
Acked-by: Michael S. Tsirkin <mst(a)redhat.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/vhost/vhost.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -213,8 +213,7 @@ int vhost_poll_start(struct vhost_poll *
if (mask)
vhost_poll_wakeup(&poll->wait, 0, 0, (void *)mask);
if (mask & POLLERR) {
- if (poll->wqh)
- remove_wait_queue(poll->wqh, &poll->wait);
+ vhost_poll_stop(poll);
ret = -EINVAL;
}
Patches currently in stable-queue which might be from jasowang(a)redhat.com are
queue-4.15/vhost-validate-log-when-iotlb-is-enabled.patch
queue-4.15/vhost_net-add-missing-lock-nesting-notation.patch
queue-4.15/vhost-correctly-remove-wait-queue-during-poll-failure.patch
This is a note to let you know that I've just added the patch titled
vhost: validate log when IOTLB is enabled
to the 4.15-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:
vhost-validate-log-when-iotlb-is-enabled.patch
and it can be found in the queue-4.15 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 Tue Apr 10 23:19:36 CEST 2018
From: Jason Wang <jasowang(a)redhat.com>
Date: Thu, 29 Mar 2018 16:00:04 +0800
Subject: vhost: validate log when IOTLB is enabled
From: Jason Wang <jasowang(a)redhat.com>
[ Upstream commit d65026c6c62e7d9616c8ceb5a53b68bcdc050525 ]
Vq log_base is the userspace address of bitmap which has nothing to do
with IOTLB. So it needs to be validated unconditionally otherwise we
may try use 0 as log_base which may lead to pin pages that will lead
unexpected result (e.g trigger BUG_ON() in set_bit_to_user()).
Fixes: 6b1e6cc7855b0 ("vhost: new device IOTLB API")
Reported-by: syzbot+6304bf97ef436580fede(a)syzkaller.appspotmail.com
Signed-off-by: Jason Wang <jasowang(a)redhat.com>
Acked-by: Michael S. Tsirkin <mst(a)redhat.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/vhost/vhost.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -1256,14 +1256,12 @@ static int vq_log_access_ok(struct vhost
/* Caller should have vq mutex and device mutex */
int vhost_vq_access_ok(struct vhost_virtqueue *vq)
{
- if (vq->iotlb) {
- /* When device IOTLB was used, the access validation
- * will be validated during prefetching.
- */
- return 1;
- }
- return vq_access_ok(vq, vq->num, vq->desc, vq->avail, vq->used) &&
- vq_log_access_ok(vq, vq->log_base);
+ int ret = vq_log_access_ok(vq, vq->log_base);
+
+ if (ret || vq->iotlb)
+ return ret;
+
+ return vq_access_ok(vq, vq->num, vq->desc, vq->avail, vq->used);
}
EXPORT_SYMBOL_GPL(vhost_vq_access_ok);
Patches currently in stable-queue which might be from jasowang(a)redhat.com are
queue-4.15/vhost-validate-log-when-iotlb-is-enabled.patch
queue-4.15/vhost_net-add-missing-lock-nesting-notation.patch
queue-4.15/vhost-correctly-remove-wait-queue-during-poll-failure.patch
This is a note to let you know that I've just added the patch titled
team: move dev_mc_sync after master_upper_dev_link in team_port_add
to the 4.15-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:
team-move-dev_mc_sync-after-master_upper_dev_link-in-team_port_add.patch
and it can be found in the queue-4.15 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 Tue Apr 10 23:19:36 CEST 2018
From: Xin Long <lucien.xin(a)gmail.com>
Date: Mon, 26 Mar 2018 01:25:06 +0800
Subject: team: move dev_mc_sync after master_upper_dev_link in team_port_add
From: Xin Long <lucien.xin(a)gmail.com>
[ Upstream commit 982cf3b3999d39a2eaca0a65542df33c19b5d814 ]
The same fix as in 'bonding: move dev_mc_sync after master_upper_dev_link
in bond_enslave' is needed for team driver.
The panic can be reproduced easily:
ip link add team1 type team
ip link set team1 up
ip link add link team1 vlan1 type vlan id 80
ip link set vlan1 master team1
Fixes: cb41c997d444 ("team: team should sync the port's uc/mc addrs when add a port")
Signed-off-by: Xin Long <lucien.xin(a)gmail.com>
Acked-by: Jiri Pirko <jiri(a)mellanox.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/team/team.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -1197,11 +1197,6 @@ static int team_port_add(struct team *te
goto err_dev_open;
}
- netif_addr_lock_bh(dev);
- dev_uc_sync_multiple(port_dev, dev);
- dev_mc_sync_multiple(port_dev, dev);
- netif_addr_unlock_bh(dev);
-
err = vlan_vids_add_by_dev(port_dev, dev);
if (err) {
netdev_err(dev, "Failed to add vlan ids to device %s\n",
@@ -1241,6 +1236,11 @@ static int team_port_add(struct team *te
goto err_option_port_add;
}
+ netif_addr_lock_bh(dev);
+ dev_uc_sync_multiple(port_dev, dev);
+ dev_mc_sync_multiple(port_dev, dev);
+ netif_addr_unlock_bh(dev);
+
port->index = -1;
list_add_tail_rcu(&port->list, &team->port_list);
team_port_enable(team, port);
@@ -1265,8 +1265,6 @@ err_enable_netpoll:
vlan_vids_del_by_dev(port_dev, dev);
err_vids_add:
- dev_uc_unsync(port_dev, dev);
- dev_mc_unsync(port_dev, dev);
dev_close(port_dev);
err_dev_open:
Patches currently in stable-queue which might be from lucien.xin(a)gmail.com are
queue-4.15/team-move-dev_mc_sync-after-master_upper_dev_link-in-team_port_add.patch
queue-4.15/bonding-process-the-err-returned-by-dev_set_allmulti-properly-in-bond_enslave.patch
queue-4.15/bonding-fix-the-err-path-for-dev-hwaddr-sync-in-bond_enslave.patch
queue-4.15/bonding-move-dev_mc_sync-after-master_upper_dev_link-in-bond_enslave.patch
queue-4.15/route-check-sysctl_fib_multipath_use_neigh-earlier-than-hash.patch