Unfortunately, we ended up merging an old version of the patch "fix info
leak with DMA_FROM_DEVICE" instead of merging the latest one. Christoph
(the swiotlb maintainer), he asked me to create an incremental fix
(after I have pointed this out the mix up, and asked him for guidance).
So here we go.
The main differences between what we got and what was agreed are:
* swiotlb_sync_single_for_device is also required to do an extra bounce
* We decided not to introduce DMA_ATTR_OVERWRITE until we have exploiters
* The implantation of DMA_ATTR_OVERWRITE is flawed: DMA_ATTR_OVERWRITE
must take precedence over DMA_ATTR_SKIP_CPU_SYNC
Thus this patch removes DMA_ATTR_OVERWRITE, and makes
swiotlb_sync_single_for_device() bounce unconditionally (that is, also
when dir == DMA_TO_DEVICE) in order do avoid synchronising back stale
data from the swiotlb buffer.
Let me note, that if the size used with dma_sync_* API is less than the
size used with dma_[un]map_*, under certain circumstances we may still
end up with swiotlb not being transparent. In that sense, this is no
perfect fix either.
To get this bullet proof, we would have to bounce the entire
mapping/bounce buffer. For that we would have to figure out the starting
address, and the size of the mapping in
swiotlb_sync_single_for_device(). While this does seem possible, there
seems to be no firm consensus on how things are supposed to work.
Signed-off-by: Halil Pasic <pasic(a)linux.ibm.com>
Fixes: ddbd89deb7d3 ("swiotlb: fix info leak with DMA_FROM_DEVICE")
Cc: stable(a)vger.kernel.org
---
I just realized that there are still scenarios where swiotlb may produce
some strange effects. Thus I don't think we have discussed the
dma_sync_* part in detail.
v1 -> v2:
* single patch instead of revert + right version
---
Documentation/core-api/dma-attributes.rst | 8 --------
include/linux/dma-mapping.h | 8 --------
kernel/dma/swiotlb.c | 23 +++++++++++++++--------
3 files changed, 15 insertions(+), 24 deletions(-)
diff --git a/Documentation/core-api/dma-attributes.rst b/Documentation/core-api/dma-attributes.rst
index 17706dc91ec9..1887d92e8e92 100644
--- a/Documentation/core-api/dma-attributes.rst
+++ b/Documentation/core-api/dma-attributes.rst
@@ -130,11 +130,3 @@ accesses to DMA buffers in both privileged "supervisor" and unprivileged
subsystem that the buffer is fully accessible at the elevated privilege
level (and ideally inaccessible or at least read-only at the
lesser-privileged levels).
-
-DMA_ATTR_OVERWRITE
-------------------
-
-This is a hint to the DMA-mapping subsystem that the device is expected to
-overwrite the entire mapped size, thus the caller does not require any of the
-previous buffer contents to be preserved. This allows bounce-buffering
-implementations to optimise DMA_FROM_DEVICE transfers.
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index 6150d11a607e..dca2b1355bb1 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -61,14 +61,6 @@
*/
#define DMA_ATTR_PRIVILEGED (1UL << 9)
-/*
- * This is a hint to the DMA-mapping subsystem that the device is expected
- * to overwrite the entire mapped size, thus the caller does not require any
- * of the previous buffer contents to be preserved. This allows
- * bounce-buffering implementations to optimise DMA_FROM_DEVICE transfers.
- */
-#define DMA_ATTR_OVERWRITE (1UL << 10)
-
/*
* A dma_addr_t can hold any valid DMA or bus address for the platform. It can
* be given to a device to use as a DMA source or target. It is specific to a
diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c
index bfc56cb21705..6db1c475ec82 100644
--- a/kernel/dma/swiotlb.c
+++ b/kernel/dma/swiotlb.c
@@ -627,10 +627,14 @@ phys_addr_t swiotlb_tbl_map_single(struct device *dev, phys_addr_t orig_addr,
for (i = 0; i < nr_slots(alloc_size + offset); i++)
mem->slots[index + i].orig_addr = slot_addr(orig_addr, i);
tlb_addr = slot_addr(mem->start, index) + offset;
- if (!(attrs & DMA_ATTR_SKIP_CPU_SYNC) &&
- (!(attrs & DMA_ATTR_OVERWRITE) || dir == DMA_TO_DEVICE ||
- dir == DMA_BIDIRECTIONAL))
- swiotlb_bounce(dev, tlb_addr, mapping_size, DMA_TO_DEVICE);
+ /*
+ * When dir == DMA_FROM_DEVICE we could omit the copy from the orig
+ * to the tlb buffer, if we knew for sure the device will
+ * overwirte the entire current content. But we don't. Thus
+ * unconditional bounce may prevent leaking swiotlb content (i.e.
+ * kernel memory) to user-space.
+ */
+ swiotlb_bounce(dev, tlb_addr, mapping_size, DMA_TO_DEVICE);
return tlb_addr;
}
@@ -697,10 +701,13 @@ void swiotlb_tbl_unmap_single(struct device *dev, phys_addr_t tlb_addr,
void swiotlb_sync_single_for_device(struct device *dev, phys_addr_t tlb_addr,
size_t size, enum dma_data_direction dir)
{
- if (dir == DMA_TO_DEVICE || dir == DMA_BIDIRECTIONAL)
- swiotlb_bounce(dev, tlb_addr, size, DMA_TO_DEVICE);
- else
- BUG_ON(dir != DMA_FROM_DEVICE);
+ /*
+ * Unconditional bounce is necessary to avoid corruption on
+ * sync_*_for_cpu or dma_ummap_* when the device didn't overwrite
+ * the whole lengt of the bounce buffer.
+ */
+ swiotlb_bounce(dev, tlb_addr, size, DMA_TO_DEVICE);
+ BUG_ON(!valid_dma_direction(dir));
}
void swiotlb_sync_single_for_cpu(struct device *dev, phys_addr_t tlb_addr,
base-commit: 38f80f42147ff658aff218edb0a88c37e58bf44f
--
2.32.0
The patch below does not apply to the 5.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 40eb0dcf4114cbfff4d207890fa5a19e82da9fdc Mon Sep 17 00:00:00 2001
From: Yang Yingliang <yangyingliang(a)huawei.com>
Date: Thu, 10 Feb 2022 17:10:53 +0800
Subject: [PATCH] tee: optee: fix error return code in probe function
If teedev_open() fails, probe function need return
error code.
Fixes: aceeafefff73 ("optee: use driver internal tee_context for some rpc")
Reported-by: Hulk Robot <hulkci(a)huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang(a)huawei.com>
Signed-off-by: Jens Wiklander <jens.wiklander(a)linaro.org>
diff --git a/drivers/tee/optee/ffa_abi.c b/drivers/tee/optee/ffa_abi.c
index 545f61af1248..0c90355896a0 100644
--- a/drivers/tee/optee/ffa_abi.c
+++ b/drivers/tee/optee/ffa_abi.c
@@ -860,8 +860,10 @@ static int optee_ffa_probe(struct ffa_device *ffa_dev)
optee_supp_init(&optee->supp);
ffa_dev_set_drvdata(ffa_dev, optee);
ctx = teedev_open(optee->teedev);
- if (IS_ERR(ctx))
+ if (IS_ERR(ctx)) {
+ rc = PTR_ERR(ctx);
goto err_rhashtable_free;
+ }
optee->ctx = ctx;
rc = optee_notif_init(optee, OPTEE_DEFAULT_MAX_NOTIF_VALUE);
if (rc)
diff --git a/drivers/tee/optee/smc_abi.c b/drivers/tee/optee/smc_abi.c
index bacd1a1d79ee..4157f4b41bdd 100644
--- a/drivers/tee/optee/smc_abi.c
+++ b/drivers/tee/optee/smc_abi.c
@@ -1427,8 +1427,10 @@ static int optee_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, optee);
ctx = teedev_open(optee->teedev);
- if (IS_ERR(ctx))
+ if (IS_ERR(ctx)) {
+ rc = PTR_ERR(ctx);
goto err_supp_uninit;
+ }
optee->ctx = ctx;
rc = optee_notif_init(optee, max_notif_value);
if (rc)
The patch below does not apply to the 5.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 40eb0dcf4114cbfff4d207890fa5a19e82da9fdc Mon Sep 17 00:00:00 2001
From: Yang Yingliang <yangyingliang(a)huawei.com>
Date: Thu, 10 Feb 2022 17:10:53 +0800
Subject: [PATCH] tee: optee: fix error return code in probe function
If teedev_open() fails, probe function need return
error code.
Fixes: aceeafefff73 ("optee: use driver internal tee_context for some rpc")
Reported-by: Hulk Robot <hulkci(a)huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang(a)huawei.com>
Signed-off-by: Jens Wiklander <jens.wiklander(a)linaro.org>
diff --git a/drivers/tee/optee/ffa_abi.c b/drivers/tee/optee/ffa_abi.c
index 545f61af1248..0c90355896a0 100644
--- a/drivers/tee/optee/ffa_abi.c
+++ b/drivers/tee/optee/ffa_abi.c
@@ -860,8 +860,10 @@ static int optee_ffa_probe(struct ffa_device *ffa_dev)
optee_supp_init(&optee->supp);
ffa_dev_set_drvdata(ffa_dev, optee);
ctx = teedev_open(optee->teedev);
- if (IS_ERR(ctx))
+ if (IS_ERR(ctx)) {
+ rc = PTR_ERR(ctx);
goto err_rhashtable_free;
+ }
optee->ctx = ctx;
rc = optee_notif_init(optee, OPTEE_DEFAULT_MAX_NOTIF_VALUE);
if (rc)
diff --git a/drivers/tee/optee/smc_abi.c b/drivers/tee/optee/smc_abi.c
index bacd1a1d79ee..4157f4b41bdd 100644
--- a/drivers/tee/optee/smc_abi.c
+++ b/drivers/tee/optee/smc_abi.c
@@ -1427,8 +1427,10 @@ static int optee_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, optee);
ctx = teedev_open(optee->teedev);
- if (IS_ERR(ctx))
+ if (IS_ERR(ctx)) {
+ rc = PTR_ERR(ctx);
goto err_supp_uninit;
+ }
optee->ctx = ctx;
rc = optee_notif_init(optee, max_notif_value);
if (rc)
The patch below does not apply to the 5.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 40eb0dcf4114cbfff4d207890fa5a19e82da9fdc Mon Sep 17 00:00:00 2001
From: Yang Yingliang <yangyingliang(a)huawei.com>
Date: Thu, 10 Feb 2022 17:10:53 +0800
Subject: [PATCH] tee: optee: fix error return code in probe function
If teedev_open() fails, probe function need return
error code.
Fixes: aceeafefff73 ("optee: use driver internal tee_context for some rpc")
Reported-by: Hulk Robot <hulkci(a)huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang(a)huawei.com>
Signed-off-by: Jens Wiklander <jens.wiklander(a)linaro.org>
diff --git a/drivers/tee/optee/ffa_abi.c b/drivers/tee/optee/ffa_abi.c
index 545f61af1248..0c90355896a0 100644
--- a/drivers/tee/optee/ffa_abi.c
+++ b/drivers/tee/optee/ffa_abi.c
@@ -860,8 +860,10 @@ static int optee_ffa_probe(struct ffa_device *ffa_dev)
optee_supp_init(&optee->supp);
ffa_dev_set_drvdata(ffa_dev, optee);
ctx = teedev_open(optee->teedev);
- if (IS_ERR(ctx))
+ if (IS_ERR(ctx)) {
+ rc = PTR_ERR(ctx);
goto err_rhashtable_free;
+ }
optee->ctx = ctx;
rc = optee_notif_init(optee, OPTEE_DEFAULT_MAX_NOTIF_VALUE);
if (rc)
diff --git a/drivers/tee/optee/smc_abi.c b/drivers/tee/optee/smc_abi.c
index bacd1a1d79ee..4157f4b41bdd 100644
--- a/drivers/tee/optee/smc_abi.c
+++ b/drivers/tee/optee/smc_abi.c
@@ -1427,8 +1427,10 @@ static int optee_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, optee);
ctx = teedev_open(optee->teedev);
- if (IS_ERR(ctx))
+ if (IS_ERR(ctx)) {
+ rc = PTR_ERR(ctx);
goto err_supp_uninit;
+ }
optee->ctx = ctx;
rc = optee_notif_init(optee, max_notif_value);
if (rc)
The patch below does not apply to the 5.10-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 40eb0dcf4114cbfff4d207890fa5a19e82da9fdc Mon Sep 17 00:00:00 2001
From: Yang Yingliang <yangyingliang(a)huawei.com>
Date: Thu, 10 Feb 2022 17:10:53 +0800
Subject: [PATCH] tee: optee: fix error return code in probe function
If teedev_open() fails, probe function need return
error code.
Fixes: aceeafefff73 ("optee: use driver internal tee_context for some rpc")
Reported-by: Hulk Robot <hulkci(a)huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang(a)huawei.com>
Signed-off-by: Jens Wiklander <jens.wiklander(a)linaro.org>
diff --git a/drivers/tee/optee/ffa_abi.c b/drivers/tee/optee/ffa_abi.c
index 545f61af1248..0c90355896a0 100644
--- a/drivers/tee/optee/ffa_abi.c
+++ b/drivers/tee/optee/ffa_abi.c
@@ -860,8 +860,10 @@ static int optee_ffa_probe(struct ffa_device *ffa_dev)
optee_supp_init(&optee->supp);
ffa_dev_set_drvdata(ffa_dev, optee);
ctx = teedev_open(optee->teedev);
- if (IS_ERR(ctx))
+ if (IS_ERR(ctx)) {
+ rc = PTR_ERR(ctx);
goto err_rhashtable_free;
+ }
optee->ctx = ctx;
rc = optee_notif_init(optee, OPTEE_DEFAULT_MAX_NOTIF_VALUE);
if (rc)
diff --git a/drivers/tee/optee/smc_abi.c b/drivers/tee/optee/smc_abi.c
index bacd1a1d79ee..4157f4b41bdd 100644
--- a/drivers/tee/optee/smc_abi.c
+++ b/drivers/tee/optee/smc_abi.c
@@ -1427,8 +1427,10 @@ static int optee_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, optee);
ctx = teedev_open(optee->teedev);
- if (IS_ERR(ctx))
+ if (IS_ERR(ctx)) {
+ rc = PTR_ERR(ctx);
goto err_supp_uninit;
+ }
optee->ctx = ctx;
rc = optee_notif_init(optee, max_notif_value);
if (rc)
The patch below does not apply to the 5.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 a6ab66eb8541d61b0a11d70980f07b4c2dfeddc5 Mon Sep 17 00:00:00 2001
From: Su Yue <l(a)damenly.su>
Date: Tue, 22 Feb 2022 16:42:07 +0800
Subject: [PATCH] btrfs: tree-checker: use u64 for item data end to avoid
overflow
User reported there is an array-index-out-of-bounds access while
mounting the crafted image:
[350.411942 ] loop0: detected capacity change from 0 to 262144
[350.427058 ] BTRFS: device fsid a62e00e8-e94e-4200-8217-12444de93c2e devid 1 transid 8 /dev/loop0 scanned by systemd-udevd (1044)
[350.428564 ] BTRFS info (device loop0): disk space caching is enabled
[350.428568 ] BTRFS info (device loop0): has skinny extents
[350.429589 ]
[350.429619 ] UBSAN: array-index-out-of-bounds in fs/btrfs/struct-funcs.c:161:1
[350.429636 ] index 1048096 is out of range for type 'page *[16]'
[350.429650 ] CPU: 0 PID: 9 Comm: kworker/u8:1 Not tainted 5.16.0-rc4
[350.429652 ] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-1ubuntu1.1 04/01/2014
[350.429653 ] Workqueue: btrfs-endio-meta btrfs_work_helper [btrfs]
[350.429772 ] Call Trace:
[350.429774 ] <TASK>
[350.429776 ] dump_stack_lvl+0x47/0x5c
[350.429780 ] ubsan_epilogue+0x5/0x50
[350.429786 ] __ubsan_handle_out_of_bounds+0x66/0x70
[350.429791 ] btrfs_get_16+0xfd/0x120 [btrfs]
[350.429832 ] check_leaf+0x754/0x1a40 [btrfs]
[350.429874 ] ? filemap_read+0x34a/0x390
[350.429878 ] ? load_balance+0x175/0xfc0
[350.429881 ] validate_extent_buffer+0x244/0x310 [btrfs]
[350.429911 ] btrfs_validate_metadata_buffer+0xf8/0x100 [btrfs]
[350.429935 ] end_bio_extent_readpage+0x3af/0x850 [btrfs]
[350.429969 ] ? newidle_balance+0x259/0x480
[350.429972 ] end_workqueue_fn+0x29/0x40 [btrfs]
[350.429995 ] btrfs_work_helper+0x71/0x330 [btrfs]
[350.430030 ] ? __schedule+0x2fb/0xa40
[350.430033 ] process_one_work+0x1f6/0x400
[350.430035 ] ? process_one_work+0x400/0x400
[350.430036 ] worker_thread+0x2d/0x3d0
[350.430037 ] ? process_one_work+0x400/0x400
[350.430038 ] kthread+0x165/0x190
[350.430041 ] ? set_kthread_struct+0x40/0x40
[350.430043 ] ret_from_fork+0x1f/0x30
[350.430047 ] </TASK>
[350.430047 ]
[350.430077 ] BTRFS warning (device loop0): bad eb member start: ptr 0xffe20f4e start 20975616 member offset 4293005178 size 2
btrfs check reports:
corrupt leaf: root=3 block=20975616 physical=20975616 slot=1, unexpected
item end, have 4294971193 expect 3897
The first slot item offset is 4293005033 and the size is 1966160.
In check_leaf, we use btrfs_item_end() to check item boundary versus
extent_buffer data size. However, return type of btrfs_item_end() is u32.
(u32)(4293005033 + 1966160) == 3897, overflow happens and the result 3897
equals to leaf data size reasonably.
Fix it by use u64 variable to store item data end in check_leaf() to
avoid u32 overflow.
This commit does solve the invalid memory access showed by the stack
trace. However, its metadata profile is DUP and another copy of the
leaf is fine. So the image can be mounted successfully. But when umount
is called, the ASSERT btrfs_mark_buffer_dirty() will be triggered
because the only node in extent tree has 0 item and invalid owner. It's
solved by another commit
"btrfs: check extent buffer owner against the owner rootid".
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=215299
Reported-by: Wenqing Liu <wenqingliu0120(a)gmail.com>
CC: stable(a)vger.kernel.org # 4.19+
Signed-off-by: Su Yue <l(a)damenly.su>
Reviewed-by: David Sterba <dsterba(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c
index 9fd145f1c4bc..aae5697dde32 100644
--- a/fs/btrfs/tree-checker.c
+++ b/fs/btrfs/tree-checker.c
@@ -1682,6 +1682,7 @@ static int check_leaf(struct extent_buffer *leaf, bool check_item_data)
*/
for (slot = 0; slot < nritems; slot++) {
u32 item_end_expected;
+ u64 item_data_end;
int ret;
btrfs_item_key_to_cpu(leaf, &key, slot);
@@ -1696,6 +1697,8 @@ static int check_leaf(struct extent_buffer *leaf, bool check_item_data)
return -EUCLEAN;
}
+ item_data_end = (u64)btrfs_item_offset(leaf, slot) +
+ btrfs_item_size(leaf, slot);
/*
* Make sure the offset and ends are right, remember that the
* item data starts at the end of the leaf and grows towards the
@@ -1706,11 +1709,10 @@ static int check_leaf(struct extent_buffer *leaf, bool check_item_data)
else
item_end_expected = btrfs_item_offset(leaf,
slot - 1);
- if (unlikely(btrfs_item_data_end(leaf, slot) != item_end_expected)) {
+ if (unlikely(item_data_end != item_end_expected)) {
generic_err(leaf, slot,
- "unexpected item end, have %u expect %u",
- btrfs_item_data_end(leaf, slot),
- item_end_expected);
+ "unexpected item end, have %llu expect %u",
+ item_data_end, item_end_expected);
return -EUCLEAN;
}
@@ -1719,12 +1721,10 @@ static int check_leaf(struct extent_buffer *leaf, bool check_item_data)
* just in case all the items are consistent to each other, but
* all point outside of the leaf.
*/
- if (unlikely(btrfs_item_data_end(leaf, slot) >
- BTRFS_LEAF_DATA_SIZE(fs_info))) {
+ if (unlikely(item_data_end > BTRFS_LEAF_DATA_SIZE(fs_info))) {
generic_err(leaf, slot,
- "slot end outside of leaf, have %u expect range [0, %u]",
- btrfs_item_data_end(leaf, slot),
- BTRFS_LEAF_DATA_SIZE(fs_info));
+ "slot end outside of leaf, have %llu expect range [0, %u]",
+ item_data_end, BTRFS_LEAF_DATA_SIZE(fs_info));
return -EUCLEAN;
}
The patch below does not apply to the 5.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 a6ab66eb8541d61b0a11d70980f07b4c2dfeddc5 Mon Sep 17 00:00:00 2001
From: Su Yue <l(a)damenly.su>
Date: Tue, 22 Feb 2022 16:42:07 +0800
Subject: [PATCH] btrfs: tree-checker: use u64 for item data end to avoid
overflow
User reported there is an array-index-out-of-bounds access while
mounting the crafted image:
[350.411942 ] loop0: detected capacity change from 0 to 262144
[350.427058 ] BTRFS: device fsid a62e00e8-e94e-4200-8217-12444de93c2e devid 1 transid 8 /dev/loop0 scanned by systemd-udevd (1044)
[350.428564 ] BTRFS info (device loop0): disk space caching is enabled
[350.428568 ] BTRFS info (device loop0): has skinny extents
[350.429589 ]
[350.429619 ] UBSAN: array-index-out-of-bounds in fs/btrfs/struct-funcs.c:161:1
[350.429636 ] index 1048096 is out of range for type 'page *[16]'
[350.429650 ] CPU: 0 PID: 9 Comm: kworker/u8:1 Not tainted 5.16.0-rc4
[350.429652 ] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-1ubuntu1.1 04/01/2014
[350.429653 ] Workqueue: btrfs-endio-meta btrfs_work_helper [btrfs]
[350.429772 ] Call Trace:
[350.429774 ] <TASK>
[350.429776 ] dump_stack_lvl+0x47/0x5c
[350.429780 ] ubsan_epilogue+0x5/0x50
[350.429786 ] __ubsan_handle_out_of_bounds+0x66/0x70
[350.429791 ] btrfs_get_16+0xfd/0x120 [btrfs]
[350.429832 ] check_leaf+0x754/0x1a40 [btrfs]
[350.429874 ] ? filemap_read+0x34a/0x390
[350.429878 ] ? load_balance+0x175/0xfc0
[350.429881 ] validate_extent_buffer+0x244/0x310 [btrfs]
[350.429911 ] btrfs_validate_metadata_buffer+0xf8/0x100 [btrfs]
[350.429935 ] end_bio_extent_readpage+0x3af/0x850 [btrfs]
[350.429969 ] ? newidle_balance+0x259/0x480
[350.429972 ] end_workqueue_fn+0x29/0x40 [btrfs]
[350.429995 ] btrfs_work_helper+0x71/0x330 [btrfs]
[350.430030 ] ? __schedule+0x2fb/0xa40
[350.430033 ] process_one_work+0x1f6/0x400
[350.430035 ] ? process_one_work+0x400/0x400
[350.430036 ] worker_thread+0x2d/0x3d0
[350.430037 ] ? process_one_work+0x400/0x400
[350.430038 ] kthread+0x165/0x190
[350.430041 ] ? set_kthread_struct+0x40/0x40
[350.430043 ] ret_from_fork+0x1f/0x30
[350.430047 ] </TASK>
[350.430047 ]
[350.430077 ] BTRFS warning (device loop0): bad eb member start: ptr 0xffe20f4e start 20975616 member offset 4293005178 size 2
btrfs check reports:
corrupt leaf: root=3 block=20975616 physical=20975616 slot=1, unexpected
item end, have 4294971193 expect 3897
The first slot item offset is 4293005033 and the size is 1966160.
In check_leaf, we use btrfs_item_end() to check item boundary versus
extent_buffer data size. However, return type of btrfs_item_end() is u32.
(u32)(4293005033 + 1966160) == 3897, overflow happens and the result 3897
equals to leaf data size reasonably.
Fix it by use u64 variable to store item data end in check_leaf() to
avoid u32 overflow.
This commit does solve the invalid memory access showed by the stack
trace. However, its metadata profile is DUP and another copy of the
leaf is fine. So the image can be mounted successfully. But when umount
is called, the ASSERT btrfs_mark_buffer_dirty() will be triggered
because the only node in extent tree has 0 item and invalid owner. It's
solved by another commit
"btrfs: check extent buffer owner against the owner rootid".
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=215299
Reported-by: Wenqing Liu <wenqingliu0120(a)gmail.com>
CC: stable(a)vger.kernel.org # 4.19+
Signed-off-by: Su Yue <l(a)damenly.su>
Reviewed-by: David Sterba <dsterba(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c
index 9fd145f1c4bc..aae5697dde32 100644
--- a/fs/btrfs/tree-checker.c
+++ b/fs/btrfs/tree-checker.c
@@ -1682,6 +1682,7 @@ static int check_leaf(struct extent_buffer *leaf, bool check_item_data)
*/
for (slot = 0; slot < nritems; slot++) {
u32 item_end_expected;
+ u64 item_data_end;
int ret;
btrfs_item_key_to_cpu(leaf, &key, slot);
@@ -1696,6 +1697,8 @@ static int check_leaf(struct extent_buffer *leaf, bool check_item_data)
return -EUCLEAN;
}
+ item_data_end = (u64)btrfs_item_offset(leaf, slot) +
+ btrfs_item_size(leaf, slot);
/*
* Make sure the offset and ends are right, remember that the
* item data starts at the end of the leaf and grows towards the
@@ -1706,11 +1709,10 @@ static int check_leaf(struct extent_buffer *leaf, bool check_item_data)
else
item_end_expected = btrfs_item_offset(leaf,
slot - 1);
- if (unlikely(btrfs_item_data_end(leaf, slot) != item_end_expected)) {
+ if (unlikely(item_data_end != item_end_expected)) {
generic_err(leaf, slot,
- "unexpected item end, have %u expect %u",
- btrfs_item_data_end(leaf, slot),
- item_end_expected);
+ "unexpected item end, have %llu expect %u",
+ item_data_end, item_end_expected);
return -EUCLEAN;
}
@@ -1719,12 +1721,10 @@ static int check_leaf(struct extent_buffer *leaf, bool check_item_data)
* just in case all the items are consistent to each other, but
* all point outside of the leaf.
*/
- if (unlikely(btrfs_item_data_end(leaf, slot) >
- BTRFS_LEAF_DATA_SIZE(fs_info))) {
+ if (unlikely(item_data_end > BTRFS_LEAF_DATA_SIZE(fs_info))) {
generic_err(leaf, slot,
- "slot end outside of leaf, have %u expect range [0, %u]",
- btrfs_item_data_end(leaf, slot),
- BTRFS_LEAF_DATA_SIZE(fs_info));
+ "slot end outside of leaf, have %llu expect range [0, %u]",
+ item_data_end, BTRFS_LEAF_DATA_SIZE(fs_info));
return -EUCLEAN;
}
The patch below does not apply to the 5.10-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 a6ab66eb8541d61b0a11d70980f07b4c2dfeddc5 Mon Sep 17 00:00:00 2001
From: Su Yue <l(a)damenly.su>
Date: Tue, 22 Feb 2022 16:42:07 +0800
Subject: [PATCH] btrfs: tree-checker: use u64 for item data end to avoid
overflow
User reported there is an array-index-out-of-bounds access while
mounting the crafted image:
[350.411942 ] loop0: detected capacity change from 0 to 262144
[350.427058 ] BTRFS: device fsid a62e00e8-e94e-4200-8217-12444de93c2e devid 1 transid 8 /dev/loop0 scanned by systemd-udevd (1044)
[350.428564 ] BTRFS info (device loop0): disk space caching is enabled
[350.428568 ] BTRFS info (device loop0): has skinny extents
[350.429589 ]
[350.429619 ] UBSAN: array-index-out-of-bounds in fs/btrfs/struct-funcs.c:161:1
[350.429636 ] index 1048096 is out of range for type 'page *[16]'
[350.429650 ] CPU: 0 PID: 9 Comm: kworker/u8:1 Not tainted 5.16.0-rc4
[350.429652 ] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-1ubuntu1.1 04/01/2014
[350.429653 ] Workqueue: btrfs-endio-meta btrfs_work_helper [btrfs]
[350.429772 ] Call Trace:
[350.429774 ] <TASK>
[350.429776 ] dump_stack_lvl+0x47/0x5c
[350.429780 ] ubsan_epilogue+0x5/0x50
[350.429786 ] __ubsan_handle_out_of_bounds+0x66/0x70
[350.429791 ] btrfs_get_16+0xfd/0x120 [btrfs]
[350.429832 ] check_leaf+0x754/0x1a40 [btrfs]
[350.429874 ] ? filemap_read+0x34a/0x390
[350.429878 ] ? load_balance+0x175/0xfc0
[350.429881 ] validate_extent_buffer+0x244/0x310 [btrfs]
[350.429911 ] btrfs_validate_metadata_buffer+0xf8/0x100 [btrfs]
[350.429935 ] end_bio_extent_readpage+0x3af/0x850 [btrfs]
[350.429969 ] ? newidle_balance+0x259/0x480
[350.429972 ] end_workqueue_fn+0x29/0x40 [btrfs]
[350.429995 ] btrfs_work_helper+0x71/0x330 [btrfs]
[350.430030 ] ? __schedule+0x2fb/0xa40
[350.430033 ] process_one_work+0x1f6/0x400
[350.430035 ] ? process_one_work+0x400/0x400
[350.430036 ] worker_thread+0x2d/0x3d0
[350.430037 ] ? process_one_work+0x400/0x400
[350.430038 ] kthread+0x165/0x190
[350.430041 ] ? set_kthread_struct+0x40/0x40
[350.430043 ] ret_from_fork+0x1f/0x30
[350.430047 ] </TASK>
[350.430047 ]
[350.430077 ] BTRFS warning (device loop0): bad eb member start: ptr 0xffe20f4e start 20975616 member offset 4293005178 size 2
btrfs check reports:
corrupt leaf: root=3 block=20975616 physical=20975616 slot=1, unexpected
item end, have 4294971193 expect 3897
The first slot item offset is 4293005033 and the size is 1966160.
In check_leaf, we use btrfs_item_end() to check item boundary versus
extent_buffer data size. However, return type of btrfs_item_end() is u32.
(u32)(4293005033 + 1966160) == 3897, overflow happens and the result 3897
equals to leaf data size reasonably.
Fix it by use u64 variable to store item data end in check_leaf() to
avoid u32 overflow.
This commit does solve the invalid memory access showed by the stack
trace. However, its metadata profile is DUP and another copy of the
leaf is fine. So the image can be mounted successfully. But when umount
is called, the ASSERT btrfs_mark_buffer_dirty() will be triggered
because the only node in extent tree has 0 item and invalid owner. It's
solved by another commit
"btrfs: check extent buffer owner against the owner rootid".
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=215299
Reported-by: Wenqing Liu <wenqingliu0120(a)gmail.com>
CC: stable(a)vger.kernel.org # 4.19+
Signed-off-by: Su Yue <l(a)damenly.su>
Reviewed-by: David Sterba <dsterba(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c
index 9fd145f1c4bc..aae5697dde32 100644
--- a/fs/btrfs/tree-checker.c
+++ b/fs/btrfs/tree-checker.c
@@ -1682,6 +1682,7 @@ static int check_leaf(struct extent_buffer *leaf, bool check_item_data)
*/
for (slot = 0; slot < nritems; slot++) {
u32 item_end_expected;
+ u64 item_data_end;
int ret;
btrfs_item_key_to_cpu(leaf, &key, slot);
@@ -1696,6 +1697,8 @@ static int check_leaf(struct extent_buffer *leaf, bool check_item_data)
return -EUCLEAN;
}
+ item_data_end = (u64)btrfs_item_offset(leaf, slot) +
+ btrfs_item_size(leaf, slot);
/*
* Make sure the offset and ends are right, remember that the
* item data starts at the end of the leaf and grows towards the
@@ -1706,11 +1709,10 @@ static int check_leaf(struct extent_buffer *leaf, bool check_item_data)
else
item_end_expected = btrfs_item_offset(leaf,
slot - 1);
- if (unlikely(btrfs_item_data_end(leaf, slot) != item_end_expected)) {
+ if (unlikely(item_data_end != item_end_expected)) {
generic_err(leaf, slot,
- "unexpected item end, have %u expect %u",
- btrfs_item_data_end(leaf, slot),
- item_end_expected);
+ "unexpected item end, have %llu expect %u",
+ item_data_end, item_end_expected);
return -EUCLEAN;
}
@@ -1719,12 +1721,10 @@ static int check_leaf(struct extent_buffer *leaf, bool check_item_data)
* just in case all the items are consistent to each other, but
* all point outside of the leaf.
*/
- if (unlikely(btrfs_item_data_end(leaf, slot) >
- BTRFS_LEAF_DATA_SIZE(fs_info))) {
+ if (unlikely(item_data_end > BTRFS_LEAF_DATA_SIZE(fs_info))) {
generic_err(leaf, slot,
- "slot end outside of leaf, have %u expect range [0, %u]",
- btrfs_item_data_end(leaf, slot),
- BTRFS_LEAF_DATA_SIZE(fs_info));
+ "slot end outside of leaf, have %llu expect range [0, %u]",
+ item_data_end, BTRFS_LEAF_DATA_SIZE(fs_info));
return -EUCLEAN;
}
The patch below does not apply to the 5.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 a6ab66eb8541d61b0a11d70980f07b4c2dfeddc5 Mon Sep 17 00:00:00 2001
From: Su Yue <l(a)damenly.su>
Date: Tue, 22 Feb 2022 16:42:07 +0800
Subject: [PATCH] btrfs: tree-checker: use u64 for item data end to avoid
overflow
User reported there is an array-index-out-of-bounds access while
mounting the crafted image:
[350.411942 ] loop0: detected capacity change from 0 to 262144
[350.427058 ] BTRFS: device fsid a62e00e8-e94e-4200-8217-12444de93c2e devid 1 transid 8 /dev/loop0 scanned by systemd-udevd (1044)
[350.428564 ] BTRFS info (device loop0): disk space caching is enabled
[350.428568 ] BTRFS info (device loop0): has skinny extents
[350.429589 ]
[350.429619 ] UBSAN: array-index-out-of-bounds in fs/btrfs/struct-funcs.c:161:1
[350.429636 ] index 1048096 is out of range for type 'page *[16]'
[350.429650 ] CPU: 0 PID: 9 Comm: kworker/u8:1 Not tainted 5.16.0-rc4
[350.429652 ] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-1ubuntu1.1 04/01/2014
[350.429653 ] Workqueue: btrfs-endio-meta btrfs_work_helper [btrfs]
[350.429772 ] Call Trace:
[350.429774 ] <TASK>
[350.429776 ] dump_stack_lvl+0x47/0x5c
[350.429780 ] ubsan_epilogue+0x5/0x50
[350.429786 ] __ubsan_handle_out_of_bounds+0x66/0x70
[350.429791 ] btrfs_get_16+0xfd/0x120 [btrfs]
[350.429832 ] check_leaf+0x754/0x1a40 [btrfs]
[350.429874 ] ? filemap_read+0x34a/0x390
[350.429878 ] ? load_balance+0x175/0xfc0
[350.429881 ] validate_extent_buffer+0x244/0x310 [btrfs]
[350.429911 ] btrfs_validate_metadata_buffer+0xf8/0x100 [btrfs]
[350.429935 ] end_bio_extent_readpage+0x3af/0x850 [btrfs]
[350.429969 ] ? newidle_balance+0x259/0x480
[350.429972 ] end_workqueue_fn+0x29/0x40 [btrfs]
[350.429995 ] btrfs_work_helper+0x71/0x330 [btrfs]
[350.430030 ] ? __schedule+0x2fb/0xa40
[350.430033 ] process_one_work+0x1f6/0x400
[350.430035 ] ? process_one_work+0x400/0x400
[350.430036 ] worker_thread+0x2d/0x3d0
[350.430037 ] ? process_one_work+0x400/0x400
[350.430038 ] kthread+0x165/0x190
[350.430041 ] ? set_kthread_struct+0x40/0x40
[350.430043 ] ret_from_fork+0x1f/0x30
[350.430047 ] </TASK>
[350.430047 ]
[350.430077 ] BTRFS warning (device loop0): bad eb member start: ptr 0xffe20f4e start 20975616 member offset 4293005178 size 2
btrfs check reports:
corrupt leaf: root=3 block=20975616 physical=20975616 slot=1, unexpected
item end, have 4294971193 expect 3897
The first slot item offset is 4293005033 and the size is 1966160.
In check_leaf, we use btrfs_item_end() to check item boundary versus
extent_buffer data size. However, return type of btrfs_item_end() is u32.
(u32)(4293005033 + 1966160) == 3897, overflow happens and the result 3897
equals to leaf data size reasonably.
Fix it by use u64 variable to store item data end in check_leaf() to
avoid u32 overflow.
This commit does solve the invalid memory access showed by the stack
trace. However, its metadata profile is DUP and another copy of the
leaf is fine. So the image can be mounted successfully. But when umount
is called, the ASSERT btrfs_mark_buffer_dirty() will be triggered
because the only node in extent tree has 0 item and invalid owner. It's
solved by another commit
"btrfs: check extent buffer owner against the owner rootid".
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=215299
Reported-by: Wenqing Liu <wenqingliu0120(a)gmail.com>
CC: stable(a)vger.kernel.org # 4.19+
Signed-off-by: Su Yue <l(a)damenly.su>
Reviewed-by: David Sterba <dsterba(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c
index 9fd145f1c4bc..aae5697dde32 100644
--- a/fs/btrfs/tree-checker.c
+++ b/fs/btrfs/tree-checker.c
@@ -1682,6 +1682,7 @@ static int check_leaf(struct extent_buffer *leaf, bool check_item_data)
*/
for (slot = 0; slot < nritems; slot++) {
u32 item_end_expected;
+ u64 item_data_end;
int ret;
btrfs_item_key_to_cpu(leaf, &key, slot);
@@ -1696,6 +1697,8 @@ static int check_leaf(struct extent_buffer *leaf, bool check_item_data)
return -EUCLEAN;
}
+ item_data_end = (u64)btrfs_item_offset(leaf, slot) +
+ btrfs_item_size(leaf, slot);
/*
* Make sure the offset and ends are right, remember that the
* item data starts at the end of the leaf and grows towards the
@@ -1706,11 +1709,10 @@ static int check_leaf(struct extent_buffer *leaf, bool check_item_data)
else
item_end_expected = btrfs_item_offset(leaf,
slot - 1);
- if (unlikely(btrfs_item_data_end(leaf, slot) != item_end_expected)) {
+ if (unlikely(item_data_end != item_end_expected)) {
generic_err(leaf, slot,
- "unexpected item end, have %u expect %u",
- btrfs_item_data_end(leaf, slot),
- item_end_expected);
+ "unexpected item end, have %llu expect %u",
+ item_data_end, item_end_expected);
return -EUCLEAN;
}
@@ -1719,12 +1721,10 @@ static int check_leaf(struct extent_buffer *leaf, bool check_item_data)
* just in case all the items are consistent to each other, but
* all point outside of the leaf.
*/
- if (unlikely(btrfs_item_data_end(leaf, slot) >
- BTRFS_LEAF_DATA_SIZE(fs_info))) {
+ if (unlikely(item_data_end > BTRFS_LEAF_DATA_SIZE(fs_info))) {
generic_err(leaf, slot,
- "slot end outside of leaf, have %u expect range [0, %u]",
- btrfs_item_data_end(leaf, slot),
- BTRFS_LEAF_DATA_SIZE(fs_info));
+ "slot end outside of leaf, have %llu expect range [0, %u]",
+ item_data_end, BTRFS_LEAF_DATA_SIZE(fs_info));
return -EUCLEAN;
}
The patch below does not apply to the 4.19-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 a6ab66eb8541d61b0a11d70980f07b4c2dfeddc5 Mon Sep 17 00:00:00 2001
From: Su Yue <l(a)damenly.su>
Date: Tue, 22 Feb 2022 16:42:07 +0800
Subject: [PATCH] btrfs: tree-checker: use u64 for item data end to avoid
overflow
User reported there is an array-index-out-of-bounds access while
mounting the crafted image:
[350.411942 ] loop0: detected capacity change from 0 to 262144
[350.427058 ] BTRFS: device fsid a62e00e8-e94e-4200-8217-12444de93c2e devid 1 transid 8 /dev/loop0 scanned by systemd-udevd (1044)
[350.428564 ] BTRFS info (device loop0): disk space caching is enabled
[350.428568 ] BTRFS info (device loop0): has skinny extents
[350.429589 ]
[350.429619 ] UBSAN: array-index-out-of-bounds in fs/btrfs/struct-funcs.c:161:1
[350.429636 ] index 1048096 is out of range for type 'page *[16]'
[350.429650 ] CPU: 0 PID: 9 Comm: kworker/u8:1 Not tainted 5.16.0-rc4
[350.429652 ] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-1ubuntu1.1 04/01/2014
[350.429653 ] Workqueue: btrfs-endio-meta btrfs_work_helper [btrfs]
[350.429772 ] Call Trace:
[350.429774 ] <TASK>
[350.429776 ] dump_stack_lvl+0x47/0x5c
[350.429780 ] ubsan_epilogue+0x5/0x50
[350.429786 ] __ubsan_handle_out_of_bounds+0x66/0x70
[350.429791 ] btrfs_get_16+0xfd/0x120 [btrfs]
[350.429832 ] check_leaf+0x754/0x1a40 [btrfs]
[350.429874 ] ? filemap_read+0x34a/0x390
[350.429878 ] ? load_balance+0x175/0xfc0
[350.429881 ] validate_extent_buffer+0x244/0x310 [btrfs]
[350.429911 ] btrfs_validate_metadata_buffer+0xf8/0x100 [btrfs]
[350.429935 ] end_bio_extent_readpage+0x3af/0x850 [btrfs]
[350.429969 ] ? newidle_balance+0x259/0x480
[350.429972 ] end_workqueue_fn+0x29/0x40 [btrfs]
[350.429995 ] btrfs_work_helper+0x71/0x330 [btrfs]
[350.430030 ] ? __schedule+0x2fb/0xa40
[350.430033 ] process_one_work+0x1f6/0x400
[350.430035 ] ? process_one_work+0x400/0x400
[350.430036 ] worker_thread+0x2d/0x3d0
[350.430037 ] ? process_one_work+0x400/0x400
[350.430038 ] kthread+0x165/0x190
[350.430041 ] ? set_kthread_struct+0x40/0x40
[350.430043 ] ret_from_fork+0x1f/0x30
[350.430047 ] </TASK>
[350.430047 ]
[350.430077 ] BTRFS warning (device loop0): bad eb member start: ptr 0xffe20f4e start 20975616 member offset 4293005178 size 2
btrfs check reports:
corrupt leaf: root=3 block=20975616 physical=20975616 slot=1, unexpected
item end, have 4294971193 expect 3897
The first slot item offset is 4293005033 and the size is 1966160.
In check_leaf, we use btrfs_item_end() to check item boundary versus
extent_buffer data size. However, return type of btrfs_item_end() is u32.
(u32)(4293005033 + 1966160) == 3897, overflow happens and the result 3897
equals to leaf data size reasonably.
Fix it by use u64 variable to store item data end in check_leaf() to
avoid u32 overflow.
This commit does solve the invalid memory access showed by the stack
trace. However, its metadata profile is DUP and another copy of the
leaf is fine. So the image can be mounted successfully. But when umount
is called, the ASSERT btrfs_mark_buffer_dirty() will be triggered
because the only node in extent tree has 0 item and invalid owner. It's
solved by another commit
"btrfs: check extent buffer owner against the owner rootid".
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=215299
Reported-by: Wenqing Liu <wenqingliu0120(a)gmail.com>
CC: stable(a)vger.kernel.org # 4.19+
Signed-off-by: Su Yue <l(a)damenly.su>
Reviewed-by: David Sterba <dsterba(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c
index 9fd145f1c4bc..aae5697dde32 100644
--- a/fs/btrfs/tree-checker.c
+++ b/fs/btrfs/tree-checker.c
@@ -1682,6 +1682,7 @@ static int check_leaf(struct extent_buffer *leaf, bool check_item_data)
*/
for (slot = 0; slot < nritems; slot++) {
u32 item_end_expected;
+ u64 item_data_end;
int ret;
btrfs_item_key_to_cpu(leaf, &key, slot);
@@ -1696,6 +1697,8 @@ static int check_leaf(struct extent_buffer *leaf, bool check_item_data)
return -EUCLEAN;
}
+ item_data_end = (u64)btrfs_item_offset(leaf, slot) +
+ btrfs_item_size(leaf, slot);
/*
* Make sure the offset and ends are right, remember that the
* item data starts at the end of the leaf and grows towards the
@@ -1706,11 +1709,10 @@ static int check_leaf(struct extent_buffer *leaf, bool check_item_data)
else
item_end_expected = btrfs_item_offset(leaf,
slot - 1);
- if (unlikely(btrfs_item_data_end(leaf, slot) != item_end_expected)) {
+ if (unlikely(item_data_end != item_end_expected)) {
generic_err(leaf, slot,
- "unexpected item end, have %u expect %u",
- btrfs_item_data_end(leaf, slot),
- item_end_expected);
+ "unexpected item end, have %llu expect %u",
+ item_data_end, item_end_expected);
return -EUCLEAN;
}
@@ -1719,12 +1721,10 @@ static int check_leaf(struct extent_buffer *leaf, bool check_item_data)
* just in case all the items are consistent to each other, but
* all point outside of the leaf.
*/
- if (unlikely(btrfs_item_data_end(leaf, slot) >
- BTRFS_LEAF_DATA_SIZE(fs_info))) {
+ if (unlikely(item_data_end > BTRFS_LEAF_DATA_SIZE(fs_info))) {
generic_err(leaf, slot,
- "slot end outside of leaf, have %u expect range [0, %u]",
- btrfs_item_data_end(leaf, slot),
- BTRFS_LEAF_DATA_SIZE(fs_info));
+ "slot end outside of leaf, have %llu expect range [0, %u]",
+ item_data_end, BTRFS_LEAF_DATA_SIZE(fs_info));
return -EUCLEAN;
}
The patch below does not apply to the 5.10-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 b4be6aefa73c9a6899ef3ba9c5faaa8a66e333ef Mon Sep 17 00:00:00 2001
From: Josef Bacik <josef(a)toxicpanda.com>
Date: Fri, 18 Feb 2022 14:56:10 -0500
Subject: [PATCH] btrfs: do not start relocation until in progress drops are
done
We hit a bug with a recovering relocation on mount for one of our file
systems in production. I reproduced this locally by injecting errors
into snapshot delete with balance running at the same time. This
presented as an error while looking up an extent item
WARNING: CPU: 5 PID: 1501 at fs/btrfs/extent-tree.c:866 lookup_inline_extent_backref+0x647/0x680
CPU: 5 PID: 1501 Comm: btrfs-balance Not tainted 5.16.0-rc8+ #8
RIP: 0010:lookup_inline_extent_backref+0x647/0x680
RSP: 0018:ffffae0a023ab960 EFLAGS: 00010202
RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 000000000000000c RDI: 0000000000000000
RBP: ffff943fd2a39b60 R08: 0000000000000000 R09: 0000000000000001
R10: 0001434088152de0 R11: 0000000000000000 R12: 0000000001d05000
R13: ffff943fd2a39b60 R14: ffff943fdb96f2a0 R15: ffff9442fc923000
FS: 0000000000000000(0000) GS:ffff944e9eb40000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f1157b1fca8 CR3: 000000010f092000 CR4: 0000000000350ee0
Call Trace:
<TASK>
insert_inline_extent_backref+0x46/0xd0
__btrfs_inc_extent_ref.isra.0+0x5f/0x200
? btrfs_merge_delayed_refs+0x164/0x190
__btrfs_run_delayed_refs+0x561/0xfa0
? btrfs_search_slot+0x7b4/0xb30
? btrfs_update_root+0x1a9/0x2c0
btrfs_run_delayed_refs+0x73/0x1f0
? btrfs_update_root+0x1a9/0x2c0
btrfs_commit_transaction+0x50/0xa50
? btrfs_update_reloc_root+0x122/0x220
prepare_to_merge+0x29f/0x320
relocate_block_group+0x2b8/0x550
btrfs_relocate_block_group+0x1a6/0x350
btrfs_relocate_chunk+0x27/0xe0
btrfs_balance+0x777/0xe60
balance_kthread+0x35/0x50
? btrfs_balance+0xe60/0xe60
kthread+0x16b/0x190
? set_kthread_struct+0x40/0x40
ret_from_fork+0x22/0x30
</TASK>
Normally snapshot deletion and relocation are excluded from running at
the same time by the fs_info->cleaner_mutex. However if we had a
pending balance waiting to get the ->cleaner_mutex, and a snapshot
deletion was running, and then the box crashed, we would come up in a
state where we have a half deleted snapshot.
Again, in the normal case the snapshot deletion needs to complete before
relocation can start, but in this case relocation could very well start
before the snapshot deletion completes, as we simply add the root to the
dead roots list and wait for the next time the cleaner runs to clean up
the snapshot.
Fix this by setting a bit on the fs_info if we have any DEAD_ROOT's that
had a pending drop_progress key. If they do then we know we were in the
middle of the drop operation and set a flag on the fs_info. Then
balance can wait until this flag is cleared to start up again.
If there are DEAD_ROOT's that don't have a drop_progress set then we're
safe to start balance right away as we'll be properly protected by the
cleaner_mutex.
CC: stable(a)vger.kernel.org # 5.10+
Reviewed-by: Filipe Manana <fdmanana(a)suse.com>
Signed-off-by: Josef Bacik <josef(a)toxicpanda.com>
Reviewed-by: David Sterba <dsterba(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 947f04789389..ebb2d109e8bb 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -602,6 +602,9 @@ enum {
/* Indicate that we want the transaction kthread to commit right now. */
BTRFS_FS_COMMIT_TRANS,
+ /* Indicate we have half completed snapshot deletions pending. */
+ BTRFS_FS_UNFINISHED_DROPS,
+
#if BITS_PER_LONG == 32
/* Indicate if we have error/warn message printed on 32bit systems */
BTRFS_FS_32BIT_ERROR,
@@ -1106,8 +1109,15 @@ enum {
BTRFS_ROOT_QGROUP_FLUSHING,
/* We started the orphan cleanup for this root. */
BTRFS_ROOT_ORPHAN_CLEANUP,
+ /* This root has a drop operation that was started previously. */
+ BTRFS_ROOT_UNFINISHED_DROP,
};
+static inline void btrfs_wake_unfinished_drop(struct btrfs_fs_info *fs_info)
+{
+ clear_and_wake_up_bit(BTRFS_FS_UNFINISHED_DROPS, &fs_info->flags);
+}
+
/*
* Record swapped tree blocks of a subvolume tree for delayed subtree trace
* code. For detail check comment in fs/btrfs/qgroup.c.
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 87a5addbedf6..48590a380762 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -3813,6 +3813,10 @@ int __cold open_ctree(struct super_block *sb, struct btrfs_fs_devices *fs_device
set_bit(BTRFS_FS_OPEN, &fs_info->flags);
+ /* Kick the cleaner thread so it'll start deleting snapshots. */
+ if (test_bit(BTRFS_FS_UNFINISHED_DROPS, &fs_info->flags))
+ wake_up_process(fs_info->cleaner_kthread);
+
clear_oneshot:
btrfs_clear_oneshot_options(fs_info);
return 0;
@@ -4538,6 +4542,12 @@ void __cold close_ctree(struct btrfs_fs_info *fs_info)
*/
kthread_park(fs_info->cleaner_kthread);
+ /*
+ * If we had UNFINISHED_DROPS we could still be processing them, so
+ * clear that bit and wake up relocation so it can stop.
+ */
+ btrfs_wake_unfinished_drop(fs_info);
+
/* wait for the qgroup rescan worker to stop */
btrfs_qgroup_wait_for_completion(fs_info, false);
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index d89273c4b6b8..96427b1ecac3 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -5622,6 +5622,7 @@ int btrfs_drop_snapshot(struct btrfs_root *root, int update_ref, int for_reloc)
int ret;
int level;
bool root_dropped = false;
+ bool unfinished_drop = false;
btrfs_debug(fs_info, "Drop subvolume %llu", root->root_key.objectid);
@@ -5664,6 +5665,8 @@ int btrfs_drop_snapshot(struct btrfs_root *root, int update_ref, int for_reloc)
* already dropped.
*/
set_bit(BTRFS_ROOT_DELETING, &root->state);
+ unfinished_drop = test_bit(BTRFS_ROOT_UNFINISHED_DROP, &root->state);
+
if (btrfs_disk_key_objectid(&root_item->drop_progress) == 0) {
level = btrfs_header_level(root->node);
path->nodes[level] = btrfs_lock_root_node(root);
@@ -5838,6 +5841,13 @@ out_free:
kfree(wc);
btrfs_free_path(path);
out:
+ /*
+ * We were an unfinished drop root, check to see if there are any
+ * pending, and if not clear and wake up any waiters.
+ */
+ if (!err && unfinished_drop)
+ btrfs_maybe_wake_unfinished_drop(fs_info);
+
/*
* So if we need to stop dropping the snapshot for whatever reason we
* need to make sure to add it back to the dead root list so that we
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index f5465197996d..9d8054839782 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -3960,6 +3960,19 @@ int btrfs_relocate_block_group(struct btrfs_fs_info *fs_info, u64 group_start)
int rw = 0;
int err = 0;
+ /*
+ * This only gets set if we had a half-deleted snapshot on mount. We
+ * cannot allow relocation to start while we're still trying to clean up
+ * these pending deletions.
+ */
+ ret = wait_on_bit(&fs_info->flags, BTRFS_FS_UNFINISHED_DROPS, TASK_INTERRUPTIBLE);
+ if (ret)
+ return ret;
+
+ /* We may have been woken up by close_ctree, so bail if we're closing. */
+ if (btrfs_fs_closing(fs_info))
+ return -EINTR;
+
bg = btrfs_lookup_block_group(fs_info, group_start);
if (!bg)
return -ENOENT;
diff --git a/fs/btrfs/root-tree.c b/fs/btrfs/root-tree.c
index 3d68d2dcd83e..ca7426ef61c8 100644
--- a/fs/btrfs/root-tree.c
+++ b/fs/btrfs/root-tree.c
@@ -278,6 +278,21 @@ int btrfs_find_orphan_roots(struct btrfs_fs_info *fs_info)
WARN_ON(!test_bit(BTRFS_ROOT_ORPHAN_ITEM_INSERTED, &root->state));
if (btrfs_root_refs(&root->root_item) == 0) {
+ struct btrfs_key drop_key;
+
+ btrfs_disk_key_to_cpu(&drop_key, &root->root_item.drop_progress);
+ /*
+ * If we have a non-zero drop_progress then we know we
+ * made it partly through deleting this snapshot, and
+ * thus we need to make sure we block any balance from
+ * happening until this snapshot is completely dropped.
+ */
+ if (drop_key.objectid != 0 || drop_key.type != 0 ||
+ drop_key.offset != 0) {
+ set_bit(BTRFS_FS_UNFINISHED_DROPS, &fs_info->flags);
+ set_bit(BTRFS_ROOT_UNFINISHED_DROP, &root->state);
+ }
+
set_bit(BTRFS_ROOT_DEAD_TREE, &root->state);
btrfs_add_dead_root(root);
}
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index c3cfdfd8de9b..f17bf3764ce8 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -1319,6 +1319,32 @@ again:
return 0;
}
+/*
+ * If we had a pending drop we need to see if there are any others left in our
+ * dead roots list, and if not clear our bit and wake any waiters.
+ */
+void btrfs_maybe_wake_unfinished_drop(struct btrfs_fs_info *fs_info)
+{
+ /*
+ * We put the drop in progress roots at the front of the list, so if the
+ * first entry doesn't have UNFINISHED_DROP set we can wake everybody
+ * up.
+ */
+ spin_lock(&fs_info->trans_lock);
+ if (!list_empty(&fs_info->dead_roots)) {
+ struct btrfs_root *root = list_first_entry(&fs_info->dead_roots,
+ struct btrfs_root,
+ root_list);
+ if (test_bit(BTRFS_ROOT_UNFINISHED_DROP, &root->state)) {
+ spin_unlock(&fs_info->trans_lock);
+ return;
+ }
+ }
+ spin_unlock(&fs_info->trans_lock);
+
+ btrfs_wake_unfinished_drop(fs_info);
+}
+
/*
* dead roots are old snapshots that need to be deleted. This allocates
* a dirty root struct and adds it into the list of dead roots that need to
@@ -1331,7 +1357,12 @@ void btrfs_add_dead_root(struct btrfs_root *root)
spin_lock(&fs_info->trans_lock);
if (list_empty(&root->root_list)) {
btrfs_grab_root(root);
- list_add_tail(&root->root_list, &fs_info->dead_roots);
+
+ /* We want to process the partially complete drops first. */
+ if (test_bit(BTRFS_ROOT_UNFINISHED_DROP, &root->state))
+ list_add(&root->root_list, &fs_info->dead_roots);
+ else
+ list_add_tail(&root->root_list, &fs_info->dead_roots);
}
spin_unlock(&fs_info->trans_lock);
}
diff --git a/fs/btrfs/transaction.h b/fs/btrfs/transaction.h
index 9402d8d94484..ba8a9826eb37 100644
--- a/fs/btrfs/transaction.h
+++ b/fs/btrfs/transaction.h
@@ -216,6 +216,7 @@ int btrfs_wait_for_commit(struct btrfs_fs_info *fs_info, u64 transid);
void btrfs_add_dead_root(struct btrfs_root *root);
int btrfs_defrag_root(struct btrfs_root *root);
+void btrfs_maybe_wake_unfinished_drop(struct btrfs_fs_info *fs_info);
int btrfs_clean_one_deleted_snapshot(struct btrfs_root *root);
int btrfs_commit_transaction(struct btrfs_trans_handle *trans);
void btrfs_commit_transaction_async(struct btrfs_trans_handle *trans);
The patch below does not apply to the 5.10-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 a50e1fcbc9b85fd4e95b89a75c0884cb032a3e06 Mon Sep 17 00:00:00 2001
From: Josef Bacik <josef(a)toxicpanda.com>
Date: Fri, 18 Feb 2022 10:17:39 -0500
Subject: [PATCH] btrfs: do not WARN_ON() if we have PageError set
Whenever we do any extent buffer operations we call
assert_eb_page_uptodate() to complain loudly if we're operating on an
non-uptodate page. Our overnight tests caught this warning earlier this
week
WARNING: CPU: 1 PID: 553508 at fs/btrfs/extent_io.c:6849 assert_eb_page_uptodate+0x3f/0x50
CPU: 1 PID: 553508 Comm: kworker/u4:13 Tainted: G W 5.17.0-rc3+ #564
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
Workqueue: btrfs-cache btrfs_work_helper
RIP: 0010:assert_eb_page_uptodate+0x3f/0x50
RSP: 0018:ffffa961440a7c68 EFLAGS: 00010246
RAX: 0017ffffc0002112 RBX: ffffe6e74453f9c0 RCX: 0000000000001000
RDX: ffffe6e74467c887 RSI: ffffe6e74453f9c0 RDI: ffff8d4c5efc2fc0
RBP: 0000000000000d56 R08: ffff8d4d4a224000 R09: 0000000000000000
R10: 00015817fa9d1ef0 R11: 000000000000000c R12: 00000000000007b1
R13: ffff8d4c5efc2fc0 R14: 0000000001500000 R15: 0000000001cb1000
FS: 0000000000000000(0000) GS:ffff8d4dbbd00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff31d3448d8 CR3: 0000000118be8004 CR4: 0000000000370ee0
Call Trace:
extent_buffer_test_bit+0x3f/0x70
free_space_test_bit+0xa6/0xc0
load_free_space_tree+0x1f6/0x470
caching_thread+0x454/0x630
? rcu_read_lock_sched_held+0x12/0x60
? rcu_read_lock_sched_held+0x12/0x60
? rcu_read_lock_sched_held+0x12/0x60
? lock_release+0x1f0/0x2d0
btrfs_work_helper+0xf2/0x3e0
? lock_release+0x1f0/0x2d0
? finish_task_switch.isra.0+0xf9/0x3a0
process_one_work+0x26d/0x580
? process_one_work+0x580/0x580
worker_thread+0x55/0x3b0
? process_one_work+0x580/0x580
kthread+0xf0/0x120
? kthread_complete_and_exit+0x20/0x20
ret_from_fork+0x1f/0x30
This was partially fixed by c2e39305299f01 ("btrfs: clear extent buffer
uptodate when we fail to write it"), however all that fix did was keep
us from finding extent buffers after a failed writeout. It didn't keep
us from continuing to use a buffer that we already had found.
In this case we're searching the commit root to cache the block group,
so we can start committing the transaction and switch the commit root
and then start writing. After the switch we can look up an extent
buffer that hasn't been written yet and start processing that block
group. Then we fail to write that block out and clear Uptodate on the
page, and then we start spewing these errors.
Normally we're protected by the tree lock to a certain degree here. If
we read a block we have that block read locked, and we block the writer
from locking the block before we submit it for the write. However this
isn't necessarily fool proof because the read could happen before we do
the submit_bio and after we locked and unlocked the extent buffer.
Also in this particular case we have path->skip_locking set, so that
won't save us here. We'll simply get a block that was valid when we
read it, but became invalid while we were using it.
What we really want is to catch the case where we've "read" a block but
it's not marked Uptodate. On read we ClearPageError(), so if we're
!Uptodate and !Error we know we didn't do the right thing for reading
the page.
Fix this by checking !Uptodate && !Error, this way we will not complain
if our buffer gets invalidated while we're using it, and we'll maintain
the spirit of the check which is to make sure we have a fully in-cache
block while we're messing with it.
CC: stable(a)vger.kernel.org # 5.4+
Signed-off-by: Josef Bacik <josef(a)toxicpanda.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index d6d48ecf823c..9081223c3230 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -6851,14 +6851,24 @@ static void assert_eb_page_uptodate(const struct extent_buffer *eb,
{
struct btrfs_fs_info *fs_info = eb->fs_info;
+ /*
+ * If we are using the commit root we could potentially clear a page
+ * Uptodate while we're using the extent buffer that we've previously
+ * looked up. We don't want to complain in this case, as the page was
+ * valid before, we just didn't write it out. Instead we want to catch
+ * the case where we didn't actually read the block properly, which
+ * would have !PageUptodate && !PageError, as we clear PageError before
+ * reading.
+ */
if (fs_info->sectorsize < PAGE_SIZE) {
- bool uptodate;
+ bool uptodate, error;
uptodate = btrfs_subpage_test_uptodate(fs_info, page,
eb->start, eb->len);
- WARN_ON(!uptodate);
+ error = btrfs_subpage_test_error(fs_info, page, eb->start, eb->len);
+ WARN_ON(!uptodate && !error);
} else {
- WARN_ON(!PageUptodate(page));
+ WARN_ON(!PageUptodate(page) && !PageError(page));
}
}
The patch below does not apply to the 5.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 a50e1fcbc9b85fd4e95b89a75c0884cb032a3e06 Mon Sep 17 00:00:00 2001
From: Josef Bacik <josef(a)toxicpanda.com>
Date: Fri, 18 Feb 2022 10:17:39 -0500
Subject: [PATCH] btrfs: do not WARN_ON() if we have PageError set
Whenever we do any extent buffer operations we call
assert_eb_page_uptodate() to complain loudly if we're operating on an
non-uptodate page. Our overnight tests caught this warning earlier this
week
WARNING: CPU: 1 PID: 553508 at fs/btrfs/extent_io.c:6849 assert_eb_page_uptodate+0x3f/0x50
CPU: 1 PID: 553508 Comm: kworker/u4:13 Tainted: G W 5.17.0-rc3+ #564
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014
Workqueue: btrfs-cache btrfs_work_helper
RIP: 0010:assert_eb_page_uptodate+0x3f/0x50
RSP: 0018:ffffa961440a7c68 EFLAGS: 00010246
RAX: 0017ffffc0002112 RBX: ffffe6e74453f9c0 RCX: 0000000000001000
RDX: ffffe6e74467c887 RSI: ffffe6e74453f9c0 RDI: ffff8d4c5efc2fc0
RBP: 0000000000000d56 R08: ffff8d4d4a224000 R09: 0000000000000000
R10: 00015817fa9d1ef0 R11: 000000000000000c R12: 00000000000007b1
R13: ffff8d4c5efc2fc0 R14: 0000000001500000 R15: 0000000001cb1000
FS: 0000000000000000(0000) GS:ffff8d4dbbd00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff31d3448d8 CR3: 0000000118be8004 CR4: 0000000000370ee0
Call Trace:
extent_buffer_test_bit+0x3f/0x70
free_space_test_bit+0xa6/0xc0
load_free_space_tree+0x1f6/0x470
caching_thread+0x454/0x630
? rcu_read_lock_sched_held+0x12/0x60
? rcu_read_lock_sched_held+0x12/0x60
? rcu_read_lock_sched_held+0x12/0x60
? lock_release+0x1f0/0x2d0
btrfs_work_helper+0xf2/0x3e0
? lock_release+0x1f0/0x2d0
? finish_task_switch.isra.0+0xf9/0x3a0
process_one_work+0x26d/0x580
? process_one_work+0x580/0x580
worker_thread+0x55/0x3b0
? process_one_work+0x580/0x580
kthread+0xf0/0x120
? kthread_complete_and_exit+0x20/0x20
ret_from_fork+0x1f/0x30
This was partially fixed by c2e39305299f01 ("btrfs: clear extent buffer
uptodate when we fail to write it"), however all that fix did was keep
us from finding extent buffers after a failed writeout. It didn't keep
us from continuing to use a buffer that we already had found.
In this case we're searching the commit root to cache the block group,
so we can start committing the transaction and switch the commit root
and then start writing. After the switch we can look up an extent
buffer that hasn't been written yet and start processing that block
group. Then we fail to write that block out and clear Uptodate on the
page, and then we start spewing these errors.
Normally we're protected by the tree lock to a certain degree here. If
we read a block we have that block read locked, and we block the writer
from locking the block before we submit it for the write. However this
isn't necessarily fool proof because the read could happen before we do
the submit_bio and after we locked and unlocked the extent buffer.
Also in this particular case we have path->skip_locking set, so that
won't save us here. We'll simply get a block that was valid when we
read it, but became invalid while we were using it.
What we really want is to catch the case where we've "read" a block but
it's not marked Uptodate. On read we ClearPageError(), so if we're
!Uptodate and !Error we know we didn't do the right thing for reading
the page.
Fix this by checking !Uptodate && !Error, this way we will not complain
if our buffer gets invalidated while we're using it, and we'll maintain
the spirit of the check which is to make sure we have a fully in-cache
block while we're messing with it.
CC: stable(a)vger.kernel.org # 5.4+
Signed-off-by: Josef Bacik <josef(a)toxicpanda.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index d6d48ecf823c..9081223c3230 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -6851,14 +6851,24 @@ static void assert_eb_page_uptodate(const struct extent_buffer *eb,
{
struct btrfs_fs_info *fs_info = eb->fs_info;
+ /*
+ * If we are using the commit root we could potentially clear a page
+ * Uptodate while we're using the extent buffer that we've previously
+ * looked up. We don't want to complain in this case, as the page was
+ * valid before, we just didn't write it out. Instead we want to catch
+ * the case where we didn't actually read the block properly, which
+ * would have !PageUptodate && !PageError, as we clear PageError before
+ * reading.
+ */
if (fs_info->sectorsize < PAGE_SIZE) {
- bool uptodate;
+ bool uptodate, error;
uptodate = btrfs_subpage_test_uptodate(fs_info, page,
eb->start, eb->len);
- WARN_ON(!uptodate);
+ error = btrfs_subpage_test_error(fs_info, page, eb->start, eb->len);
+ WARN_ON(!uptodate && !error);
} else {
- WARN_ON(!PageUptodate(page));
+ WARN_ON(!PageUptodate(page) && !PageError(page));
}
}
The patch below does not apply to the 4.19-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 d99478874355d3a7b9d86dfb5d7590d5b1754b1f Mon Sep 17 00:00:00 2001
From: Filipe Manana <fdmanana(a)suse.com>
Date: Thu, 17 Feb 2022 12:12:02 +0000
Subject: [PATCH] btrfs: fix lost prealloc extents beyond eof after full fsync
When doing a full fsync, if we have prealloc extents beyond (or at) eof,
and the leaves that contain them were not modified in the current
transaction, we end up not logging them. This results in losing those
extents when we replay the log after a power failure, since the inode is
truncated to the current value of the logged i_size.
Just like for the fast fsync path, we need to always log all prealloc
extents starting at or beyond i_size. The fast fsync case was fixed in
commit 471d557afed155 ("Btrfs: fix loss of prealloc extents past i_size
after fsync log replay") but it missed the full fsync path. The problem
exists since the very early days, when the log tree was added by
commit e02119d5a7b439 ("Btrfs: Add a write ahead tree log to optimize
synchronous operations").
Example reproducer:
$ mkfs.btrfs -f /dev/sdc
$ mount /dev/sdc /mnt
# Create our test file with many file extent items, so that they span
# several leaves of metadata, even if the node/page size is 64K. Use
# direct IO and not fsync/O_SYNC because it's both faster and it avoids
# clearing the full sync flag from the inode - we want the fsync below
# to trigger the slow full sync code path.
$ xfs_io -f -d -c "pwrite -b 4K 0 16M" /mnt/foo
# Now add two preallocated extents to our file without extending the
# file's size. One right at i_size, and another further beyond, leaving
# a gap between the two prealloc extents.
$ xfs_io -c "falloc -k 16M 1M" /mnt/foo
$ xfs_io -c "falloc -k 20M 1M" /mnt/foo
# Make sure everything is durably persisted and the transaction is
# committed. This makes all created extents to have a generation lower
# than the generation of the transaction used by the next write and
# fsync.
sync
# Now overwrite only the first extent, which will result in modifying
# only the first leaf of metadata for our inode. Then fsync it. This
# fsync will use the slow code path (inode full sync bit is set) because
# it's the first fsync since the inode was created/loaded.
$ xfs_io -c "pwrite 0 4K" -c "fsync" /mnt/foo
# Extent list before power failure.
$ xfs_io -c "fiemap -v" /mnt/foo
/mnt/foo:
EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS
0: [0..7]: 2178048..2178055 8 0x0
1: [8..16383]: 26632..43007 16376 0x0
2: [16384..32767]: 2156544..2172927 16384 0x0
3: [32768..34815]: 2172928..2174975 2048 0x800
4: [34816..40959]: hole 6144
5: [40960..43007]: 2174976..2177023 2048 0x801
<power fail>
# Mount fs again, trigger log replay.
$ mount /dev/sdc /mnt
# Extent list after power failure and log replay.
$ xfs_io -c "fiemap -v" /mnt/foo
/mnt/foo:
EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS
0: [0..7]: 2178048..2178055 8 0x0
1: [8..16383]: 26632..43007 16376 0x0
2: [16384..32767]: 2156544..2172927 16384 0x1
# The prealloc extents at file offsets 16M and 20M are missing.
So fix this by calling btrfs_log_prealloc_extents() when we are doing a
full fsync, so that we always log all prealloc extents beyond eof.
A test case for fstests will follow soon.
CC: stable(a)vger.kernel.org # 4.19+
Signed-off-by: Filipe Manana <fdmanana(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 3ee014c06b82..42caf595c936 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -4635,7 +4635,7 @@ static int log_one_extent(struct btrfs_trans_handle *trans,
/*
* Log all prealloc extents beyond the inode's i_size to make sure we do not
- * lose them after doing a fast fsync and replaying the log. We scan the
+ * lose them after doing a full/fast fsync and replaying the log. We scan the
* subvolume's root instead of iterating the inode's extent map tree because
* otherwise we can log incorrect extent items based on extent map conversion.
* That can happen due to the fact that extent maps are merged when they
@@ -5414,6 +5414,7 @@ static int copy_inode_items_to_log(struct btrfs_trans_handle *trans,
struct btrfs_log_ctx *ctx,
bool *need_log_inode_item)
{
+ const u64 i_size = i_size_read(&inode->vfs_inode);
struct btrfs_root *root = inode->root;
int ins_start_slot = 0;
int ins_nr = 0;
@@ -5434,13 +5435,21 @@ static int copy_inode_items_to_log(struct btrfs_trans_handle *trans,
if (min_key->type > max_key->type)
break;
- if (min_key->type == BTRFS_INODE_ITEM_KEY)
+ if (min_key->type == BTRFS_INODE_ITEM_KEY) {
*need_log_inode_item = false;
-
- if ((min_key->type == BTRFS_INODE_REF_KEY ||
- min_key->type == BTRFS_INODE_EXTREF_KEY) &&
- inode->generation == trans->transid &&
- !recursive_logging) {
+ } else if (min_key->type == BTRFS_EXTENT_DATA_KEY &&
+ min_key->offset >= i_size) {
+ /*
+ * Extents at and beyond eof are logged with
+ * btrfs_log_prealloc_extents().
+ * Only regular files have BTRFS_EXTENT_DATA_KEY keys,
+ * and no keys greater than that, so bail out.
+ */
+ break;
+ } else if ((min_key->type == BTRFS_INODE_REF_KEY ||
+ min_key->type == BTRFS_INODE_EXTREF_KEY) &&
+ inode->generation == trans->transid &&
+ !recursive_logging) {
u64 other_ino = 0;
u64 other_parent = 0;
@@ -5471,10 +5480,8 @@ static int copy_inode_items_to_log(struct btrfs_trans_handle *trans,
btrfs_release_path(path);
goto next_key;
}
- }
-
- /* Skip xattrs, we log them later with btrfs_log_all_xattrs() */
- if (min_key->type == BTRFS_XATTR_ITEM_KEY) {
+ } else if (min_key->type == BTRFS_XATTR_ITEM_KEY) {
+ /* Skip xattrs, logged later with btrfs_log_all_xattrs() */
if (ins_nr == 0)
goto next_slot;
ret = copy_items(trans, inode, dst_path, path,
@@ -5527,9 +5534,21 @@ static int copy_inode_items_to_log(struct btrfs_trans_handle *trans,
break;
}
}
- if (ins_nr)
+ if (ins_nr) {
ret = copy_items(trans, inode, dst_path, path, ins_start_slot,
ins_nr, inode_only, logged_isize);
+ if (ret)
+ return ret;
+ }
+
+ if (inode_only == LOG_INODE_ALL && S_ISREG(inode->vfs_inode.i_mode)) {
+ /*
+ * Release the path because otherwise we might attempt to double
+ * lock the same leaf with btrfs_log_prealloc_extents() below.
+ */
+ btrfs_release_path(path);
+ ret = btrfs_log_prealloc_extents(trans, inode, dst_path);
+ }
return ret;
}
Hello,
Good day,
The HSBC Bank is a financial institution in United Kingdom. We
promotes long-term,sustainable and broad-based economic growth in
developing and emerging countries by providing financial support like
loans and investment to large, small and
medium-sized companies (SMEs) as well as fast-growing enterprises
which in turn helps to create secure and permanent jobs and reduce
poverty.
If you need fund to promotes your business, project(Project Funding),
Loan, planning, budgeting and expansion of your business(s) , do not
hesitate to indicate your interest as we are here to serve you better
by granting your request.
Thank you
Mr:Mark
From: Yunfei Wang <yf.wang(a)mediatek.com>
In alloc_iova_fast function, if an iova alloc request fail,
it will free the iova ranges present in the percpu iova
rcaches and free global iova rcache and then retry, but
flushing CPU iova rcaches only for each online CPU, which
will cause incomplete rcache cleaning, and iova rcaches of
not online CPU cannot be flushed, because iova rcaches may
also lead to fragmentation of iova space, so the next retry
action may still be fail.
Based on the above, so need to flushing all iova rcaches
for each possible CPU, use for_each_possible_cpu instead of
for_each_online_cpu like in free_iova_rcaches function,
so that all rcaches can be completely released to try
replenishing IOVAs.
Signed-off-by: Yunfei Wang <yf.wang(a)mediatek.com>
Cc: <stable(a)vger.kernel.org> # 5.4.*
---
drivers/iommu/iova.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/iova.c b/drivers/iommu/iova.c
index b28c9435b898..5a0637cd7bc2 100644
--- a/drivers/iommu/iova.c
+++ b/drivers/iommu/iova.c
@@ -460,7 +460,7 @@ alloc_iova_fast(struct iova_domain *iovad, unsigned long size,
/* Try replenishing IOVAs by flushing rcache. */
flush_rcache = false;
- for_each_online_cpu(cpu)
+ for_each_possible_cpu(cpu)
free_cpu_cached_iovas(cpu, iovad);
free_global_cached_iovas(iovad);
goto retry;
--
2.18.0
The patch titled
Subject: memcg: sync flush only if periodic flush is delayed
has been added to the -mm tree. Its filename is
memcg-sync-flush-only-if-periodic-flush-is-delayed.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/memcg-sync-flush-only-if-periodic…
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/memcg-sync-flush-only-if-periodic…
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Shakeel Butt <shakeelb(a)google.com>
Subject: memcg: sync flush only if periodic flush is delayed
Daniel Dao has reported [1] a regression on workloads that may trigger a
lot of refaults (anon and file). The underlying issue is that flushing
rstat is expensive. Although rstat flush are batched with (nr_cpus *
MEMCG_BATCH) stat updates, it seems like there are workloads which
genuinely do stat updates larger than batch value within short amount of
time. Since the rstat flush can happen in the performance critical
codepaths like page faults, such workload can suffer greatly.
This patch fixes this regression by making the rstat flushing conditional
in the performance critical codepaths. More specifically, the kernel
relies on the async periodic rstat flusher to flush the stats and only if
the periodic flusher is delayed by more than twice the amount of its
normal time window then the kernel allows rstat flushing from the
performance critical codepaths.
Now the question: what are the side-effects of this change? The worst
that can happen is the refault codepath will see 4sec old lruvec stats and
may cause false (or missed) activations of the refaulted page which may
under-or-overestimate the workingset size. Though that is not very
concerning as the kernel can already miss or do false activations.
There are two more codepaths whose flushing behavior is not changed by
this patch and we may need to come to them in future. One is the
writeback stats used by dirty throttling and second is the deactivation
heuristic in the reclaim. For now keeping an eye on them and if there is
report of regression due to these codepaths, we will reevaluate then.
Link: https://lore.kernel.org/all/CA+wXwBSyO87ZX5PVwdHm-=dBjZYECGmfnydUicUyrQqndg… [1]
Link: https://lkml.kernel.org/r/20220304184040.1304781-1-shakeelb@google.com
Fixes: 1f828223b799 ("memcg: flush lruvec stats in the refault")
Signed-off-by: Shakeel Butt <shakeelb(a)google.com>
Reported-by: Daniel Dao <dqminh(a)cloudflare.com>
Tested-by: Ivan Babrou <ivan(a)cloudflare.com>
Cc: Michal Hocko <mhocko(a)suse.com>
Cc: Roman Gushchin <roman.gushchin(a)linux.dev>
Cc: Johannes Weiner <hannes(a)cmpxchg.org>
Cc: Michal Koutn�� <mkoutny(a)suse.com>
Cc: Frank Hofmann <fhofmann(a)cloudflare.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
include/linux/memcontrol.h | 5 +++++
mm/memcontrol.c | 12 +++++++++++-
mm/workingset.c | 2 +-
3 files changed, 17 insertions(+), 2 deletions(-)
--- a/include/linux/memcontrol.h~memcg-sync-flush-only-if-periodic-flush-is-delayed
+++ a/include/linux/memcontrol.h
@@ -999,6 +999,7 @@ static inline unsigned long lruvec_page_
}
void mem_cgroup_flush_stats(void);
+void mem_cgroup_flush_stats_delayed(void);
void __mod_memcg_lruvec_state(struct lruvec *lruvec, enum node_stat_item idx,
int val);
@@ -1442,6 +1443,10 @@ static inline void mem_cgroup_flush_stat
{
}
+static inline void mem_cgroup_flush_stats_delayed(void)
+{
+}
+
static inline void __mod_memcg_lruvec_state(struct lruvec *lruvec,
enum node_stat_item idx, int val)
{
--- a/mm/memcontrol.c~memcg-sync-flush-only-if-periodic-flush-is-delayed
+++ a/mm/memcontrol.c
@@ -628,6 +628,9 @@ static DECLARE_DEFERRABLE_WORK(stats_flu
static DEFINE_SPINLOCK(stats_flush_lock);
static DEFINE_PER_CPU(unsigned int, stats_updates);
static atomic_t stats_flush_threshold = ATOMIC_INIT(0);
+static u64 flush_next_time;
+
+#define FLUSH_TIME (2UL*HZ)
static inline void memcg_rstat_updated(struct mem_cgroup *memcg, int val)
{
@@ -649,6 +652,7 @@ static void __mem_cgroup_flush_stats(voi
if (!spin_trylock_irqsave(&stats_flush_lock, flag))
return;
+ flush_next_time = jiffies_64 + 2*FLUSH_TIME;
cgroup_rstat_flush_irqsafe(root_mem_cgroup->css.cgroup);
atomic_set(&stats_flush_threshold, 0);
spin_unlock_irqrestore(&stats_flush_lock, flag);
@@ -660,10 +664,16 @@ void mem_cgroup_flush_stats(void)
__mem_cgroup_flush_stats();
}
+void mem_cgroup_flush_stats_delayed(void)
+{
+ if (rstat_flush_time && time_after64(jiffies_64, flush_next_time))
+ mem_cgroup_flush_stats();
+}
+
static void flush_memcg_stats_dwork(struct work_struct *w)
{
__mem_cgroup_flush_stats();
- queue_delayed_work(system_unbound_wq, &stats_flush_dwork, 2UL*HZ);
+ queue_delayed_work(system_unbound_wq, &stats_flush_dwork, FLUSH_TIME);
}
/**
--- a/mm/workingset.c~memcg-sync-flush-only-if-periodic-flush-is-delayed
+++ a/mm/workingset.c
@@ -354,7 +354,7 @@ void workingset_refault(struct folio *fo
mod_lruvec_state(lruvec, WORKINGSET_REFAULT_BASE + file, nr);
- mem_cgroup_flush_stats();
+ mem_cgroup_flush_stats_delayed();
/*
* Compare the distance to the existing workingset size. We
* don't activate pages that couldn't stay resident even if
_
Patches currently in -mm which might be from shakeelb(a)google.com are
memcg-sync-flush-only-if-periodic-flush-is-delayed.patch
memcg-replace-in_interrupt-with-in_task.patch
memcg-refactor-mem_cgroup_oom.patch
memcg-unify-force-charging-conditions.patch
selftests-memcg-test-high-limit-for-single-entry-allocation.patch
memcg-synchronously-enforce-memoryhigh-for-large-overcharges.patch
The patch titled
Subject: memcg: sync flush only if periodic flush is delayed
has been added to the -mm tree. Its filename is
memcg-sync-flush-only-if-periodic-flush-is-delayed.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/memcg-sync-flush-only-if-periodic…
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/memcg-sync-flush-only-if-periodic…
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Shakeel Butt <shakeelb(a)google.com>
Subject: memcg: sync flush only if periodic flush is delayed
Daniel Dao has reported [1] a regression on workloads that may trigger a
lot of refaults (anon and file). The underlying issue is that flushing
rstat is expensive. Although rstat flush are batched with (nr_cpus *
MEMCG_BATCH) stat updates, it seems like there are workloads which
genuinely do stat updates larger than batch value within short amount of
time. Since the rstat flush can happen in the performance critical
codepaths like page faults, such workload can suffer greatly.
This patch fixes this regression by making the rstat flushing conditional
in the performance critical codepaths. More specifically, the kernel
relies on the async periodic rstat flusher to flush the stats and only if
the periodic flusher is delayed by more than twice the amount of its
normal time window then the kernel allows rstat flushing from the
performance critical codepaths.
Now the question: what are the side-effects of this change? The worst
that can happen is the refault codepath will see 4sec old lruvec stats and
may cause false (or missed) activations of the refaulted page which may
under-or-overestimate the workingset size. Though that is not very
concerning as the kernel can already miss or do false activations.
There are two more codepaths whose flushing behavior is not changed by
this patch and we may need to come to them in future. One is the
writeback stats used by dirty throttling and second is the deactivation
heuristic in the reclaim. For now keeping an eye on them and if there is
report of regression due to these codepaths, we will reevaluate then.
Link: https://lore.kernel.org/all/CA+wXwBSyO87ZX5PVwdHm-=dBjZYECGmfnydUicUyrQqndg… [1]
Link: https://lkml.kernel.org/r/20220304184040.1304781-1-shakeelb@google.com
Fixes: 1f828223b799 ("memcg: flush lruvec stats in the refault")
Signed-off-by: Shakeel Butt <shakeelb(a)google.com>
Reported-by: Daniel Dao <dqminh(a)cloudflare.com>
Tested-by: Ivan Babrou <ivan(a)cloudflare.com>
Cc: Michal Hocko <mhocko(a)suse.com>
Cc: Roman Gushchin <roman.gushchin(a)linux.dev>
Cc: Johannes Weiner <hannes(a)cmpxchg.org>
Cc: Michal Koutn�� <mkoutny(a)suse.com>
Cc: Frank Hofmann <fhofmann(a)cloudflare.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
include/linux/memcontrol.h | 5 +++++
mm/memcontrol.c | 12 +++++++++++-
mm/workingset.c | 2 +-
3 files changed, 17 insertions(+), 2 deletions(-)
--- a/include/linux/memcontrol.h~memcg-sync-flush-only-if-periodic-flush-is-delayed
+++ a/include/linux/memcontrol.h
@@ -999,6 +999,7 @@ static inline unsigned long lruvec_page_
}
void mem_cgroup_flush_stats(void);
+void mem_cgroup_flush_stats_delayed(void);
void __mod_memcg_lruvec_state(struct lruvec *lruvec, enum node_stat_item idx,
int val);
@@ -1442,6 +1443,10 @@ static inline void mem_cgroup_flush_stat
{
}
+static inline void mem_cgroup_flush_stats_delayed(void)
+{
+}
+
static inline void __mod_memcg_lruvec_state(struct lruvec *lruvec,
enum node_stat_item idx, int val)
{
--- a/mm/memcontrol.c~memcg-sync-flush-only-if-periodic-flush-is-delayed
+++ a/mm/memcontrol.c
@@ -628,6 +628,9 @@ static DECLARE_DEFERRABLE_WORK(stats_flu
static DEFINE_SPINLOCK(stats_flush_lock);
static DEFINE_PER_CPU(unsigned int, stats_updates);
static atomic_t stats_flush_threshold = ATOMIC_INIT(0);
+static u64 flush_next_time;
+
+#define FLUSH_TIME (2UL*HZ)
static inline void memcg_rstat_updated(struct mem_cgroup *memcg, int val)
{
@@ -649,6 +652,7 @@ static void __mem_cgroup_flush_stats(voi
if (!spin_trylock_irqsave(&stats_flush_lock, flag))
return;
+ flush_next_time = jiffies_64 + 2*FLUSH_TIME;
cgroup_rstat_flush_irqsafe(root_mem_cgroup->css.cgroup);
atomic_set(&stats_flush_threshold, 0);
spin_unlock_irqrestore(&stats_flush_lock, flag);
@@ -660,10 +664,16 @@ void mem_cgroup_flush_stats(void)
__mem_cgroup_flush_stats();
}
+void mem_cgroup_flush_stats_delayed(void)
+{
+ if (rstat_flush_time && time_after64(jiffies_64, flush_next_time))
+ mem_cgroup_flush_stats();
+}
+
static void flush_memcg_stats_dwork(struct work_struct *w)
{
__mem_cgroup_flush_stats();
- queue_delayed_work(system_unbound_wq, &stats_flush_dwork, 2UL*HZ);
+ queue_delayed_work(system_unbound_wq, &stats_flush_dwork, FLUSH_TIME);
}
/**
--- a/mm/workingset.c~memcg-sync-flush-only-if-periodic-flush-is-delayed
+++ a/mm/workingset.c
@@ -354,7 +354,7 @@ void workingset_refault(struct folio *fo
mod_lruvec_state(lruvec, WORKINGSET_REFAULT_BASE + file, nr);
- mem_cgroup_flush_stats();
+ mem_cgroup_flush_stats_delayed();
/*
* Compare the distance to the existing workingset size. We
* don't activate pages that couldn't stay resident even if
_
Patches currently in -mm which might be from shakeelb(a)google.com are
memcg-sync-flush-only-if-periodic-flush-is-delayed.patch
memcg-replace-in_interrupt-with-in_task.patch
memcg-refactor-mem_cgroup_oom.patch
memcg-unify-force-charging-conditions.patch
selftests-memcg-test-high-limit-for-single-entry-allocation.patch
memcg-synchronously-enforce-memoryhigh-for-large-overcharges.patch
The patch titled
Subject: memcg: sync flush only if periodic flush is delayed
has been removed from the -mm tree. Its filename was
memcg-sync-flush-only-if-periodic-flush-is-delayed.patch
This patch was dropped because it had testing failures
------------------------------------------------------
From: Shakeel Butt <shakeelb(a)google.com>
Subject: memcg: sync flush only if periodic flush is delayed
Daniel Dao has reported [1] a regression on workloads that may trigger a
lot of refaults (anon and file). The underlying issue is that flushing
rstat is expensive. Although rstat flush are batched with (nr_cpus *
MEMCG_BATCH) stat updates, it seems like there are workloads which
genuinely do stat updates larger than batch value within short amount of
time. Since the rstat flush can happen in the performance critical
codepaths like page faults, such workload can suffer greatly.
This patch fixes this regression by making the rstat flushing conditional
in the performance critical codepaths. More specifically, the kernel
relies on the async periodic rstat flusher to flush the stats and only if
the periodic flusher is delayed by more than twice the amount of its
normal time window then the kernel allows rstat flushing from the
performance critical codepaths.
Now the question: what are the side-effects of this change? The worst
that can happen is the refault codepath will see 4sec old lruvec stats and
may cause false (or missed) activations of the refaulted page which may
under-or-overestimate the workingset size. Though that is not very
concerning as the kernel can already miss or do false activations.
There are two more codepaths whose flushing behavior is not changed by
this patch and we may need to come to them in future. One is the
writeback stats used by dirty throttling and second is the deactivation
heuristic in the reclaim. For now keeping an eye on them and if there is
report of regression due to these codepaths, we will reevaluate then.
Link: https://lore.kernel.org/all/CA+wXwBSyO87ZX5PVwdHm-=dBjZYECGmfnydUicUyrQqndg… [1]
Link: https://lkml.kernel.org/r/20220304184040.1304781-1-shakeelb@google.com
Fixes: 1f828223b799 ("memcg: flush lruvec stats in the refault")
Signed-off-by: Shakeel Butt <shakeelb(a)google.com>
Reported-by: Daniel Dao <dqminh(a)cloudflare.com>
Tested-by: Ivan Babrou <ivan(a)cloudflare.com>
Cc: Michal Hocko <mhocko(a)suse.com>
Cc: Roman Gushchin <roman.gushchin(a)linux.dev>
Cc: Johannes Weiner <hannes(a)cmpxchg.org>
Cc: Michal Koutn�� <mkoutny(a)suse.com>
Cc: Frank Hofmann <fhofmann(a)cloudflare.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
include/linux/memcontrol.h | 5 +++++
mm/memcontrol.c | 12 +++++++++++-
mm/workingset.c | 2 +-
3 files changed, 17 insertions(+), 2 deletions(-)
--- a/include/linux/memcontrol.h~memcg-sync-flush-only-if-periodic-flush-is-delayed
+++ a/include/linux/memcontrol.h
@@ -999,6 +999,7 @@ static inline unsigned long lruvec_page_
}
void mem_cgroup_flush_stats(void);
+void mem_cgroup_flush_stats_delayed(void);
void __mod_memcg_lruvec_state(struct lruvec *lruvec, enum node_stat_item idx,
int val);
@@ -1442,6 +1443,10 @@ static inline void mem_cgroup_flush_stat
{
}
+static inline void mem_cgroup_flush_stats_delayed(void)
+{
+}
+
static inline void __mod_memcg_lruvec_state(struct lruvec *lruvec,
enum node_stat_item idx, int val)
{
--- a/mm/memcontrol.c~memcg-sync-flush-only-if-periodic-flush-is-delayed
+++ a/mm/memcontrol.c
@@ -628,6 +628,9 @@ static DECLARE_DEFERRABLE_WORK(stats_flu
static DEFINE_SPINLOCK(stats_flush_lock);
static DEFINE_PER_CPU(unsigned int, stats_updates);
static atomic_t stats_flush_threshold = ATOMIC_INIT(0);
+static u64 flush_next_time;
+
+#define FLUSH_TIME (2UL*HZ)
static inline void memcg_rstat_updated(struct mem_cgroup *memcg, int val)
{
@@ -649,6 +652,7 @@ static void __mem_cgroup_flush_stats(voi
if (!spin_trylock_irqsave(&stats_flush_lock, flag))
return;
+ flush_next_time = jiffies_64 + 2*FLUSH_TIME;
cgroup_rstat_flush_irqsafe(root_mem_cgroup->css.cgroup);
atomic_set(&stats_flush_threshold, 0);
spin_unlock_irqrestore(&stats_flush_lock, flag);
@@ -660,10 +664,16 @@ void mem_cgroup_flush_stats(void)
__mem_cgroup_flush_stats();
}
+void mem_cgroup_flush_stats_delayed(void)
+{
+ if (rstat_flush_time && time_after64(jiffies_64, flush_next_time))
+ mem_cgroup_flush_stats();
+}
+
static void flush_memcg_stats_dwork(struct work_struct *w)
{
__mem_cgroup_flush_stats();
- queue_delayed_work(system_unbound_wq, &stats_flush_dwork, 2UL*HZ);
+ queue_delayed_work(system_unbound_wq, &stats_flush_dwork, FLUSH_TIME);
}
/**
--- a/mm/workingset.c~memcg-sync-flush-only-if-periodic-flush-is-delayed
+++ a/mm/workingset.c
@@ -354,7 +354,7 @@ void workingset_refault(struct folio *fo
mod_lruvec_state(lruvec, WORKINGSET_REFAULT_BASE + file, nr);
- mem_cgroup_flush_stats();
+ mem_cgroup_flush_stats_delayed();
/*
* Compare the distance to the existing workingset size. We
* don't activate pages that couldn't stay resident even if
_
Patches currently in -mm which might be from shakeelb(a)google.com are
memcg-replace-in_interrupt-with-in_task.patch
memcg-refactor-mem_cgroup_oom.patch
memcg-unify-force-charging-conditions.patch
selftests-memcg-test-high-limit-for-single-entry-allocation.patch
memcg-synchronously-enforce-memoryhigh-for-large-overcharges.patch
The patch below does not apply to the 5.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 96403e11283def1d1c465c8279514c9a504d8630 Mon Sep 17 00:00:00 2001
From: Suren Baghdasaryan <surenb(a)google.com>
Date: Fri, 4 Mar 2022 20:28:55 -0800
Subject: [PATCH] mm: prevent vm_area_struct::anon_name refcount saturation
A deep process chain with many vmas could grow really high. With
default sysctl_max_map_count (64k) and default pid_max (32k) the max
number of vmas in the system is 2147450880 and the refcounter has
headroom of 1073774592 before it reaches REFCOUNT_SATURATED
(3221225472).
Therefore it's unlikely that an anonymous name refcounter will overflow
with these defaults. Currently the max for pid_max is PID_MAX_LIMIT
(4194304) and for sysctl_max_map_count it's INT_MAX (2147483647). In
this configuration anon_vma_name refcount overflow becomes theoretically
possible (that still require heavy sharing of that anon_vma_name between
processes).
kref refcounting interface used in anon_vma_name structure will detect a
counter overflow when it reaches REFCOUNT_SATURATED value but will only
generate a warning and freeze the ref counter. This would lead to the
refcounted object never being freed. A determined attacker could leak
memory like that but it would be rather expensive and inefficient way to
do so.
To ensure anon_vma_name refcount does not overflow, stop anon_vma_name
sharing when the refcount reaches REFCOUNT_MAX (2147483647), which still
leaves INT_MAX/2 (1073741823) values before the counter reaches
REFCOUNT_SATURATED. This should provide enough headroom for raising the
refcounts temporarily.
Link: https://lkml.kernel.org/r/20220223153613.835563-2-surenb@google.com
Signed-off-by: Suren Baghdasaryan <surenb(a)google.com>
Suggested-by: Michal Hocko <mhocko(a)suse.com>
Acked-by: Michal Hocko <mhocko(a)suse.com>
Cc: Alexey Gladkov <legion(a)kernel.org>
Cc: Chris Hyser <chris.hyser(a)oracle.com>
Cc: Christian Brauner <brauner(a)kernel.org>
Cc: Colin Cross <ccross(a)google.com>
Cc: Cyrill Gorcunov <gorcunov(a)gmail.com>
Cc: Dave Hansen <dave.hansen(a)intel.com>
Cc: David Hildenbrand <david(a)redhat.com>
Cc: Davidlohr Bueso <dave(a)stgolabs.net>
Cc: "Eric W. Biederman" <ebiederm(a)xmission.com>
Cc: Johannes Weiner <hannes(a)cmpxchg.org>
Cc: Kees Cook <keescook(a)chromium.org>
Cc: "Kirill A. Shutemov" <kirill.shutemov(a)linux.intel.com>
Cc: Matthew Wilcox <willy(a)infradead.org>
Cc: Peter Collingbourne <pcc(a)google.com>
Cc: Sasha Levin <sashal(a)kernel.org>
Cc: Sumit Semwal <sumit.semwal(a)linaro.org>
Cc: Vlastimil Babka <vbabka(a)suse.cz>
Cc: Xiaofeng Cao <caoxiaofeng(a)yulong.com>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds(a)linux-foundation.org>
diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h
index dd3accaa4e6d..cf90b1fa2c60 100644
--- a/include/linux/mm_inline.h
+++ b/include/linux/mm_inline.h
@@ -161,15 +161,25 @@ static inline void anon_vma_name_put(struct anon_vma_name *anon_name)
kref_put(&anon_name->kref, anon_vma_name_free);
}
+static inline
+struct anon_vma_name *anon_vma_name_reuse(struct anon_vma_name *anon_name)
+{
+ /* Prevent anon_name refcount saturation early on */
+ if (kref_read(&anon_name->kref) < REFCOUNT_MAX) {
+ anon_vma_name_get(anon_name);
+ return anon_name;
+
+ }
+ return anon_vma_name_alloc(anon_name->name);
+}
+
static inline void dup_anon_vma_name(struct vm_area_struct *orig_vma,
struct vm_area_struct *new_vma)
{
struct anon_vma_name *anon_name = anon_vma_name(orig_vma);
- if (anon_name) {
- anon_vma_name_get(anon_name);
- new_vma->anon_name = anon_name;
- }
+ if (anon_name)
+ new_vma->anon_name = anon_vma_name_reuse(anon_name);
}
static inline void free_anon_vma_name(struct vm_area_struct *vma)
diff --git a/mm/madvise.c b/mm/madvise.c
index 081b1cded21e..1f2693dccf7b 100644
--- a/mm/madvise.c
+++ b/mm/madvise.c
@@ -113,8 +113,7 @@ static int replace_anon_vma_name(struct vm_area_struct *vma,
if (anon_vma_name_eq(orig_name, anon_name))
return 0;
- anon_vma_name_get(anon_name);
- vma->anon_name = anon_name;
+ vma->anon_name = anon_vma_name_reuse(anon_name);
anon_vma_name_put(orig_name);
return 0;
The patch titled
Subject: memfd: fix F_SEAL_WRITE after shmem huge page allocated
has been removed from the -mm tree. Its filename was
memfd-fix-f_seal_write-after-shmem-huge-page-allocated.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Hugh Dickins <hughd(a)google.com>
Subject: memfd: fix F_SEAL_WRITE after shmem huge page allocated
Wangyong reports: after enabling tmpfs filesystem to support transparent
hugepage with the following command:
echo always > /sys/kernel/mm/transparent_hugepage/shmem_enabled
the docker program tries to add F_SEAL_WRITE through the following
command, but it fails unexpectedly with errno EBUSY:
fcntl(5, F_ADD_SEALS, F_SEAL_WRITE) = -1.
That is because memfd_tag_pins() and memfd_wait_for_pins() were never
updated for shmem huge pages: checking page_mapcount() against
page_count() is hopeless on THP subpages - they need to check
total_mapcount() against page_count() on THP heads only.
Make memfd_tag_pins() (compared > 1) as strict as memfd_wait_for_pins()
(compared != 1): either can be justified, but given the non-atomic
total_mapcount() calculation, it is better now to be strict. Bear in mind
that total_mapcount() itself scans all of the THP subpages, when choosing
to take an XA_CHECK_SCHED latency break.
Also fix the unlikely xa_is_value() case in memfd_wait_for_pins(): if a
page has been swapped out since memfd_tag_pins(), then its refcount must
have fallen, and so it can safely be untagged.
Link: https://lkml.kernel.org/r/a4f79248-df75-2c8c-3df-ba3317ccb5da@google.com
Signed-off-by: Hugh Dickins <hughd(a)google.com>
Reported-by: Zeal Robot <zealci(a)zte.com.cn>
Reported-by: wangyong <wang.yong12(a)zte.com.cn>
Cc: Mike Kravetz <mike.kravetz(a)oracle.com>
Cc: Matthew Wilcox (Oracle) <willy(a)infradead.org>
Cc: CGEL ZTE <cgel.zte(a)gmail.com>
Cc: Kirill A. Shutemov <kirill(a)shutemov.name>
Cc: Song Liu <songliubraving(a)fb.com>
Cc: Yang Yang <yang.yang29(a)zte.com.cn>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/memfd.c | 40 ++++++++++++++++++++++++++++------------
1 file changed, 28 insertions(+), 12 deletions(-)
--- a/mm/memfd.c~memfd-fix-f_seal_write-after-shmem-huge-page-allocated
+++ a/mm/memfd.c
@@ -31,20 +31,28 @@
static void memfd_tag_pins(struct xa_state *xas)
{
struct page *page;
- unsigned int tagged = 0;
+ int latency = 0;
+ int cache_count;
lru_add_drain();
xas_lock_irq(xas);
xas_for_each(xas, page, ULONG_MAX) {
- if (xa_is_value(page))
- continue;
- page = find_subpage(page, xas->xa_index);
- if (page_count(page) - page_mapcount(page) > 1)
+ cache_count = 1;
+ if (!xa_is_value(page) &&
+ PageTransHuge(page) && !PageHuge(page))
+ cache_count = HPAGE_PMD_NR;
+
+ if (!xa_is_value(page) &&
+ page_count(page) - total_mapcount(page) != cache_count)
xas_set_mark(xas, MEMFD_TAG_PINNED);
+ if (cache_count != 1)
+ xas_set(xas, page->index + cache_count);
- if (++tagged % XA_CHECK_SCHED)
+ latency += cache_count;
+ if (latency < XA_CHECK_SCHED)
continue;
+ latency = 0;
xas_pause(xas);
xas_unlock_irq(xas);
@@ -73,7 +81,8 @@ static int memfd_wait_for_pins(struct ad
error = 0;
for (scan = 0; scan <= LAST_SCAN; scan++) {
- unsigned int tagged = 0;
+ int latency = 0;
+ int cache_count;
if (!xas_marked(&xas, MEMFD_TAG_PINNED))
break;
@@ -87,10 +96,14 @@ static int memfd_wait_for_pins(struct ad
xas_lock_irq(&xas);
xas_for_each_marked(&xas, page, ULONG_MAX, MEMFD_TAG_PINNED) {
bool clear = true;
- if (xa_is_value(page))
- continue;
- page = find_subpage(page, xas.xa_index);
- if (page_count(page) - page_mapcount(page) != 1) {
+
+ cache_count = 1;
+ if (!xa_is_value(page) &&
+ PageTransHuge(page) && !PageHuge(page))
+ cache_count = HPAGE_PMD_NR;
+
+ if (!xa_is_value(page) && cache_count !=
+ page_count(page) - total_mapcount(page)) {
/*
* On the last scan, we clean up all those tags
* we inserted; but make a note that we still
@@ -103,8 +116,11 @@ static int memfd_wait_for_pins(struct ad
}
if (clear)
xas_clear_mark(&xas, MEMFD_TAG_PINNED);
- if (++tagged % XA_CHECK_SCHED)
+
+ latency += cache_count;
+ if (latency < XA_CHECK_SCHED)
continue;
+ latency = 0;
xas_pause(&xas);
xas_unlock_irq(&xas);
_
Patches currently in -mm which might be from hughd(a)google.com are
tmpfs-support-for-file-creation-time-fix.patch
mm-_install_special_mapping-apply-vm_locked_clear_mask.patch
mm-thp-refix-__split_huge_pmd_locked-for-migration-pmd.patch
mm-thp-clearpagedoublemap-in-first-page_add_file_rmap.patch
mm-thp-fix-nr_file_mapped-accounting-in-page__file_rmap.patch
From: Filipe Manana <fdmanana(a)suse.com>
Commit f0bfa76a11e93d0fe2c896fcb566568c5e8b5d3f upstream.
When doing a direct IO write against a file range that either has
preallocated extents in that range or has regular extents and the file
has the NOCOW attribute set, the write fails with -ENOSPC when all of
the following conditions are met:
1) There are no data blocks groups with enough free space matching
the size of the write;
2) There's not enough unallocated space for allocating a new data block
group;
3) The extents in the target file range are not shared, neither through
snapshots nor through reflinks.
This is wrong because a NOCOW write can be done in such case, and in fact
it's possible to do it using a buffered IO write, since when failing to
allocate data space, the buffered IO path checks if a NOCOW write is
possible.
The failure in direct IO write path comes from the fact that early on,
at btrfs_dio_iomap_begin(), we try to allocate data space for the write
and if it that fails we return the error and stop - we never check if we
can do NOCOW. But later, at btrfs_get_blocks_direct_write(), we check
if we can do a NOCOW write into the range, or a subset of the range, and
then release the previously reserved data space.
Fix this by doing the data reservation only if needed, when we must COW,
at btrfs_get_blocks_direct_write() instead of doing it at
btrfs_dio_iomap_begin(). This also simplifies a bit the logic and removes
the inneficiency of doing unnecessary data reservations.
The following example test script reproduces the problem:
$ cat dio-nocow-enospc.sh
#!/bin/bash
DEV=/dev/sdj
MNT=/mnt/sdj
# Use a small fixed size (1G) filesystem so that it's quick to fill
# it up.
# Make sure the mixed block groups feature is not enabled because we
# later want to not have more space available for allocating data
# extents but still have enough metadata space free for the file writes.
mkfs.btrfs -f -b $((1024 * 1024 * 1024)) -O ^mixed-bg $DEV
mount $DEV $MNT
# Create our test file with the NOCOW attribute set.
touch $MNT/foobar
chattr +C $MNT/foobar
# Now fill in all unallocated space with data for our test file.
# This will allocate a data block group that will be full and leave
# no (or a very small amount of) unallocated space in the device, so
# that it will not be possible to allocate a new block group later.
echo
echo "Creating test file with initial data..."
xfs_io -c "pwrite -S 0xab -b 1M 0 900M" $MNT/foobar
# Now try a direct IO write against file range [0, 10M[.
# This should succeed since this is a NOCOW file and an extent for the
# range was previously allocated.
echo
echo "Trying direct IO write over allocated space..."
xfs_io -d -c "pwrite -S 0xcd -b 10M 0 10M" $MNT/foobar
umount $MNT
When running the test:
$ ./dio-nocow-enospc.sh
(...)
Creating test file with initial data...
wrote 943718400/943718400 bytes at offset 0
900 MiB, 900 ops; 0:00:01.43 (625.526 MiB/sec and 625.5265 ops/sec)
Trying direct IO write over allocated space...
pwrite: No space left on device
A test case for fstests will follow, testing both this direct IO write
scenario as well as the buffered IO write scenario to make it less likely
to get future regressions on the buffered IO case.
Reviewed-by: Josef Bacik <josef(a)toxicpanda.com>
Signed-off-by: Filipe Manana <fdmanana(a)suse.com>
Signed-off-by: David Sterba <dsterba(a)suse.com>
Signed-off-by: Anand Jain <anand.jain(a)oracle.com>
---
fs/btrfs/inode.c | 142 ++++++++++++++++++++++++++---------------------
1 file changed, 78 insertions(+), 64 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index e92f0b0afe9e..58053b5f0ce1 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -60,8 +60,6 @@ struct btrfs_iget_args {
};
struct btrfs_dio_data {
- u64 reserve;
- loff_t length;
ssize_t submitted;
struct extent_changeset *data_reserved;
};
@@ -7763,6 +7761,10 @@ static int btrfs_get_blocks_direct_write(struct extent_map **map,
{
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
struct extent_map *em = *map;
+ int type;
+ u64 block_start, orig_start, orig_block_len, ram_bytes;
+ bool can_nocow = false;
+ bool space_reserved = false;
int ret = 0;
/*
@@ -7777,9 +7779,6 @@ static int btrfs_get_blocks_direct_write(struct extent_map **map,
if (test_bit(EXTENT_FLAG_PREALLOC, &em->flags) ||
((BTRFS_I(inode)->flags & BTRFS_INODE_NODATACOW) &&
em->block_start != EXTENT_MAP_HOLE)) {
- int type;
- u64 block_start, orig_start, orig_block_len, ram_bytes;
-
if (test_bit(EXTENT_FLAG_PREALLOC, &em->flags))
type = BTRFS_ORDERED_PREALLOC;
else
@@ -7789,53 +7788,92 @@ static int btrfs_get_blocks_direct_write(struct extent_map **map,
if (can_nocow_extent(inode, start, &len, &orig_start,
&orig_block_len, &ram_bytes, false) == 1 &&
- btrfs_inc_nocow_writers(fs_info, block_start)) {
- struct extent_map *em2;
+ btrfs_inc_nocow_writers(fs_info, block_start))
+ can_nocow = true;
+ }
- em2 = btrfs_create_dio_extent(BTRFS_I(inode), start, len,
- orig_start, block_start,
- len, orig_block_len,
- ram_bytes, type);
+ if (can_nocow) {
+ struct extent_map *em2;
+
+ /* We can NOCOW, so only need to reserve metadata space. */
+ ret = btrfs_delalloc_reserve_metadata(BTRFS_I(inode), len);
+ if (ret < 0) {
+ /* Our caller expects us to free the input extent map. */
+ free_extent_map(em);
+ *map = NULL;
btrfs_dec_nocow_writers(fs_info, block_start);
- if (type == BTRFS_ORDERED_PREALLOC) {
- free_extent_map(em);
- *map = em = em2;
- }
+ goto out;
+ }
+ space_reserved = true;
- if (em2 && IS_ERR(em2)) {
- ret = PTR_ERR(em2);
- goto out;
- }
- /*
- * For inode marked NODATACOW or extent marked PREALLOC,
- * use the existing or preallocated extent, so does not
- * need to adjust btrfs_space_info's bytes_may_use.
- */
- btrfs_free_reserved_data_space_noquota(fs_info, len);
- goto skip_cow;
+ em2 = btrfs_create_dio_extent(BTRFS_I(inode), start, len,
+ orig_start, block_start,
+ len, orig_block_len,
+ ram_bytes, type);
+ btrfs_dec_nocow_writers(fs_info, block_start);
+ if (type == BTRFS_ORDERED_PREALLOC) {
+ free_extent_map(em);
+ *map = em = em2;
}
- }
- /* this will cow the extent */
- free_extent_map(em);
- *map = em = btrfs_new_extent_direct(BTRFS_I(inode), start, len);
- if (IS_ERR(em)) {
- ret = PTR_ERR(em);
- goto out;
+ if (IS_ERR(em2)) {
+ ret = PTR_ERR(em2);
+ goto out;
+ }
+ } else {
+ const u64 prev_len = len;
+
+ /* Our caller expects us to free the input extent map. */
+ free_extent_map(em);
+ *map = NULL;
+
+ /* We have to COW, so need to reserve metadata and data space. */
+ ret = btrfs_delalloc_reserve_space(BTRFS_I(inode),
+ &dio_data->data_reserved,
+ start, len);
+ if (ret < 0)
+ goto out;
+ space_reserved = true;
+
+ em = btrfs_new_extent_direct(BTRFS_I(inode), start, len);
+ if (IS_ERR(em)) {
+ ret = PTR_ERR(em);
+ goto out;
+ }
+ *map = em;
+ len = min(len, em->len - (start - em->start));
+ if (len < prev_len)
+ btrfs_delalloc_release_space(BTRFS_I(inode),
+ dio_data->data_reserved,
+ start + len, prev_len - len,
+ true);
}
- len = min(len, em->len - (start - em->start));
+ /*
+ * We have created our ordered extent, so we can now release our reservation
+ * for an outstanding extent.
+ */
+ btrfs_delalloc_release_extents(BTRFS_I(inode), len);
-skip_cow:
/*
* Need to update the i_size under the extent lock so buffered
* readers will get the updated i_size when we unlock.
*/
if (start + len > i_size_read(inode))
i_size_write(inode, start + len);
-
- dio_data->reserve -= len;
out:
+ if (ret && space_reserved) {
+ btrfs_delalloc_release_extents(BTRFS_I(inode), len);
+ if (can_nocow) {
+ btrfs_delalloc_release_metadata(BTRFS_I(inode), len, true);
+ } else {
+ btrfs_delalloc_release_space(BTRFS_I(inode),
+ dio_data->data_reserved,
+ start, len, true);
+ extent_changeset_free(dio_data->data_reserved);
+ dio_data->data_reserved = NULL;
+ }
+ }
return ret;
}
@@ -7877,18 +7915,6 @@ static int btrfs_dio_iomap_begin(struct inode *inode, loff_t start,
if (!dio_data)
return -ENOMEM;
- dio_data->length = length;
- if (write) {
- dio_data->reserve = round_up(length, fs_info->sectorsize);
- ret = btrfs_delalloc_reserve_space(BTRFS_I(inode),
- &dio_data->data_reserved,
- start, dio_data->reserve);
- if (ret) {
- extent_changeset_free(dio_data->data_reserved);
- kfree(dio_data);
- return ret;
- }
- }
iomap->private = dio_data;
@@ -7981,14 +8007,8 @@ static int btrfs_dio_iomap_begin(struct inode *inode, loff_t start,
unlock_extent_cached(&BTRFS_I(inode)->io_tree, lockstart, lockend,
&cached_state);
err:
- if (dio_data) {
- btrfs_delalloc_release_space(BTRFS_I(inode),
- dio_data->data_reserved, start,
- dio_data->reserve, true);
- btrfs_delalloc_release_extents(BTRFS_I(inode), dio_data->reserve);
- extent_changeset_free(dio_data->data_reserved);
- kfree(dio_data);
- }
+ kfree(dio_data);
+
return ret;
}
@@ -8018,14 +8038,8 @@ static int btrfs_dio_iomap_end(struct inode *inode, loff_t pos, loff_t length,
ret = -ENOTBLK;
}
- if (write) {
- if (dio_data->reserve)
- btrfs_delalloc_release_space(BTRFS_I(inode),
- dio_data->data_reserved, pos,
- dio_data->reserve, true);
- btrfs_delalloc_release_extents(BTRFS_I(inode), dio_data->length);
+ if (write)
extent_changeset_free(dio_data->data_reserved);
- }
out:
kfree(dio_data);
iomap->private = NULL;
--
2.33.1
On Sat, 5 Mar 2022, gregkh(a)linuxfoundation.org wrote:
>
> This is a note to let you know that I've just added the patch titled
>
> memfd: fix F_SEAL_WRITE after shmem huge page allocated
>
> to the 5.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:
> memfd-fix-f_seal_write-after-shmem-huge-page-allocated.patch
> and it can be found in the queue-5.4 subdirectory.
Thank you for adding that patch to 5.16, 5.15, 5.10 and 5.4:
please accept the substitute patch below for 4.14 and 4.9 - thanks.
A different patch for 4.19 has been sent separately.
From f2b277c4d1c63a85127e8aa2588e9cc3bd21cb99 Mon Sep 17 00:00:00 2001
From: Hugh Dickins <hughd(a)google.com>
Date: Fri, 4 Mar 2022 20:29:01 -0800
Subject: memfd: fix F_SEAL_WRITE after shmem huge page allocated
From: Hugh Dickins <hughd(a)google.com>
commit f2b277c4d1c63a85127e8aa2588e9cc3bd21cb99 upstream.
Wangyong reports: after enabling tmpfs filesystem to support transparent
hugepage with the following command:
echo always > /sys/kernel/mm/transparent_hugepage/shmem_enabled
the docker program tries to add F_SEAL_WRITE through the following
command, but it fails unexpectedly with errno EBUSY:
fcntl(5, F_ADD_SEALS, F_SEAL_WRITE) = -1.
That is because memfd_tag_pins() and memfd_wait_for_pins() were never
updated for shmem huge pages: checking page_mapcount() against
page_count() is hopeless on THP subpages - they need to check
total_mapcount() against page_count() on THP heads only.
Make memfd_tag_pins() (compared > 1) as strict as memfd_wait_for_pins()
(compared != 1): either can be justified, but given the non-atomic
total_mapcount() calculation, it is better now to be strict. Bear in
mind that total_mapcount() itself scans all of the THP subpages, when
choosing to take an XA_CHECK_SCHED latency break.
Also fix the unlikely xa_is_value() case in memfd_wait_for_pins(): if a
page has been swapped out since memfd_tag_pins(), then its refcount must
have fallen, and so it can safely be untagged.
Link: https://lkml.kernel.org/r/a4f79248-df75-2c8c-3df-ba3317ccb5da@google.com
Signed-off-by: Hugh Dickins <hughd(a)google.com>
Reported-by: Zeal Robot <zealci(a)zte.com.cn>
Reported-by: wangyong <wang.yong12(a)zte.com.cn>
Cc: Mike Kravetz <mike.kravetz(a)oracle.com>
Cc: Matthew Wilcox (Oracle) <willy(a)infradead.org>
Cc: CGEL ZTE <cgel.zte(a)gmail.com>
Cc: Kirill A. Shutemov <kirill(a)shutemov.name>
Cc: Song Liu <songliubraving(a)fb.com>
Cc: Yang Yang <yang.yang29(a)zte.com.cn>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds(a)linux-foundation.org>
---
mm/shmem.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -2689,7 +2689,8 @@ static void shmem_tag_pins(struct address_space *mapping)
slot = radix_tree_iter_retry(&iter);
continue;
}
- } else if (page_count(page) - page_mapcount(page) > 1) {
+ } else if (!PageTail(page) && page_count(page) !=
+ hpage_nr_pages(page) + total_mapcount(page)) {
radix_tree_tag_set(&mapping->page_tree, iter.index,
SHMEM_TAG_PINNED);
}
@@ -2749,8 +2750,8 @@ static int shmem_wait_for_pins(struct address_space *mapping)
page = NULL;
}
- if (page &&
- page_count(page) - page_mapcount(page) != 1) {
+ if (page && page_count(page) !=
+ hpage_nr_pages(page) + total_mapcount(page)) {
if (scan < LAST_SCAN)
goto continue_resched;
The patch below does not apply to the 5.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 96403e11283def1d1c465c8279514c9a504d8630 Mon Sep 17 00:00:00 2001
From: Suren Baghdasaryan <surenb(a)google.com>
Date: Fri, 4 Mar 2022 20:28:55 -0800
Subject: [PATCH] mm: prevent vm_area_struct::anon_name refcount saturation
A deep process chain with many vmas could grow really high. With
default sysctl_max_map_count (64k) and default pid_max (32k) the max
number of vmas in the system is 2147450880 and the refcounter has
headroom of 1073774592 before it reaches REFCOUNT_SATURATED
(3221225472).
Therefore it's unlikely that an anonymous name refcounter will overflow
with these defaults. Currently the max for pid_max is PID_MAX_LIMIT
(4194304) and for sysctl_max_map_count it's INT_MAX (2147483647). In
this configuration anon_vma_name refcount overflow becomes theoretically
possible (that still require heavy sharing of that anon_vma_name between
processes).
kref refcounting interface used in anon_vma_name structure will detect a
counter overflow when it reaches REFCOUNT_SATURATED value but will only
generate a warning and freeze the ref counter. This would lead to the
refcounted object never being freed. A determined attacker could leak
memory like that but it would be rather expensive and inefficient way to
do so.
To ensure anon_vma_name refcount does not overflow, stop anon_vma_name
sharing when the refcount reaches REFCOUNT_MAX (2147483647), which still
leaves INT_MAX/2 (1073741823) values before the counter reaches
REFCOUNT_SATURATED. This should provide enough headroom for raising the
refcounts temporarily.
Link: https://lkml.kernel.org/r/20220223153613.835563-2-surenb@google.com
Signed-off-by: Suren Baghdasaryan <surenb(a)google.com>
Suggested-by: Michal Hocko <mhocko(a)suse.com>
Acked-by: Michal Hocko <mhocko(a)suse.com>
Cc: Alexey Gladkov <legion(a)kernel.org>
Cc: Chris Hyser <chris.hyser(a)oracle.com>
Cc: Christian Brauner <brauner(a)kernel.org>
Cc: Colin Cross <ccross(a)google.com>
Cc: Cyrill Gorcunov <gorcunov(a)gmail.com>
Cc: Dave Hansen <dave.hansen(a)intel.com>
Cc: David Hildenbrand <david(a)redhat.com>
Cc: Davidlohr Bueso <dave(a)stgolabs.net>
Cc: "Eric W. Biederman" <ebiederm(a)xmission.com>
Cc: Johannes Weiner <hannes(a)cmpxchg.org>
Cc: Kees Cook <keescook(a)chromium.org>
Cc: "Kirill A. Shutemov" <kirill.shutemov(a)linux.intel.com>
Cc: Matthew Wilcox <willy(a)infradead.org>
Cc: Peter Collingbourne <pcc(a)google.com>
Cc: Sasha Levin <sashal(a)kernel.org>
Cc: Sumit Semwal <sumit.semwal(a)linaro.org>
Cc: Vlastimil Babka <vbabka(a)suse.cz>
Cc: Xiaofeng Cao <caoxiaofeng(a)yulong.com>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds(a)linux-foundation.org>
diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h
index dd3accaa4e6d..cf90b1fa2c60 100644
--- a/include/linux/mm_inline.h
+++ b/include/linux/mm_inline.h
@@ -161,15 +161,25 @@ static inline void anon_vma_name_put(struct anon_vma_name *anon_name)
kref_put(&anon_name->kref, anon_vma_name_free);
}
+static inline
+struct anon_vma_name *anon_vma_name_reuse(struct anon_vma_name *anon_name)
+{
+ /* Prevent anon_name refcount saturation early on */
+ if (kref_read(&anon_name->kref) < REFCOUNT_MAX) {
+ anon_vma_name_get(anon_name);
+ return anon_name;
+
+ }
+ return anon_vma_name_alloc(anon_name->name);
+}
+
static inline void dup_anon_vma_name(struct vm_area_struct *orig_vma,
struct vm_area_struct *new_vma)
{
struct anon_vma_name *anon_name = anon_vma_name(orig_vma);
- if (anon_name) {
- anon_vma_name_get(anon_name);
- new_vma->anon_name = anon_name;
- }
+ if (anon_name)
+ new_vma->anon_name = anon_vma_name_reuse(anon_name);
}
static inline void free_anon_vma_name(struct vm_area_struct *vma)
diff --git a/mm/madvise.c b/mm/madvise.c
index 081b1cded21e..1f2693dccf7b 100644
--- a/mm/madvise.c
+++ b/mm/madvise.c
@@ -113,8 +113,7 @@ static int replace_anon_vma_name(struct vm_area_struct *vma,
if (anon_vma_name_eq(orig_name, anon_name))
return 0;
- anon_vma_name_get(anon_name);
- vma->anon_name = anon_name;
+ vma->anon_name = anon_vma_name_reuse(anon_name);
anon_vma_name_put(orig_name);
return 0;
This is a note to let you know that I've just added the patch titled
usb: typec: tipd: Forward plug orientation to typec subsystem
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-next branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release
during the merge window.
If you have any questions about this process, please let me know.
From 676748389f5db74e7d28f9d630eebd75cb8a11b4 Mon Sep 17 00:00:00 2001
From: Sven Peter <sven(a)svenpeter.dev>
Date: Sat, 26 Feb 2022 13:59:12 +0100
Subject: usb: typec: tipd: Forward plug orientation to typec subsystem
In order to bring up the USB3 PHY on the Apple M1 we need to know the
orientation of the Type-C cable. Extract it from the status register and
forward it to the typec subsystem.
Reviewed-by: Heikki Krogerus <heikki.krogerus(a)linux.intel.com>
Cc: stable <stable(a)vger.kernel.org>
Signed-off-by: Sven Peter <sven(a)svenpeter.dev>
Link: https://lore.kernel.org/r/20220226125912.59828-1-sven@svenpeter.dev
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/usb/typec/tipd/core.c | 5 +++++
drivers/usb/typec/tipd/tps6598x.h | 1 +
2 files changed, 6 insertions(+)
diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
index 7ffcda94d323..16b4560216ba 100644
--- a/drivers/usb/typec/tipd/core.c
+++ b/drivers/usb/typec/tipd/core.c
@@ -256,6 +256,10 @@ static int tps6598x_connect(struct tps6598x *tps, u32 status)
typec_set_pwr_opmode(tps->port, mode);
typec_set_pwr_role(tps->port, TPS_STATUS_TO_TYPEC_PORTROLE(status));
typec_set_vconn_role(tps->port, TPS_STATUS_TO_TYPEC_VCONN(status));
+ if (TPS_STATUS_TO_UPSIDE_DOWN(status))
+ typec_set_orientation(tps->port, TYPEC_ORIENTATION_REVERSE);
+ else
+ typec_set_orientation(tps->port, TYPEC_ORIENTATION_NORMAL);
tps6598x_set_data_role(tps, TPS_STATUS_TO_TYPEC_DATAROLE(status), true);
tps->partner = typec_register_partner(tps->port, &desc);
@@ -278,6 +282,7 @@ static void tps6598x_disconnect(struct tps6598x *tps, u32 status)
typec_set_pwr_opmode(tps->port, TYPEC_PWR_MODE_USB);
typec_set_pwr_role(tps->port, TPS_STATUS_TO_TYPEC_PORTROLE(status));
typec_set_vconn_role(tps->port, TPS_STATUS_TO_TYPEC_VCONN(status));
+ typec_set_orientation(tps->port, TYPEC_ORIENTATION_NONE);
tps6598x_set_data_role(tps, TPS_STATUS_TO_TYPEC_DATAROLE(status), false);
power_supply_changed(tps->psy);
diff --git a/drivers/usb/typec/tipd/tps6598x.h b/drivers/usb/typec/tipd/tps6598x.h
index 3dae84c524fb..527857549d69 100644
--- a/drivers/usb/typec/tipd/tps6598x.h
+++ b/drivers/usb/typec/tipd/tps6598x.h
@@ -17,6 +17,7 @@
/* TPS_REG_STATUS bits */
#define TPS_STATUS_PLUG_PRESENT BIT(0)
#define TPS_STATUS_PLUG_UPSIDE_DOWN BIT(4)
+#define TPS_STATUS_TO_UPSIDE_DOWN(s) (!!((s) & TPS_STATUS_PLUG_UPSIDE_DOWN))
#define TPS_STATUS_PORTROLE BIT(5)
#define TPS_STATUS_TO_TYPEC_PORTROLE(s) (!!((s) & TPS_STATUS_PORTROLE))
#define TPS_STATUS_DATAROLE BIT(6)
--
2.35.1
On Sat, 5 Mar 2022, gregkh(a)linuxfoundation.org wrote:
>
> This is a note to let you know that I've just added the patch titled
>
> memfd: fix F_SEAL_WRITE after shmem huge page allocated
>
> to the 5.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:
> memfd-fix-f_seal_write-after-shmem-huge-page-allocated.patch
> and it can be found in the queue-5.4 subdirectory.
Thank you for adding that patch to 5.16, 5.15, 5.10 and 5.4:
please accept the substitute patch below for 4.19 - thanks.
A different patch will follow for 4.14 and 4.9.
From f2b277c4d1c63a85127e8aa2588e9cc3bd21cb99 Mon Sep 17 00:00:00 2001
From: Hugh Dickins <hughd(a)google.com>
Date: Fri, 4 Mar 2022 20:29:01 -0800
Subject: memfd: fix F_SEAL_WRITE after shmem huge page allocated
From: Hugh Dickins <hughd(a)google.com>
commit f2b277c4d1c63a85127e8aa2588e9cc3bd21cb99 upstream.
Wangyong reports: after enabling tmpfs filesystem to support transparent
hugepage with the following command:
echo always > /sys/kernel/mm/transparent_hugepage/shmem_enabled
the docker program tries to add F_SEAL_WRITE through the following
command, but it fails unexpectedly with errno EBUSY:
fcntl(5, F_ADD_SEALS, F_SEAL_WRITE) = -1.
That is because memfd_tag_pins() and memfd_wait_for_pins() were never
updated for shmem huge pages: checking page_mapcount() against
page_count() is hopeless on THP subpages - they need to check
total_mapcount() against page_count() on THP heads only.
Make memfd_tag_pins() (compared > 1) as strict as memfd_wait_for_pins()
(compared != 1): either can be justified, but given the non-atomic
total_mapcount() calculation, it is better now to be strict. Bear in
mind that total_mapcount() itself scans all of the THP subpages, when
choosing to take an XA_CHECK_SCHED latency break.
Also fix the unlikely xa_is_value() case in memfd_wait_for_pins(): if a
page has been swapped out since memfd_tag_pins(), then its refcount must
have fallen, and so it can safely be untagged.
Link: https://lkml.kernel.org/r/a4f79248-df75-2c8c-3df-ba3317ccb5da@google.com
Signed-off-by: Hugh Dickins <hughd(a)google.com>
Reported-by: Zeal Robot <zealci(a)zte.com.cn>
Reported-by: wangyong <wang.yong12(a)zte.com.cn>
Cc: Mike Kravetz <mike.kravetz(a)oracle.com>
Cc: Matthew Wilcox (Oracle) <willy(a)infradead.org>
Cc: CGEL ZTE <cgel.zte(a)gmail.com>
Cc: Kirill A. Shutemov <kirill(a)shutemov.name>
Cc: Song Liu <songliubraving(a)fb.com>
Cc: Yang Yang <yang.yang29(a)zte.com.cn>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds(a)linux-foundation.org>
---
mm/memfd.c | 30 ++++++++++++++++++++++--------
1 file changed, 22 insertions(+), 8 deletions(-)
--- a/mm/memfd.c
+++ b/mm/memfd.c
@@ -34,26 +34,35 @@ static void memfd_tag_pins(struct address_space *mapping)
void __rcu **slot;
pgoff_t start;
struct page *page;
- unsigned int tagged = 0;
+ int latency = 0;
+ int cache_count;
lru_add_drain();
start = 0;
xa_lock_irq(&mapping->i_pages);
radix_tree_for_each_slot(slot, &mapping->i_pages, &iter, start) {
+ cache_count = 1;
page = radix_tree_deref_slot_protected(slot, &mapping->i_pages.xa_lock);
- if (!page || radix_tree_exception(page)) {
+ if (!page || radix_tree_exception(page) || PageTail(page)) {
if (radix_tree_deref_retry(page)) {
slot = radix_tree_iter_retry(&iter);
continue;
}
- } else if (page_count(page) - page_mapcount(page) > 1) {
- radix_tree_tag_set(&mapping->i_pages, iter.index,
- MEMFD_TAG_PINNED);
+ } else {
+ if (PageTransHuge(page) && !PageHuge(page))
+ cache_count = HPAGE_PMD_NR;
+ if (cache_count !=
+ page_count(page) - total_mapcount(page)) {
+ radix_tree_tag_set(&mapping->i_pages,
+ iter.index, MEMFD_TAG_PINNED);
+ }
}
- if (++tagged % 1024)
+ latency += cache_count;
+ if (latency < 1024)
continue;
+ latency = 0;
slot = radix_tree_iter_resume(slot, &iter);
xa_unlock_irq(&mapping->i_pages);
@@ -79,6 +88,7 @@ static int memfd_wait_for_pins(struct address_space *mapping)
pgoff_t start;
struct page *page;
int error, scan;
+ int cache_count;
memfd_tag_pins(mapping);
@@ -107,8 +117,12 @@ static int memfd_wait_for_pins(struct address_space *mapping)
page = NULL;
}
- if (page &&
- page_count(page) - page_mapcount(page) != 1) {
+ cache_count = 1;
+ if (page && PageTransHuge(page) && !PageHuge(page))
+ cache_count = HPAGE_PMD_NR;
+
+ if (page && cache_count !=
+ page_count(page) - total_mapcount(page)) {
if (scan < LAST_SCAN)
goto continue_resched;
GOD BLESS YOU AS YOU REPLY URGENTLY
Hello Dear,
Greetings, I am contacting you regarding an important information i
have for you please reply to confirm your email address and for more
details Thanks
Regards
Mrs Susan Elwood Hara.
stable-rc/queue/5.10 build: 183 builds: 45 failed, 138 passed, 1170 errors, 699 warnings (v5.10.103-94-g8a21dc3cefb9)
Full Build Summary: https://kernelci.org/build/stable-rc/branch/queue%2F5.10/kernel/v5.10.103-9…
Tree: stable-rc
Branch: queue/5.10
Git Describe: v5.10.103-94-g8a21dc3cefb9
Git Commit: 8a21dc3cefb97152bbb9185545cfbc4f7601f92c
Git URL: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
Built: 7 unique architectures
Build Failures Detected:
arm64:
defconfig: (gcc-10) FAIL
defconfig+arm64-chromebook: (gcc-10) FAIL
arm:
at91_dt_defconfig: (gcc-10) FAIL
bcm2835_defconfig: (gcc-10) FAIL
eseries_pxa_defconfig: (gcc-10) FAIL
exynos_defconfig: (gcc-10) FAIL
gemini_defconfig: (gcc-10) FAIL
imx_v6_v7_defconfig: (gcc-10) FAIL
mini2440_defconfig: (gcc-10) FAIL
multi_v5_defconfig: (gcc-10) FAIL
multi_v7_defconfig: (gcc-10) FAIL
mvebu_v5_defconfig: (gcc-10) FAIL
omap2plus_defconfig: (gcc-10) FAIL
pxa_defconfig: (gcc-10) FAIL
qcom_defconfig: (gcc-10) FAIL
rpc_defconfig: (gcc-10) FAIL
s3c2410_defconfig: (gcc-10) FAIL
s5pv210_defconfig: (gcc-10) FAIL
sama5_defconfig: (gcc-10) FAIL
tegra_defconfig: (gcc-10) FAIL
u8500_defconfig: (gcc-10) FAIL
zeus_defconfig: (gcc-10) FAIL
i386:
i386_defconfig: (gcc-10) FAIL
mips:
ar7_defconfig: (gcc-10) FAIL
ath25_defconfig: (gcc-10) FAIL
ath79_defconfig: (gcc-10) FAIL
bcm47xx_defconfig: (gcc-10) FAIL
bcm63xx_defconfig: (gcc-10) FAIL
bmips_be_defconfig: (gcc-10) FAIL
bmips_stb_defconfig: (gcc-10) FAIL
db1xxx_defconfig: (gcc-10) FAIL
gcw0_defconfig: (gcc-10) FAIL
gpr_defconfig: (gcc-10) FAIL
ip27_defconfig: (gcc-10) FAIL
ip28_defconfig: (gcc-10) FAIL
lemote2f_defconfig: (gcc-10) FAIL
loongson3_defconfig: (gcc-10) FAIL
malta_defconfig: (gcc-10) FAIL
malta_kvm_defconfig: (gcc-10) FAIL
malta_kvm_guest_defconfig: (gcc-10) FAIL
maltaup_xpa_defconfig: (gcc-10) FAIL
pistachio_defconfig: (gcc-10) FAIL
sb1250_swarm_defconfig: (gcc-10) FAIL
x86_64:
x86_64_defconfig: (gcc-10) FAIL
x86_64_defconfig+x86-chromebook: (gcc-10) FAIL
Errors and Warnings Detected:
arc:
arm64:
defconfig (gcc-10): 28 errors, 21 warnings
defconfig+arm64-chromebook (gcc-10): 28 errors, 21 warnings
arm:
at91_dt_defconfig (gcc-10): 28 errors, 16 warnings
bcm2835_defconfig (gcc-10): 28 errors, 16 warnings
eseries_pxa_defconfig (gcc-10): 28 errors, 16 warnings
exynos_defconfig (gcc-10): 28 errors, 16 warnings
gemini_defconfig (gcc-10): 26 errors, 17 warnings
imx_v6_v7_defconfig (gcc-10): 28 errors, 16 warnings
mini2440_defconfig (gcc-10): 28 errors, 16 warnings
multi_v5_defconfig (gcc-10): 28 errors, 16 warnings
multi_v7_defconfig (gcc-10): 28 errors, 16 warnings
mvebu_v5_defconfig (gcc-10): 28 errors, 16 warnings
omap2plus_defconfig (gcc-10): 28 errors, 16 warnings
pxa_defconfig (gcc-10): 28 errors, 16 warnings
qcom_defconfig (gcc-10): 28 errors, 16 warnings
rpc_defconfig (gcc-10): 4 errors
s3c2410_defconfig (gcc-10): 28 errors, 16 warnings
s5pv210_defconfig (gcc-10): 28 errors, 16 warnings
sama5_defconfig (gcc-10): 28 errors, 16 warnings
tegra_defconfig (gcc-10): 28 errors, 16 warnings
u8500_defconfig (gcc-10): 28 errors, 16 warnings
zeus_defconfig (gcc-10): 28 errors, 16 warnings
i386:
i386_defconfig (gcc-10): 28 errors, 21 warnings
mips:
32r2el_defconfig (gcc-10): 1 warning
ar7_defconfig (gcc-10): 28 errors, 16 warnings
ath25_defconfig (gcc-10): 28 errors, 14 warnings
ath79_defconfig (gcc-10): 28 errors, 14 warnings
bcm47xx_defconfig (gcc-10): 28 errors, 14 warnings
bcm63xx_defconfig (gcc-10): 26 errors, 17 warnings
bmips_be_defconfig (gcc-10): 26 errors, 17 warnings
bmips_stb_defconfig (gcc-10): 26 errors, 17 warnings
db1xxx_defconfig (gcc-10): 26 errors, 17 warnings
decstation_64_defconfig (gcc-10): 1 warning
decstation_defconfig (gcc-10): 1 warning
decstation_r4k_defconfig (gcc-10): 1 warning
gcw0_defconfig (gcc-10): 28 errors, 16 warnings
gpr_defconfig (gcc-10): 28 errors, 16 warnings
lemote2f_defconfig (gcc-10): 28 errors, 16 warnings
loongson3_defconfig (gcc-10): 28 errors, 16 warnings
malta_defconfig (gcc-10): 28 errors, 14 warnings
malta_kvm_defconfig (gcc-10): 28 errors, 14 warnings
malta_kvm_guest_defconfig (gcc-10): 28 errors, 16 warnings
maltaup_xpa_defconfig (gcc-10): 28 errors, 14 warnings
pistachio_defconfig (gcc-10): 28 errors, 16 warnings
rm200_defconfig (gcc-10): 1 warning
sb1250_swarm_defconfig (gcc-10): 28 errors, 16 warnings
riscv:
rv32_defconfig (gcc-10): 4 warnings
x86_64:
x86_64_defconfig (gcc-10): 28 errors, 21 warnings
x86_64_defconfig+x86-chromebook (gcc-10): 28 errors, 21 warnings
Errors summary:
42 net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
42 net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
42 net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
42 net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
42 net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
42 net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
42 net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
42 net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
42 net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
42 net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
42 net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
42 net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
42 net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
42 net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
42 net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
42 net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
42 net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
42 net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
42 net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
42 net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
42 net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
42 net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
42 net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
42 net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
42 net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
37 net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
37 net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
32 include/linux/export.h:67:22: error: expected declaration or statement at end of input
10 net/mac80211/mlme.c:5957:1: error: expected declaration or statement at end of input
2 arm-linux-gnueabihf-gcc: error: unrecognized -march target: armv3m
2 arm-linux-gnueabihf-gcc: error: missing argument to ‘-march=’
Warnings summary:
64 include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
42 net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
42 net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
42 net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
42 net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
42 net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
42 net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
42 net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
42 net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
42 net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
42 net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
42 net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
42 net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
36 net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
36 net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
10 net/mac80211/mlme.c:5949:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
10 include/linux/compiler.h:225:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
5 net/mac80211/mlme.c:5949:6: warning: ‘ieee80211_cqm_beacon_loss_notify’ defined but not used [-Wunused-function]
5 net/mac80211/mlme.c:5936:6: warning: ‘ieee80211_cqm_rssi_notify’ defined but not used [-Wunused-function]
5 include/linux/export.h:99:20: warning: unused variable ‘__kstrtab_ieee80211_cqm_rssi_notify’ [-Wunused-variable]
5 include/linux/export.h:99:20: warning: unused variable ‘__kstrtab_ieee80211_cqm_beacon_loss_notify’ [-Wunused-variable]
5 include/linux/export.h:100:20: warning: unused variable ‘__kstrtabns_ieee80211_cqm_rssi_notify’ [-Wunused-variable]
5 include/linux/export.h:100:20: warning: unused variable ‘__kstrtabns_ieee80211_cqm_beacon_loss_notify’ [-Wunused-variable]
3 kernel/rcu/tasks.h:707:13: warning: ‘show_rcu_tasks_rude_gp_kthread’ defined but not used [-Wunused-function]
2 <stdin>:830:2: warning: #warning syscall fstat64 not implemented [-Wcpp]
2 <stdin>:1127:2: warning: #warning syscall fstatat64 not implemented [-Wcpp]
1 drivers/block/paride/bpck.c:32: warning: "PC" redefined
1 WARNING: modpost: Symbol info of vmlinux is missing. Unresolved symbol check will be entirely skipped.
Section mismatches summary:
1 WARNING: modpost: vmlinux.o(.text+0xd040): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
1 WARNING: modpost: vmlinux.o(.text+0xce9c): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
1 WARNING: modpost: vmlinux.o(.text+0xcda4): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
1 WARNING: modpost: vmlinux.o(.text+0xcd38): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
1 WARNING: modpost: vmlinux.o(.text+0xcb84): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
1 WARNING: modpost: vmlinux.o(.text+0xcb74): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
1 WARNING: modpost: vmlinux.o(.text+0xcb6c): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
1 WARNING: modpost: vmlinux.o(.text+0xcb4c): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
1 WARNING: modpost: vmlinux.o(.text+0xcaa8): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
1 WARNING: modpost: vmlinux.o(.text+0xc8ec): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
1 WARNING: modpost: vmlinux.o(.text+0xb904): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
1 WARNING: modpost: vmlinux.o(.text+0x8054): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
1 WARNING: modpost: vmlinux.o(.text+0x7670): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
================================================================================
Detailed per-defconfig build reports:
--------------------------------------------------------------------------------
32r2el_defconfig (mips, gcc-10) — PASS, 0 errors, 1 warning, 0 section mismatches
Warnings:
WARNING: modpost: Symbol info of vmlinux is missing. Unresolved symbol check will be entirely skipped.
--------------------------------------------------------------------------------
allnoconfig (x86_64, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
allnoconfig (i386, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
allnoconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
am200epdkit_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
ar7_defconfig (mips, gcc-10) — FAIL, 28 errors, 16 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
aspeed_g4_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
aspeed_g5_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
assabet_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
Section mismatches:
WARNING: modpost: vmlinux.o(.text+0xcb6c): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
--------------------------------------------------------------------------------
at91_dt_defconfig (arm, gcc-10) — FAIL, 28 errors, 16 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
ath25_defconfig (mips, gcc-10) — FAIL, 28 errors, 14 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
ath79_defconfig (mips, gcc-10) — FAIL, 28 errors, 14 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
axm55xx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
axs103_smp_defconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
badge4_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
Section mismatches:
WARNING: modpost: vmlinux.o(.text+0xcd38): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
--------------------------------------------------------------------------------
bcm2835_defconfig (arm, gcc-10) — FAIL, 28 errors, 16 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
bcm47xx_defconfig (mips, gcc-10) — FAIL, 28 errors, 14 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
bcm63xx_defconfig (mips, gcc-10) — FAIL, 26 errors, 17 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5957:1: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5949:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5949:6: warning: ‘ieee80211_cqm_beacon_loss_notify’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5936:6: warning: ‘ieee80211_cqm_rssi_notify’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
bigsur_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
bmips_be_defconfig (mips, gcc-10) — FAIL, 26 errors, 17 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5957:1: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5949:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5949:6: warning: ‘ieee80211_cqm_beacon_loss_notify’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5936:6: warning: ‘ieee80211_cqm_rssi_notify’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
bmips_stb_defconfig (mips, gcc-10) — FAIL, 26 errors, 17 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5957:1: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5949:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5949:6: warning: ‘ieee80211_cqm_beacon_loss_notify’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5936:6: warning: ‘ieee80211_cqm_rssi_notify’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
capcella_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
cavium_octeon_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
cerfcube_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
Section mismatches:
WARNING: modpost: vmlinux.o(.text+0x7670): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
--------------------------------------------------------------------------------
ci20_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
cm_x300_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
cobalt_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
colibri_pxa270_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
colibri_pxa300_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
collie_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
Section mismatches:
WARNING: modpost: vmlinux.o(.text+0xb904): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
--------------------------------------------------------------------------------
corgi_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
cu1000-neo_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
cu1830-neo_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
davinci_all_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
db1xxx_defconfig (mips, gcc-10) — FAIL, 26 errors, 17 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5957:1: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5949:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5949:6: warning: ‘ieee80211_cqm_beacon_loss_notify’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5936:6: warning: ‘ieee80211_cqm_rssi_notify’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
decstation_64_defconfig (mips, gcc-10) — PASS, 0 errors, 1 warning, 0 section mismatches
Warnings:
kernel/rcu/tasks.h:707:13: warning: ‘show_rcu_tasks_rude_gp_kthread’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
decstation_defconfig (mips, gcc-10) — PASS, 0 errors, 1 warning, 0 section mismatches
Warnings:
kernel/rcu/tasks.h:707:13: warning: ‘show_rcu_tasks_rude_gp_kthread’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
decstation_r4k_defconfig (mips, gcc-10) — PASS, 0 errors, 1 warning, 0 section mismatches
Warnings:
kernel/rcu/tasks.h:707:13: warning: ‘show_rcu_tasks_rude_gp_kthread’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
defconfig (riscv, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
defconfig (arm64, gcc-10) — FAIL, 28 errors, 21 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
net/mac80211/mlme.c:5957:1: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/compiler.h:225:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5949:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/compiler.h:225:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:100:20: warning: unused variable ‘__kstrtabns_ieee80211_cqm_beacon_loss_notify’ [-Wunused-variable]
include/linux/export.h:99:20: warning: unused variable ‘__kstrtab_ieee80211_cqm_beacon_loss_notify’ [-Wunused-variable]
include/linux/export.h:100:20: warning: unused variable ‘__kstrtabns_ieee80211_cqm_rssi_notify’ [-Wunused-variable]
include/linux/export.h:99:20: warning: unused variable ‘__kstrtab_ieee80211_cqm_rssi_notify’ [-Wunused-variable]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
defconfig+arm64-chromebook (arm64, gcc-10) — FAIL, 28 errors, 21 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
net/mac80211/mlme.c:5957:1: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/compiler.h:225:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5949:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/compiler.h:225:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:100:20: warning: unused variable ‘__kstrtabns_ieee80211_cqm_beacon_loss_notify’ [-Wunused-variable]
include/linux/export.h:99:20: warning: unused variable ‘__kstrtab_ieee80211_cqm_beacon_loss_notify’ [-Wunused-variable]
include/linux/export.h:100:20: warning: unused variable ‘__kstrtabns_ieee80211_cqm_rssi_notify’ [-Wunused-variable]
include/linux/export.h:99:20: warning: unused variable ‘__kstrtab_ieee80211_cqm_rssi_notify’ [-Wunused-variable]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
dove_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
e55_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
ebsa110_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
efm32_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
ep93xx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
Section mismatches:
WARNING: modpost: vmlinux.o(.text+0x8054): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
--------------------------------------------------------------------------------
eseries_pxa_defconfig (arm, gcc-10) — FAIL, 28 errors, 16 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
exynos_defconfig (arm, gcc-10) — FAIL, 28 errors, 16 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
ezx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
footbridge_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
fuloong2e_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
gcw0_defconfig (mips, gcc-10) — FAIL, 28 errors, 16 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
gemini_defconfig (arm, gcc-10) — FAIL, 26 errors, 17 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5957:1: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5949:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5949:6: warning: ‘ieee80211_cqm_beacon_loss_notify’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5936:6: warning: ‘ieee80211_cqm_rssi_notify’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
gpr_defconfig (mips, gcc-10) — FAIL, 28 errors, 16 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
h3600_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
Section mismatches:
WARNING: modpost: vmlinux.o(.text+0xcb84): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
--------------------------------------------------------------------------------
h5000_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
hackkit_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
Section mismatches:
WARNING: modpost: vmlinux.o(.text+0xce9c): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
--------------------------------------------------------------------------------
haps_hs_defconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
haps_hs_smp_defconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
hisi_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
hsdk_defconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
i386_defconfig (i386, gcc-10) — FAIL, 28 errors, 21 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
net/mac80211/mlme.c:5957:1: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/compiler.h:225:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5949:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/compiler.h:225:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:100:20: warning: unused variable ‘__kstrtabns_ieee80211_cqm_beacon_loss_notify’ [-Wunused-variable]
include/linux/export.h:99:20: warning: unused variable ‘__kstrtab_ieee80211_cqm_beacon_loss_notify’ [-Wunused-variable]
include/linux/export.h:100:20: warning: unused variable ‘__kstrtabns_ieee80211_cqm_rssi_notify’ [-Wunused-variable]
include/linux/export.h:99:20: warning: unused variable ‘__kstrtab_ieee80211_cqm_rssi_notify’ [-Wunused-variable]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
imote2_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
imx_v4_v5_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
imx_v6_v7_defconfig (arm, gcc-10) — FAIL, 28 errors, 16 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
integrator_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
iop32x_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
ip22_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
ip27_defconfig (mips, gcc-10) — FAIL, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
ip28_defconfig (mips, gcc-10) — FAIL, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
ixp4xx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
jazz_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
jmr3927_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
jornada720_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
Section mismatches:
WARNING: modpost: vmlinux.o(.text+0xcaa8): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
--------------------------------------------------------------------------------
keystone_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
lart_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
Section mismatches:
WARNING: modpost: vmlinux.o(.text+0xcb74): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
--------------------------------------------------------------------------------
lemote2f_defconfig (mips, gcc-10) — FAIL, 28 errors, 16 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
loongson1b_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
loongson1c_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
loongson3_defconfig (mips, gcc-10) — FAIL, 28 errors, 16 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
lpc18xx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
lpc32xx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
lpd270_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
lubbock_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
magician_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
mainstone_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
malta_defconfig (mips, gcc-10) — FAIL, 28 errors, 14 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
malta_kvm_defconfig (mips, gcc-10) — FAIL, 28 errors, 14 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
malta_kvm_guest_defconfig (mips, gcc-10) — FAIL, 28 errors, 16 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
malta_qemu_32r6_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
maltaaprp_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
maltasmvp_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
maltasmvp_eva_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
maltaup_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
maltaup_xpa_defconfig (mips, gcc-10) — FAIL, 28 errors, 14 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
milbeaut_m10v_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
mini2440_defconfig (arm, gcc-10) — FAIL, 28 errors, 16 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
mmp2_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
moxart_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
mpc30x_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
mps2_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
mtx1_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
multi_v4t_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
multi_v5_defconfig (arm, gcc-10) — FAIL, 28 errors, 16 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
multi_v7_defconfig (arm, gcc-10) — FAIL, 28 errors, 16 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
mvebu_v5_defconfig (arm, gcc-10) — FAIL, 28 errors, 16 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
mvebu_v7_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
mxs_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
neponset_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
Section mismatches:
WARNING: modpost: vmlinux.o(.text+0xcda4): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
--------------------------------------------------------------------------------
netwinder_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
nhk8815_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
nlm_xlp_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
nlm_xlr_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
nommu_k210_defconfig (riscv, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
nsimosci_hs_defconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
nsimosci_hs_smp_defconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
omap1_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
omap2plus_defconfig (arm, gcc-10) — FAIL, 28 errors, 16 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
omega2p_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
orion5x_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
oxnas_v6_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
palmz72_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
pcm027_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
pic32mzda_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
pistachio_defconfig (mips, gcc-10) — FAIL, 28 errors, 16 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
pleb_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
Section mismatches:
WARNING: modpost: vmlinux.o(.text+0xc8ec): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
--------------------------------------------------------------------------------
prima2_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
pxa168_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
pxa255-idp_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
pxa3xx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
pxa910_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
pxa_defconfig (arm, gcc-10) — FAIL, 28 errors, 16 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
qcom_defconfig (arm, gcc-10) — FAIL, 28 errors, 16 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
qi_lb60_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
rb532_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
rbtx49xx_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
realview_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
rm200_defconfig (mips, gcc-10) — PASS, 0 errors, 1 warning, 0 section mismatches
Warnings:
drivers/block/paride/bpck.c:32: warning: "PC" redefined
--------------------------------------------------------------------------------
rpc_defconfig (arm, gcc-10) — FAIL, 4 errors, 0 warnings, 0 section mismatches
Errors:
arm-linux-gnueabihf-gcc: error: unrecognized -march target: armv3m
arm-linux-gnueabihf-gcc: error: missing argument to ‘-march=’
arm-linux-gnueabihf-gcc: error: unrecognized -march target: armv3m
arm-linux-gnueabihf-gcc: error: missing argument to ‘-march=’
--------------------------------------------------------------------------------
rs90_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
rt305x_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
rv32_defconfig (riscv, gcc-10) — PASS, 0 errors, 4 warnings, 0 section mismatches
Warnings:
<stdin>:830:2: warning: #warning syscall fstat64 not implemented [-Wcpp]
<stdin>:1127:2: warning: #warning syscall fstatat64 not implemented [-Wcpp]
<stdin>:830:2: warning: #warning syscall fstat64 not implemented [-Wcpp]
<stdin>:1127:2: warning: #warning syscall fstatat64 not implemented [-Wcpp]
--------------------------------------------------------------------------------
s3c2410_defconfig (arm, gcc-10) — FAIL, 28 errors, 16 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
s3c6400_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
s5pv210_defconfig (arm, gcc-10) — FAIL, 28 errors, 16 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
sama5_defconfig (arm, gcc-10) — FAIL, 28 errors, 16 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
sb1250_swarm_defconfig (mips, gcc-10) — FAIL, 28 errors, 16 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
shannon_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
Section mismatches:
WARNING: modpost: vmlinux.o(.text+0xcb4c): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
--------------------------------------------------------------------------------
shmobile_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
simpad_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
Section mismatches:
WARNING: modpost: vmlinux.o(.text+0xd040): Section mismatch in reference from the function __arm_ioremap_pfn_caller() to the function .meminit.text:memblock_is_map_memory()
--------------------------------------------------------------------------------
socfpga_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
spear13xx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
spear3xx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
spear6xx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
spitz_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
stm32_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
sunxi_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
tango4_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
tb0219_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
tb0226_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
tb0287_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
tct_hammer_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
tegra_defconfig (arm, gcc-10) — FAIL, 28 errors, 16 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
tinyconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
tinyconfig (x86_64, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
tinyconfig (i386, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
trizeps4_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
u300_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
u8500_defconfig (arm, gcc-10) — FAIL, 28 errors, 16 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
vdk_hs38_defconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
vdk_hs38_smp_defconfig (arc, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
versatile_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
vexpress_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
vf610m4_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
viper_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
vocore2_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
vt8500_v6_v7_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
workpad_defconfig (mips, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
x86_64_defconfig (x86_64, gcc-10) — FAIL, 28 errors, 21 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
net/mac80211/mlme.c:5957:1: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/compiler.h:225:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5949:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/compiler.h:225:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:100:20: warning: unused variable ‘__kstrtabns_ieee80211_cqm_beacon_loss_notify’ [-Wunused-variable]
include/linux/export.h:99:20: warning: unused variable ‘__kstrtab_ieee80211_cqm_beacon_loss_notify’ [-Wunused-variable]
include/linux/export.h:100:20: warning: unused variable ‘__kstrtabns_ieee80211_cqm_rssi_notify’ [-Wunused-variable]
include/linux/export.h:99:20: warning: unused variable ‘__kstrtab_ieee80211_cqm_rssi_notify’ [-Wunused-variable]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
x86_64_defconfig+x86-chromebook (x86_64, gcc-10) — FAIL, 28 errors, 21 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
net/mac80211/mlme.c:5957:1: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/compiler.h:225:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5949:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/compiler.h:225:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:100:20: warning: unused variable ‘__kstrtabns_ieee80211_cqm_beacon_loss_notify’ [-Wunused-variable]
include/linux/export.h:99:20: warning: unused variable ‘__kstrtab_ieee80211_cqm_beacon_loss_notify’ [-Wunused-variable]
include/linux/export.h:100:20: warning: unused variable ‘__kstrtabns_ieee80211_cqm_rssi_notify’ [-Wunused-variable]
include/linux/export.h:99:20: warning: unused variable ‘__kstrtab_ieee80211_cqm_rssi_notify’ [-Wunused-variable]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
xcep_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
--------------------------------------------------------------------------------
zeus_defconfig (arm, gcc-10) — FAIL, 28 errors, 16 warnings, 0 section mismatches
Errors:
net/mac80211/mlme.c:3116:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_deauth’
net/mac80211/mlme.c:3164:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_disassoc’
net/mac80211/mlme.c:3195:13: error: invalid storage class for function ‘ieee80211_get_rates’
net/mac80211/mlme.c:3245:13: error: invalid storage class for function ‘ieee80211_twt_req_supported’
net/mac80211/mlme.c:3258:12: error: invalid storage class for function ‘ieee80211_recalc_twt_req’
net/mac80211/mlme.c:3271:13: error: invalid storage class for function ‘ieee80211_assoc_success’
net/mac80211/mlme.c:3648:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_assoc_resp’
net/mac80211/mlme.c:3757:13: error: invalid storage class for function ‘ieee80211_rx_bss_info’
net/mac80211/mlme.c:3780:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_probe_resp’
net/mac80211/mlme.c:3845:13: error: invalid storage class for function ‘ieee80211_handle_beacon_sig’
net/mac80211/mlme.c:3941:13: error: invalid storage class for function ‘ieee80211_rx_our_beacon’
net/mac80211/mlme.c:3951:13: error: invalid storage class for function ‘ieee80211_rx_mgmt_beacon’
net/mac80211/mlme.c:4344:13: error: invalid storage class for function ‘ieee80211_sta_timer’
net/mac80211/mlme.c:4352:13: error: invalid storage class for function ‘ieee80211_sta_connection_lost’
net/mac80211/mlme.c:4364:12: error: invalid storage class for function ‘ieee80211_auth’
net/mac80211/mlme.c:4439:12: error: invalid storage class for function ‘ieee80211_do_assoc’
net/mac80211/mlme.c:4639:13: error: invalid storage class for function ‘ieee80211_sta_bcn_mon_timer’
net/mac80211/mlme.c:4656:13: error: invalid storage class for function ‘ieee80211_sta_conn_mon_timer’
net/mac80211/mlme.c:4688:13: error: invalid storage class for function ‘ieee80211_sta_monitor_work’
net/mac80211/mlme.c:4697:13: error: invalid storage class for function ‘ieee80211_restart_sta_timer’
net/mac80211/mlme.c:4847:11: error: invalid storage class for function ‘ieee80211_ht_vht_rx_chains’
net/mac80211/mlme.c:4892:1: error: invalid storage class for function ‘ieee80211_verify_sta_he_mcs_support’
net/mac80211/mlme.c:4953:12: error: invalid storage class for function ‘ieee80211_prep_channel’
net/mac80211/mlme.c:5122:13: error: invalid storage class for function ‘ieee80211_get_dtim’
net/mac80211/mlme.c:5156:12: error: invalid storage class for function ‘ieee80211_prep_connection’
net/mac80211/mlme.c:5947:15: error: non-static declaration of ‘ieee80211_cqm_rssi_notify’ follows static declaration
net/mac80211/mlme.c:5957:15: error: non-static declaration of ‘ieee80211_cqm_beacon_loss_notify’ follows static declaration
include/linux/export.h:67:22: error: expected declaration or statement at end of input
Warnings:
net/mac80211/mlme.c:3062:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
include/linux/export.h:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
net/mac80211/mlme.c:5898:6: warning: ‘ieee80211_mgd_stop’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5867:5: warning: ‘ieee80211_mgd_disassoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5803:5: warning: ‘ieee80211_mgd_deauth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5480:5: warning: ‘ieee80211_mgd_assoc’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:5330:5: warning: ‘ieee80211_mgd_auth’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4834:6: warning: ‘ieee80211_mlme_notify_scan_completed’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4795:6: warning: ‘ieee80211_sta_setup_sdata’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4770:6: warning: ‘ieee80211_sta_restart’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4710:6: warning: ‘ieee80211_mgd_quiesce’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4492:6: warning: ‘ieee80211_sta_work’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4480:6: warning: ‘ieee80211_mgd_conn_tx_status’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4254:6: warning: ‘ieee80211_sta_rx_queued_mgmt’ defined but not used [-Wunused-function]
net/mac80211/mlme.c:4234:6: warning: ‘ieee80211_sta_rx_queued_ext’ defined but not used [-Wunused-function]
--------------------------------------------------------------------------------
zx_defconfig (arm, gcc-10) — PASS, 0 errors, 0 warnings, 0 section mismatches
---
For more info write to <info(a)kernelci.org>
The patch below does not apply to the 5.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 6b4b54c7ca347bcb4aa7a3cc01aa16e84ac7fbe4 Mon Sep 17 00:00:00 2001
From: Alexander Egorenkov <egorenar(a)linux.ibm.com>
Date: Wed, 9 Feb 2022 11:25:09 +0100
Subject: [PATCH] s390/setup: preserve memory at OLDMEM_BASE and OLDMEM_SIZE
We need to preserve the values at OLDMEM_BASE and OLDMEM_SIZE which are
used by zgetdump in case when kdump crashes. In that case zgetdump will
attempt to read OLDMEM_BASE and OLDMEM_SIZE in order to find out where
the memory range [0 - OLDMEM_SIZE] belonging to the production kernel is.
Fixes: f1a546947431 ("s390/setup: don't reserve memory that occupied decompressor's head")
Cc: stable(a)vger.kernel.org # 5.15+
Signed-off-by: Alexander Egorenkov <egorenar(a)linux.ibm.com>
Acked-by: Vasily Gorbik <gor(a)linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor(a)linux.ibm.com>
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index f2c25d113e7b..05327be3a982 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -800,6 +800,8 @@ static void __init check_initrd(void)
static void __init reserve_kernel(void)
{
memblock_reserve(0, STARTUP_NORMAL_OFFSET);
+ memblock_reserve(OLDMEM_BASE, sizeof(unsigned long));
+ memblock_reserve(OLDMEM_SIZE, sizeof(unsigned long));
memblock_reserve(__amode31_base, __eamode31 - __samode31);
memblock_reserve(__pa(sclp_early_sccb), EXT_SCCB_READ_SCP);
memblock_reserve(__pa(_stext), _end - _stext);
The patch below does not apply to the 5.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 74583f1b92cb3bbba1a3741cea237545c56f506c Mon Sep 17 00:00:00 2001
From: Niklas Cassel <niklas.cassel(a)wdc.com>
Date: Tue, 1 Mar 2022 00:44:18 +0000
Subject: [PATCH] riscv: dts: k210: fix broken IRQs on hart1
Commit 67d96729a9e7 ("riscv: Update Canaan Kendryte K210 device tree")
incorrectly removed two entries from the PLIC interrupt-controller node's
interrupts-extended property.
The PLIC driver cannot know the mapping between hart contexts and hart ids,
so this information has to be provided by device tree, as specified by the
PLIC device tree binding.
The PLIC driver uses the interrupts-extended property, and initializes the
hart context registers in the exact same order as provided by the
interrupts-extended property.
In other words, if we don't specify the S-mode interrupts, the PLIC driver
will simply initialize the hart0 S-mode hart context with the hart1 M-mode
configuration. It is therefore essential to specify the S-mode IRQs even
though the system itself will only ever be running in M-mode.
Re-add the S-mode interrupts, so that we get working IRQs on hart1 again.
Cc: <stable(a)vger.kernel.org>
Fixes: 67d96729a9e7 ("riscv: Update Canaan Kendryte K210 device tree")
Signed-off-by: Niklas Cassel <niklas.cassel(a)wdc.com>
Signed-off-by: Palmer Dabbelt <palmer(a)rivosinc.com>
diff --git a/arch/riscv/boot/dts/canaan/k210.dtsi b/arch/riscv/boot/dts/canaan/k210.dtsi
index 56f57118c633..44d338514761 100644
--- a/arch/riscv/boot/dts/canaan/k210.dtsi
+++ b/arch/riscv/boot/dts/canaan/k210.dtsi
@@ -113,7 +113,8 @@ plic0: interrupt-controller@c000000 {
compatible = "canaan,k210-plic", "sifive,plic-1.0.0";
reg = <0xC000000 0x4000000>;
interrupt-controller;
- interrupts-extended = <&cpu0_intc 11>, <&cpu1_intc 11>;
+ interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>,
+ <&cpu1_intc 11>, <&cpu1_intc 9>;
riscv,ndev = <65>;
};
The patch below does not apply to the 5.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 6b0b2d9a6a308bcd9300c2d83000a82812c56cea Mon Sep 17 00:00:00 2001
From: Suravee Suthikulpanit <suravee.suthikulpanit(a)amd.com>
Date: Thu, 10 Feb 2022 09:47:45 -0600
Subject: [PATCH] iommu/amd: Fix I/O page table memory leak
The current logic updates the I/O page table mode for the domain
before calling the logic to free memory used for the page table.
This results in IOMMU page table memory leak, and can be observed
when launching VM w/ pass-through devices.
Fix by freeing the memory used for page table before updating the mode.
Cc: Joerg Roedel <joro(a)8bytes.org>
Reported-by: Daniel Jordan <daniel.m.jordan(a)oracle.com>
Tested-by: Daniel Jordan <daniel.m.jordan(a)oracle.com>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit(a)amd.com>
Fixes: e42ba0633064 ("iommu/amd: Restructure code for freeing page table")
Link: https://lore.kernel.org/all/20220118194720.urjgi73b7c3tq2o6@oracle.com/
Link: https://lore.kernel.org/r/20220210154745.11524-1-suravee.suthikulpanit@amd.…
Signed-off-by: Joerg Roedel <jroedel(a)suse.de>
diff --git a/drivers/iommu/amd/io_pgtable.c b/drivers/iommu/amd/io_pgtable.c
index b1bf4125b0f7..6608d1717574 100644
--- a/drivers/iommu/amd/io_pgtable.c
+++ b/drivers/iommu/amd/io_pgtable.c
@@ -492,18 +492,18 @@ static void v1_free_pgtable(struct io_pgtable *iop)
dom = container_of(pgtable, struct protection_domain, iop);
- /* Update data structure */
- amd_iommu_domain_clr_pt_root(dom);
-
- /* Make changes visible to IOMMUs */
- amd_iommu_domain_update(dom);
-
/* Page-table is not visible to IOMMU anymore, so free it */
BUG_ON(pgtable->mode < PAGE_MODE_NONE ||
pgtable->mode > PAGE_MODE_6_LEVEL);
free_sub_pt(pgtable->root, pgtable->mode, &freelist);
+ /* Update data structure */
+ amd_iommu_domain_clr_pt_root(dom);
+
+ /* Make changes visible to IOMMUs */
+ amd_iommu_domain_update(dom);
+
put_pages_list(&freelist);
}
The patch below does not apply to the 5.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 6b0b2d9a6a308bcd9300c2d83000a82812c56cea Mon Sep 17 00:00:00 2001
From: Suravee Suthikulpanit <suravee.suthikulpanit(a)amd.com>
Date: Thu, 10 Feb 2022 09:47:45 -0600
Subject: [PATCH] iommu/amd: Fix I/O page table memory leak
The current logic updates the I/O page table mode for the domain
before calling the logic to free memory used for the page table.
This results in IOMMU page table memory leak, and can be observed
when launching VM w/ pass-through devices.
Fix by freeing the memory used for page table before updating the mode.
Cc: Joerg Roedel <joro(a)8bytes.org>
Reported-by: Daniel Jordan <daniel.m.jordan(a)oracle.com>
Tested-by: Daniel Jordan <daniel.m.jordan(a)oracle.com>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit(a)amd.com>
Fixes: e42ba0633064 ("iommu/amd: Restructure code for freeing page table")
Link: https://lore.kernel.org/all/20220118194720.urjgi73b7c3tq2o6@oracle.com/
Link: https://lore.kernel.org/r/20220210154745.11524-1-suravee.suthikulpanit@amd.…
Signed-off-by: Joerg Roedel <jroedel(a)suse.de>
diff --git a/drivers/iommu/amd/io_pgtable.c b/drivers/iommu/amd/io_pgtable.c
index b1bf4125b0f7..6608d1717574 100644
--- a/drivers/iommu/amd/io_pgtable.c
+++ b/drivers/iommu/amd/io_pgtable.c
@@ -492,18 +492,18 @@ static void v1_free_pgtable(struct io_pgtable *iop)
dom = container_of(pgtable, struct protection_domain, iop);
- /* Update data structure */
- amd_iommu_domain_clr_pt_root(dom);
-
- /* Make changes visible to IOMMUs */
- amd_iommu_domain_update(dom);
-
/* Page-table is not visible to IOMMU anymore, so free it */
BUG_ON(pgtable->mode < PAGE_MODE_NONE ||
pgtable->mode > PAGE_MODE_6_LEVEL);
free_sub_pt(pgtable->root, pgtable->mode, &freelist);
+ /* Update data structure */
+ amd_iommu_domain_clr_pt_root(dom);
+
+ /* Make changes visible to IOMMUs */
+ amd_iommu_domain_update(dom);
+
put_pages_list(&freelist);
}
The patch below does not apply to the 5.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 0579fafd37fb7efe091f0e6c8ccf968864f40f3e Mon Sep 17 00:00:00 2001
From: Slawomir Laba <slawomirx.laba(a)intel.com>
Date: Wed, 23 Feb 2022 13:37:50 +0100
Subject: [PATCH] iavf: Fix locking for VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS
iavf_virtchnl_completion is called under crit_lock but when
the code for VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS is called,
this lock is released in order to obtain rtnl_lock to avoid
ABBA deadlock with unregister_netdev.
Along with the new way iavf_remove behaves, there exist
many risks related to the lock release and attmepts to regrab
it. The driver faces crashes related to races between
unregister_netdev and netdev_update_features. Yet another
risk is that the driver could already obtain the crit_lock
in order to destroy it and iavf_virtchnl_completion could
crash or block forever.
Make iavf_virtchnl_completion never relock crit_lock in it's
call paths.
Extract rtnl_lock locking logic to the driver for
unregister_netdev in order to set the netdev_registered flag
inside the lock.
Introduce a new flag that will inform adminq_task to perform
the code from VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS right after
it finishes processing messages. Guard this code with remove
flags so it's never called when the driver is in remove state.
Fixes: 5951a2b9812d ("iavf: Fix VLAN feature flags after VFR")
Signed-off-by: Slawomir Laba <slawomirx.laba(a)intel.com>
Signed-off-by: Phani Burra <phani.r.burra(a)intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller(a)intel.com>
Signed-off-by: Mateusz Palczewski <mateusz.palczewski(a)intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski(a)intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen(a)intel.com>
diff --git a/drivers/net/ethernet/intel/iavf/iavf.h b/drivers/net/ethernet/intel/iavf/iavf.h
index f259fd517b2c..89423947ee65 100644
--- a/drivers/net/ethernet/intel/iavf/iavf.h
+++ b/drivers/net/ethernet/intel/iavf/iavf.h
@@ -287,6 +287,7 @@ struct iavf_adapter {
#define IAVF_FLAG_LEGACY_RX BIT(15)
#define IAVF_FLAG_REINIT_ITR_NEEDED BIT(16)
#define IAVF_FLAG_QUEUES_DISABLED BIT(17)
+#define IAVF_FLAG_SETUP_NETDEV_FEATURES BIT(18)
/* duplicates for common code */
#define IAVF_FLAG_DCB_ENABLED 0
/* flags for admin queue service task */
diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index be51da978e7c..67349d24dc90 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -2879,6 +2879,24 @@ static void iavf_adminq_task(struct work_struct *work)
} while (pending);
mutex_unlock(&adapter->crit_lock);
+ if ((adapter->flags & IAVF_FLAG_SETUP_NETDEV_FEATURES)) {
+ if (adapter->netdev_registered ||
+ !test_bit(__IAVF_IN_REMOVE_TASK, &adapter->crit_section)) {
+ struct net_device *netdev = adapter->netdev;
+
+ rtnl_lock();
+ netdev_update_features(netdev);
+ rtnl_unlock();
+ /* Request VLAN offload settings */
+ if (VLAN_V2_ALLOWED(adapter))
+ iavf_set_vlan_offload_features
+ (adapter, 0, netdev->features);
+
+ iavf_set_queue_vlan_tag_loc(adapter);
+ }
+
+ adapter->flags &= ~IAVF_FLAG_SETUP_NETDEV_FEATURES;
+ }
if ((adapter->flags &
(IAVF_FLAG_RESET_PENDING | IAVF_FLAG_RESET_NEEDED)) ||
adapter->state == __IAVF_RESETTING)
@@ -4606,8 +4624,10 @@ static void iavf_remove(struct pci_dev *pdev)
cancel_delayed_work_sync(&adapter->watchdog_task);
if (adapter->netdev_registered) {
- unregister_netdev(netdev);
+ rtnl_lock();
+ unregister_netdevice(netdev);
adapter->netdev_registered = false;
+ rtnl_unlock();
}
if (CLIENT_ALLOWED(adapter)) {
err = iavf_lan_del_device(adapter);
diff --git a/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c b/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
index 5ee1d118fd30..88844d68e150 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
@@ -2146,29 +2146,7 @@ void iavf_virtchnl_completion(struct iavf_adapter *adapter,
sizeof(adapter->vlan_v2_caps)));
iavf_process_config(adapter);
-
- /* unlock crit_lock before acquiring rtnl_lock as other
- * processes holding rtnl_lock could be waiting for the same
- * crit_lock
- */
- mutex_unlock(&adapter->crit_lock);
- /* VLAN capabilities can change during VFR, so make sure to
- * update the netdev features with the new capabilities
- */
- rtnl_lock();
- netdev_update_features(netdev);
- rtnl_unlock();
- if (iavf_lock_timeout(&adapter->crit_lock, 10000))
- dev_warn(&adapter->pdev->dev, "failed to acquire crit_lock in %s\n",
- __FUNCTION__);
-
- /* Request VLAN offload settings */
- if (VLAN_V2_ALLOWED(adapter))
- iavf_set_vlan_offload_features(adapter, 0,
- netdev->features);
-
- iavf_set_queue_vlan_tag_loc(adapter);
-
+ adapter->flags |= IAVF_FLAG_SETUP_NETDEV_FEATURES;
}
break;
case VIRTCHNL_OP_ENABLE_QUEUES:
The patch below does not apply to the 5.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 0579fafd37fb7efe091f0e6c8ccf968864f40f3e Mon Sep 17 00:00:00 2001
From: Slawomir Laba <slawomirx.laba(a)intel.com>
Date: Wed, 23 Feb 2022 13:37:50 +0100
Subject: [PATCH] iavf: Fix locking for VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS
iavf_virtchnl_completion is called under crit_lock but when
the code for VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS is called,
this lock is released in order to obtain rtnl_lock to avoid
ABBA deadlock with unregister_netdev.
Along with the new way iavf_remove behaves, there exist
many risks related to the lock release and attmepts to regrab
it. The driver faces crashes related to races between
unregister_netdev and netdev_update_features. Yet another
risk is that the driver could already obtain the crit_lock
in order to destroy it and iavf_virtchnl_completion could
crash or block forever.
Make iavf_virtchnl_completion never relock crit_lock in it's
call paths.
Extract rtnl_lock locking logic to the driver for
unregister_netdev in order to set the netdev_registered flag
inside the lock.
Introduce a new flag that will inform adminq_task to perform
the code from VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS right after
it finishes processing messages. Guard this code with remove
flags so it's never called when the driver is in remove state.
Fixes: 5951a2b9812d ("iavf: Fix VLAN feature flags after VFR")
Signed-off-by: Slawomir Laba <slawomirx.laba(a)intel.com>
Signed-off-by: Phani Burra <phani.r.burra(a)intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller(a)intel.com>
Signed-off-by: Mateusz Palczewski <mateusz.palczewski(a)intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski(a)intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen(a)intel.com>
diff --git a/drivers/net/ethernet/intel/iavf/iavf.h b/drivers/net/ethernet/intel/iavf/iavf.h
index f259fd517b2c..89423947ee65 100644
--- a/drivers/net/ethernet/intel/iavf/iavf.h
+++ b/drivers/net/ethernet/intel/iavf/iavf.h
@@ -287,6 +287,7 @@ struct iavf_adapter {
#define IAVF_FLAG_LEGACY_RX BIT(15)
#define IAVF_FLAG_REINIT_ITR_NEEDED BIT(16)
#define IAVF_FLAG_QUEUES_DISABLED BIT(17)
+#define IAVF_FLAG_SETUP_NETDEV_FEATURES BIT(18)
/* duplicates for common code */
#define IAVF_FLAG_DCB_ENABLED 0
/* flags for admin queue service task */
diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index be51da978e7c..67349d24dc90 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -2879,6 +2879,24 @@ static void iavf_adminq_task(struct work_struct *work)
} while (pending);
mutex_unlock(&adapter->crit_lock);
+ if ((adapter->flags & IAVF_FLAG_SETUP_NETDEV_FEATURES)) {
+ if (adapter->netdev_registered ||
+ !test_bit(__IAVF_IN_REMOVE_TASK, &adapter->crit_section)) {
+ struct net_device *netdev = adapter->netdev;
+
+ rtnl_lock();
+ netdev_update_features(netdev);
+ rtnl_unlock();
+ /* Request VLAN offload settings */
+ if (VLAN_V2_ALLOWED(adapter))
+ iavf_set_vlan_offload_features
+ (adapter, 0, netdev->features);
+
+ iavf_set_queue_vlan_tag_loc(adapter);
+ }
+
+ adapter->flags &= ~IAVF_FLAG_SETUP_NETDEV_FEATURES;
+ }
if ((adapter->flags &
(IAVF_FLAG_RESET_PENDING | IAVF_FLAG_RESET_NEEDED)) ||
adapter->state == __IAVF_RESETTING)
@@ -4606,8 +4624,10 @@ static void iavf_remove(struct pci_dev *pdev)
cancel_delayed_work_sync(&adapter->watchdog_task);
if (adapter->netdev_registered) {
- unregister_netdev(netdev);
+ rtnl_lock();
+ unregister_netdevice(netdev);
adapter->netdev_registered = false;
+ rtnl_unlock();
}
if (CLIENT_ALLOWED(adapter)) {
err = iavf_lan_del_device(adapter);
diff --git a/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c b/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
index 5ee1d118fd30..88844d68e150 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
@@ -2146,29 +2146,7 @@ void iavf_virtchnl_completion(struct iavf_adapter *adapter,
sizeof(adapter->vlan_v2_caps)));
iavf_process_config(adapter);
-
- /* unlock crit_lock before acquiring rtnl_lock as other
- * processes holding rtnl_lock could be waiting for the same
- * crit_lock
- */
- mutex_unlock(&adapter->crit_lock);
- /* VLAN capabilities can change during VFR, so make sure to
- * update the netdev features with the new capabilities
- */
- rtnl_lock();
- netdev_update_features(netdev);
- rtnl_unlock();
- if (iavf_lock_timeout(&adapter->crit_lock, 10000))
- dev_warn(&adapter->pdev->dev, "failed to acquire crit_lock in %s\n",
- __FUNCTION__);
-
- /* Request VLAN offload settings */
- if (VLAN_V2_ALLOWED(adapter))
- iavf_set_vlan_offload_features(adapter, 0,
- netdev->features);
-
- iavf_set_queue_vlan_tag_loc(adapter);
-
+ adapter->flags |= IAVF_FLAG_SETUP_NETDEV_FEATURES;
}
break;
case VIRTCHNL_OP_ENABLE_QUEUES:
The patch below does not apply to the 5.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 fc2e6b3b132a907378f6af08356b105a4139c4fb Mon Sep 17 00:00:00 2001
From: Slawomir Laba <slawomirx.laba(a)intel.com>
Date: Wed, 23 Feb 2022 13:35:49 +0100
Subject: [PATCH] iavf: Rework mutexes for better synchronisation
The driver used to crash in multiple spots when put to stress testing
of the init, reset and remove paths.
The user would experience call traces or hangs when creating,
resetting, removing VFs. Depending on the machines, the call traces
are happening in random spots, like reset restoring resources racing
with driver remove.
Make adapter->crit_lock mutex a mandatory lock for guarding the
operations performed on all workqueues and functions dealing with
resource allocation and disposal.
Make __IAVF_REMOVE a final state of the driver respected by
workqueues that shall not requeue, when they fail to obtain the
crit_lock.
Make the IRQ handler not to queue the new work for adminq_task
when the __IAVF_REMOVE state is set.
Fixes: 5ac49f3c2702 ("iavf: use mutexes for locking of critical sections")
Signed-off-by: Slawomir Laba <slawomirx.laba(a)intel.com>
Signed-off-by: Phani Burra <phani.r.burra(a)intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller(a)intel.com>
Signed-off-by: Mateusz Palczewski <mateusz.palczewski(a)intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski(a)intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen(a)intel.com>
diff --git a/drivers/net/ethernet/intel/iavf/iavf.h b/drivers/net/ethernet/intel/iavf/iavf.h
index 59806d1f7e79..44f83e06486d 100644
--- a/drivers/net/ethernet/intel/iavf/iavf.h
+++ b/drivers/net/ethernet/intel/iavf/iavf.h
@@ -246,7 +246,6 @@ struct iavf_adapter {
struct list_head mac_filter_list;
struct mutex crit_lock;
struct mutex client_lock;
- struct mutex remove_lock;
/* Lock to protect accesses to MAC and VLAN lists */
spinlock_t mac_vlan_list_lock;
char misc_vector_name[IFNAMSIZ + 9];
diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index 8125b9120615..84ae96e912d7 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -302,8 +302,9 @@ static irqreturn_t iavf_msix_aq(int irq, void *data)
rd32(hw, IAVF_VFINT_ICR01);
rd32(hw, IAVF_VFINT_ICR0_ENA1);
- /* schedule work on the private workqueue */
- queue_work(iavf_wq, &adapter->adminq_task);
+ if (adapter->state != __IAVF_REMOVE)
+ /* schedule work on the private workqueue */
+ queue_work(iavf_wq, &adapter->adminq_task);
return IRQ_HANDLED;
}
@@ -2374,8 +2375,12 @@ static void iavf_watchdog_task(struct work_struct *work)
struct iavf_hw *hw = &adapter->hw;
u32 reg_val;
- if (!mutex_trylock(&adapter->crit_lock))
+ if (!mutex_trylock(&adapter->crit_lock)) {
+ if (adapter->state == __IAVF_REMOVE)
+ return;
+
goto restart_watchdog;
+ }
if (adapter->flags & IAVF_FLAG_PF_COMMS_FAILED)
iavf_change_state(adapter, __IAVF_COMM_FAILED);
@@ -2601,13 +2606,13 @@ static void iavf_reset_task(struct work_struct *work)
/* When device is being removed it doesn't make sense to run the reset
* task, just return in such a case.
*/
- if (mutex_is_locked(&adapter->remove_lock))
- return;
+ if (!mutex_trylock(&adapter->crit_lock)) {
+ if (adapter->state != __IAVF_REMOVE)
+ queue_work(iavf_wq, &adapter->reset_task);
- if (iavf_lock_timeout(&adapter->crit_lock, 200)) {
- schedule_work(&adapter->reset_task);
return;
}
+
while (!mutex_trylock(&adapter->client_lock))
usleep_range(500, 1000);
if (CLIENT_ENABLED(adapter)) {
@@ -2826,13 +2831,19 @@ static void iavf_adminq_task(struct work_struct *work)
if (adapter->flags & IAVF_FLAG_PF_COMMS_FAILED)
goto out;
+ if (!mutex_trylock(&adapter->crit_lock)) {
+ if (adapter->state == __IAVF_REMOVE)
+ return;
+
+ queue_work(iavf_wq, &adapter->adminq_task);
+ goto out;
+ }
+
event.buf_len = IAVF_MAX_AQ_BUF_SIZE;
event.msg_buf = kzalloc(event.buf_len, GFP_KERNEL);
if (!event.msg_buf)
goto out;
- if (iavf_lock_timeout(&adapter->crit_lock, 200))
- goto freedom;
do {
ret = iavf_clean_arq_element(hw, &event, &pending);
v_op = (enum virtchnl_ops)le32_to_cpu(event.desc.cookie_high);
@@ -3800,11 +3811,12 @@ static int iavf_close(struct net_device *netdev)
struct iavf_adapter *adapter = netdev_priv(netdev);
int status;
- if (adapter->state <= __IAVF_DOWN_PENDING)
- return 0;
+ mutex_lock(&adapter->crit_lock);
- while (!mutex_trylock(&adapter->crit_lock))
- usleep_range(500, 1000);
+ if (adapter->state <= __IAVF_DOWN_PENDING) {
+ mutex_unlock(&adapter->crit_lock);
+ return 0;
+ }
set_bit(__IAVF_VSI_DOWN, adapter->vsi.state);
if (CLIENT_ENABLED(adapter))
@@ -4431,7 +4443,6 @@ static int iavf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
*/
mutex_init(&adapter->crit_lock);
mutex_init(&adapter->client_lock);
- mutex_init(&adapter->remove_lock);
mutex_init(&hw->aq.asq_mutex);
mutex_init(&hw->aq.arq_mutex);
@@ -4556,11 +4567,7 @@ static void iavf_remove(struct pci_dev *pdev)
struct iavf_cloud_filter *cf, *cftmp;
struct iavf_hw *hw = &adapter->hw;
int err;
- /* Indicate we are in remove and not to run reset_task */
- mutex_lock(&adapter->remove_lock);
- cancel_work_sync(&adapter->reset_task);
- cancel_delayed_work_sync(&adapter->watchdog_task);
- cancel_delayed_work_sync(&adapter->client_task);
+
if (adapter->netdev_registered) {
unregister_netdev(netdev);
adapter->netdev_registered = false;
@@ -4572,6 +4579,10 @@ static void iavf_remove(struct pci_dev *pdev)
err);
}
+ mutex_lock(&adapter->crit_lock);
+ dev_info(&adapter->pdev->dev, "Remove device\n");
+ iavf_change_state(adapter, __IAVF_REMOVE);
+
iavf_request_reset(adapter);
msleep(50);
/* If the FW isn't responding, kick it once, but only once. */
@@ -4579,18 +4590,19 @@ static void iavf_remove(struct pci_dev *pdev)
iavf_request_reset(adapter);
msleep(50);
}
- if (iavf_lock_timeout(&adapter->crit_lock, 5000))
- dev_warn(&adapter->pdev->dev, "failed to acquire crit_lock in %s\n", __FUNCTION__);
- dev_info(&adapter->pdev->dev, "Removing device\n");
+ iavf_misc_irq_disable(adapter);
/* Shut down all the garbage mashers on the detention level */
- iavf_change_state(adapter, __IAVF_REMOVE);
+ cancel_work_sync(&adapter->reset_task);
+ cancel_delayed_work_sync(&adapter->watchdog_task);
+ cancel_work_sync(&adapter->adminq_task);
+ cancel_delayed_work_sync(&adapter->client_task);
+
adapter->aq_required = 0;
adapter->flags &= ~IAVF_FLAG_REINIT_ITR_NEEDED;
iavf_free_all_tx_resources(adapter);
iavf_free_all_rx_resources(adapter);
- iavf_misc_irq_disable(adapter);
iavf_free_misc_irq(adapter);
/* In case we enter iavf_remove from erroneous state, free traffic irqs
@@ -4606,10 +4618,6 @@ static void iavf_remove(struct pci_dev *pdev)
iavf_reset_interrupt_capability(adapter);
iavf_free_q_vectors(adapter);
- cancel_delayed_work_sync(&adapter->watchdog_task);
-
- cancel_work_sync(&adapter->adminq_task);
-
iavf_free_rss(adapter);
if (hw->aq.asq.count)
@@ -4621,8 +4629,6 @@ static void iavf_remove(struct pci_dev *pdev)
mutex_destroy(&adapter->client_lock);
mutex_unlock(&adapter->crit_lock);
mutex_destroy(&adapter->crit_lock);
- mutex_unlock(&adapter->remove_lock);
- mutex_destroy(&adapter->remove_lock);
iounmap(hw->hw_addr);
pci_release_regions(pdev);
The patch below does not apply to the 5.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 fc2e6b3b132a907378f6af08356b105a4139c4fb Mon Sep 17 00:00:00 2001
From: Slawomir Laba <slawomirx.laba(a)intel.com>
Date: Wed, 23 Feb 2022 13:35:49 +0100
Subject: [PATCH] iavf: Rework mutexes for better synchronisation
The driver used to crash in multiple spots when put to stress testing
of the init, reset and remove paths.
The user would experience call traces or hangs when creating,
resetting, removing VFs. Depending on the machines, the call traces
are happening in random spots, like reset restoring resources racing
with driver remove.
Make adapter->crit_lock mutex a mandatory lock for guarding the
operations performed on all workqueues and functions dealing with
resource allocation and disposal.
Make __IAVF_REMOVE a final state of the driver respected by
workqueues that shall not requeue, when they fail to obtain the
crit_lock.
Make the IRQ handler not to queue the new work for adminq_task
when the __IAVF_REMOVE state is set.
Fixes: 5ac49f3c2702 ("iavf: use mutexes for locking of critical sections")
Signed-off-by: Slawomir Laba <slawomirx.laba(a)intel.com>
Signed-off-by: Phani Burra <phani.r.burra(a)intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller(a)intel.com>
Signed-off-by: Mateusz Palczewski <mateusz.palczewski(a)intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski(a)intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen(a)intel.com>
diff --git a/drivers/net/ethernet/intel/iavf/iavf.h b/drivers/net/ethernet/intel/iavf/iavf.h
index 59806d1f7e79..44f83e06486d 100644
--- a/drivers/net/ethernet/intel/iavf/iavf.h
+++ b/drivers/net/ethernet/intel/iavf/iavf.h
@@ -246,7 +246,6 @@ struct iavf_adapter {
struct list_head mac_filter_list;
struct mutex crit_lock;
struct mutex client_lock;
- struct mutex remove_lock;
/* Lock to protect accesses to MAC and VLAN lists */
spinlock_t mac_vlan_list_lock;
char misc_vector_name[IFNAMSIZ + 9];
diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index 8125b9120615..84ae96e912d7 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -302,8 +302,9 @@ static irqreturn_t iavf_msix_aq(int irq, void *data)
rd32(hw, IAVF_VFINT_ICR01);
rd32(hw, IAVF_VFINT_ICR0_ENA1);
- /* schedule work on the private workqueue */
- queue_work(iavf_wq, &adapter->adminq_task);
+ if (adapter->state != __IAVF_REMOVE)
+ /* schedule work on the private workqueue */
+ queue_work(iavf_wq, &adapter->adminq_task);
return IRQ_HANDLED;
}
@@ -2374,8 +2375,12 @@ static void iavf_watchdog_task(struct work_struct *work)
struct iavf_hw *hw = &adapter->hw;
u32 reg_val;
- if (!mutex_trylock(&adapter->crit_lock))
+ if (!mutex_trylock(&adapter->crit_lock)) {
+ if (adapter->state == __IAVF_REMOVE)
+ return;
+
goto restart_watchdog;
+ }
if (adapter->flags & IAVF_FLAG_PF_COMMS_FAILED)
iavf_change_state(adapter, __IAVF_COMM_FAILED);
@@ -2601,13 +2606,13 @@ static void iavf_reset_task(struct work_struct *work)
/* When device is being removed it doesn't make sense to run the reset
* task, just return in such a case.
*/
- if (mutex_is_locked(&adapter->remove_lock))
- return;
+ if (!mutex_trylock(&adapter->crit_lock)) {
+ if (adapter->state != __IAVF_REMOVE)
+ queue_work(iavf_wq, &adapter->reset_task);
- if (iavf_lock_timeout(&adapter->crit_lock, 200)) {
- schedule_work(&adapter->reset_task);
return;
}
+
while (!mutex_trylock(&adapter->client_lock))
usleep_range(500, 1000);
if (CLIENT_ENABLED(adapter)) {
@@ -2826,13 +2831,19 @@ static void iavf_adminq_task(struct work_struct *work)
if (adapter->flags & IAVF_FLAG_PF_COMMS_FAILED)
goto out;
+ if (!mutex_trylock(&adapter->crit_lock)) {
+ if (adapter->state == __IAVF_REMOVE)
+ return;
+
+ queue_work(iavf_wq, &adapter->adminq_task);
+ goto out;
+ }
+
event.buf_len = IAVF_MAX_AQ_BUF_SIZE;
event.msg_buf = kzalloc(event.buf_len, GFP_KERNEL);
if (!event.msg_buf)
goto out;
- if (iavf_lock_timeout(&adapter->crit_lock, 200))
- goto freedom;
do {
ret = iavf_clean_arq_element(hw, &event, &pending);
v_op = (enum virtchnl_ops)le32_to_cpu(event.desc.cookie_high);
@@ -3800,11 +3811,12 @@ static int iavf_close(struct net_device *netdev)
struct iavf_adapter *adapter = netdev_priv(netdev);
int status;
- if (adapter->state <= __IAVF_DOWN_PENDING)
- return 0;
+ mutex_lock(&adapter->crit_lock);
- while (!mutex_trylock(&adapter->crit_lock))
- usleep_range(500, 1000);
+ if (adapter->state <= __IAVF_DOWN_PENDING) {
+ mutex_unlock(&adapter->crit_lock);
+ return 0;
+ }
set_bit(__IAVF_VSI_DOWN, adapter->vsi.state);
if (CLIENT_ENABLED(adapter))
@@ -4431,7 +4443,6 @@ static int iavf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
*/
mutex_init(&adapter->crit_lock);
mutex_init(&adapter->client_lock);
- mutex_init(&adapter->remove_lock);
mutex_init(&hw->aq.asq_mutex);
mutex_init(&hw->aq.arq_mutex);
@@ -4556,11 +4567,7 @@ static void iavf_remove(struct pci_dev *pdev)
struct iavf_cloud_filter *cf, *cftmp;
struct iavf_hw *hw = &adapter->hw;
int err;
- /* Indicate we are in remove and not to run reset_task */
- mutex_lock(&adapter->remove_lock);
- cancel_work_sync(&adapter->reset_task);
- cancel_delayed_work_sync(&adapter->watchdog_task);
- cancel_delayed_work_sync(&adapter->client_task);
+
if (adapter->netdev_registered) {
unregister_netdev(netdev);
adapter->netdev_registered = false;
@@ -4572,6 +4579,10 @@ static void iavf_remove(struct pci_dev *pdev)
err);
}
+ mutex_lock(&adapter->crit_lock);
+ dev_info(&adapter->pdev->dev, "Remove device\n");
+ iavf_change_state(adapter, __IAVF_REMOVE);
+
iavf_request_reset(adapter);
msleep(50);
/* If the FW isn't responding, kick it once, but only once. */
@@ -4579,18 +4590,19 @@ static void iavf_remove(struct pci_dev *pdev)
iavf_request_reset(adapter);
msleep(50);
}
- if (iavf_lock_timeout(&adapter->crit_lock, 5000))
- dev_warn(&adapter->pdev->dev, "failed to acquire crit_lock in %s\n", __FUNCTION__);
- dev_info(&adapter->pdev->dev, "Removing device\n");
+ iavf_misc_irq_disable(adapter);
/* Shut down all the garbage mashers on the detention level */
- iavf_change_state(adapter, __IAVF_REMOVE);
+ cancel_work_sync(&adapter->reset_task);
+ cancel_delayed_work_sync(&adapter->watchdog_task);
+ cancel_work_sync(&adapter->adminq_task);
+ cancel_delayed_work_sync(&adapter->client_task);
+
adapter->aq_required = 0;
adapter->flags &= ~IAVF_FLAG_REINIT_ITR_NEEDED;
iavf_free_all_tx_resources(adapter);
iavf_free_all_rx_resources(adapter);
- iavf_misc_irq_disable(adapter);
iavf_free_misc_irq(adapter);
/* In case we enter iavf_remove from erroneous state, free traffic irqs
@@ -4606,10 +4618,6 @@ static void iavf_remove(struct pci_dev *pdev)
iavf_reset_interrupt_capability(adapter);
iavf_free_q_vectors(adapter);
- cancel_delayed_work_sync(&adapter->watchdog_task);
-
- cancel_work_sync(&adapter->adminq_task);
-
iavf_free_rss(adapter);
if (hw->aq.asq.count)
@@ -4621,8 +4629,6 @@ static void iavf_remove(struct pci_dev *pdev)
mutex_destroy(&adapter->client_lock);
mutex_unlock(&adapter->crit_lock);
mutex_destroy(&adapter->crit_lock);
- mutex_unlock(&adapter->remove_lock);
- mutex_destroy(&adapter->remove_lock);
iounmap(hw->hw_addr);
pci_release_regions(pdev);
The patch below does not apply to the 4.19-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 570425f8c7c18b14fa8a2a58a0adb431968ad118 Mon Sep 17 00:00:00 2001
From: Sukadev Bhattiprolu <sukadev(a)linux.ibm.com>
Date: Thu, 24 Feb 2022 22:23:55 -0800
Subject: [PATCH] ibmvnic: register netdev after init of adapter
Finish initializing the adapter before registering netdev so state
is consistent.
Fixes: c26eba03e407 ("ibmvnic: Update reset infrastructure to support tunable parameters")
Signed-off-by: Sukadev Bhattiprolu <sukadev(a)linux.ibm.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index 5913d372bc27..a7b03ca109d8 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -5826,12 +5826,6 @@ static int ibmvnic_probe(struct vio_dev *dev, const struct vio_device_id *id)
goto ibmvnic_dev_file_err;
netif_carrier_off(netdev);
- rc = register_netdev(netdev);
- if (rc) {
- dev_err(&dev->dev, "failed to register netdev rc=%d\n", rc);
- goto ibmvnic_register_fail;
- }
- dev_info(&dev->dev, "ibmvnic registered\n");
if (init_success) {
adapter->state = VNIC_PROBED;
@@ -5844,6 +5838,14 @@ static int ibmvnic_probe(struct vio_dev *dev, const struct vio_device_id *id)
adapter->wait_for_reset = false;
adapter->last_reset_time = jiffies;
+
+ rc = register_netdev(netdev);
+ if (rc) {
+ dev_err(&dev->dev, "failed to register netdev rc=%d\n", rc);
+ goto ibmvnic_register_fail;
+ }
+ dev_info(&dev->dev, "ibmvnic registered\n");
+
return 0;
ibmvnic_register_fail:
The patch below does not apply to the 5.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 570425f8c7c18b14fa8a2a58a0adb431968ad118 Mon Sep 17 00:00:00 2001
From: Sukadev Bhattiprolu <sukadev(a)linux.ibm.com>
Date: Thu, 24 Feb 2022 22:23:55 -0800
Subject: [PATCH] ibmvnic: register netdev after init of adapter
Finish initializing the adapter before registering netdev so state
is consistent.
Fixes: c26eba03e407 ("ibmvnic: Update reset infrastructure to support tunable parameters")
Signed-off-by: Sukadev Bhattiprolu <sukadev(a)linux.ibm.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index 5913d372bc27..a7b03ca109d8 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -5826,12 +5826,6 @@ static int ibmvnic_probe(struct vio_dev *dev, const struct vio_device_id *id)
goto ibmvnic_dev_file_err;
netif_carrier_off(netdev);
- rc = register_netdev(netdev);
- if (rc) {
- dev_err(&dev->dev, "failed to register netdev rc=%d\n", rc);
- goto ibmvnic_register_fail;
- }
- dev_info(&dev->dev, "ibmvnic registered\n");
if (init_success) {
adapter->state = VNIC_PROBED;
@@ -5844,6 +5838,14 @@ static int ibmvnic_probe(struct vio_dev *dev, const struct vio_device_id *id)
adapter->wait_for_reset = false;
adapter->last_reset_time = jiffies;
+
+ rc = register_netdev(netdev);
+ if (rc) {
+ dev_err(&dev->dev, "failed to register netdev rc=%d\n", rc);
+ goto ibmvnic_register_fail;
+ }
+ dev_info(&dev->dev, "ibmvnic registered\n");
+
return 0;
ibmvnic_register_fail:
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 087a7b944c5db409f7c1a68bf4896c56ba54eaff Mon Sep 17 00:00:00 2001
From: Vincent Whitchurch <vincent.whitchurch(a)axis.com>
Date: Thu, 24 Feb 2022 12:38:29 +0100
Subject: [PATCH] net: stmmac: only enable DMA interrupts when ready
In this driver's ->ndo_open() callback, it enables DMA interrupts,
starts the DMA channels, then requests interrupts with request_irq(),
and then finally enables napi.
If RX DMA interrupts are received before napi is enabled, no processing
is done because napi_schedule_prep() will return false. If the network
has a lot of broadcast/multicast traffic, then the RX ring could fill up
completely before napi is enabled. When this happens, no further RX
interrupts will be delivered, and the driver will fail to receive any
packets.
Fix this by only enabling DMA interrupts after all other initialization
is complete.
Fixes: 523f11b5d4fd72efb ("net: stmmac: move hardware setup for stmmac_open to new function")
Reported-by: Lars Persson <larper(a)axis.com>
Signed-off-by: Vincent Whitchurch <vincent.whitchurch(a)axis.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index bde76ea2deec..cb9b6e08780c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2262,6 +2262,23 @@ static void stmmac_stop_tx_dma(struct stmmac_priv *priv, u32 chan)
stmmac_stop_tx(priv, priv->ioaddr, chan);
}
+static void stmmac_enable_all_dma_irq(struct stmmac_priv *priv)
+{
+ u32 rx_channels_count = priv->plat->rx_queues_to_use;
+ u32 tx_channels_count = priv->plat->tx_queues_to_use;
+ u32 dma_csr_ch = max(rx_channels_count, tx_channels_count);
+ u32 chan;
+
+ for (chan = 0; chan < dma_csr_ch; chan++) {
+ struct stmmac_channel *ch = &priv->channel[chan];
+ unsigned long flags;
+
+ spin_lock_irqsave(&ch->lock, flags);
+ stmmac_enable_dma_irq(priv, priv->ioaddr, chan, 1, 1);
+ spin_unlock_irqrestore(&ch->lock, flags);
+ }
+}
+
/**
* stmmac_start_all_dma - start all RX and TX DMA channels
* @priv: driver private structure
@@ -2904,8 +2921,10 @@ static int stmmac_init_dma_engine(struct stmmac_priv *priv)
stmmac_axi(priv, priv->ioaddr, priv->plat->axi);
/* DMA CSR Channel configuration */
- for (chan = 0; chan < dma_csr_ch; chan++)
+ for (chan = 0; chan < dma_csr_ch; chan++) {
stmmac_init_chan(priv, priv->ioaddr, priv->plat->dma_cfg, chan);
+ stmmac_disable_dma_irq(priv, priv->ioaddr, chan, 1, 1);
+ }
/* DMA RX Channel Configuration */
for (chan = 0; chan < rx_channels_count; chan++) {
@@ -3761,6 +3780,7 @@ static int stmmac_open(struct net_device *dev)
stmmac_enable_all_queues(priv);
netif_tx_start_all_queues(priv->dev);
+ stmmac_enable_all_dma_irq(priv);
return 0;
@@ -6510,8 +6530,10 @@ int stmmac_xdp_open(struct net_device *dev)
}
/* DMA CSR Channel configuration */
- for (chan = 0; chan < dma_csr_ch; chan++)
+ for (chan = 0; chan < dma_csr_ch; chan++) {
stmmac_init_chan(priv, priv->ioaddr, priv->plat->dma_cfg, chan);
+ stmmac_disable_dma_irq(priv, priv->ioaddr, chan, 1, 1);
+ }
/* Adjust Split header */
sph_en = (priv->hw->rx_csum > 0) && priv->sph;
@@ -6572,6 +6594,7 @@ int stmmac_xdp_open(struct net_device *dev)
stmmac_enable_all_queues(priv);
netif_carrier_on(dev);
netif_tx_start_all_queues(dev);
+ stmmac_enable_all_dma_irq(priv);
return 0;
@@ -7451,6 +7474,7 @@ int stmmac_resume(struct device *dev)
stmmac_restore_hw_vlan_rx_fltr(priv, ndev, priv->hw);
stmmac_enable_all_queues(priv);
+ stmmac_enable_all_dma_irq(priv);
mutex_unlock(&priv->lock);
rtnl_unlock();
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 087a7b944c5db409f7c1a68bf4896c56ba54eaff Mon Sep 17 00:00:00 2001
From: Vincent Whitchurch <vincent.whitchurch(a)axis.com>
Date: Thu, 24 Feb 2022 12:38:29 +0100
Subject: [PATCH] net: stmmac: only enable DMA interrupts when ready
In this driver's ->ndo_open() callback, it enables DMA interrupts,
starts the DMA channels, then requests interrupts with request_irq(),
and then finally enables napi.
If RX DMA interrupts are received before napi is enabled, no processing
is done because napi_schedule_prep() will return false. If the network
has a lot of broadcast/multicast traffic, then the RX ring could fill up
completely before napi is enabled. When this happens, no further RX
interrupts will be delivered, and the driver will fail to receive any
packets.
Fix this by only enabling DMA interrupts after all other initialization
is complete.
Fixes: 523f11b5d4fd72efb ("net: stmmac: move hardware setup for stmmac_open to new function")
Reported-by: Lars Persson <larper(a)axis.com>
Signed-off-by: Vincent Whitchurch <vincent.whitchurch(a)axis.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index bde76ea2deec..cb9b6e08780c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2262,6 +2262,23 @@ static void stmmac_stop_tx_dma(struct stmmac_priv *priv, u32 chan)
stmmac_stop_tx(priv, priv->ioaddr, chan);
}
+static void stmmac_enable_all_dma_irq(struct stmmac_priv *priv)
+{
+ u32 rx_channels_count = priv->plat->rx_queues_to_use;
+ u32 tx_channels_count = priv->plat->tx_queues_to_use;
+ u32 dma_csr_ch = max(rx_channels_count, tx_channels_count);
+ u32 chan;
+
+ for (chan = 0; chan < dma_csr_ch; chan++) {
+ struct stmmac_channel *ch = &priv->channel[chan];
+ unsigned long flags;
+
+ spin_lock_irqsave(&ch->lock, flags);
+ stmmac_enable_dma_irq(priv, priv->ioaddr, chan, 1, 1);
+ spin_unlock_irqrestore(&ch->lock, flags);
+ }
+}
+
/**
* stmmac_start_all_dma - start all RX and TX DMA channels
* @priv: driver private structure
@@ -2904,8 +2921,10 @@ static int stmmac_init_dma_engine(struct stmmac_priv *priv)
stmmac_axi(priv, priv->ioaddr, priv->plat->axi);
/* DMA CSR Channel configuration */
- for (chan = 0; chan < dma_csr_ch; chan++)
+ for (chan = 0; chan < dma_csr_ch; chan++) {
stmmac_init_chan(priv, priv->ioaddr, priv->plat->dma_cfg, chan);
+ stmmac_disable_dma_irq(priv, priv->ioaddr, chan, 1, 1);
+ }
/* DMA RX Channel Configuration */
for (chan = 0; chan < rx_channels_count; chan++) {
@@ -3761,6 +3780,7 @@ static int stmmac_open(struct net_device *dev)
stmmac_enable_all_queues(priv);
netif_tx_start_all_queues(priv->dev);
+ stmmac_enable_all_dma_irq(priv);
return 0;
@@ -6510,8 +6530,10 @@ int stmmac_xdp_open(struct net_device *dev)
}
/* DMA CSR Channel configuration */
- for (chan = 0; chan < dma_csr_ch; chan++)
+ for (chan = 0; chan < dma_csr_ch; chan++) {
stmmac_init_chan(priv, priv->ioaddr, priv->plat->dma_cfg, chan);
+ stmmac_disable_dma_irq(priv, priv->ioaddr, chan, 1, 1);
+ }
/* Adjust Split header */
sph_en = (priv->hw->rx_csum > 0) && priv->sph;
@@ -6572,6 +6594,7 @@ int stmmac_xdp_open(struct net_device *dev)
stmmac_enable_all_queues(priv);
netif_carrier_on(dev);
netif_tx_start_all_queues(dev);
+ stmmac_enable_all_dma_irq(priv);
return 0;
@@ -7451,6 +7474,7 @@ int stmmac_resume(struct device *dev)
stmmac_restore_hw_vlan_rx_fltr(priv, ndev, priv->hw);
stmmac_enable_all_queues(priv);
+ stmmac_enable_all_dma_irq(priv);
mutex_unlock(&priv->lock);
rtnl_unlock();
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 087a7b944c5db409f7c1a68bf4896c56ba54eaff Mon Sep 17 00:00:00 2001
From: Vincent Whitchurch <vincent.whitchurch(a)axis.com>
Date: Thu, 24 Feb 2022 12:38:29 +0100
Subject: [PATCH] net: stmmac: only enable DMA interrupts when ready
In this driver's ->ndo_open() callback, it enables DMA interrupts,
starts the DMA channels, then requests interrupts with request_irq(),
and then finally enables napi.
If RX DMA interrupts are received before napi is enabled, no processing
is done because napi_schedule_prep() will return false. If the network
has a lot of broadcast/multicast traffic, then the RX ring could fill up
completely before napi is enabled. When this happens, no further RX
interrupts will be delivered, and the driver will fail to receive any
packets.
Fix this by only enabling DMA interrupts after all other initialization
is complete.
Fixes: 523f11b5d4fd72efb ("net: stmmac: move hardware setup for stmmac_open to new function")
Reported-by: Lars Persson <larper(a)axis.com>
Signed-off-by: Vincent Whitchurch <vincent.whitchurch(a)axis.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index bde76ea2deec..cb9b6e08780c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2262,6 +2262,23 @@ static void stmmac_stop_tx_dma(struct stmmac_priv *priv, u32 chan)
stmmac_stop_tx(priv, priv->ioaddr, chan);
}
+static void stmmac_enable_all_dma_irq(struct stmmac_priv *priv)
+{
+ u32 rx_channels_count = priv->plat->rx_queues_to_use;
+ u32 tx_channels_count = priv->plat->tx_queues_to_use;
+ u32 dma_csr_ch = max(rx_channels_count, tx_channels_count);
+ u32 chan;
+
+ for (chan = 0; chan < dma_csr_ch; chan++) {
+ struct stmmac_channel *ch = &priv->channel[chan];
+ unsigned long flags;
+
+ spin_lock_irqsave(&ch->lock, flags);
+ stmmac_enable_dma_irq(priv, priv->ioaddr, chan, 1, 1);
+ spin_unlock_irqrestore(&ch->lock, flags);
+ }
+}
+
/**
* stmmac_start_all_dma - start all RX and TX DMA channels
* @priv: driver private structure
@@ -2904,8 +2921,10 @@ static int stmmac_init_dma_engine(struct stmmac_priv *priv)
stmmac_axi(priv, priv->ioaddr, priv->plat->axi);
/* DMA CSR Channel configuration */
- for (chan = 0; chan < dma_csr_ch; chan++)
+ for (chan = 0; chan < dma_csr_ch; chan++) {
stmmac_init_chan(priv, priv->ioaddr, priv->plat->dma_cfg, chan);
+ stmmac_disable_dma_irq(priv, priv->ioaddr, chan, 1, 1);
+ }
/* DMA RX Channel Configuration */
for (chan = 0; chan < rx_channels_count; chan++) {
@@ -3761,6 +3780,7 @@ static int stmmac_open(struct net_device *dev)
stmmac_enable_all_queues(priv);
netif_tx_start_all_queues(priv->dev);
+ stmmac_enable_all_dma_irq(priv);
return 0;
@@ -6510,8 +6530,10 @@ int stmmac_xdp_open(struct net_device *dev)
}
/* DMA CSR Channel configuration */
- for (chan = 0; chan < dma_csr_ch; chan++)
+ for (chan = 0; chan < dma_csr_ch; chan++) {
stmmac_init_chan(priv, priv->ioaddr, priv->plat->dma_cfg, chan);
+ stmmac_disable_dma_irq(priv, priv->ioaddr, chan, 1, 1);
+ }
/* Adjust Split header */
sph_en = (priv->hw->rx_csum > 0) && priv->sph;
@@ -6572,6 +6594,7 @@ int stmmac_xdp_open(struct net_device *dev)
stmmac_enable_all_queues(priv);
netif_carrier_on(dev);
netif_tx_start_all_queues(dev);
+ stmmac_enable_all_dma_irq(priv);
return 0;
@@ -7451,6 +7474,7 @@ int stmmac_resume(struct device *dev)
stmmac_restore_hw_vlan_rx_fltr(priv, ndev, priv->hw);
stmmac_enable_all_queues(priv);
+ stmmac_enable_all_dma_irq(priv);
mutex_unlock(&priv->lock);
rtnl_unlock();
The patch below does not apply to the 4.19-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 087a7b944c5db409f7c1a68bf4896c56ba54eaff Mon Sep 17 00:00:00 2001
From: Vincent Whitchurch <vincent.whitchurch(a)axis.com>
Date: Thu, 24 Feb 2022 12:38:29 +0100
Subject: [PATCH] net: stmmac: only enable DMA interrupts when ready
In this driver's ->ndo_open() callback, it enables DMA interrupts,
starts the DMA channels, then requests interrupts with request_irq(),
and then finally enables napi.
If RX DMA interrupts are received before napi is enabled, no processing
is done because napi_schedule_prep() will return false. If the network
has a lot of broadcast/multicast traffic, then the RX ring could fill up
completely before napi is enabled. When this happens, no further RX
interrupts will be delivered, and the driver will fail to receive any
packets.
Fix this by only enabling DMA interrupts after all other initialization
is complete.
Fixes: 523f11b5d4fd72efb ("net: stmmac: move hardware setup for stmmac_open to new function")
Reported-by: Lars Persson <larper(a)axis.com>
Signed-off-by: Vincent Whitchurch <vincent.whitchurch(a)axis.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index bde76ea2deec..cb9b6e08780c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2262,6 +2262,23 @@ static void stmmac_stop_tx_dma(struct stmmac_priv *priv, u32 chan)
stmmac_stop_tx(priv, priv->ioaddr, chan);
}
+static void stmmac_enable_all_dma_irq(struct stmmac_priv *priv)
+{
+ u32 rx_channels_count = priv->plat->rx_queues_to_use;
+ u32 tx_channels_count = priv->plat->tx_queues_to_use;
+ u32 dma_csr_ch = max(rx_channels_count, tx_channels_count);
+ u32 chan;
+
+ for (chan = 0; chan < dma_csr_ch; chan++) {
+ struct stmmac_channel *ch = &priv->channel[chan];
+ unsigned long flags;
+
+ spin_lock_irqsave(&ch->lock, flags);
+ stmmac_enable_dma_irq(priv, priv->ioaddr, chan, 1, 1);
+ spin_unlock_irqrestore(&ch->lock, flags);
+ }
+}
+
/**
* stmmac_start_all_dma - start all RX and TX DMA channels
* @priv: driver private structure
@@ -2904,8 +2921,10 @@ static int stmmac_init_dma_engine(struct stmmac_priv *priv)
stmmac_axi(priv, priv->ioaddr, priv->plat->axi);
/* DMA CSR Channel configuration */
- for (chan = 0; chan < dma_csr_ch; chan++)
+ for (chan = 0; chan < dma_csr_ch; chan++) {
stmmac_init_chan(priv, priv->ioaddr, priv->plat->dma_cfg, chan);
+ stmmac_disable_dma_irq(priv, priv->ioaddr, chan, 1, 1);
+ }
/* DMA RX Channel Configuration */
for (chan = 0; chan < rx_channels_count; chan++) {
@@ -3761,6 +3780,7 @@ static int stmmac_open(struct net_device *dev)
stmmac_enable_all_queues(priv);
netif_tx_start_all_queues(priv->dev);
+ stmmac_enable_all_dma_irq(priv);
return 0;
@@ -6510,8 +6530,10 @@ int stmmac_xdp_open(struct net_device *dev)
}
/* DMA CSR Channel configuration */
- for (chan = 0; chan < dma_csr_ch; chan++)
+ for (chan = 0; chan < dma_csr_ch; chan++) {
stmmac_init_chan(priv, priv->ioaddr, priv->plat->dma_cfg, chan);
+ stmmac_disable_dma_irq(priv, priv->ioaddr, chan, 1, 1);
+ }
/* Adjust Split header */
sph_en = (priv->hw->rx_csum > 0) && priv->sph;
@@ -6572,6 +6594,7 @@ int stmmac_xdp_open(struct net_device *dev)
stmmac_enable_all_queues(priv);
netif_carrier_on(dev);
netif_tx_start_all_queues(dev);
+ stmmac_enable_all_dma_irq(priv);
return 0;
@@ -7451,6 +7474,7 @@ int stmmac_resume(struct device *dev)
stmmac_restore_hw_vlan_rx_fltr(priv, ndev, priv->hw);
stmmac_enable_all_queues(priv);
+ stmmac_enable_all_dma_irq(priv);
mutex_unlock(&priv->lock);
rtnl_unlock();
The patch below does not apply to the 5.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 087a7b944c5db409f7c1a68bf4896c56ba54eaff Mon Sep 17 00:00:00 2001
From: Vincent Whitchurch <vincent.whitchurch(a)axis.com>
Date: Thu, 24 Feb 2022 12:38:29 +0100
Subject: [PATCH] net: stmmac: only enable DMA interrupts when ready
In this driver's ->ndo_open() callback, it enables DMA interrupts,
starts the DMA channels, then requests interrupts with request_irq(),
and then finally enables napi.
If RX DMA interrupts are received before napi is enabled, no processing
is done because napi_schedule_prep() will return false. If the network
has a lot of broadcast/multicast traffic, then the RX ring could fill up
completely before napi is enabled. When this happens, no further RX
interrupts will be delivered, and the driver will fail to receive any
packets.
Fix this by only enabling DMA interrupts after all other initialization
is complete.
Fixes: 523f11b5d4fd72efb ("net: stmmac: move hardware setup for stmmac_open to new function")
Reported-by: Lars Persson <larper(a)axis.com>
Signed-off-by: Vincent Whitchurch <vincent.whitchurch(a)axis.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index bde76ea2deec..cb9b6e08780c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2262,6 +2262,23 @@ static void stmmac_stop_tx_dma(struct stmmac_priv *priv, u32 chan)
stmmac_stop_tx(priv, priv->ioaddr, chan);
}
+static void stmmac_enable_all_dma_irq(struct stmmac_priv *priv)
+{
+ u32 rx_channels_count = priv->plat->rx_queues_to_use;
+ u32 tx_channels_count = priv->plat->tx_queues_to_use;
+ u32 dma_csr_ch = max(rx_channels_count, tx_channels_count);
+ u32 chan;
+
+ for (chan = 0; chan < dma_csr_ch; chan++) {
+ struct stmmac_channel *ch = &priv->channel[chan];
+ unsigned long flags;
+
+ spin_lock_irqsave(&ch->lock, flags);
+ stmmac_enable_dma_irq(priv, priv->ioaddr, chan, 1, 1);
+ spin_unlock_irqrestore(&ch->lock, flags);
+ }
+}
+
/**
* stmmac_start_all_dma - start all RX and TX DMA channels
* @priv: driver private structure
@@ -2904,8 +2921,10 @@ static int stmmac_init_dma_engine(struct stmmac_priv *priv)
stmmac_axi(priv, priv->ioaddr, priv->plat->axi);
/* DMA CSR Channel configuration */
- for (chan = 0; chan < dma_csr_ch; chan++)
+ for (chan = 0; chan < dma_csr_ch; chan++) {
stmmac_init_chan(priv, priv->ioaddr, priv->plat->dma_cfg, chan);
+ stmmac_disable_dma_irq(priv, priv->ioaddr, chan, 1, 1);
+ }
/* DMA RX Channel Configuration */
for (chan = 0; chan < rx_channels_count; chan++) {
@@ -3761,6 +3780,7 @@ static int stmmac_open(struct net_device *dev)
stmmac_enable_all_queues(priv);
netif_tx_start_all_queues(priv->dev);
+ stmmac_enable_all_dma_irq(priv);
return 0;
@@ -6510,8 +6530,10 @@ int stmmac_xdp_open(struct net_device *dev)
}
/* DMA CSR Channel configuration */
- for (chan = 0; chan < dma_csr_ch; chan++)
+ for (chan = 0; chan < dma_csr_ch; chan++) {
stmmac_init_chan(priv, priv->ioaddr, priv->plat->dma_cfg, chan);
+ stmmac_disable_dma_irq(priv, priv->ioaddr, chan, 1, 1);
+ }
/* Adjust Split header */
sph_en = (priv->hw->rx_csum > 0) && priv->sph;
@@ -6572,6 +6594,7 @@ int stmmac_xdp_open(struct net_device *dev)
stmmac_enable_all_queues(priv);
netif_carrier_on(dev);
netif_tx_start_all_queues(dev);
+ stmmac_enable_all_dma_irq(priv);
return 0;
@@ -7451,6 +7474,7 @@ int stmmac_resume(struct device *dev)
stmmac_restore_hw_vlan_rx_fltr(priv, ndev, priv->hw);
stmmac_enable_all_queues(priv);
+ stmmac_enable_all_dma_irq(priv);
mutex_unlock(&priv->lock);
rtnl_unlock();
The patch below does not apply to the 5.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 087a7b944c5db409f7c1a68bf4896c56ba54eaff Mon Sep 17 00:00:00 2001
From: Vincent Whitchurch <vincent.whitchurch(a)axis.com>
Date: Thu, 24 Feb 2022 12:38:29 +0100
Subject: [PATCH] net: stmmac: only enable DMA interrupts when ready
In this driver's ->ndo_open() callback, it enables DMA interrupts,
starts the DMA channels, then requests interrupts with request_irq(),
and then finally enables napi.
If RX DMA interrupts are received before napi is enabled, no processing
is done because napi_schedule_prep() will return false. If the network
has a lot of broadcast/multicast traffic, then the RX ring could fill up
completely before napi is enabled. When this happens, no further RX
interrupts will be delivered, and the driver will fail to receive any
packets.
Fix this by only enabling DMA interrupts after all other initialization
is complete.
Fixes: 523f11b5d4fd72efb ("net: stmmac: move hardware setup for stmmac_open to new function")
Reported-by: Lars Persson <larper(a)axis.com>
Signed-off-by: Vincent Whitchurch <vincent.whitchurch(a)axis.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index bde76ea2deec..cb9b6e08780c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2262,6 +2262,23 @@ static void stmmac_stop_tx_dma(struct stmmac_priv *priv, u32 chan)
stmmac_stop_tx(priv, priv->ioaddr, chan);
}
+static void stmmac_enable_all_dma_irq(struct stmmac_priv *priv)
+{
+ u32 rx_channels_count = priv->plat->rx_queues_to_use;
+ u32 tx_channels_count = priv->plat->tx_queues_to_use;
+ u32 dma_csr_ch = max(rx_channels_count, tx_channels_count);
+ u32 chan;
+
+ for (chan = 0; chan < dma_csr_ch; chan++) {
+ struct stmmac_channel *ch = &priv->channel[chan];
+ unsigned long flags;
+
+ spin_lock_irqsave(&ch->lock, flags);
+ stmmac_enable_dma_irq(priv, priv->ioaddr, chan, 1, 1);
+ spin_unlock_irqrestore(&ch->lock, flags);
+ }
+}
+
/**
* stmmac_start_all_dma - start all RX and TX DMA channels
* @priv: driver private structure
@@ -2904,8 +2921,10 @@ static int stmmac_init_dma_engine(struct stmmac_priv *priv)
stmmac_axi(priv, priv->ioaddr, priv->plat->axi);
/* DMA CSR Channel configuration */
- for (chan = 0; chan < dma_csr_ch; chan++)
+ for (chan = 0; chan < dma_csr_ch; chan++) {
stmmac_init_chan(priv, priv->ioaddr, priv->plat->dma_cfg, chan);
+ stmmac_disable_dma_irq(priv, priv->ioaddr, chan, 1, 1);
+ }
/* DMA RX Channel Configuration */
for (chan = 0; chan < rx_channels_count; chan++) {
@@ -3761,6 +3780,7 @@ static int stmmac_open(struct net_device *dev)
stmmac_enable_all_queues(priv);
netif_tx_start_all_queues(priv->dev);
+ stmmac_enable_all_dma_irq(priv);
return 0;
@@ -6510,8 +6530,10 @@ int stmmac_xdp_open(struct net_device *dev)
}
/* DMA CSR Channel configuration */
- for (chan = 0; chan < dma_csr_ch; chan++)
+ for (chan = 0; chan < dma_csr_ch; chan++) {
stmmac_init_chan(priv, priv->ioaddr, priv->plat->dma_cfg, chan);
+ stmmac_disable_dma_irq(priv, priv->ioaddr, chan, 1, 1);
+ }
/* Adjust Split header */
sph_en = (priv->hw->rx_csum > 0) && priv->sph;
@@ -6572,6 +6594,7 @@ int stmmac_xdp_open(struct net_device *dev)
stmmac_enable_all_queues(priv);
netif_carrier_on(dev);
netif_tx_start_all_queues(dev);
+ stmmac_enable_all_dma_irq(priv);
return 0;
@@ -7451,6 +7474,7 @@ int stmmac_resume(struct device *dev)
stmmac_restore_hw_vlan_rx_fltr(priv, ndev, priv->hw);
stmmac_enable_all_queues(priv);
+ stmmac_enable_all_dma_irq(priv);
mutex_unlock(&priv->lock);
rtnl_unlock();
The patch below does not apply to the 5.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 087a7b944c5db409f7c1a68bf4896c56ba54eaff Mon Sep 17 00:00:00 2001
From: Vincent Whitchurch <vincent.whitchurch(a)axis.com>
Date: Thu, 24 Feb 2022 12:38:29 +0100
Subject: [PATCH] net: stmmac: only enable DMA interrupts when ready
In this driver's ->ndo_open() callback, it enables DMA interrupts,
starts the DMA channels, then requests interrupts with request_irq(),
and then finally enables napi.
If RX DMA interrupts are received before napi is enabled, no processing
is done because napi_schedule_prep() will return false. If the network
has a lot of broadcast/multicast traffic, then the RX ring could fill up
completely before napi is enabled. When this happens, no further RX
interrupts will be delivered, and the driver will fail to receive any
packets.
Fix this by only enabling DMA interrupts after all other initialization
is complete.
Fixes: 523f11b5d4fd72efb ("net: stmmac: move hardware setup for stmmac_open to new function")
Reported-by: Lars Persson <larper(a)axis.com>
Signed-off-by: Vincent Whitchurch <vincent.whitchurch(a)axis.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index bde76ea2deec..cb9b6e08780c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2262,6 +2262,23 @@ static void stmmac_stop_tx_dma(struct stmmac_priv *priv, u32 chan)
stmmac_stop_tx(priv, priv->ioaddr, chan);
}
+static void stmmac_enable_all_dma_irq(struct stmmac_priv *priv)
+{
+ u32 rx_channels_count = priv->plat->rx_queues_to_use;
+ u32 tx_channels_count = priv->plat->tx_queues_to_use;
+ u32 dma_csr_ch = max(rx_channels_count, tx_channels_count);
+ u32 chan;
+
+ for (chan = 0; chan < dma_csr_ch; chan++) {
+ struct stmmac_channel *ch = &priv->channel[chan];
+ unsigned long flags;
+
+ spin_lock_irqsave(&ch->lock, flags);
+ stmmac_enable_dma_irq(priv, priv->ioaddr, chan, 1, 1);
+ spin_unlock_irqrestore(&ch->lock, flags);
+ }
+}
+
/**
* stmmac_start_all_dma - start all RX and TX DMA channels
* @priv: driver private structure
@@ -2904,8 +2921,10 @@ static int stmmac_init_dma_engine(struct stmmac_priv *priv)
stmmac_axi(priv, priv->ioaddr, priv->plat->axi);
/* DMA CSR Channel configuration */
- for (chan = 0; chan < dma_csr_ch; chan++)
+ for (chan = 0; chan < dma_csr_ch; chan++) {
stmmac_init_chan(priv, priv->ioaddr, priv->plat->dma_cfg, chan);
+ stmmac_disable_dma_irq(priv, priv->ioaddr, chan, 1, 1);
+ }
/* DMA RX Channel Configuration */
for (chan = 0; chan < rx_channels_count; chan++) {
@@ -3761,6 +3780,7 @@ static int stmmac_open(struct net_device *dev)
stmmac_enable_all_queues(priv);
netif_tx_start_all_queues(priv->dev);
+ stmmac_enable_all_dma_irq(priv);
return 0;
@@ -6510,8 +6530,10 @@ int stmmac_xdp_open(struct net_device *dev)
}
/* DMA CSR Channel configuration */
- for (chan = 0; chan < dma_csr_ch; chan++)
+ for (chan = 0; chan < dma_csr_ch; chan++) {
stmmac_init_chan(priv, priv->ioaddr, priv->plat->dma_cfg, chan);
+ stmmac_disable_dma_irq(priv, priv->ioaddr, chan, 1, 1);
+ }
/* Adjust Split header */
sph_en = (priv->hw->rx_csum > 0) && priv->sph;
@@ -6572,6 +6594,7 @@ int stmmac_xdp_open(struct net_device *dev)
stmmac_enable_all_queues(priv);
netif_carrier_on(dev);
netif_tx_start_all_queues(dev);
+ stmmac_enable_all_dma_irq(priv);
return 0;
@@ -7451,6 +7474,7 @@ int stmmac_resume(struct device *dev)
stmmac_restore_hw_vlan_rx_fltr(priv, ndev, priv->hw);
stmmac_enable_all_queues(priv);
+ stmmac_enable_all_dma_irq(priv);
mutex_unlock(&priv->lock);
rtnl_unlock();
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 47a1db8e797da01a1309bf42e0c0d771d4e4d4f3 Mon Sep 17 00:00:00 2001
From: Johan Hovold <johan(a)kernel.org>
Date: Wed, 1 Dec 2021 14:25:26 +0100
Subject: [PATCH] firmware: qemu_fw_cfg: fix kobject leak in probe error path
An initialised kobject must be freed using kobject_put() to avoid
leaking associated resources (e.g. the object name).
Commit fe3c60684377 ("firmware: Fix a reference count leak.") "fixed"
the leak in the first error path of the file registration helper but
left the second one unchanged. This "fix" would however result in a NULL
pointer dereference due to the release function also removing the never
added entry from the fw_cfg_entry_cache list. This has now been
addressed.
Fix the remaining kobject leak by restoring the common error path and
adding the missing kobject_put().
Fixes: 75f3e8e47f38 ("firmware: introduce sysfs driver for QEMU's fw_cfg device")
Cc: stable(a)vger.kernel.org # 4.6
Cc: Gabriel Somlo <somlo(a)cmu.edu>
Signed-off-by: Johan Hovold <johan(a)kernel.org>
Link: https://lore.kernel.org/r/20211201132528.30025-3-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
diff --git a/drivers/firmware/qemu_fw_cfg.c b/drivers/firmware/qemu_fw_cfg.c
index a9c64ebfc49a..ccb7ed62452f 100644
--- a/drivers/firmware/qemu_fw_cfg.c
+++ b/drivers/firmware/qemu_fw_cfg.c
@@ -603,15 +603,13 @@ static int fw_cfg_register_file(const struct fw_cfg_file *f)
/* register entry under "/sys/firmware/qemu_fw_cfg/by_key/" */
err = kobject_init_and_add(&entry->kobj, &fw_cfg_sysfs_entry_ktype,
fw_cfg_sel_ko, "%d", entry->select);
- if (err) {
- kobject_put(&entry->kobj);
- return err;
- }
+ if (err)
+ goto err_put_entry;
/* add raw binary content access */
err = sysfs_create_bin_file(&entry->kobj, &fw_cfg_sysfs_attr_raw);
if (err)
- goto err_add_raw;
+ goto err_del_entry;
/* try adding "/sys/firmware/qemu_fw_cfg/by_name/" symlink */
fw_cfg_build_symlink(fw_cfg_fname_kset, &entry->kobj, entry->name);
@@ -620,9 +618,10 @@ static int fw_cfg_register_file(const struct fw_cfg_file *f)
fw_cfg_sysfs_cache_enlist(entry);
return 0;
-err_add_raw:
+err_del_entry:
kobject_del(&entry->kobj);
- kfree(entry);
+err_put_entry:
+ kobject_put(&entry->kobj);
return err;
}
The patch below does not apply to the 4.19-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 23584c1ed3e15a6f4bfab8dc5a88d94ab929ee12 Mon Sep 17 00:00:00 2001
From: Lukas Wunner <lukas(a)wunner.de>
Date: Wed, 17 Nov 2021 23:22:09 +0100
Subject: [PATCH] PCI: pciehp: Fix infinite loop in IRQ handler upon power
fault
The Power Fault Detected bit in the Slot Status register differs from
all other hotplug events in that it is sticky: It can only be cleared
after turning off slot power. Per PCIe r5.0, sec. 6.7.1.8:
If a power controller detects a main power fault on the hot-plug slot,
it must automatically set its internal main power fault latch [...].
The main power fault latch is cleared when software turns off power to
the hot-plug slot.
The stickiness used to cause interrupt storms and infinite loops which
were fixed in 2009 by commits 5651c48cfafe ("PCI pciehp: fix power fault
interrupt storm problem") and 99f0169c17f3 ("PCI: pciehp: enable
software notification on empty slots").
Unfortunately in 2020 the infinite loop issue was inadvertently
reintroduced by commit 8edf5332c393 ("PCI: pciehp: Fix MSI interrupt
race"): The hardirq handler pciehp_isr() clears the PFD bit until
pciehp's power_fault_detected flag is set. That happens in the IRQ
thread pciehp_ist(), which never learns of the event because the hardirq
handler is stuck in an infinite loop. Fix by setting the
power_fault_detected flag already in the hardirq handler.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=214989
Link: https://lore.kernel.org/linux-pci/DM8PR11MB5702255A6A92F735D90A4446868B9@DM…
Fixes: 8edf5332c393 ("PCI: pciehp: Fix MSI interrupt race")
Link: https://lore.kernel.org/r/66eaeef31d4997ceea357ad93259f290ededecfd.16371872…
Reported-by: Joseph Bao <joseph.bao(a)intel.com>
Tested-by: Joseph Bao <joseph.bao(a)intel.com>
Signed-off-by: Lukas Wunner <lukas(a)wunner.de>
Signed-off-by: Bjorn Helgaas <bhelgaas(a)google.com>
Cc: stable(a)vger.kernel.org # v4.19+
Cc: Stuart Hayes <stuart.w.hayes(a)gmail.com>
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
index 83a0fa119cae..9535c61cbff3 100644
--- a/drivers/pci/hotplug/pciehp_hpc.c
+++ b/drivers/pci/hotplug/pciehp_hpc.c
@@ -642,6 +642,8 @@ static irqreturn_t pciehp_isr(int irq, void *dev_id)
*/
if (ctrl->power_fault_detected)
status &= ~PCI_EXP_SLTSTA_PFD;
+ else if (status & PCI_EXP_SLTSTA_PFD)
+ ctrl->power_fault_detected = true;
events |= status;
if (!events) {
@@ -651,7 +653,7 @@ static irqreturn_t pciehp_isr(int irq, void *dev_id)
}
if (status) {
- pcie_capability_write_word(pdev, PCI_EXP_SLTSTA, events);
+ pcie_capability_write_word(pdev, PCI_EXP_SLTSTA, status);
/*
* In MSI mode, all event bits must be zero before the port
@@ -725,8 +727,7 @@ static irqreturn_t pciehp_ist(int irq, void *dev_id)
}
/* Check Power Fault Detected */
- if ((events & PCI_EXP_SLTSTA_PFD) && !ctrl->power_fault_detected) {
- ctrl->power_fault_detected = 1;
+ if (events & PCI_EXP_SLTSTA_PFD) {
ctrl_err(ctrl, "Slot(%s): Power fault\n", slot_name(ctrl));
pciehp_set_indicators(ctrl, PCI_EXP_SLTCTL_PWR_IND_OFF,
PCI_EXP_SLTCTL_ATTN_IND_ON);
Commit b3612ccdf284 ("net: dsa: microchip: implement multi-bridge support")
plugged a packet leak between ports that were members of different bridges.
Unfortunately, this broke another use case, namely that of more than two
ports that are members of the same bridge.
After that commit, when a port is added to a bridge, hardware bridging
between other member ports of that bridge will be cleared, preventing
packet exchange between them.
Fix by ensuring that the Port VLAN Membership bitmap includes any existing
ports in the bridge, not just the port being added.
Upstream commit 3d00827a90db6f79abc7cdc553887f89a2e0a184, backported to 5.16.
Fixes: b3612ccdf284 ("net: dsa: microchip: implement multi-bridge support")
Signed-off-by: Svenning Sørensen <sss(a)secomea.com>
Tested-by: Oleksij Rempel <o.rempel(a)pengutronix.de>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
---
drivers/net/dsa/microchip/ksz_common.c | 26 +++++++++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)
diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c
index 8a04302018dc..7ab9ab58de65 100644
--- a/drivers/net/dsa/microchip/ksz_common.c
+++ b/drivers/net/dsa/microchip/ksz_common.c
@@ -26,7 +26,7 @@ void ksz_update_port_member(struct ksz_device *dev, int port)
struct dsa_switch *ds = dev->ds;
u8 port_member = 0, cpu_port;
const struct dsa_port *dp;
- int i;
+ int i, j;
if (!dsa_is_user_port(ds, port))
return;
@@ -45,13 +45,33 @@ void ksz_update_port_member(struct ksz_device *dev, int port)
continue;
if (!dp->bridge_dev || dp->bridge_dev != other_dp->bridge_dev)
continue;
+ if (other_p->stp_state != BR_STATE_FORWARDING)
+ continue;
- if (other_p->stp_state == BR_STATE_FORWARDING &&
- p->stp_state == BR_STATE_FORWARDING) {
+ if (p->stp_state == BR_STATE_FORWARDING) {
val |= BIT(port);
port_member |= BIT(i);
}
+ /* Retain port [i]'s relationship to other ports than [port] */
+ for (j = 0; j < ds->num_ports; j++) {
+ const struct dsa_port *third_dp;
+ struct ksz_port *third_p;
+
+ if (j == i)
+ continue;
+ if (j == port)
+ continue;
+ if (!dsa_is_user_port(ds, j))
+ continue;
+ third_p = &dev->ports[j];
+ if (third_p->stp_state != BR_STATE_FORWARDING)
+ continue;
+ third_dp = dsa_to_port(ds, j);
+ if (third_dp->bridge_dev == dp->bridge_dev)
+ val |= BIT(j);
+ }
+
dev->dev_ops->cfg_port_member(dev, i, val | cpu_port);
}
--
2.20.1
Hi Greg,
I'm sorry about the crippled patch in my last message.
Unfortunately, I have no other means than the MS webmail client to send mail,
and it seems it corrupts plain text when replying to a thread.
Therefore, I send this as a new message - I really hope it will work this time.
Best regards, Svenning
From: Brett Creeley <brett.creeley(a)intel.com>
commit e6ba5273d4ede03d075d7a116b8edad1f6115f4d upstream.
[I had to fix the cherry-pick manually as the patch added a line around
some context that was missing.]
The VF can be configured via the PF's ndo ops at the same time the PF is
receiving/handling virtchnl messages. This has many issues, with
one of them being the ndo op could be actively resetting a VF (i.e.
resetting it to the default state and deleting/re-adding the VF's VSI)
while a virtchnl message is being handled. The following error was seen
because a VF ndo op was used to change a VF's trust setting while the
VIRTCHNL_OP_CONFIG_VSI_QUEUES was ongoing:
[35274.192484] ice 0000:88:00.0: Failed to set LAN Tx queue context, error: ICE_ERR_PARAM
[35274.193074] ice 0000:88:00.0: VF 0 failed opcode 6, retval: -5
[35274.193640] iavf 0000:88:01.0: PF returned error -5 (IAVF_ERR_PARAM) to our request 6
Fix this by making sure the virtchnl handling and VF ndo ops that
trigger VF resets cannot run concurrently. This is done by adding a
struct mutex cfg_lock to each VF structure. For VF ndo ops, the mutex
will be locked around the critical operations and VFR. Since the ndo ops
will trigger a VFR, the virtchnl thread will use mutex_trylock(). This
is done because if any other thread (i.e. VF ndo op) has the mutex, then
that means the current VF message being handled is no longer valid, so
just ignore it.
This issue can be seen using the following commands:
for i in {0..50}; do
rmmod ice
modprobe ice
sleep 1
echo 1 > /sys/class/net/ens785f0/device/sriov_numvfs
echo 1 > /sys/class/net/ens785f1/device/sriov_numvfs
ip link set ens785f1 vf 0 trust on
ip link set ens785f0 vf 0 trust on
sleep 2
echo 0 > /sys/class/net/ens785f0/device/sriov_numvfs
echo 0 > /sys/class/net/ens785f1/device/sriov_numvfs
sleep 1
echo 1 > /sys/class/net/ens785f0/device/sriov_numvfs
echo 1 > /sys/class/net/ens785f1/device/sriov_numvfs
ip link set ens785f1 vf 0 trust on
ip link set ens785f0 vf 0 trust on
done
Fixes: 7c710869d64e ("ice: Add handlers for VF netdevice operations")
Cc: <stable(a)vger.kernel.org> # 5.8.x
Signed-off-by: Brett Creeley <brett.creeley(a)intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski(a)intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen(a)intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller(a)intel.com>
---
This is for stable trees 5.8 through 5.12. I sent patches for 5.13 and 5.14
separately since they have slightly different context
.../net/ethernet/intel/ice/ice_virtchnl_pf.c | 25 +++++++++++++++++++
.../net/ethernet/intel/ice/ice_virtchnl_pf.h | 5 ++++
2 files changed, 30 insertions(+)
diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
index 48dee9c5d534..66da8f540454 100644
--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
@@ -375,6 +375,8 @@ void ice_free_vfs(struct ice_pf *pf)
set_bit(ICE_VF_STATE_DIS, pf->vf[i].vf_states);
ice_free_vf_res(&pf->vf[i]);
}
+
+ mutex_destroy(&pf->vf[i].cfg_lock);
}
if (ice_sriov_free_msix_res(pf))
@@ -1556,6 +1558,8 @@ static void ice_set_dflt_settings_vfs(struct ice_pf *pf)
set_bit(ICE_VIRTCHNL_VF_CAP_L2, &vf->vf_caps);
vf->spoofchk = true;
vf->num_vf_qs = pf->num_qps_per_vf;
+
+ mutex_init(&vf->cfg_lock);
}
}
@@ -3389,6 +3393,8 @@ ice_set_vf_port_vlan(struct net_device *netdev, int vf_id, u16 vlan_id, u8 qos,
return 0;
}
+ mutex_lock(&vf->cfg_lock);
+
vf->port_vlan_info = vlanprio;
if (vf->port_vlan_info)
@@ -3398,6 +3404,7 @@ ice_set_vf_port_vlan(struct net_device *netdev, int vf_id, u16 vlan_id, u8 qos,
dev_info(dev, "Clearing port VLAN on VF %d\n", vf_id);
ice_vc_reset_vf(vf);
+ mutex_unlock(&vf->cfg_lock);
return 0;
}
@@ -3763,6 +3770,15 @@ void ice_vc_process_vf_msg(struct ice_pf *pf, struct ice_rq_event_info *event)
return;
}
+ /* VF is being configured in another context that triggers a VFR, so no
+ * need to process this message
+ */
+ if (!mutex_trylock(&vf->cfg_lock)) {
+ dev_info(dev, "VF %u is being configured in another context that will trigger a VFR, so there is no need to handle this message\n",
+ vf->vf_id);
+ return;
+ }
+
switch (v_opcode) {
case VIRTCHNL_OP_VERSION:
err = ice_vc_get_ver_msg(vf, msg);
@@ -3839,6 +3855,8 @@ void ice_vc_process_vf_msg(struct ice_pf *pf, struct ice_rq_event_info *event)
dev_info(dev, "PF failed to honor VF %d, opcode %d, error %d\n",
vf_id, v_opcode, err);
}
+
+ mutex_unlock(&vf->cfg_lock);
}
/**
@@ -3953,6 +3971,8 @@ int ice_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac)
return -EINVAL;
}
+ mutex_lock(&vf->cfg_lock);
+
/* VF is notified of its new MAC via the PF's response to the
* VIRTCHNL_OP_GET_VF_RESOURCES message after the VF has been reset
*/
@@ -3970,6 +3990,7 @@ int ice_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac)
}
ice_vc_reset_vf(vf);
+ mutex_unlock(&vf->cfg_lock);
return 0;
}
@@ -3999,11 +4020,15 @@ int ice_set_vf_trust(struct net_device *netdev, int vf_id, bool trusted)
if (trusted == vf->trusted)
return 0;
+ mutex_lock(&vf->cfg_lock);
+
vf->trusted = trusted;
ice_vc_reset_vf(vf);
dev_info(ice_pf_to_dev(pf), "VF %u is now %strusted\n",
vf_id, trusted ? "" : "un");
+ mutex_unlock(&vf->cfg_lock);
+
return 0;
}
diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h
index 0f519fba3770..59e5b4f16e96 100644
--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h
+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h
@@ -68,6 +68,11 @@ struct ice_mdd_vf_events {
struct ice_vf {
struct ice_pf *pf;
+ /* Used during virtchnl message handling and NDO ops against the VF
+ * that will trigger a VFR
+ */
+ struct mutex cfg_lock;
+
u16 vf_id; /* VF ID in the PF space */
u16 lan_vsi_idx; /* index into PF struct */
/* first vector index of this VF in the PF space */
--
2.35.1.355.ge7e302376dd6
From: Brett Creeley <brett.creeley(a)intel.com>
commit e6ba5273d4ede03d075d7a116b8edad1f6115f4d upstream.
[I had to fix the cherry-pick manually as the patch added a line around
some context that was missing.]
The VF can be configured via the PF's ndo ops at the same time the PF is
receiving/handling virtchnl messages. This has many issues, with
one of them being the ndo op could be actively resetting a VF (i.e.
resetting it to the default state and deleting/re-adding the VF's VSI)
while a virtchnl message is being handled. The following error was seen
because a VF ndo op was used to change a VF's trust setting while the
VIRTCHNL_OP_CONFIG_VSI_QUEUES was ongoing:
[35274.192484] ice 0000:88:00.0: Failed to set LAN Tx queue context, error: ICE_ERR_PARAM
[35274.193074] ice 0000:88:00.0: VF 0 failed opcode 6, retval: -5
[35274.193640] iavf 0000:88:01.0: PF returned error -5 (IAVF_ERR_PARAM) to our request 6
Fix this by making sure the virtchnl handling and VF ndo ops that
trigger VF resets cannot run concurrently. This is done by adding a
struct mutex cfg_lock to each VF structure. For VF ndo ops, the mutex
will be locked around the critical operations and VFR. Since the ndo ops
will trigger a VFR, the virtchnl thread will use mutex_trylock(). This
is done because if any other thread (i.e. VF ndo op) has the mutex, then
that means the current VF message being handled is no longer valid, so
just ignore it.
This issue can be seen using the following commands:
for i in {0..50}; do
rmmod ice
modprobe ice
sleep 1
echo 1 > /sys/class/net/ens785f0/device/sriov_numvfs
echo 1 > /sys/class/net/ens785f1/device/sriov_numvfs
ip link set ens785f1 vf 0 trust on
ip link set ens785f0 vf 0 trust on
sleep 2
echo 0 > /sys/class/net/ens785f0/device/sriov_numvfs
echo 0 > /sys/class/net/ens785f1/device/sriov_numvfs
sleep 1
echo 1 > /sys/class/net/ens785f0/device/sriov_numvfs
echo 1 > /sys/class/net/ens785f1/device/sriov_numvfs
ip link set ens785f1 vf 0 trust on
ip link set ens785f0 vf 0 trust on
done
Fixes: 7c710869d64e ("ice: Add handlers for VF netdevice operations")
Cc: <stable(a)vger.kernel.org> # 5.13.x
Signed-off-by: Brett Creeley <brett.creeley(a)intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski(a)intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen(a)intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller(a)intel.com>
---
This should apply to 5.13
.../net/ethernet/intel/ice/ice_virtchnl_pf.c | 25 +++++++++++++++++++
.../net/ethernet/intel/ice/ice_virtchnl_pf.h | 5 ++++
2 files changed, 30 insertions(+)
diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
index 671902d9fc35..2629d670bbbf 100644
--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
@@ -647,6 +647,8 @@ void ice_free_vfs(struct ice_pf *pf)
set_bit(ICE_VF_STATE_DIS, pf->vf[i].vf_states);
ice_free_vf_res(&pf->vf[i]);
}
+
+ mutex_destroy(&pf->vf[i].cfg_lock);
}
if (ice_sriov_free_msix_res(pf))
@@ -1893,6 +1895,8 @@ static void ice_set_dflt_settings_vfs(struct ice_pf *pf)
*/
ice_vf_ctrl_invalidate_vsi(vf);
ice_vf_fdir_init(vf);
+
+ mutex_init(&vf->cfg_lock);
}
}
@@ -3955,6 +3959,8 @@ ice_set_vf_port_vlan(struct net_device *netdev, int vf_id, u16 vlan_id, u8 qos,
return 0;
}
+ mutex_lock(&vf->cfg_lock);
+
vf->port_vlan_info = vlanprio;
if (vf->port_vlan_info)
@@ -3964,6 +3970,7 @@ ice_set_vf_port_vlan(struct net_device *netdev, int vf_id, u16 vlan_id, u8 qos,
dev_info(dev, "Clearing port VLAN on VF %d\n", vf_id);
ice_vc_reset_vf(vf);
+ mutex_unlock(&vf->cfg_lock);
return 0;
}
@@ -4338,6 +4345,15 @@ void ice_vc_process_vf_msg(struct ice_pf *pf, struct ice_rq_event_info *event)
return;
}
+ /* VF is being configured in another context that triggers a VFR, so no
+ * need to process this message
+ */
+ if (!mutex_trylock(&vf->cfg_lock)) {
+ dev_info(dev, "VF %u is being configured in another context that will trigger a VFR, so there is no need to handle this message\n",
+ vf->vf_id);
+ return;
+ }
+
switch (v_opcode) {
case VIRTCHNL_OP_VERSION:
err = ice_vc_get_ver_msg(vf, msg);
@@ -4426,6 +4442,8 @@ void ice_vc_process_vf_msg(struct ice_pf *pf, struct ice_rq_event_info *event)
dev_info(dev, "PF failed to honor VF %d, opcode %d, error %d\n",
vf_id, v_opcode, err);
}
+
+ mutex_unlock(&vf->cfg_lock);
}
/**
@@ -4540,6 +4558,8 @@ int ice_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac)
return -EINVAL;
}
+ mutex_lock(&vf->cfg_lock);
+
/* VF is notified of its new MAC via the PF's response to the
* VIRTCHNL_OP_GET_VF_RESOURCES message after the VF has been reset
*/
@@ -4557,6 +4577,7 @@ int ice_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac)
}
ice_vc_reset_vf(vf);
+ mutex_unlock(&vf->cfg_lock);
return 0;
}
@@ -4586,11 +4607,15 @@ int ice_set_vf_trust(struct net_device *netdev, int vf_id, bool trusted)
if (trusted == vf->trusted)
return 0;
+ mutex_lock(&vf->cfg_lock);
+
vf->trusted = trusted;
ice_vc_reset_vf(vf);
dev_info(ice_pf_to_dev(pf), "VF %u is now %strusted\n",
vf_id, trusted ? "" : "un");
+ mutex_unlock(&vf->cfg_lock);
+
return 0;
}
diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h
index d800ed83d6c3..3da39d63a24b 100644
--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h
+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h
@@ -69,6 +69,11 @@ struct ice_mdd_vf_events {
struct ice_vf {
struct ice_pf *pf;
+ /* Used during virtchnl message handling and NDO ops against the VF
+ * that will trigger a VFR
+ */
+ struct mutex cfg_lock;
+
u16 vf_id; /* VF ID in the PF space */
u16 lan_vsi_idx; /* index into PF struct */
u16 ctrl_vsi_idx;
--
2.35.1.355.ge7e302376dd6
commit 59348401ebed ("platform/x86: amd-pmc: Add special handling for
timer based S0i3 wakeup") adds support for using another platform timer
in lieu of the RTC which doesn't work properly on some systems. This path
was validated and worked well before submission. During the 5.16-rc1 merge
window other patches were merged that caused this to stop working properly.
When this feature was used with 5.16-rc1 or later some OEM laptops with the
matching firmware requirements from that commit would shutdown instead of
program a timer based wakeup.
This was bisected to commit 8d89835b0467 ("PM: suspend: Do not pause
cpuidle in the suspend-to-idle path"). This wasn't supposed to cause any
negative impacts and also tested well on both Intel and ARM platforms.
However this changed the semantics of when CPUs are allowed to be in the
deepest state. For the AMD systems in question it appears this causes a
firmware crash for timer based wakeup.
It's hypothesized to be caused by the `amd-pmc` driver sending `OS_HINT`
and all the CPUs going into a deep state while the timer is still being
programmed. It's likely a firmware bug, but to avoid it don't allow setting
CPUs into the deepest state while using CZN timer wakeup path.
If later it's discovered that this also occurs from "regular" suspends
without a timer as well or on other silicon, this may be later expanded to
run in the suspend path for more scenarios.
Cc: stable(a)vger.kernel.org # 5.16+
Suggested-by: Rafael J. Wysocki <rafael.j.wysocki(a)intel.com>
Link: https://lore.kernel.org/linux-acpi/BL1PR12MB51570F5BD05980A0DCA1F3F4E23A9@B…
Fixes: 8d89835b0467 ("PM: suspend: Do not pause cpuidle in the suspend-to-idle path")
Fixes: 23f62d7ab25b ("PM: sleep: Pause cpuidle later and resume it earlier during system transitions")
Fixes: 59348401ebed ("platform/x86: amd-pmc: Add special handling for timer based S0i3 wakeup"
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki(a)intel.com>
Signed-off-by: Mario Limonciello <mario.limonciello(a)amd.com>
Link: https://lore.kernel.org/r/20220223175237.6209-1-mario.limonciello@amd.com
Reviewed-by: Hans de Goede <hdegoede(a)redhat.com>
Signed-off-by: Hans de Goede <hdegoede(a)redhat.com>
(cherry picked from commit 68af28426b3ca1bf9ba21c7d8bdd0ff639e5134c)
---
This didn't apply cleanly to 5.16.y because 5.16.y doesn't contain the STB
feature. Manually fixed up the commit for this.
This is *only* intended for 5.16.
drivers/platform/x86/amd-pmc.c | 34 ++++++++++++++++++++++++++++++----
1 file changed, 30 insertions(+), 4 deletions(-)
diff --git a/drivers/platform/x86/amd-pmc.c b/drivers/platform/x86/amd-pmc.c
index 8c74733530e3..11d0f829302b 100644
--- a/drivers/platform/x86/amd-pmc.c
+++ b/drivers/platform/x86/amd-pmc.c
@@ -21,6 +21,7 @@
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/platform_device.h>
+#include <linux/pm_qos.h>
#include <linux/rtc.h>
#include <linux/suspend.h>
#include <linux/seq_file.h>
@@ -79,6 +80,9 @@
#define PMC_MSG_DELAY_MIN_US 50
#define RESPONSE_REGISTER_LOOP_MAX 20000
+/* QoS request for letting CPUs in idle states, but not the deepest */
+#define AMD_PMC_MAX_IDLE_STATE_LATENCY 3
+
#define SOC_SUBSYSTEM_IP_MAX 12
#define DELAY_MIN_US 2000
#define DELAY_MAX_US 3000
@@ -123,6 +127,7 @@ struct amd_pmc_dev {
u8 rev;
struct device *dev;
struct mutex lock; /* generic mutex lock */
+ struct pm_qos_request amd_pmc_pm_qos_req;
#if IS_ENABLED(CONFIG_DEBUG_FS)
struct dentry *dbgfs_dir;
#endif /* CONFIG_DEBUG_FS */
@@ -459,6 +464,14 @@ static int amd_pmc_verify_czn_rtc(struct amd_pmc_dev *pdev, u32 *arg)
rc = rtc_alarm_irq_enable(rtc_device, 0);
dev_dbg(pdev->dev, "wakeup timer programmed for %lld seconds\n", duration);
+ /*
+ * Prevent CPUs from getting into deep idle states while sending OS_HINT
+ * which is otherwise generally safe to send when at least one of the CPUs
+ * is not in deep idle states.
+ */
+ cpu_latency_qos_update_request(&pdev->amd_pmc_pm_qos_req, AMD_PMC_MAX_IDLE_STATE_LATENCY);
+ wake_up_all_idle_cpus();
+
return rc;
}
@@ -476,17 +489,24 @@ static int __maybe_unused amd_pmc_suspend(struct device *dev)
/* Activate CZN specific RTC functionality */
if (pdev->cpu_id == AMD_CPU_ID_CZN) {
rc = amd_pmc_verify_czn_rtc(pdev, &arg);
- if (rc < 0)
- return rc;
+ if (rc)
+ goto fail;
}
/* Dump the IdleMask before we send hint to SMU */
amd_pmc_idlemask_read(pdev, dev, NULL);
msg = amd_pmc_get_os_hint(pdev);
rc = amd_pmc_send_cmd(pdev, arg, NULL, msg, 0);
- if (rc)
+ if (rc) {
dev_err(pdev->dev, "suspend failed\n");
+ goto fail;
+ }
+ return 0;
+fail:
+ if (pdev->cpu_id == AMD_CPU_ID_CZN)
+ cpu_latency_qos_update_request(&pdev->amd_pmc_pm_qos_req,
+ PM_QOS_DEFAULT_VALUE);
return rc;
}
@@ -507,7 +527,12 @@ static int __maybe_unused amd_pmc_resume(struct device *dev)
/* Dump the IdleMask to see the blockers */
amd_pmc_idlemask_read(pdev, dev, NULL);
- return 0;
+ /* Restore the QoS request back to defaults if it was set */
+ if (pdev->cpu_id == AMD_CPU_ID_CZN)
+ cpu_latency_qos_update_request(&pdev->amd_pmc_pm_qos_req,
+ PM_QOS_DEFAULT_VALUE);
+
+ return rc;
}
static const struct dev_pm_ops amd_pmc_pm_ops = {
@@ -597,6 +622,7 @@ static int amd_pmc_probe(struct platform_device *pdev)
amd_pmc_get_smu_version(dev);
platform_set_drvdata(pdev, dev);
amd_pmc_dbgfs_register(dev);
+ cpu_latency_qos_add_request(&dev->amd_pmc_pm_qos_req, PM_QOS_DEFAULT_VALUE);
return 0;
}
--
2.34.1
From: Frederic Weisbecker <frederic(a)kernel.org>
commit b2fcf2102049f6e56981e0ab3d9b633b8e2741da upstream.
This sequence of events can lead to a failure to requeue a CPU's
->nocb_timer:
1. There are no callbacks queued for any CPU covered by CPU 0-2's
->nocb_gp_kthread. Note that ->nocb_gp_kthread is associated
with CPU 0.
2. CPU 1 enqueues its first callback with interrupts disabled, and
thus must defer awakening its ->nocb_gp_kthread. It therefore
queues its rcu_data structure's ->nocb_timer. At this point,
CPU 1's rdp->nocb_defer_wakeup is RCU_NOCB_WAKE.
3. CPU 2, which shares the same ->nocb_gp_kthread, also enqueues a
callback, but with interrupts enabled, allowing it to directly
awaken the ->nocb_gp_kthread.
4. The newly awakened ->nocb_gp_kthread associates both CPU 1's
and CPU 2's callbacks with a future grace period and arranges
for that grace period to be started.
5. This ->nocb_gp_kthread goes to sleep waiting for the end of this
future grace period.
6. This grace period elapses before the CPU 1's timer fires.
This is normally improbably given that the timer is set for only
one jiffy, but timers can be delayed. Besides, it is possible
that kernel was built with CONFIG_RCU_STRICT_GRACE_PERIOD=y.
7. The grace period ends, so rcu_gp_kthread awakens the
->nocb_gp_kthread, which in turn awakens both CPU 1's and
CPU 2's ->nocb_cb_kthread. Then ->nocb_gb_kthread sleeps
waiting for more newly queued callbacks.
8. CPU 1's ->nocb_cb_kthread invokes its callback, then sleeps
waiting for more invocable callbacks.
9. Note that neither kthread updated any ->nocb_timer state,
so CPU 1's ->nocb_defer_wakeup is still set to RCU_NOCB_WAKE.
10. CPU 1 enqueues its second callback, this time with interrupts
enabled so it can wake directly ->nocb_gp_kthread.
It does so with calling wake_nocb_gp() which also cancels the
pending timer that got queued in step 2. But that doesn't reset
CPU 1's ->nocb_defer_wakeup which is still set to RCU_NOCB_WAKE.
So CPU 1's ->nocb_defer_wakeup and its ->nocb_timer are now
desynchronized.
11. ->nocb_gp_kthread associates the callback queued in 10 with a new
grace period, arranges for that grace period to start and sleeps
waiting for it to complete.
12. The grace period ends, rcu_gp_kthread awakens ->nocb_gp_kthread,
which in turn wakes up CPU 1's ->nocb_cb_kthread which then
invokes the callback queued in 10.
13. CPU 1 enqueues its third callback, this time with interrupts
disabled so it must queue a timer for a deferred wakeup. However
the value of its ->nocb_defer_wakeup is RCU_NOCB_WAKE which
incorrectly indicates that a timer is already queued. Instead,
CPU 1's ->nocb_timer was cancelled in 10. CPU 1 therefore fails
to queue the ->nocb_timer.
14. CPU 1 has its pending callback and it may go unnoticed until
some other CPU ever wakes up ->nocb_gp_kthread or CPU 1 ever
calls an explicit deferred wakeup, for example, during idle entry.
This commit fixes this bug by resetting rdp->nocb_defer_wakeup everytime
we delete the ->nocb_timer.
It is quite possible that there is a similar scenario involving
->nocb_bypass_timer and ->nocb_defer_wakeup. However, despite some
effort from several people, a failure scenario has not yet been located.
However, that by no means guarantees that no such scenario exists.
Finding a failure scenario is left as an exercise for the reader, and the
"Fixes:" tag below relates to ->nocb_bypass_timer instead of ->nocb_timer.
Fixes: d1b222c6be1f (rcu/nocb: Add bypass callback queueing)
Cc: <stable(a)vger.kernel.org>
Cc: Josh Triplett <josh(a)joshtriplett.org>
Cc: Lai Jiangshan <jiangshanlai(a)gmail.com>
Cc: Joel Fernandes <joel(a)joelfernandes.org>
Cc: Boqun Feng <boqun.feng(a)gmail.com>
Reviewed-by: Neeraj Upadhyay <neeraju(a)codeaurora.org>
Signed-off-by: Frederic Weisbecker <frederic(a)kernel.org>
Signed-off-by: Paul E. McKenney <paulmck(a)kernel.org>
Conflicts:
kernel/rcu/tree_plugin.h
Signed-off-by: Zhen Lei <thunder.leizhen(a)huawei.com>
---
kernel/rcu/tree_plugin.h | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 244f32e98360fdf..658427c33b9370e 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -1646,7 +1646,11 @@ static void wake_nocb_gp(struct rcu_data *rdp, bool force,
rcu_nocb_unlock_irqrestore(rdp, flags);
return;
}
- del_timer(&rdp->nocb_timer);
+
+ if (READ_ONCE(rdp->nocb_defer_wakeup) > RCU_NOCB_WAKE_NOT) {
+ WRITE_ONCE(rdp->nocb_defer_wakeup, RCU_NOCB_WAKE_NOT);
+ del_timer(&rdp->nocb_timer);
+ }
rcu_nocb_unlock_irqrestore(rdp, flags);
raw_spin_lock_irqsave(&rdp_gp->nocb_gp_lock, flags);
if (force || READ_ONCE(rdp_gp->nocb_gp_sleep)) {
@@ -2164,7 +2168,6 @@ static void do_nocb_deferred_wakeup_common(struct rcu_data *rdp)
return;
}
ndw = READ_ONCE(rdp->nocb_defer_wakeup);
- WRITE_ONCE(rdp->nocb_defer_wakeup, RCU_NOCB_WAKE_NOT);
wake_nocb_gp(rdp, ndw == RCU_NOCB_WAKE_FORCE, flags);
trace_rcu_nocb_wake(rcu_state.name, rdp->cpu, TPS("DeferredWake"));
}
--
2.26.0.106.g9fadedd
The patch below does not apply to the 5.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 9f1c50cf39167ff71dc5953a3234f3f6eeb8fcb5 Mon Sep 17 00:00:00 2001
From: "D. Wythe" <alibuda(a)linux.alibaba.com>
Date: Thu, 24 Feb 2022 23:26:19 +0800
Subject: [PATCH] net/smc: fix connection leak
There's a potential leak issue under following execution sequence :
smc_release smc_connect_work
if (sk->sk_state == SMC_INIT)
send_clc_confirim
tcp_abort();
...
sk.sk_state = SMC_ACTIVE
smc_close_active
switch(sk->sk_state) {
...
case SMC_ACTIVE:
smc_close_final()
// then wait peer closed
Unfortunately, tcp_abort() may discard CLC CONFIRM messages that are
still in the tcp send buffer, in which case our connection token cannot
be delivered to the server side, which means that we cannot get a
passive close message at all. Therefore, it is impossible for the to be
disconnected at all.
This patch tries a very simple way to avoid this issue, once the state
has changed to SMC_ACTIVE after tcp_abort(), we can actively abort the
smc connection, considering that the state is SMC_INIT before
tcp_abort(), abandoning the complete disconnection process should not
cause too much problem.
In fact, this problem may exist as long as the CLC CONFIRM message is
not received by the server. Whether a timer should be added after
smc_close_final() needs to be discussed in the future. But even so, this
patch provides a faster release for connection in above case, it should
also be valuable.
Fixes: 39f41f367b08 ("net/smc: common release code for non-accepted sockets")
Signed-off-by: D. Wythe <alibuda(a)linux.alibaba.com>
Acked-by: Karsten Graul <kgraul(a)linux.ibm.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c
index 306d9e8cd1dd..81984c1c0e78 100644
--- a/net/smc/af_smc.c
+++ b/net/smc/af_smc.c
@@ -183,7 +183,7 @@ static int smc_release(struct socket *sock)
{
struct sock *sk = sock->sk;
struct smc_sock *smc;
- int rc = 0;
+ int old_state, rc = 0;
if (!sk)
goto out;
@@ -191,8 +191,10 @@ static int smc_release(struct socket *sock)
sock_hold(sk); /* sock_put below */
smc = smc_sk(sk);
+ old_state = sk->sk_state;
+
/* cleanup for a dangling non-blocking connect */
- if (smc->connect_nonblock && sk->sk_state == SMC_INIT)
+ if (smc->connect_nonblock && old_state == SMC_INIT)
tcp_abort(smc->clcsock->sk, ECONNABORTED);
if (cancel_work_sync(&smc->connect_work))
@@ -206,6 +208,10 @@ static int smc_release(struct socket *sock)
else
lock_sock(sk);
+ if (old_state == SMC_INIT && sk->sk_state == SMC_ACTIVE &&
+ !smc->use_fallback)
+ smc_close_active_abort(smc);
+
rc = __smc_release(smc);
/* detach socket */
The patch below does not apply to the 5.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 9995b408f17ff8c7f11bc725c8aa225ba3a63b1c Mon Sep 17 00:00:00 2001
From: "j.nixdorf(a)avm.de" <j.nixdorf(a)avm.de>
Date: Thu, 24 Feb 2022 10:06:49 +0100
Subject: [PATCH] net: ipv6: ensure we call ipv6_mc_down() at most once
There are two reasons for addrconf_notify() to be called with NETDEV_DOWN:
either the network device is actually going down, or IPv6 was disabled
on the interface.
If either of them stays down while the other is toggled, we repeatedly
call the code for NETDEV_DOWN, including ipv6_mc_down(), while never
calling the corresponding ipv6_mc_up() in between. This will cause a
new entry in idev->mc_tomb to be allocated for each multicast group
the interface is subscribed to, which in turn leaks one struct ifmcaddr6
per nontrivial multicast group the interface is subscribed to.
The following reproducer will leak at least $n objects:
ip addr add ff2e::4242/32 dev eth0 autojoin
sysctl -w net.ipv6.conf.eth0.disable_ipv6=1
for i in $(seq 1 $n); do
ip link set up eth0; ip link set down eth0
done
Joining groups with IPV6_ADD_MEMBERSHIP (unprivileged) or setting the
sysctl net.ipv6.conf.eth0.forwarding to 1 (=> subscribing to ff02::2)
can also be used to create a nontrivial idev->mc_list, which will the
leak objects with the right up-down-sequence.
Based on both sources for NETDEV_DOWN events the interface IPv6 state
should be considered:
- not ready if the network interface is not ready OR IPv6 is disabled
for it
- ready if the network interface is ready AND IPv6 is enabled for it
The functions ipv6_mc_up() and ipv6_down() should only be run when this
state changes.
Implement this by remembering when the IPv6 state is ready, and only
run ipv6_mc_down() if it actually changed from ready to not ready.
The other direction (not ready -> ready) already works correctly, as:
- the interface notification triggered codepath for NETDEV_UP /
NETDEV_CHANGE returns early if ipv6 is disabled, and
- the disable_ipv6=0 triggered codepath skips fully initializing the
interface as long as addrconf_link_ready(dev) returns false
- calling ipv6_mc_up() repeatedly does not leak anything
Fixes: 3ce62a84d53c ("ipv6: exit early in addrconf_notify() if IPv6 is disabled")
Signed-off-by: Johannes Nixdorf <j.nixdorf(a)avm.de>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 6c8ab3e6e6fe..f908e2fd30b2 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -3732,6 +3732,7 @@ static int addrconf_ifdown(struct net_device *dev, bool unregister)
struct inet6_dev *idev;
struct inet6_ifaddr *ifa, *tmp;
bool keep_addr = false;
+ bool was_ready;
int state, i;
ASSERT_RTNL();
@@ -3797,7 +3798,10 @@ static int addrconf_ifdown(struct net_device *dev, bool unregister)
addrconf_del_rs_timer(idev);
- /* Step 2: clear flags for stateless addrconf */
+ /* Step 2: clear flags for stateless addrconf, repeated down
+ * detection
+ */
+ was_ready = idev->if_flags & IF_READY;
if (!unregister)
idev->if_flags &= ~(IF_RS_SENT|IF_RA_RCVD|IF_READY);
@@ -3871,7 +3875,7 @@ static int addrconf_ifdown(struct net_device *dev, bool unregister)
if (unregister) {
ipv6_ac_destroy_dev(idev);
ipv6_mc_destroy_dev(idev);
- } else {
+ } else if (was_ready) {
ipv6_mc_down(idev);
}
The patch below does not apply to the 4.19-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 9995b408f17ff8c7f11bc725c8aa225ba3a63b1c Mon Sep 17 00:00:00 2001
From: "j.nixdorf(a)avm.de" <j.nixdorf(a)avm.de>
Date: Thu, 24 Feb 2022 10:06:49 +0100
Subject: [PATCH] net: ipv6: ensure we call ipv6_mc_down() at most once
There are two reasons for addrconf_notify() to be called with NETDEV_DOWN:
either the network device is actually going down, or IPv6 was disabled
on the interface.
If either of them stays down while the other is toggled, we repeatedly
call the code for NETDEV_DOWN, including ipv6_mc_down(), while never
calling the corresponding ipv6_mc_up() in between. This will cause a
new entry in idev->mc_tomb to be allocated for each multicast group
the interface is subscribed to, which in turn leaks one struct ifmcaddr6
per nontrivial multicast group the interface is subscribed to.
The following reproducer will leak at least $n objects:
ip addr add ff2e::4242/32 dev eth0 autojoin
sysctl -w net.ipv6.conf.eth0.disable_ipv6=1
for i in $(seq 1 $n); do
ip link set up eth0; ip link set down eth0
done
Joining groups with IPV6_ADD_MEMBERSHIP (unprivileged) or setting the
sysctl net.ipv6.conf.eth0.forwarding to 1 (=> subscribing to ff02::2)
can also be used to create a nontrivial idev->mc_list, which will the
leak objects with the right up-down-sequence.
Based on both sources for NETDEV_DOWN events the interface IPv6 state
should be considered:
- not ready if the network interface is not ready OR IPv6 is disabled
for it
- ready if the network interface is ready AND IPv6 is enabled for it
The functions ipv6_mc_up() and ipv6_down() should only be run when this
state changes.
Implement this by remembering when the IPv6 state is ready, and only
run ipv6_mc_down() if it actually changed from ready to not ready.
The other direction (not ready -> ready) already works correctly, as:
- the interface notification triggered codepath for NETDEV_UP /
NETDEV_CHANGE returns early if ipv6 is disabled, and
- the disable_ipv6=0 triggered codepath skips fully initializing the
interface as long as addrconf_link_ready(dev) returns false
- calling ipv6_mc_up() repeatedly does not leak anything
Fixes: 3ce62a84d53c ("ipv6: exit early in addrconf_notify() if IPv6 is disabled")
Signed-off-by: Johannes Nixdorf <j.nixdorf(a)avm.de>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 6c8ab3e6e6fe..f908e2fd30b2 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -3732,6 +3732,7 @@ static int addrconf_ifdown(struct net_device *dev, bool unregister)
struct inet6_dev *idev;
struct inet6_ifaddr *ifa, *tmp;
bool keep_addr = false;
+ bool was_ready;
int state, i;
ASSERT_RTNL();
@@ -3797,7 +3798,10 @@ static int addrconf_ifdown(struct net_device *dev, bool unregister)
addrconf_del_rs_timer(idev);
- /* Step 2: clear flags for stateless addrconf */
+ /* Step 2: clear flags for stateless addrconf, repeated down
+ * detection
+ */
+ was_ready = idev->if_flags & IF_READY;
if (!unregister)
idev->if_flags &= ~(IF_RS_SENT|IF_RA_RCVD|IF_READY);
@@ -3871,7 +3875,7 @@ static int addrconf_ifdown(struct net_device *dev, bool unregister)
if (unregister) {
ipv6_ac_destroy_dev(idev);
ipv6_mc_destroy_dev(idev);
- } else {
+ } else if (was_ready) {
ipv6_mc_down(idev);
}
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 9995b408f17ff8c7f11bc725c8aa225ba3a63b1c Mon Sep 17 00:00:00 2001
From: "j.nixdorf(a)avm.de" <j.nixdorf(a)avm.de>
Date: Thu, 24 Feb 2022 10:06:49 +0100
Subject: [PATCH] net: ipv6: ensure we call ipv6_mc_down() at most once
There are two reasons for addrconf_notify() to be called with NETDEV_DOWN:
either the network device is actually going down, or IPv6 was disabled
on the interface.
If either of them stays down while the other is toggled, we repeatedly
call the code for NETDEV_DOWN, including ipv6_mc_down(), while never
calling the corresponding ipv6_mc_up() in between. This will cause a
new entry in idev->mc_tomb to be allocated for each multicast group
the interface is subscribed to, which in turn leaks one struct ifmcaddr6
per nontrivial multicast group the interface is subscribed to.
The following reproducer will leak at least $n objects:
ip addr add ff2e::4242/32 dev eth0 autojoin
sysctl -w net.ipv6.conf.eth0.disable_ipv6=1
for i in $(seq 1 $n); do
ip link set up eth0; ip link set down eth0
done
Joining groups with IPV6_ADD_MEMBERSHIP (unprivileged) or setting the
sysctl net.ipv6.conf.eth0.forwarding to 1 (=> subscribing to ff02::2)
can also be used to create a nontrivial idev->mc_list, which will the
leak objects with the right up-down-sequence.
Based on both sources for NETDEV_DOWN events the interface IPv6 state
should be considered:
- not ready if the network interface is not ready OR IPv6 is disabled
for it
- ready if the network interface is ready AND IPv6 is enabled for it
The functions ipv6_mc_up() and ipv6_down() should only be run when this
state changes.
Implement this by remembering when the IPv6 state is ready, and only
run ipv6_mc_down() if it actually changed from ready to not ready.
The other direction (not ready -> ready) already works correctly, as:
- the interface notification triggered codepath for NETDEV_UP /
NETDEV_CHANGE returns early if ipv6 is disabled, and
- the disable_ipv6=0 triggered codepath skips fully initializing the
interface as long as addrconf_link_ready(dev) returns false
- calling ipv6_mc_up() repeatedly does not leak anything
Fixes: 3ce62a84d53c ("ipv6: exit early in addrconf_notify() if IPv6 is disabled")
Signed-off-by: Johannes Nixdorf <j.nixdorf(a)avm.de>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 6c8ab3e6e6fe..f908e2fd30b2 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -3732,6 +3732,7 @@ static int addrconf_ifdown(struct net_device *dev, bool unregister)
struct inet6_dev *idev;
struct inet6_ifaddr *ifa, *tmp;
bool keep_addr = false;
+ bool was_ready;
int state, i;
ASSERT_RTNL();
@@ -3797,7 +3798,10 @@ static int addrconf_ifdown(struct net_device *dev, bool unregister)
addrconf_del_rs_timer(idev);
- /* Step 2: clear flags for stateless addrconf */
+ /* Step 2: clear flags for stateless addrconf, repeated down
+ * detection
+ */
+ was_ready = idev->if_flags & IF_READY;
if (!unregister)
idev->if_flags &= ~(IF_RS_SENT|IF_RA_RCVD|IF_READY);
@@ -3871,7 +3875,7 @@ static int addrconf_ifdown(struct net_device *dev, bool unregister)
if (unregister) {
ipv6_ac_destroy_dev(idev);
ipv6_mc_destroy_dev(idev);
- } else {
+ } else if (was_ready) {
ipv6_mc_down(idev);
}
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 9995b408f17ff8c7f11bc725c8aa225ba3a63b1c Mon Sep 17 00:00:00 2001
From: "j.nixdorf(a)avm.de" <j.nixdorf(a)avm.de>
Date: Thu, 24 Feb 2022 10:06:49 +0100
Subject: [PATCH] net: ipv6: ensure we call ipv6_mc_down() at most once
There are two reasons for addrconf_notify() to be called with NETDEV_DOWN:
either the network device is actually going down, or IPv6 was disabled
on the interface.
If either of them stays down while the other is toggled, we repeatedly
call the code for NETDEV_DOWN, including ipv6_mc_down(), while never
calling the corresponding ipv6_mc_up() in between. This will cause a
new entry in idev->mc_tomb to be allocated for each multicast group
the interface is subscribed to, which in turn leaks one struct ifmcaddr6
per nontrivial multicast group the interface is subscribed to.
The following reproducer will leak at least $n objects:
ip addr add ff2e::4242/32 dev eth0 autojoin
sysctl -w net.ipv6.conf.eth0.disable_ipv6=1
for i in $(seq 1 $n); do
ip link set up eth0; ip link set down eth0
done
Joining groups with IPV6_ADD_MEMBERSHIP (unprivileged) or setting the
sysctl net.ipv6.conf.eth0.forwarding to 1 (=> subscribing to ff02::2)
can also be used to create a nontrivial idev->mc_list, which will the
leak objects with the right up-down-sequence.
Based on both sources for NETDEV_DOWN events the interface IPv6 state
should be considered:
- not ready if the network interface is not ready OR IPv6 is disabled
for it
- ready if the network interface is ready AND IPv6 is enabled for it
The functions ipv6_mc_up() and ipv6_down() should only be run when this
state changes.
Implement this by remembering when the IPv6 state is ready, and only
run ipv6_mc_down() if it actually changed from ready to not ready.
The other direction (not ready -> ready) already works correctly, as:
- the interface notification triggered codepath for NETDEV_UP /
NETDEV_CHANGE returns early if ipv6 is disabled, and
- the disable_ipv6=0 triggered codepath skips fully initializing the
interface as long as addrconf_link_ready(dev) returns false
- calling ipv6_mc_up() repeatedly does not leak anything
Fixes: 3ce62a84d53c ("ipv6: exit early in addrconf_notify() if IPv6 is disabled")
Signed-off-by: Johannes Nixdorf <j.nixdorf(a)avm.de>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 6c8ab3e6e6fe..f908e2fd30b2 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -3732,6 +3732,7 @@ static int addrconf_ifdown(struct net_device *dev, bool unregister)
struct inet6_dev *idev;
struct inet6_ifaddr *ifa, *tmp;
bool keep_addr = false;
+ bool was_ready;
int state, i;
ASSERT_RTNL();
@@ -3797,7 +3798,10 @@ static int addrconf_ifdown(struct net_device *dev, bool unregister)
addrconf_del_rs_timer(idev);
- /* Step 2: clear flags for stateless addrconf */
+ /* Step 2: clear flags for stateless addrconf, repeated down
+ * detection
+ */
+ was_ready = idev->if_flags & IF_READY;
if (!unregister)
idev->if_flags &= ~(IF_RS_SENT|IF_RA_RCVD|IF_READY);
@@ -3871,7 +3875,7 @@ static int addrconf_ifdown(struct net_device *dev, bool unregister)
if (unregister) {
ipv6_ac_destroy_dev(idev);
ipv6_mc_destroy_dev(idev);
- } else {
+ } else if (was_ready) {
ipv6_mc_down(idev);
}
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 690bb6fb64f5dc7437317153902573ecad67593d Mon Sep 17 00:00:00 2001
From: Sven Eckelmann <sven(a)narfation.org>
Date: Mon, 28 Feb 2022 00:01:24 +0100
Subject: [PATCH] batman-adv: Request iflink once in batadv-on-batadv check
There is no need to call dev_get_iflink multiple times for the same
net_device in batadv_is_on_batman_iface. And since some of the
.ndo_get_iflink callbacks are dynamic (for example via RCUs like in
vxcan_get_iflink), it could easily happen that the returned values are not
stable. The pre-checks before __dev_get_by_index are then of course bogus.
Fixes: b7eddd0b3950 ("batman-adv: prevent using any virtual device created on batman-adv as hard-interface")
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
Signed-off-by: Simon Wunderlich <sw(a)simonwunderlich.de>
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
index 8a2b78f9c4b2..35aa1122043b 100644
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -149,22 +149,23 @@ static bool batadv_is_on_batman_iface(const struct net_device *net_dev)
struct net *net = dev_net(net_dev);
struct net_device *parent_dev;
struct net *parent_net;
+ int iflink;
bool ret;
/* check if this is a batman-adv mesh interface */
if (batadv_softif_is_valid(net_dev))
return true;
+ iflink = dev_get_iflink(net_dev);
+
/* no more parents..stop recursion */
- if (dev_get_iflink(net_dev) == 0 ||
- dev_get_iflink(net_dev) == net_dev->ifindex)
+ if (iflink == 0 || iflink == net_dev->ifindex)
return false;
parent_net = batadv_getlink_net(net_dev, net);
/* recurse over the parent device */
- parent_dev = __dev_get_by_index((struct net *)parent_net,
- dev_get_iflink(net_dev));
+ parent_dev = __dev_get_by_index((struct net *)parent_net, iflink);
/* if we got a NULL parent_dev there is something broken.. */
if (!parent_dev) {
pr_err("Cannot find parent device\n");
The patch below does not apply to the 5.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 74583f1b92cb3bbba1a3741cea237545c56f506c Mon Sep 17 00:00:00 2001
From: Niklas Cassel <niklas.cassel(a)wdc.com>
Date: Tue, 1 Mar 2022 00:44:18 +0000
Subject: [PATCH] riscv: dts: k210: fix broken IRQs on hart1
Commit 67d96729a9e7 ("riscv: Update Canaan Kendryte K210 device tree")
incorrectly removed two entries from the PLIC interrupt-controller node's
interrupts-extended property.
The PLIC driver cannot know the mapping between hart contexts and hart ids,
so this information has to be provided by device tree, as specified by the
PLIC device tree binding.
The PLIC driver uses the interrupts-extended property, and initializes the
hart context registers in the exact same order as provided by the
interrupts-extended property.
In other words, if we don't specify the S-mode interrupts, the PLIC driver
will simply initialize the hart0 S-mode hart context with the hart1 M-mode
configuration. It is therefore essential to specify the S-mode IRQs even
though the system itself will only ever be running in M-mode.
Re-add the S-mode interrupts, so that we get working IRQs on hart1 again.
Cc: <stable(a)vger.kernel.org>
Fixes: 67d96729a9e7 ("riscv: Update Canaan Kendryte K210 device tree")
Signed-off-by: Niklas Cassel <niklas.cassel(a)wdc.com>
Signed-off-by: Palmer Dabbelt <palmer(a)rivosinc.com>
diff --git a/arch/riscv/boot/dts/canaan/k210.dtsi b/arch/riscv/boot/dts/canaan/k210.dtsi
index 56f57118c633..44d338514761 100644
--- a/arch/riscv/boot/dts/canaan/k210.dtsi
+++ b/arch/riscv/boot/dts/canaan/k210.dtsi
@@ -113,7 +113,8 @@ plic0: interrupt-controller@c000000 {
compatible = "canaan,k210-plic", "sifive,plic-1.0.0";
reg = <0xC000000 0x4000000>;
interrupt-controller;
- interrupts-extended = <&cpu0_intc 11>, <&cpu1_intc 11>;
+ interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>,
+ <&cpu1_intc 11>, <&cpu1_intc 9>;
riscv,ndev = <65>;
};
The patch below does not apply to the 5.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 74583f1b92cb3bbba1a3741cea237545c56f506c Mon Sep 17 00:00:00 2001
From: Niklas Cassel <niklas.cassel(a)wdc.com>
Date: Tue, 1 Mar 2022 00:44:18 +0000
Subject: [PATCH] riscv: dts: k210: fix broken IRQs on hart1
Commit 67d96729a9e7 ("riscv: Update Canaan Kendryte K210 device tree")
incorrectly removed two entries from the PLIC interrupt-controller node's
interrupts-extended property.
The PLIC driver cannot know the mapping between hart contexts and hart ids,
so this information has to be provided by device tree, as specified by the
PLIC device tree binding.
The PLIC driver uses the interrupts-extended property, and initializes the
hart context registers in the exact same order as provided by the
interrupts-extended property.
In other words, if we don't specify the S-mode interrupts, the PLIC driver
will simply initialize the hart0 S-mode hart context with the hart1 M-mode
configuration. It is therefore essential to specify the S-mode IRQs even
though the system itself will only ever be running in M-mode.
Re-add the S-mode interrupts, so that we get working IRQs on hart1 again.
Cc: <stable(a)vger.kernel.org>
Fixes: 67d96729a9e7 ("riscv: Update Canaan Kendryte K210 device tree")
Signed-off-by: Niklas Cassel <niklas.cassel(a)wdc.com>
Signed-off-by: Palmer Dabbelt <palmer(a)rivosinc.com>
diff --git a/arch/riscv/boot/dts/canaan/k210.dtsi b/arch/riscv/boot/dts/canaan/k210.dtsi
index 56f57118c633..44d338514761 100644
--- a/arch/riscv/boot/dts/canaan/k210.dtsi
+++ b/arch/riscv/boot/dts/canaan/k210.dtsi
@@ -113,7 +113,8 @@ plic0: interrupt-controller@c000000 {
compatible = "canaan,k210-plic", "sifive,plic-1.0.0";
reg = <0xC000000 0x4000000>;
interrupt-controller;
- interrupts-extended = <&cpu0_intc 11>, <&cpu1_intc 11>;
+ interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>,
+ <&cpu1_intc 11>, <&cpu1_intc 9>;
riscv,ndev = <65>;
};
Hi,
there are two more patches that did not have the CC: stable tag from the
recent series to fix defrag in btrfs. Please add them to 5.16 queue,
both apply cleanly, thanks.
d5633b0dee02 btrfs: defrag: bring back the old file extent search behavior
199257a78bb0 btrfs: defrag: don't use merged extent map for their generation check
From: Eric Biggers <ebiggers(a)google.com>
Most callers of public_key_verify_signature(), including most indirect
callers via verify_signature() as well as pkcs7_verify_sig_chain(),
don't check that public_key_signature::pkey_algo matches
public_key::pkey_algo. These should always match. However, a malicious
signature could intentionally declare an unintended algorithm. It is
essential that such signatures be rejected outright, or that the
algorithm of the *key* be used -- not the algorithm of the signature as
that would allow attackers to choose the algorithm used.
Currently, public_key_verify_signature() correctly uses the key's
algorithm when deciding which akcipher to allocate. That's good.
However, it uses the signature's algorithm when deciding whether to do
the first step of SM2, which is incorrect. Also, v4.19 and older
kernels used the signature's algorithm for the entire process.
Prevent such errors by making public_key_verify_signature() enforce that
the signature's algorithm matches the key's algorithm.
Also remove two checks of this done by callers, which are now redundant.
Cc: stable(a)vger.kernel.org
Signed-off-by: Eric Biggers <ebiggers(a)google.com>
---
crypto/asymmetric_keys/pkcs7_verify.c | 6 ------
crypto/asymmetric_keys/public_key.c | 15 +++++++++++++++
crypto/asymmetric_keys/x509_public_key.c | 6 ------
3 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/crypto/asymmetric_keys/pkcs7_verify.c b/crypto/asymmetric_keys/pkcs7_verify.c
index 0b4d07aa88111..f94a1d1ad3a6c 100644
--- a/crypto/asymmetric_keys/pkcs7_verify.c
+++ b/crypto/asymmetric_keys/pkcs7_verify.c
@@ -174,12 +174,6 @@ static int pkcs7_find_key(struct pkcs7_message *pkcs7,
pr_devel("Sig %u: Found cert serial match X.509[%u]\n",
sinfo->index, certix);
- if (strcmp(x509->pub->pkey_algo, sinfo->sig->pkey_algo) != 0) {
- pr_warn("Sig %u: X.509 algo and PKCS#7 sig algo don't match\n",
- sinfo->index);
- continue;
- }
-
sinfo->signer = x509;
return 0;
}
diff --git a/crypto/asymmetric_keys/public_key.c b/crypto/asymmetric_keys/public_key.c
index 4fefb219bfdc8..aba7113d86c76 100644
--- a/crypto/asymmetric_keys/public_key.c
+++ b/crypto/asymmetric_keys/public_key.c
@@ -325,6 +325,21 @@ int public_key_verify_signature(const struct public_key *pkey,
BUG_ON(!sig);
BUG_ON(!sig->s);
+ /*
+ * The signature's claimed public key algorithm *must* match the key's
+ * actual public key algorithm.
+ *
+ * Small exception: ECDSA signatures don't specify the curve, but ECDSA
+ * keys do. So the strings can mismatch slightly in that case:
+ * "ecdsa-nist-*" for the key, but "ecdsa" for the signature.
+ */
+ if (!sig->pkey_algo)
+ return -EINVAL;
+ if (strcmp(pkey->pkey_algo, sig->pkey_algo) != 0 &&
+ (strncmp(pkey->pkey_algo, "ecdsa-", 6) != 0 ||
+ strcmp(sig->pkey_algo, "ecdsa") != 0))
+ return -EKEYREJECTED;
+
ret = software_key_determine_akcipher(sig->encoding,
sig->hash_algo,
pkey, alg_name);
diff --git a/crypto/asymmetric_keys/x509_public_key.c b/crypto/asymmetric_keys/x509_public_key.c
index fe14cae115b51..71cc1738fbfd2 100644
--- a/crypto/asymmetric_keys/x509_public_key.c
+++ b/crypto/asymmetric_keys/x509_public_key.c
@@ -128,12 +128,6 @@ int x509_check_for_self_signed(struct x509_certificate *cert)
goto out;
}
- ret = -EKEYREJECTED;
- if (strcmp(cert->pub->pkey_algo, cert->sig->pkey_algo) != 0 &&
- (strncmp(cert->pub->pkey_algo, "ecdsa-", 6) != 0 ||
- strcmp(cert->sig->pkey_algo, "ecdsa") != 0))
- goto out;
-
ret = public_key_verify_signature(cert->pub, cert->sig);
if (ret < 0) {
if (ret == -ENOPKG) {
--
2.35.1
From: Lino Sanfilippo <l.sanfilippo(a)kunbus.com>
The following sequence of operations results in a refcount warning:
1. Open device /dev/tpmrm.
2. Remove module tpm_tis_spi.
3. Write a TPM command to the file descriptor opened at step 1.
------------[ cut here ]------------
WARNING: CPU: 3 PID: 1161 at lib/refcount.c:25 kobject_get+0xa0/0xa4
refcount_t: addition on 0; use-after-free.
Modules linked in: tpm_tis_spi tpm_tis_core tpm mdio_bcm_unimac brcmfmac
sha256_generic libsha256 sha256_arm hci_uart btbcm bluetooth cfg80211 vc4
brcmutil ecdh_generic ecc snd_soc_core crc32_arm_ce libaes
raspberrypi_hwmon ac97_bus snd_pcm_dmaengine bcm2711_thermal snd_pcm
snd_timer genet snd phy_generic soundcore [last unloaded: spi_bcm2835]
CPU: 3 PID: 1161 Comm: hold_open Not tainted 5.10.0ls-main-dirty #2
Hardware name: BCM2711
[<c0410c3c>] (unwind_backtrace) from [<c040b580>] (show_stack+0x10/0x14)
[<c040b580>] (show_stack) from [<c1092174>] (dump_stack+0xc4/0xd8)
[<c1092174>] (dump_stack) from [<c0445a30>] (__warn+0x104/0x108)
[<c0445a30>] (__warn) from [<c0445aa8>] (warn_slowpath_fmt+0x74/0xb8)
[<c0445aa8>] (warn_slowpath_fmt) from [<c08435d0>] (kobject_get+0xa0/0xa4)
[<c08435d0>] (kobject_get) from [<bf0a715c>] (tpm_try_get_ops+0x14/0x54 [tpm])
[<bf0a715c>] (tpm_try_get_ops [tpm]) from [<bf0a7d6c>] (tpm_common_write+0x38/0x60 [tpm])
[<bf0a7d6c>] (tpm_common_write [tpm]) from [<c05a7ac0>] (vfs_write+0xc4/0x3c0)
[<c05a7ac0>] (vfs_write) from [<c05a7ee4>] (ksys_write+0x58/0xcc)
[<c05a7ee4>] (ksys_write) from [<c04001a0>] (ret_fast_syscall+0x0/0x4c)
Exception stack(0xc226bfa8 to 0xc226bff0)
bfa0: 00000000 000105b4 00000003 beafe664 00000014 00000000
bfc0: 00000000 000105b4 000103f8 00000004 00000000 00000000 b6f9c000 beafe684
bfe0: 0000006c beafe648 0001056c b6eb6944
---[ end trace d4b8409def9b8b1f ]---
The reason for this warning is the attempt to get the chip->dev reference
in tpm_common_write() although the reference counter is already zero.
Since commit 8979b02aaf1d ("tpm: Fix reference count to main device") the
extra reference used to prevent a premature zero counter is never taken,
because the required TPM_CHIP_FLAG_TPM2 flag is never set.
Fix this by moving the TPM 2 character device handling from
tpm_chip_alloc() to tpm_add_char_device() which is called at a later point
in time when the flag has been set in case of TPM2.
Commit fdc915f7f719 ("tpm: expose spaces via a device link /dev/tpmrm<n>")
already introduced function tpm_devs_release() to release the extra
reference but did not implement the required put on chip->devs that results
in the call of this function.
Fix this by putting chip->devs in tpm_chip_unregister().
Finally move the new implementation for the TPM 2 handling into a new
function to avoid multiple checks for the TPM_CHIP_FLAG_TPM2 flag in the
good case and error cases.
Cc: stable(a)vger.kernel.org
Fixes: fdc915f7f719 ("tpm: expose spaces via a device link /dev/tpmrm<n>")
Fixes: 8979b02aaf1d ("tpm: Fix reference count to main device")
Co-developed-by: Jason Gunthorpe <jgg(a)ziepe.ca>
Tested-by: Stefan Berger <stefanb(a)linux.ibm.com>
Signed-off-by: Jason Gunthorpe <jgg(a)ziepe.ca>
Signed-off-by: Lino Sanfilippo <LinoSanfilippo(a)gmx.de>
---
drivers/char/tpm/tpm-chip.c | 46 +++++--------------------
drivers/char/tpm/tpm.h | 2 ++
drivers/char/tpm/tpm2-space.c | 65 +++++++++++++++++++++++++++++++++++
3 files changed, 75 insertions(+), 38 deletions(-)
diff --git a/drivers/char/tpm/tpm-chip.c b/drivers/char/tpm/tpm-chip.c
index b009e7479b70..783d65fc71f0 100644
--- a/drivers/char/tpm/tpm-chip.c
+++ b/drivers/char/tpm/tpm-chip.c
@@ -274,14 +274,6 @@ static void tpm_dev_release(struct device *dev)
kfree(chip);
}
-static void tpm_devs_release(struct device *dev)
-{
- struct tpm_chip *chip = container_of(dev, struct tpm_chip, devs);
-
- /* release the master device reference */
- put_device(&chip->dev);
-}
-
/**
* tpm_class_shutdown() - prepare the TPM device for loss of power.
* @dev: device to which the chip is associated.
@@ -344,7 +336,6 @@ struct tpm_chip *tpm_chip_alloc(struct device *pdev,
chip->dev_num = rc;
device_initialize(&chip->dev);
- device_initialize(&chip->devs);
chip->dev.class = tpm_class;
chip->dev.class->shutdown_pre = tpm_class_shutdown;
@@ -352,29 +343,12 @@ struct tpm_chip *tpm_chip_alloc(struct device *pdev,
chip->dev.parent = pdev;
chip->dev.groups = chip->groups;
- chip->devs.parent = pdev;
- chip->devs.class = tpmrm_class;
- chip->devs.release = tpm_devs_release;
- /* get extra reference on main device to hold on
- * behalf of devs. This holds the chip structure
- * while cdevs is in use. The corresponding put
- * is in the tpm_devs_release (TPM2 only)
- */
- if (chip->flags & TPM_CHIP_FLAG_TPM2)
- get_device(&chip->dev);
-
if (chip->dev_num == 0)
chip->dev.devt = MKDEV(MISC_MAJOR, TPM_MINOR);
else
chip->dev.devt = MKDEV(MAJOR(tpm_devt), chip->dev_num);
- chip->devs.devt =
- MKDEV(MAJOR(tpm_devt), chip->dev_num + TPM_NUM_DEVICES);
-
rc = dev_set_name(&chip->dev, "tpm%d", chip->dev_num);
- if (rc)
- goto out;
- rc = dev_set_name(&chip->devs, "tpmrm%d", chip->dev_num);
if (rc)
goto out;
@@ -382,9 +356,7 @@ struct tpm_chip *tpm_chip_alloc(struct device *pdev,
chip->flags |= TPM_CHIP_FLAG_VIRTUAL;
cdev_init(&chip->cdev, &tpm_fops);
- cdev_init(&chip->cdevs, &tpmrm_fops);
chip->cdev.owner = THIS_MODULE;
- chip->cdevs.owner = THIS_MODULE;
rc = tpm2_init_space(&chip->work_space, TPM2_SPACE_BUFFER_SIZE);
if (rc) {
@@ -396,7 +368,6 @@ struct tpm_chip *tpm_chip_alloc(struct device *pdev,
return chip;
out:
- put_device(&chip->devs);
put_device(&chip->dev);
return ERR_PTR(rc);
}
@@ -445,14 +416,9 @@ static int tpm_add_char_device(struct tpm_chip *chip)
}
if (chip->flags & TPM_CHIP_FLAG_TPM2 && !tpm_is_firmware_upgrade(chip)) {
- rc = cdev_device_add(&chip->cdevs, &chip->devs);
- if (rc) {
- dev_err(&chip->devs,
- "unable to cdev_device_add() %s, major %d, minor %d, err=%d\n",
- dev_name(&chip->devs), MAJOR(chip->devs.devt),
- MINOR(chip->devs.devt), rc);
- return rc;
- }
+ rc = tpm_devs_add(chip);
+ if (rc)
+ goto err_del_cdev;
}
/* Make the chip available. */
@@ -460,6 +426,10 @@ static int tpm_add_char_device(struct tpm_chip *chip)
idr_replace(&dev_nums_idr, chip, chip->dev_num);
mutex_unlock(&idr_lock);
+ return 0;
+
+err_del_cdev:
+ cdev_device_del(&chip->cdev, &chip->dev);
return rc;
}
@@ -654,7 +624,7 @@ void tpm_chip_unregister(struct tpm_chip *chip)
hwrng_unregister(&chip->hwrng);
tpm_bios_log_teardown(chip);
if (chip->flags & TPM_CHIP_FLAG_TPM2 && !tpm_is_firmware_upgrade(chip))
- cdev_device_del(&chip->cdevs, &chip->devs);
+ tpm_devs_remove(chip);
tpm_del_char_device(chip);
}
EXPORT_SYMBOL_GPL(tpm_chip_unregister);
diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
index 283f78211c3a..2163c6ee0d36 100644
--- a/drivers/char/tpm/tpm.h
+++ b/drivers/char/tpm/tpm.h
@@ -234,6 +234,8 @@ int tpm2_prepare_space(struct tpm_chip *chip, struct tpm_space *space, u8 *cmd,
size_t cmdsiz);
int tpm2_commit_space(struct tpm_chip *chip, struct tpm_space *space, void *buf,
size_t *bufsiz);
+int tpm_devs_add(struct tpm_chip *chip);
+void tpm_devs_remove(struct tpm_chip *chip);
void tpm_bios_log_setup(struct tpm_chip *chip);
void tpm_bios_log_teardown(struct tpm_chip *chip);
diff --git a/drivers/char/tpm/tpm2-space.c b/drivers/char/tpm/tpm2-space.c
index 97e916856cf3..265ec72b1d81 100644
--- a/drivers/char/tpm/tpm2-space.c
+++ b/drivers/char/tpm/tpm2-space.c
@@ -574,3 +574,68 @@ int tpm2_commit_space(struct tpm_chip *chip, struct tpm_space *space,
dev_err(&chip->dev, "%s: error %d\n", __func__, rc);
return rc;
}
+
+/*
+ * Put the reference to the main device.
+ */
+static void tpm_devs_release(struct device *dev)
+{
+ struct tpm_chip *chip = container_of(dev, struct tpm_chip, devs);
+
+ /* release the master device reference */
+ put_device(&chip->dev);
+}
+
+/*
+ * Remove the device file for exposed TPM spaces and release the device
+ * reference. This may also release the reference to the master device.
+ */
+void tpm_devs_remove(struct tpm_chip *chip)
+{
+ cdev_device_del(&chip->cdevs, &chip->devs);
+ put_device(&chip->devs);
+}
+
+/*
+ * Add a device file to expose TPM spaces. Also take a reference to the
+ * main device.
+ */
+int tpm_devs_add(struct tpm_chip *chip)
+{
+ int rc;
+
+ device_initialize(&chip->devs);
+ chip->devs.parent = chip->dev.parent;
+ chip->devs.class = tpmrm_class;
+
+ /*
+ * Get extra reference on main device to hold on behalf of devs.
+ * This holds the chip structure while cdevs is in use. The
+ * corresponding put is in the tpm_devs_release.
+ */
+ get_device(&chip->dev);
+ chip->devs.release = tpm_devs_release;
+ chip->devs.devt = MKDEV(MAJOR(tpm_devt), chip->dev_num + TPM_NUM_DEVICES);
+ cdev_init(&chip->cdevs, &tpmrm_fops);
+ chip->cdevs.owner = THIS_MODULE;
+
+ rc = dev_set_name(&chip->devs, "tpmrm%d", chip->dev_num);
+ if (rc)
+ goto err_put_devs;
+
+ rc = cdev_device_add(&chip->cdevs, &chip->devs);
+ if (rc) {
+ dev_err(&chip->devs,
+ "unable to cdev_device_add() %s, major %d, minor %d, err=%d\n",
+ dev_name(&chip->devs), MAJOR(chip->devs.devt),
+ MINOR(chip->devs.devt), rc);
+ goto err_put_devs;
+ }
+
+ return 0;
+
+err_put_devs:
+ put_device(&chip->devs);
+
+ return rc;
+}
--
2.35.1
From: "Steven Rostedt (Google)" <rostedt(a)goodmis.org>
When trying to add a histogram against an event with the "cpu" field, it
was impossible due to "cpu" being a keyword to key off of the running CPU.
So to fix this, it was changed to "common_cpu" to match the other generic
fields (like "common_pid"). But since some scripts used "cpu" for keying
off of the CPU (for events that did not have "cpu" as a field, which is
most of them), a backward compatibility trick was added such that if "cpu"
was used as a key, and the event did not have "cpu" as a field name, then
it would fallback and switch over to "common_cpu".
This fix has a couple of subtle bugs. One was that when switching over to
"common_cpu", it did not change the field name, it just set a flag. But
the code still found a "cpu" field. The "cpu" field is used for filtering
and is returned when the event does not have a "cpu" field.
This was found by:
# cd /sys/kernel/tracing
# echo hist:key=cpu,pid:sort=cpu > events/sched/sched_wakeup/trigger
# cat events/sched/sched_wakeup/hist
Which showed the histogram unsorted:
{ cpu: 19, pid: 1175 } hitcount: 1
{ cpu: 6, pid: 239 } hitcount: 2
{ cpu: 23, pid: 1186 } hitcount: 14
{ cpu: 12, pid: 249 } hitcount: 2
{ cpu: 3, pid: 994 } hitcount: 5
Instead of hard coding the "cpu" checks, take advantage of the fact that
trace_event_field_field() returns a special field for "cpu" and "CPU" if
the event does not have "cpu" as a field. This special field has the
"filter_type" of "FILTER_CPU". Check that to test if the returned field is
of the CPU type instead of doing the string compare.
Also, fix the sorting bug by testing for the hist_field flag of
HIST_FIELD_FL_CPU when setting up the sort routine. Otherwise it will use
the special CPU field to know what compare routine to use, and since that
special field does not have a size, it returns tracing_map_cmp_none.
Cc: stable(a)vger.kernel.org
Fixes: 1e3bac71c505 ("tracing/histogram: Rename "cpu" to "common_cpu"")
Reported-by: Daniel Bristot de Oliveira <bristot(a)kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt(a)goodmis.org>
---
kernel/trace/trace_events_hist.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
index ada87bfb5bb8..dc7f733b4cb3 100644
--- a/kernel/trace/trace_events_hist.c
+++ b/kernel/trace/trace_events_hist.c
@@ -2289,9 +2289,9 @@ parse_field(struct hist_trigger_data *hist_data, struct trace_event_file *file,
/*
* For backward compatibility, if field_name
* was "cpu", then we treat this the same as
- * common_cpu.
+ * common_cpu. This also works for "CPU".
*/
- if (strcmp(field_name, "cpu") == 0) {
+ if (field && field->filter_type == FILTER_CPU) {
*flags |= HIST_FIELD_FL_CPU;
} else {
hist_err(tr, HIST_ERR_FIELD_NOT_FOUND,
@@ -4832,7 +4832,7 @@ static int create_tracing_map_fields(struct hist_trigger_data *hist_data)
if (hist_field->flags & HIST_FIELD_FL_STACKTRACE)
cmp_fn = tracing_map_cmp_none;
- else if (!field)
+ else if (!field || hist_field->flags & HIST_FIELD_FL_CPU)
cmp_fn = tracing_map_cmp_num(hist_field->size,
hist_field->is_signed);
else if (is_string_field(field))
--
2.34.1
From: Hugh Dickins <hughd(a)google.com>
Subject: memfd: fix F_SEAL_WRITE after shmem huge page allocated
Wangyong reports: after enabling tmpfs filesystem to support transparent
hugepage with the following command:
echo always > /sys/kernel/mm/transparent_hugepage/shmem_enabled
the docker program tries to add F_SEAL_WRITE through the following
command, but it fails unexpectedly with errno EBUSY:
fcntl(5, F_ADD_SEALS, F_SEAL_WRITE) = -1.
That is because memfd_tag_pins() and memfd_wait_for_pins() were never
updated for shmem huge pages: checking page_mapcount() against
page_count() is hopeless on THP subpages - they need to check
total_mapcount() against page_count() on THP heads only.
Make memfd_tag_pins() (compared > 1) as strict as memfd_wait_for_pins()
(compared != 1): either can be justified, but given the non-atomic
total_mapcount() calculation, it is better now to be strict. Bear in mind
that total_mapcount() itself scans all of the THP subpages, when choosing
to take an XA_CHECK_SCHED latency break.
Also fix the unlikely xa_is_value() case in memfd_wait_for_pins(): if a
page has been swapped out since memfd_tag_pins(), then its refcount must
have fallen, and so it can safely be untagged.
Link: https://lkml.kernel.org/r/a4f79248-df75-2c8c-3df-ba3317ccb5da@google.com
Signed-off-by: Hugh Dickins <hughd(a)google.com>
Reported-by: Zeal Robot <zealci(a)zte.com.cn>
Reported-by: wangyong <wang.yong12(a)zte.com.cn>
Cc: Mike Kravetz <mike.kravetz(a)oracle.com>
Cc: Matthew Wilcox (Oracle) <willy(a)infradead.org>
Cc: CGEL ZTE <cgel.zte(a)gmail.com>
Cc: Kirill A. Shutemov <kirill(a)shutemov.name>
Cc: Song Liu <songliubraving(a)fb.com>
Cc: Yang Yang <yang.yang29(a)zte.com.cn>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/memfd.c | 40 ++++++++++++++++++++++++++++------------
1 file changed, 28 insertions(+), 12 deletions(-)
--- a/mm/memfd.c~memfd-fix-f_seal_write-after-shmem-huge-page-allocated
+++ a/mm/memfd.c
@@ -31,20 +31,28 @@
static void memfd_tag_pins(struct xa_state *xas)
{
struct page *page;
- unsigned int tagged = 0;
+ int latency = 0;
+ int cache_count;
lru_add_drain();
xas_lock_irq(xas);
xas_for_each(xas, page, ULONG_MAX) {
- if (xa_is_value(page))
- continue;
- page = find_subpage(page, xas->xa_index);
- if (page_count(page) - page_mapcount(page) > 1)
+ cache_count = 1;
+ if (!xa_is_value(page) &&
+ PageTransHuge(page) && !PageHuge(page))
+ cache_count = HPAGE_PMD_NR;
+
+ if (!xa_is_value(page) &&
+ page_count(page) - total_mapcount(page) != cache_count)
xas_set_mark(xas, MEMFD_TAG_PINNED);
+ if (cache_count != 1)
+ xas_set(xas, page->index + cache_count);
- if (++tagged % XA_CHECK_SCHED)
+ latency += cache_count;
+ if (latency < XA_CHECK_SCHED)
continue;
+ latency = 0;
xas_pause(xas);
xas_unlock_irq(xas);
@@ -73,7 +81,8 @@ static int memfd_wait_for_pins(struct ad
error = 0;
for (scan = 0; scan <= LAST_SCAN; scan++) {
- unsigned int tagged = 0;
+ int latency = 0;
+ int cache_count;
if (!xas_marked(&xas, MEMFD_TAG_PINNED))
break;
@@ -87,10 +96,14 @@ static int memfd_wait_for_pins(struct ad
xas_lock_irq(&xas);
xas_for_each_marked(&xas, page, ULONG_MAX, MEMFD_TAG_PINNED) {
bool clear = true;
- if (xa_is_value(page))
- continue;
- page = find_subpage(page, xas.xa_index);
- if (page_count(page) - page_mapcount(page) != 1) {
+
+ cache_count = 1;
+ if (!xa_is_value(page) &&
+ PageTransHuge(page) && !PageHuge(page))
+ cache_count = HPAGE_PMD_NR;
+
+ if (!xa_is_value(page) && cache_count !=
+ page_count(page) - total_mapcount(page)) {
/*
* On the last scan, we clean up all those tags
* we inserted; but make a note that we still
@@ -103,8 +116,11 @@ static int memfd_wait_for_pins(struct ad
}
if (clear)
xas_clear_mark(&xas, MEMFD_TAG_PINNED);
- if (++tagged % XA_CHECK_SCHED)
+
+ latency += cache_count;
+ if (latency < XA_CHECK_SCHED)
continue;
+ latency = 0;
xas_pause(&xas);
xas_unlock_irq(&xas);
_
Unfortunately, we ended up with the wrong version of the patch "fix info
leak with DMA_FROM_DEVICE" getting merged. We got v4 merged, but the
version we want is v7 with some minor tweaks which were supposed to be
applied by Christoph (swiotlb maintainer). After pointing this out, I
was asked by Christoph to create an incremental fix.
IMHO the cleanest way to do this is a reverting the incorrect version
of the patch and applying the correct one. I hope that qualifies as
an incremental fix.
The main differences between what we got and what we need are:
* swiotlb_sync_single_for_device is also required to do an extra bounce
* It was decided that we want to defer introducing DMA_ATTR_OVERWRITE,
until we have exploiters
* And anyway DMA_ATTR_OVERWRITE must take precedence over
DMA_ATTR_SKIP_CPU_SYNC, so the v4 implementation of DMA_ATTR_OVERWRITE
ain't even orrect.
Halil Pasic (2):
Revert "swiotlb: fix info leak with DMA_FROM_DEVICE"
swiotlb: fix info leak with DMA_FROM_DEVICE
Documentation/core-api/dma-attributes.rst | 8 --------
include/linux/dma-mapping.h | 8 --------
kernel/dma/swiotlb.c | 23 +++++++++++++++--------
3 files changed, 15 insertions(+), 24 deletions(-)
base-commit: 38f80f42147ff658aff218edb0a88c37e58bf44f
--
2.32.0
Hi Robin,
> For various reasons based on the allocator behaviour and typical
> use-cases at the time, when the max32_alloc_size optimisation was
> introduced it seemed reasonable to couple the reset of the tracked
> size to the update of cached32_node upon freeing a relevant IOVA.
> However, since subsequent optimisations focused on helping genuine
> 32-bit devices make best use of even more limited address spaces, it
> is now a lot more likely for cached32_node to be anywhere in a "full"
> 32-bit address space, and as such more likely for space to become
> available from IOVAs below that node being freed.
>
> At this point, the short-cut in __cached_rbnode_delete_update() really
> doesn't hold up any more, and we need to fix the logic to reliably
> provide the expected behaviour. We still want cached32_node to only move
> upwards, but we should reset the allocation size if *any* 32-bit space
> has become available.
>
> Reported-by: Yunfei Wang <yf.wang(a)mediatek.com>
> Signed-off-by: Robin Murphy <robin.murphy(a)arm.com>
Would you mind adding:
Cc: <stable(a)vger.kernel.org>
to this path? I checked and I think the patch can be applied to
5.4 and later.
thanks,
Miles
The patch titled
Subject: memcg: sync flush only if periodic flush is delayed
has been added to the -mm tree. Its filename is
memcg-sync-flush-only-if-periodic-flush-is-delayed.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/memcg-sync-flush-only-if-periodic…
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/memcg-sync-flush-only-if-periodic…
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Shakeel Butt <shakeelb(a)google.com>
Subject: memcg: sync flush only if periodic flush is delayed
Daniel Dao has reported [1] a regression on workloads that may trigger a
lot of refaults (anon and file). The underlying issue is that flushing
rstat is expensive. Although rstat flush are batched with (nr_cpus *
MEMCG_BATCH) stat updates, it seems like there are workloads which
genuinely do stat updates larger than batch value within short amount of
time. Since the rstat flush can happen in the performance critical
codepaths like page faults, such workload can suffer greatly.
This patch fixes this regression by making the rstat flushing conditional
in the performance critical codepaths. More specifically, the kernel
relies on the async periodic rstat flusher to flush the stats and only if
the periodic flusher is delayed by more than twice the amount of its
normal time window then the kernel allows rstat flushing from the
performance critical codepaths.
Now the question: what are the side-effects of this change? The worst
that can happen is the refault codepath will see 4sec old lruvec stats and
may cause false (or missed) activations of the refaulted page which may
under-or-overestimate the workingset size. Though that is not very
concerning as the kernel can already miss or do false activations.
There are two more codepaths whose flushing behavior is not changed by
this patch and we may need to come to them in future. One is the
writeback stats used by dirty throttling and second is the deactivation
heuristic in the reclaim. For now keeping an eye on them and if there is
report of regression due to these codepaths, we will reevaluate then.
Link: https://lore.kernel.org/all/CA+wXwBSyO87ZX5PVwdHm-=dBjZYECGmfnydUicUyrQqndg… [1]
Link: https://lkml.kernel.org/r/20220304184040.1304781-1-shakeelb@google.com
Fixes: 1f828223b799 ("memcg: flush lruvec stats in the refault")
Signed-off-by: Shakeel Butt <shakeelb(a)google.com>
Reported-by: Daniel Dao <dqminh(a)cloudflare.com>
Tested-by: Ivan Babrou <ivan(a)cloudflare.com>
Cc: Michal Hocko <mhocko(a)suse.com>
Cc: Roman Gushchin <roman.gushchin(a)linux.dev>
Cc: Johannes Weiner <hannes(a)cmpxchg.org>
Cc: Michal Koutn�� <mkoutny(a)suse.com>
Cc: Frank Hofmann <fhofmann(a)cloudflare.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
include/linux/memcontrol.h | 5 +++++
mm/memcontrol.c | 12 +++++++++++-
mm/workingset.c | 2 +-
3 files changed, 17 insertions(+), 2 deletions(-)
--- a/include/linux/memcontrol.h~memcg-sync-flush-only-if-periodic-flush-is-delayed
+++ a/include/linux/memcontrol.h
@@ -999,6 +999,7 @@ static inline unsigned long lruvec_page_
}
void mem_cgroup_flush_stats(void);
+void mem_cgroup_flush_stats_delayed(void);
void __mod_memcg_lruvec_state(struct lruvec *lruvec, enum node_stat_item idx,
int val);
@@ -1442,6 +1443,10 @@ static inline void mem_cgroup_flush_stat
{
}
+static inline void mem_cgroup_flush_stats_delayed(void)
+{
+}
+
static inline void __mod_memcg_lruvec_state(struct lruvec *lruvec,
enum node_stat_item idx, int val)
{
--- a/mm/memcontrol.c~memcg-sync-flush-only-if-periodic-flush-is-delayed
+++ a/mm/memcontrol.c
@@ -628,6 +628,9 @@ static DECLARE_DEFERRABLE_WORK(stats_flu
static DEFINE_SPINLOCK(stats_flush_lock);
static DEFINE_PER_CPU(unsigned int, stats_updates);
static atomic_t stats_flush_threshold = ATOMIC_INIT(0);
+static u64 flush_next_time;
+
+#define FLUSH_TIME (2UL*HZ)
static inline void memcg_rstat_updated(struct mem_cgroup *memcg, int val)
{
@@ -649,6 +652,7 @@ static void __mem_cgroup_flush_stats(voi
if (!spin_trylock_irqsave(&stats_flush_lock, flag))
return;
+ flush_next_time = jiffies_64 + 2*FLUSH_TIME;
cgroup_rstat_flush_irqsafe(root_mem_cgroup->css.cgroup);
atomic_set(&stats_flush_threshold, 0);
spin_unlock_irqrestore(&stats_flush_lock, flag);
@@ -660,10 +664,16 @@ void mem_cgroup_flush_stats(void)
__mem_cgroup_flush_stats();
}
+void mem_cgroup_flush_stats_delayed(void)
+{
+ if (rstat_flush_time && time_after64(jiffies_64, flush_next_time))
+ mem_cgroup_flush_stats();
+}
+
static void flush_memcg_stats_dwork(struct work_struct *w)
{
__mem_cgroup_flush_stats();
- queue_delayed_work(system_unbound_wq, &stats_flush_dwork, 2UL*HZ);
+ queue_delayed_work(system_unbound_wq, &stats_flush_dwork, FLUSH_TIME);
}
/**
--- a/mm/workingset.c~memcg-sync-flush-only-if-periodic-flush-is-delayed
+++ a/mm/workingset.c
@@ -354,7 +354,7 @@ void workingset_refault(struct folio *fo
mod_lruvec_state(lruvec, WORKINGSET_REFAULT_BASE + file, nr);
- mem_cgroup_flush_stats();
+ mem_cgroup_flush_stats_delayed();
/*
* Compare the distance to the existing workingset size. We
* don't activate pages that couldn't stay resident even if
_
Patches currently in -mm which might be from shakeelb(a)google.com are
memcg-sync-flush-only-if-periodic-flush-is-delayed.patch
memcg-replace-in_interrupt-with-in_task.patch
memcg-refactor-mem_cgroup_oom.patch
memcg-unify-force-charging-conditions.patch
selftests-memcg-test-high-limit-for-single-entry-allocation.patch
memcg-synchronously-enforce-memoryhigh-for-large-overcharges.patch
From: Nicholas Kazlauskas <nicholas.kazlauskas(a)amd.com>
[Why]
Found when running igt@kms_atomic.
Userspace attempts to do a TEST_COMMIT when 0 streams which calls
dc_remove_stream_from_ctx. This in turn calls link_enc_unassign
which ends up modifying stream->link = NULL directly, causing the
global link_enc to be removed preventing further link activity
and future link validation from passing.
[How]
We take care of link_enc unassignment at the start of
link_enc_cfg_link_encs_assign so this call is no longer necessary.
Fixes global state from being modified while unlocked.
Reviewed-by: Jimmy Kizito <Jimmy.Kizito(a)amd.com>
Acked-by: Jasdeep Dhillon <jdhillon(a)amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas(a)amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler(a)amd.com>
Signed-off-by: Alex Deucher <alexander.deucher(a)amd.com>
Cc: stable(a)vger.kernel.org
(cherry picked from commit 3743e7f6fcb938b7d8b7967e6a9442805e269b3d)
---
Please apply this for 5.15.y.
This was already targeted to stable and 5.16.y picked it up but doesn't
apply cleanly on 5.15.y. This problem exists in 5.15 as well but the nearby
`#if defined(CONFIG_DRM_AMD_DC_DCN)` from DP 2.0 support
hasn't been introduced in 5.15.y.
drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
index e94546187cf1..7ae409f7dcf8 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
@@ -1799,9 +1799,6 @@ enum dc_status dc_remove_stream_from_ctx(
dc->res_pool,
del_pipe->stream_res.stream_enc,
false);
- /* Release link encoder from stream in new dc_state. */
- if (dc->res_pool->funcs->link_enc_unassign)
- dc->res_pool->funcs->link_enc_unassign(new_ctx, del_pipe->stream);
if (del_pipe->stream_res.audio)
update_audio_usage(
--
2.34.1
vhost_vsock_handle_tx_kick() already holds the mutex during its call
to vhost_get_vq_desc(). All we have to do is take the same lock
during virtqueue clean-up and we mitigate the reported issues.
Link: https://syzkaller.appspot.com/bug?extid=279432d30d825e63ba00
Cc: <stable(a)vger.kernel.org>
Reported-by: syzbot+adc3cb32385586bec859(a)syzkaller.appspotmail.com
Signed-off-by: Lee Jones <lee.jones(a)linaro.org>
---
drivers/vhost/vhost.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 59edb5a1ffe28..bbaff6a5e21b8 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -693,6 +693,7 @@ void vhost_dev_cleanup(struct vhost_dev *dev)
int i;
for (i = 0; i < dev->nvqs; ++i) {
+ mutex_lock(&dev->vqs[i]->mutex);
if (dev->vqs[i]->error_ctx)
eventfd_ctx_put(dev->vqs[i]->error_ctx);
if (dev->vqs[i]->kick)
@@ -700,6 +701,7 @@ void vhost_dev_cleanup(struct vhost_dev *dev)
if (dev->vqs[i]->call_ctx.ctx)
eventfd_ctx_put(dev->vqs[i]->call_ctx.ctx);
vhost_vq_reset(dev, dev->vqs[i]);
+ mutex_unlock(&dev->vqs[i]->mutex);
}
vhost_dev_free_iovecs(dev);
if (dev->log_ctx)
--
2.35.1.574.g5d30c73bfb-goog
There is an oddity in the way the RSR register flags propagate to the
ISR register (and the actual interrupt output) on this hardware: it
appears that RSR register bits only result in ISR being asserted if the
interrupt was actually enabled at the time, so enabling interrupts with
RSR bits already set doesn't trigger an interrupt to be raised. There
was already a partial fix for this race in the macb_poll function where
it checked for RSR bits being set and re-triggered NAPI receive.
However, there was a still a race window between checking RSR and
actually enabling interrupts, where a lost wakeup could happen. It's
necessary to check again after enabling interrupts to see if RSR was set
just prior to the interrupt being enabled, and re-trigger receive in that
case.
This issue was noticed in a point-to-point UDP request-response protocol
which periodically saw timeouts or abnormally high response times due to
received packets not being processed in a timely fashion. In many
applications, more packets arriving, including TCP retransmissions, would
cause the original packet to be processed, thus masking the issue.
Fixes: 02f7a34f34e3 ("net: macb: Re-enable RX interrupt only when RX is done")
Cc: stable(a)vger.kernel.org
Co-developed-by: Scott McNutt <scott.mcnutt(a)siriusxm.com>
Signed-off-by: Scott McNutt <scott.mcnutt(a)siriusxm.com>
Signed-off-by: Robert Hancock <robert.hancock(a)calian.com>
---
Changes since v1:
-removed unrelated cleanup
-added notes on observed frequency of branches to comments
drivers/net/ethernet/cadence/macb_main.c | 25 +++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 98498a76ae16..d13f06cf0308 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -1573,7 +1573,14 @@ static int macb_poll(struct napi_struct *napi, int budget)
if (work_done < budget) {
napi_complete_done(napi, work_done);
- /* Packets received while interrupts were disabled */
+ /* RSR bits only seem to propagate to raise interrupts when
+ * interrupts are enabled at the time, so if bits are already
+ * set due to packets received while interrupts were disabled,
+ * they will not cause another interrupt to be generated when
+ * interrupts are re-enabled.
+ * Check for this case here. This has been seen to happen
+ * around 30% of the time under heavy network load.
+ */
status = macb_readl(bp, RSR);
if (status) {
if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE)
@@ -1581,6 +1588,22 @@ static int macb_poll(struct napi_struct *napi, int budget)
napi_reschedule(napi);
} else {
queue_writel(queue, IER, bp->rx_intr_mask);
+
+ /* In rare cases, packets could have been received in
+ * the window between the check above and re-enabling
+ * interrupts. Therefore, a double-check is required
+ * to avoid losing a wakeup. This can potentially race
+ * with the interrupt handler doing the same actions
+ * if an interrupt is raised just after enabling them,
+ * but this should be harmless.
+ */
+ status = macb_readl(bp, RSR);
+ if (unlikely(status)) {
+ queue_writel(queue, IDR, bp->rx_intr_mask);
+ if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE)
+ queue_writel(queue, ISR, MACB_BIT(RCOMP));
+ napi_schedule(napi);
+ }
}
}
--
2.31.1
On 3/4/22, 12:31 PM, "Maryoris Luz Mendoza Ruiz" <mmendozarui(a)uniminuto.edu.co> wrote:
Un premio en efectivo de 820,000.00 donado a usted, envíenos su nombre correo: denisbeau501(a)gmail.com
En cumplimiento de la ley 1581 de 2012, UNIMINUTO está comprometida con el tratamiento lícito y seguro de los datos personales de sus colaboradores y terceros, garantizando su confidencialidad. Consulte nuestra Política de Tratamiento de Información en: http://www.uniminuto.edu/documentos-institucionales. Los titulares en cualquier momento pueden ejercer sus derechos legalmente consagrados de conocimiento, actualización, rectificación y supresión de sus datos personales a través del portal web http://www.uniminuto.edu/contacto o a la siguiente dirección: Calle 81B No.72B-70 en la ciudad de Bogotá, y el teléfono 5933004 en la ciudad de Bogotá, o a nivel nacional 01800 0936670.
Si su correo no es institucional y desea ser borrado de la lista de envíos UNIMINUTO, haga clic en el siguiente enlace http://soporte.uniminuto.edu/glpi/plugins/formcreator/front/formdisplay.php… porque este mensaje fue hecho específicamente para usted. En su lugar, use la página de reenvío en nuestro sistema de boletín de noticias. Para cambiar sus detalles y elegir a qué listas desea suscribirse, visite su página de preferencias personal; o puedes cancelar su suscripción por completo de todos los envíos futuros.
--
Hello Dear,
how are you today?hope you are fine
My name is Dr Ava Smith ,Am an English and French nationalities.
I will give you pictures and more details about me as soon as i hear from you
Thanks
Ava
From: Niklas Cassel <niklas.cassel(a)wdc.com>
Commit 67d96729a9e7 ("riscv: Update Canaan Kendryte K210 device tree")
incorrectly removed two entries from the PLIC interrupt-controller node's
interrupts-extended property.
The PLIC driver cannot know the mapping between hart contexts and hart ids,
so this information has to be provided by device tree, as specified by the
PLIC device tree binding.
The PLIC driver uses the interrupts-extended property, and initializes the
hart context registers in the exact same order as provided by the
interrupts-extended property.
In other words, if we don't specify the S-mode interrupts, the PLIC driver
will simply initialize the hart0 S-mode hart context with the hart1 M-mode
configuration. It is therefore essential to specify the S-mode IRQs even
though the system itself will only ever be running in M-mode.
Re-add the S-mode interrupts, so that we get working IRQs on hart1 again.
Cc: <stable(a)vger.kernel.org>
Fixes: 67d96729a9e7 ("riscv: Update Canaan Kendryte K210 device tree")
Signed-off-by: Niklas Cassel <niklas.cassel(a)wdc.com>
---
arch/riscv/boot/dts/canaan/k210.dtsi | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/riscv/boot/dts/canaan/k210.dtsi b/arch/riscv/boot/dts/canaan/k210.dtsi
index 56f57118c633..44d338514761 100644
--- a/arch/riscv/boot/dts/canaan/k210.dtsi
+++ b/arch/riscv/boot/dts/canaan/k210.dtsi
@@ -113,7 +113,8 @@ plic0: interrupt-controller@c000000 {
compatible = "canaan,k210-plic", "sifive,plic-1.0.0";
reg = <0xC000000 0x4000000>;
interrupt-controller;
- interrupts-extended = <&cpu0_intc 11>, <&cpu1_intc 11>;
+ interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>,
+ <&cpu1_intc 11>, <&cpu1_intc 9>;
riscv,ndev = <65>;
};
--
2.35.1
There is a limited amount of SGX memory (EPC) on each system. When that
memory is used up, SGX has its own swapping mechanism which is similar
in concept but totally separate from the core mm/* code. Instead of
swapping to disk, SGX swaps from EPC to normal RAM. That normal RAM
comes from a shared memory pseudo-file and can itself be swapped by the
core mm code. There is a hierarchy like this:
EPC <-> shmem <-> disk
After data is swapped back in from shmem to EPC, the shmem backing
storage needs to be freed. Currently, the backing shmem is not freed.
This effectively wastes the shmem while the enclave is running. The
memory is recovered when the enclave is destroyed and the backing
storage freed.
Sort this out by freeing memory with shmem_truncate_range(), as soon as
a page is faulted back to the EPC. In addition, free the memory for
PCMD pages as soon as all PCMD's in a page have been marked as unused
by zeroing its contents.
Reported-by: Dave Hansen <dave.hansen(a)linux.intel.com>
Cc: stable(a)vger.kernel.org
Fixes: 1728ab54b4be ("x86/sgx: Add a page reclaimer")
Signed-off-by: Jarkko Sakkinen <jarkko(a)kernel.org>
---
v5:
* Encapsulated file offset calculation for PCMD struct.
* Replaced "magic number" PAGE_SIZE with sizeof(struct sgx_secs) to make
the offset calculation more self-documentative.
v4:
* Sanitized the offset calculations.
v3:
* Resend.
v2:
* Rewrite commit message as proposed by Dave.
* Truncate PCMD pages (Dave).
---
arch/x86/kernel/cpu/sgx/encl.c | 57 ++++++++++++++++++++++++++++------
1 file changed, 48 insertions(+), 9 deletions(-)
diff --git a/arch/x86/kernel/cpu/sgx/encl.c b/arch/x86/kernel/cpu/sgx/encl.c
index 8be6f0592bdc..3d2ed8d27747 100644
--- a/arch/x86/kernel/cpu/sgx/encl.c
+++ b/arch/x86/kernel/cpu/sgx/encl.c
@@ -12,6 +12,30 @@
#include "encls.h"
#include "sgx.h"
+/*
+ * Calculate byte offset of a PCMD struct associated with an enclave page. PCMD's
+ * follow right after the EPC data in the backing storage. In addition to the
+ * visible enclave pages, there's one extra page slot for SECS, before PCMD
+ * structs.
+ */
+static inline pgoff_t sgx_encl_get_backing_page_pcmd_offset(struct sgx_encl *encl,
+ unsigned long page_index)
+{
+ pgoff_t epc_end_off = encl->size + sizeof(struct sgx_secs);
+
+ return epc_end_off + page_index * sizeof(struct sgx_pcmd);
+}
+
+/*
+ * Free a page from the backing storage in the given page index.
+ */
+static inline void sgx_encl_truncate_backing_page(struct sgx_encl *encl, unsigned long page_index)
+{
+ struct inode *inode = file_inode(encl->backing);
+
+ shmem_truncate_range(inode, PFN_PHYS(page_index), PFN_PHYS(page_index) + PAGE_SIZE - 1);
+}
+
/*
* ELDU: Load an EPC page as unblocked. For more info, see "OS Management of EPC
* Pages" in the SDM.
@@ -22,9 +46,11 @@ static int __sgx_encl_eldu(struct sgx_encl_page *encl_page,
{
unsigned long va_offset = encl_page->desc & SGX_ENCL_PAGE_VA_OFFSET_MASK;
struct sgx_encl *encl = encl_page->encl;
+ pgoff_t page_index, page_pcmd_off;
struct sgx_pageinfo pginfo;
struct sgx_backing b;
- pgoff_t page_index;
+ bool pcmd_page_empty;
+ u8 *pcmd_page;
int ret;
if (secs_page)
@@ -32,14 +58,16 @@ static int __sgx_encl_eldu(struct sgx_encl_page *encl_page,
else
page_index = PFN_DOWN(encl->size);
+ page_pcmd_off = sgx_encl_get_backing_page_pcmd_offset(encl, page_index);
+
ret = sgx_encl_lookup_backing(encl, page_index, &b);
if (ret)
return ret;
pginfo.addr = encl_page->desc & PAGE_MASK;
pginfo.contents = (unsigned long)kmap_atomic(b.contents);
- pginfo.metadata = (unsigned long)kmap_atomic(b.pcmd) +
- b.pcmd_offset;
+ pcmd_page = kmap_atomic(b.pcmd);
+ pginfo.metadata = (unsigned long)pcmd_page + b.pcmd_offset;
if (secs_page)
pginfo.secs = (u64)sgx_get_epc_virt_addr(secs_page);
@@ -55,11 +83,24 @@ static int __sgx_encl_eldu(struct sgx_encl_page *encl_page,
ret = -EFAULT;
}
- kunmap_atomic((void *)(unsigned long)(pginfo.metadata - b.pcmd_offset));
+ memset(pcmd_page + b.pcmd_offset, 0, sizeof(struct sgx_pcmd));
+
+ /*
+ * The area for the PCMD in the page was zeroed above. Check if the
+ * whole page is now empty meaning that all PCMD's have been zeroed:
+ */
+ pcmd_page_empty = !memchr_inv(pcmd_page, 0, PAGE_SIZE);
+
+ kunmap_atomic(pcmd_page);
kunmap_atomic((void *)(unsigned long)pginfo.contents);
sgx_encl_put_backing(&b, false);
+ sgx_encl_truncate_backing_page(encl, page_index);
+
+ if (pcmd_page_empty)
+ sgx_encl_truncate_backing_page(encl, PFN_DOWN(page_pcmd_off));
+
return ret;
}
@@ -583,7 +624,7 @@ static struct page *sgx_encl_get_backing_page(struct sgx_encl *encl,
static int sgx_encl_get_backing(struct sgx_encl *encl, unsigned long page_index,
struct sgx_backing *backing)
{
- pgoff_t pcmd_index = PFN_DOWN(encl->size) + 1 + (page_index >> 5);
+ pgoff_t page_pcmd_off = sgx_encl_get_backing_page_pcmd_offset(encl, page_index);
struct page *contents;
struct page *pcmd;
@@ -591,7 +632,7 @@ static int sgx_encl_get_backing(struct sgx_encl *encl, unsigned long page_index,
if (IS_ERR(contents))
return PTR_ERR(contents);
- pcmd = sgx_encl_get_backing_page(encl, pcmd_index);
+ pcmd = sgx_encl_get_backing_page(encl, PFN_DOWN(page_pcmd_off));
if (IS_ERR(pcmd)) {
put_page(contents);
return PTR_ERR(pcmd);
@@ -600,9 +641,7 @@ static int sgx_encl_get_backing(struct sgx_encl *encl, unsigned long page_index,
backing->page_index = page_index;
backing->contents = contents;
backing->pcmd = pcmd;
- backing->pcmd_offset =
- (page_index & (PAGE_SIZE / sizeof(struct sgx_pcmd) - 1)) *
- sizeof(struct sgx_pcmd);
+ backing->pcmd_offset = page_pcmd_off & (PAGE_SIZE - 1);
return 0;
}
--
2.35.1
From: Nicholas Kazlauskas <nicholas.kazlauskas(a)amd.com>
'commit 708978487304 ("drm/amdgpu/display: Only set vblank_disable_immediate when PSR is not enabled")'
Fixes: 92020e81ddbe ("drm/amdgpu/display: set vblank_disable_immediate for DC")
Kernel version to apply: 5.15.17+
[Why]
PSR currently relies on the kernel's delayed vblank on/off mechanism
as an implicit bufferring mechanism to prevent excessive entry/exit.
Without this delay the user experience is impacted since it can take
a few frames to enter/exit.
[How]
Only allow vblank disable immediate for DC when psr is not supported.
Leave a TODO indicating that this support should be extended in the
future to delay independent of the vblank interrupt.
Acked-by: Alex Deucher <alexander.deucher(a)amd.com>
Reviewed-by: Harry Wentland <harry.wentland(a)amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas(a)amd.com>
Signed-off-by: Alex Deucher <alexander.deucher(a)amd.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 5ae9b8133d6d..76967adc5160 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -1279,9 +1279,6 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
adev_to_drm(adev)->mode_config.cursor_width = adev->dm.dc->caps.max_cursor_size;
adev_to_drm(adev)->mode_config.cursor_height = adev->dm.dc->caps.max_cursor_size;
- /* Disable vblank IRQs aggressively for power-saving */
- adev_to_drm(adev)->vblank_disable_immediate = true;
-
if (drm_vblank_init(adev_to_drm(adev), adev->dm.display_indexes_num)) {
DRM_ERROR(
"amdgpu: failed to initialize sw for display support.\n");
@@ -3866,6 +3863,14 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
}
+ /*
+ * Disable vblank IRQs aggressively for power-saving.
+ *
+ * TODO: Fix vblank control helpers to delay PSR entry to allow this when PSR
+ * is also supported.
+ */
+ adev_to_drm(adev)->vblank_disable_immediate = !psr_feature_enabled;
+
/* Software is initialized. Now we can register interrupt handlers. */
switch (adev->asic_type) {
#if defined(CONFIG_DRM_AMD_DC_SI)
--
2.25.1
From: Lino Sanfilippo <l.sanfilippo(a)kunbus.com>
The following sequence of operations results in a refcount warning:
1. Open device /dev/tpmrm.
2. Remove module tpm_tis_spi.
3. Write a TPM command to the file descriptor opened at step 1.
------------[ cut here ]------------
WARNING: CPU: 3 PID: 1161 at lib/refcount.c:25 kobject_get+0xa0/0xa4
refcount_t: addition on 0; use-after-free.
Modules linked in: tpm_tis_spi tpm_tis_core tpm mdio_bcm_unimac brcmfmac
sha256_generic libsha256 sha256_arm hci_uart btbcm bluetooth cfg80211 vc4
brcmutil ecdh_generic ecc snd_soc_core crc32_arm_ce libaes
raspberrypi_hwmon ac97_bus snd_pcm_dmaengine bcm2711_thermal snd_pcm
snd_timer genet snd phy_generic soundcore [last unloaded: spi_bcm2835]
CPU: 3 PID: 1161 Comm: hold_open Not tainted 5.10.0ls-main-dirty #2
Hardware name: BCM2711
[<c0410c3c>] (unwind_backtrace) from [<c040b580>] (show_stack+0x10/0x14)
[<c040b580>] (show_stack) from [<c1092174>] (dump_stack+0xc4/0xd8)
[<c1092174>] (dump_stack) from [<c0445a30>] (__warn+0x104/0x108)
[<c0445a30>] (__warn) from [<c0445aa8>] (warn_slowpath_fmt+0x74/0xb8)
[<c0445aa8>] (warn_slowpath_fmt) from [<c08435d0>] (kobject_get+0xa0/0xa4)
[<c08435d0>] (kobject_get) from [<bf0a715c>] (tpm_try_get_ops+0x14/0x54 [tpm])
[<bf0a715c>] (tpm_try_get_ops [tpm]) from [<bf0a7d6c>] (tpm_common_write+0x38/0x60 [tpm])
[<bf0a7d6c>] (tpm_common_write [tpm]) from [<c05a7ac0>] (vfs_write+0xc4/0x3c0)
[<c05a7ac0>] (vfs_write) from [<c05a7ee4>] (ksys_write+0x58/0xcc)
[<c05a7ee4>] (ksys_write) from [<c04001a0>] (ret_fast_syscall+0x0/0x4c)
Exception stack(0xc226bfa8 to 0xc226bff0)
bfa0: 00000000 000105b4 00000003 beafe664 00000014 00000000
bfc0: 00000000 000105b4 000103f8 00000004 00000000 00000000 b6f9c000 beafe684
bfe0: 0000006c beafe648 0001056c b6eb6944
---[ end trace d4b8409def9b8b1f ]---
The reason for this warning is the attempt to get the chip->dev reference
in tpm_common_write() although the reference counter is already zero.
Since commit 8979b02aaf1d ("tpm: Fix reference count to main device") the
extra reference used to prevent a premature zero counter is never taken,
because the required TPM_CHIP_FLAG_TPM2 flag is never set.
Fix this by moving the TPM 2 character device handling from
tpm_chip_alloc() to tpm_add_char_device() which is called at a later point
in time when the flag has been set in case of TPM2.
Commit fdc915f7f719 ("tpm: expose spaces via a device link /dev/tpmrm<n>")
already introduced function tpm_devs_release() to release the extra
reference but did not implement the required put on chip->devs that results
in the call of this function.
Fix this by putting chip->devs in tpm_chip_unregister().
Finally move the new implementation for the TPM 2 handling into a new
function to avoid multiple checks for the TPM_CHIP_FLAG_TPM2 flag in the
good case and error cases.
Cc: stable(a)vger.kernel.org
Fixes: fdc915f7f719 ("tpm: expose spaces via a device link /dev/tpmrm<n>")
Fixes: 8979b02aaf1d ("tpm: Fix reference count to main device")
Co-developed-by: Jason Gunthorpe <jgg(a)ziepe.ca>
Signed-off-by: Jason Gunthorpe <jgg(a)ziepe.ca>
Signed-off-by: Lino Sanfilippo <l.sanfilippo(a)kunbus.com>
---
drivers/char/tpm/tpm-chip.c | 48 +++++++-----------------------
drivers/char/tpm/tpm.h | 1 +
drivers/char/tpm/tpm2-space.c | 55 +++++++++++++++++++++++++++++++++++
3 files changed, 66 insertions(+), 38 deletions(-)
diff --git a/drivers/char/tpm/tpm-chip.c b/drivers/char/tpm/tpm-chip.c
index b009e7479b70..06beee4da808 100644
--- a/drivers/char/tpm/tpm-chip.c
+++ b/drivers/char/tpm/tpm-chip.c
@@ -274,14 +274,6 @@ static void tpm_dev_release(struct device *dev)
kfree(chip);
}
-static void tpm_devs_release(struct device *dev)
-{
- struct tpm_chip *chip = container_of(dev, struct tpm_chip, devs);
-
- /* release the master device reference */
- put_device(&chip->dev);
-}
-
/**
* tpm_class_shutdown() - prepare the TPM device for loss of power.
* @dev: device to which the chip is associated.
@@ -344,7 +336,6 @@ struct tpm_chip *tpm_chip_alloc(struct device *pdev,
chip->dev_num = rc;
device_initialize(&chip->dev);
- device_initialize(&chip->devs);
chip->dev.class = tpm_class;
chip->dev.class->shutdown_pre = tpm_class_shutdown;
@@ -352,29 +343,12 @@ struct tpm_chip *tpm_chip_alloc(struct device *pdev,
chip->dev.parent = pdev;
chip->dev.groups = chip->groups;
- chip->devs.parent = pdev;
- chip->devs.class = tpmrm_class;
- chip->devs.release = tpm_devs_release;
- /* get extra reference on main device to hold on
- * behalf of devs. This holds the chip structure
- * while cdevs is in use. The corresponding put
- * is in the tpm_devs_release (TPM2 only)
- */
- if (chip->flags & TPM_CHIP_FLAG_TPM2)
- get_device(&chip->dev);
-
if (chip->dev_num == 0)
chip->dev.devt = MKDEV(MISC_MAJOR, TPM_MINOR);
else
chip->dev.devt = MKDEV(MAJOR(tpm_devt), chip->dev_num);
- chip->devs.devt =
- MKDEV(MAJOR(tpm_devt), chip->dev_num + TPM_NUM_DEVICES);
-
rc = dev_set_name(&chip->dev, "tpm%d", chip->dev_num);
- if (rc)
- goto out;
- rc = dev_set_name(&chip->devs, "tpmrm%d", chip->dev_num);
if (rc)
goto out;
@@ -382,9 +356,7 @@ struct tpm_chip *tpm_chip_alloc(struct device *pdev,
chip->flags |= TPM_CHIP_FLAG_VIRTUAL;
cdev_init(&chip->cdev, &tpm_fops);
- cdev_init(&chip->cdevs, &tpmrm_fops);
chip->cdev.owner = THIS_MODULE;
- chip->cdevs.owner = THIS_MODULE;
rc = tpm2_init_space(&chip->work_space, TPM2_SPACE_BUFFER_SIZE);
if (rc) {
@@ -396,7 +368,6 @@ struct tpm_chip *tpm_chip_alloc(struct device *pdev,
return chip;
out:
- put_device(&chip->devs);
put_device(&chip->dev);
return ERR_PTR(rc);
}
@@ -445,14 +416,9 @@ static int tpm_add_char_device(struct tpm_chip *chip)
}
if (chip->flags & TPM_CHIP_FLAG_TPM2 && !tpm_is_firmware_upgrade(chip)) {
- rc = cdev_device_add(&chip->cdevs, &chip->devs);
- if (rc) {
- dev_err(&chip->devs,
- "unable to cdev_device_add() %s, major %d, minor %d, err=%d\n",
- dev_name(&chip->devs), MAJOR(chip->devs.devt),
- MINOR(chip->devs.devt), rc);
- return rc;
- }
+ rc = tpm_devs_add(chip);
+ if (rc)
+ goto err_del_cdev;
}
/* Make the chip available. */
@@ -460,6 +426,10 @@ static int tpm_add_char_device(struct tpm_chip *chip)
idr_replace(&dev_nums_idr, chip, chip->dev_num);
mutex_unlock(&idr_lock);
+ return 0;
+
+err_del_cdev:
+ cdev_device_del(&chip->cdev, &chip->dev);
return rc;
}
@@ -653,8 +623,10 @@ void tpm_chip_unregister(struct tpm_chip *chip)
if (IS_ENABLED(CONFIG_HW_RANDOM_TPM) && !tpm_is_firmware_upgrade(chip))
hwrng_unregister(&chip->hwrng);
tpm_bios_log_teardown(chip);
- if (chip->flags & TPM_CHIP_FLAG_TPM2 && !tpm_is_firmware_upgrade(chip))
+ if (chip->flags & TPM_CHIP_FLAG_TPM2 && !tpm_is_firmware_upgrade(chip)) {
cdev_device_del(&chip->cdevs, &chip->devs);
+ put_device(&chip->devs);
+ }
tpm_del_char_device(chip);
}
EXPORT_SYMBOL_GPL(tpm_chip_unregister);
diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
index 283f78211c3a..b7070ea9212a 100644
--- a/drivers/char/tpm/tpm.h
+++ b/drivers/char/tpm/tpm.h
@@ -234,6 +234,7 @@ int tpm2_prepare_space(struct tpm_chip *chip, struct tpm_space *space, u8 *cmd,
size_t cmdsiz);
int tpm2_commit_space(struct tpm_chip *chip, struct tpm_space *space, void *buf,
size_t *bufsiz);
+int tpm_devs_add(struct tpm_chip *chip);
void tpm_bios_log_setup(struct tpm_chip *chip);
void tpm_bios_log_teardown(struct tpm_chip *chip);
diff --git a/drivers/char/tpm/tpm2-space.c b/drivers/char/tpm/tpm2-space.c
index 97e916856cf3..bd9fbd32bc01 100644
--- a/drivers/char/tpm/tpm2-space.c
+++ b/drivers/char/tpm/tpm2-space.c
@@ -574,3 +574,58 @@ int tpm2_commit_space(struct tpm_chip *chip, struct tpm_space *space,
dev_err(&chip->dev, "%s: error %d\n", __func__, rc);
return rc;
}
+
+/*
+ * Put the reference to the main device.
+ */
+static void tpm_devs_release(struct device *dev)
+{
+ struct tpm_chip *chip = container_of(dev, struct tpm_chip, devs);
+
+ /* release the master device reference */
+ put_device(&chip->dev);
+}
+
+/*
+ * Add a device file to expose TPM spaces. Also take a reference to the
+ * main device.
+ */
+int tpm_devs_add(struct tpm_chip *chip)
+{
+ int rc;
+
+ device_initialize(&chip->devs);
+ chip->devs.parent = chip->dev.parent;
+ chip->devs.class = tpmrm_class;
+
+ /*
+ * Get extra reference on main device to hold on behalf of devs.
+ * This holds the chip structure while cdevs is in use. The
+ * corresponding put is in the tpm_devs_release.
+ */
+ get_device(&chip->dev);
+ chip->devs.release = tpm_devs_release;
+ chip->devs.devt = MKDEV(MAJOR(tpm_devt), chip->dev_num + TPM_NUM_DEVICES);
+ cdev_init(&chip->cdevs, &tpmrm_fops);
+ chip->cdevs.owner = THIS_MODULE;
+
+ rc = dev_set_name(&chip->devs, "tpmrm%d", chip->dev_num);
+ if (rc)
+ goto err_put_devs;
+
+ rc = cdev_device_add(&chip->cdevs, &chip->devs);
+ if (rc) {
+ dev_err(&chip->devs,
+ "unable to cdev_device_add() %s, major %d, minor %d, err=%d\n",
+ dev_name(&chip->devs), MAJOR(chip->devs.devt),
+ MINOR(chip->devs.devt), rc);
+ goto err_put_devs;
+ }
+
+ return 0;
+
+err_put_devs:
+ put_device(&chip->devs);
+
+ return rc;
+}
--
2.35.1
Ampere Altra defines CPU clusters in the ACPI PPTT. They share a Snoop
Control Unit, but have no shared CPU-side last level cache.
cpu_coregroup_mask() will return a cpumask with weight 1, while
cpu_clustergroup_mask() will return a cpumask with weight 2.
As a result, build_sched_domain() will BUG() once per CPU with:
BUG: arch topology borken
the CLS domain not a subset of the MC domain
The MC level cpumask is then extended to that of the CLS child, and is
later removed entirely as redundant. This sched domain topology is an
improvement over previous topologies, or those built without
SCHED_CLUSTER, particularly for certain latency sensitive workloads.
With the current scheduler model and heuristics, this is a desirable
default topology for Ampere Altra and Altra Max system.
Introduce an alternate sched domain topology for arm64 without the MC
level and test for llc_sibling weight 1 across all CPUs to enable it.
Do this in arch/arm64/kernel/smp.c (as opposed to
arch/arm64/kernel/topology.c) as all the CPU sibling maps are now
populated and we avoid needing to extend the drivers/acpi/pptt.c API to
detect the cluster level being above the cpu llc level. This is
consistent with other architectures and provides a readily extensible
mechanism for other alternate topologies.
The final sched domain topology for a 2 socket Ampere Altra system is
unchanged with or without CONFIG_SCHED_CLUSTER, and the BUG is avoided:
For CPU0:
CONFIG_SCHED_CLUSTER=y
CLS [0-1]
DIE [0-79]
NUMA [0-159]
CONFIG_SCHED_CLUSTER is not set
DIE [0-79]
NUMA [0-159]
Cc: Catalin Marinas <catalin.marinas(a)arm.com>
Cc: Will Deacon <will(a)kernel.org>
Cc: Peter Zijlstra <peterz(a)infradead.org>
Cc: Vincent Guittot <vincent.guittot(a)linaro.org>
Cc: Barry Song <song.bao.hua(a)hisilicon.com>
Cc: Valentin Schneider <valentin.schneider(a)arm.com>
Cc: D. Scott Phillips <scott(a)os.amperecomputing.com>
Cc: Ilkka Koskinen <ilkka(a)os.amperecomputing.com>
Cc: <stable(a)vger.kernel.org> # 5.16.x
Signed-off-by: Darren Hart <darren(a)os.amperecomputing.com>
---
arch/arm64/kernel/smp.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
index 27df5c1e6baa..3597e75645e1 100644
--- a/arch/arm64/kernel/smp.c
+++ b/arch/arm64/kernel/smp.c
@@ -433,6 +433,33 @@ static void __init hyp_mode_check(void)
}
}
+static struct sched_domain_topology_level arm64_no_mc_topology[] = {
+#ifdef CONFIG_SCHED_SMT
+ { cpu_smt_mask, cpu_smt_flags, SD_INIT_NAME(SMT) },
+#endif
+
+#ifdef CONFIG_SCHED_CLUSTER
+ { cpu_clustergroup_mask, cpu_cluster_flags, SD_INIT_NAME(CLS) },
+#endif
+
+ { cpu_cpu_mask, SD_INIT_NAME(DIE) },
+ { NULL, },
+};
+
+static void __init update_sched_domain_topology(void)
+{
+ int cpu;
+
+ for_each_possible_cpu(cpu) {
+ if (cpu_topology[cpu].llc_id != -1 &&
+ cpumask_weight(&cpu_topology[cpu].llc_sibling) > 1)
+ return;
+ }
+
+ pr_info("No LLC siblings, using No MC sched domains topology\n");
+ set_sched_topology(arm64_no_mc_topology);
+}
+
void __init smp_cpus_done(unsigned int max_cpus)
{
pr_info("SMP: Total of %d processors activated.\n", num_online_cpus());
@@ -440,6 +467,7 @@ void __init smp_cpus_done(unsigned int max_cpus)
hyp_mode_check();
apply_alternatives_all();
mark_linear_text_alias_ro();
+ update_sched_domain_topology();
}
void __init smp_prepare_boot_cpu(void)
--
2.31.1
From: Sean Christopherson <seanjc(a)google.com>
Explicitly check for present SPTEs when clearing dirty bits in the TDP
MMU. This isn't strictly required for correctness, as setting the dirty
bit in a defunct SPTE will not change the SPTE from !PRESENT to PRESENT.
However, the guarded MMU_WARN_ON() in spte_ad_need_write_protect() would
complain if anyone actually turned on KVM's MMU debugging.
Fixes: a6a0b05da9f3 ("kvm: x86/mmu: Support dirty logging for the TDP MMU")
Cc: Ben Gardon <bgardon(a)google.com>
Signed-off-by: Sean Christopherson <seanjc(a)google.com>
Reviewed-by: Ben Gardon <bgardon(a)google.com>
Message-Id: <20220226001546.360188-3-seanjc(a)google.com>
Cc: stable(a)vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini(a)redhat.com>
---
arch/x86/kvm/mmu/tdp_mmu.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/x86/kvm/mmu/tdp_mmu.c b/arch/x86/kvm/mmu/tdp_mmu.c
index debf08212f12..4cf0cc04b2a0 100644
--- a/arch/x86/kvm/mmu/tdp_mmu.c
+++ b/arch/x86/kvm/mmu/tdp_mmu.c
@@ -1468,6 +1468,9 @@ static bool clear_dirty_gfn_range(struct kvm *kvm, struct kvm_mmu_page *root,
if (tdp_mmu_iter_cond_resched(kvm, &iter, false, true))
continue;
+ if (!is_shadow_present_pte(iter.old_spte))
+ continue;
+
if (spte_ad_need_write_protect(iter.old_spte)) {
if (is_writable_pte(iter.old_spte))
new_spte = iter.old_spte & ~PT_WRITABLE_MASK;
--
2.31.1
Tie the lifetime the KVM module to the lifetime of each VM via
kvm.users_count. This way anything that grabs a reference to the VM via
kvm_get_kvm() cannot accidentally outlive the KVM module.
Prior to this commit, the lifetime of the KVM module was tied to the
lifetime of /dev/kvm file descriptors, VM file descriptors, and vCPU
file descriptors by their respective file_operations "owner" field.
This approach is insufficient because references grabbed via
kvm_get_kvm() do not prevent closing any of the aforementioned file
descriptors.
This fixes a long standing theoretical bug in KVM that at least affects
async page faults. kvm_setup_async_pf() grabs a reference via
kvm_get_kvm(), and drops it in an asynchronous work callback. Nothing
prevents the VM file descriptor from being closed and the KVM module
from being unloaded before this callback runs.
Fixes: af585b921e5d ("KVM: Halt vcpu if page it tries to access is swapped out")
Cc: stable(a)vger.kernel.org
Suggested-by: Ben Gardon <bgardon(a)google.com>
[ Based on a patch from Ben implemented for Google's kernel. ]
Signed-off-by: David Matlack <dmatlack(a)google.com>
---
virt/kvm/kvm_main.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 35ae6d32dae5..b59f0a29dbd5 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -117,6 +117,8 @@ EXPORT_SYMBOL_GPL(kvm_debugfs_dir);
static const struct file_operations stat_fops_per_vm;
+static struct file_operations kvm_chardev_ops;
+
static long kvm_vcpu_ioctl(struct file *file, unsigned int ioctl,
unsigned long arg);
#ifdef CONFIG_KVM_COMPAT
@@ -1131,6 +1133,11 @@ static struct kvm *kvm_create_vm(unsigned long type)
preempt_notifier_inc();
kvm_init_pm_notifier(kvm);
+ if (!try_module_get(kvm_chardev_ops.owner)) {
+ r = -ENODEV;
+ goto out_err;
+ }
+
return kvm;
out_err:
@@ -1220,6 +1227,7 @@ static void kvm_destroy_vm(struct kvm *kvm)
preempt_notifier_dec();
hardware_disable_all();
mmdrop(mm);
+ module_put(kvm_chardev_ops.owner);
}
void kvm_get_kvm(struct kvm *kvm)
base-commit: b13a3befc815eae574d87e6249f973dfbb6ad6cd
prerequisite-patch-id: 38f66d60319bf0bc9bf49f91f0f9119e5441629b
prerequisite-patch-id: 51aa921d68ea649d436ea68e1b8f4aabc3805156
--
2.35.1.616.g0bdcbb4464-goog
There is an oddity in the way the RSR register flags propagate to the
ISR register (and the actual interrupt output) on this hardware: it
appears that RSR register bits only result in ISR being asserted if the
interrupt was actually enabled at the time, so enabling interrupts with
RSR bits already set doesn't trigger an interrupt to be raised. There
was already a partial fix for this race in the macb_poll function where
it checked for RSR bits being set and re-triggered NAPI receive.
However, there was a still a race window between checking RSR and
actually enabling interrupts, where a lost wakeup could happen. It's
necessary to check again after enabling interrupts to see if RSR was set
just prior to the interrupt being enabled, and re-trigger receive in that
case.
This issue was noticed in a point-to-point UDP request-response protocol
which periodically saw timeouts or abnormally high response times due to
received packets not being processed in a timely fashion. In many
applications, more packets arriving, including TCP retransmissions, would
cause the original packet to be processed, thus masking the issue.
Also change from using napi_reschedule to napi_schedule, as the only
difference is the presence of a return value which wasn't used here
anyway.
Fixes: 02f7a34f34e3 ("net: macb: Re-enable RX interrupt only when RX is done")
Cc: stable(a)vger.kernel.org
Co-developed-by: Scott McNutt <scott.mcnutt(a)siriusxm.com>
Signed-off-by: Scott McNutt <scott.mcnutt(a)siriusxm.com>
Signed-off-by: Robert Hancock <robert.hancock(a)calian.com>
---
drivers/net/ethernet/cadence/macb_main.c | 26 ++++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 98498a76ae16..338660fe1d93 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -1573,14 +1573,36 @@ static int macb_poll(struct napi_struct *napi, int budget)
if (work_done < budget) {
napi_complete_done(napi, work_done);
- /* Packets received while interrupts were disabled */
+ /* RSR bits only seem to propagate to raise interrupts when
+ * interrupts are enabled at the time, so if bits are already
+ * set due to packets received while interrupts were disabled,
+ * they will not cause another interrupt to be generated when
+ * interrupts are re-enabled.
+ * Check for this case here.
+ */
status = macb_readl(bp, RSR);
if (status) {
if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE)
queue_writel(queue, ISR, MACB_BIT(RCOMP));
- napi_reschedule(napi);
+ napi_schedule(napi);
} else {
queue_writel(queue, IER, bp->rx_intr_mask);
+
+ /* Packets could have been received in the window
+ * between the check above and re-enabling interrupts.
+ * Therefore, a double-check is required to avoid
+ * losing a wakeup. This can potentially race with
+ * the interrupt handler doing the same actions if an
+ * interrupt is raised just after enabling them, but
+ * this should be harmless.
+ */
+ status = macb_readl(bp, RSR);
+ if (unlikely(status)) {
+ queue_writel(queue, IDR, bp->rx_intr_mask);
+ if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE)
+ queue_writel(queue, ISR, MACB_BIT(RCOMP));
+ napi_schedule(napi);
+ }
}
}
--
2.31.1
Please pick these two commits for all stable branches:
commit 89f3594d0de58e8a57d92d497dea9fee3d4b9cda
Author: Hangyu Hua <hbh25y(a)gmail.com>
Date: Sat Jan 1 01:21:37 2022 +0800
usb: gadget: don't release an existing dev->buf
commit 501e38a5531efbd77d5c73c0ba838a889bfc1d74
Author: Hangyu Hua <hbh25y(a)gmail.com>
Date: Sat Jan 1 01:21:38 2022 +0800
usb: gadget: clear related members when goto fail
Ben.
--
Ben Hutchings
The first rule of tautology club is the first rule of tautology club.
This is a note to let you know that I've just added the patch titled
usb: typec: tipd: Forward plug orientation to typec subsystem
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-testing branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will be merged to the usb-next branch sometime soon,
after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
From 676748389f5db74e7d28f9d630eebd75cb8a11b4 Mon Sep 17 00:00:00 2001
From: Sven Peter <sven(a)svenpeter.dev>
Date: Sat, 26 Feb 2022 13:59:12 +0100
Subject: usb: typec: tipd: Forward plug orientation to typec subsystem
In order to bring up the USB3 PHY on the Apple M1 we need to know the
orientation of the Type-C cable. Extract it from the status register and
forward it to the typec subsystem.
Reviewed-by: Heikki Krogerus <heikki.krogerus(a)linux.intel.com>
Cc: stable <stable(a)vger.kernel.org>
Signed-off-by: Sven Peter <sven(a)svenpeter.dev>
Link: https://lore.kernel.org/r/20220226125912.59828-1-sven@svenpeter.dev
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/usb/typec/tipd/core.c | 5 +++++
drivers/usb/typec/tipd/tps6598x.h | 1 +
2 files changed, 6 insertions(+)
diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
index 7ffcda94d323..16b4560216ba 100644
--- a/drivers/usb/typec/tipd/core.c
+++ b/drivers/usb/typec/tipd/core.c
@@ -256,6 +256,10 @@ static int tps6598x_connect(struct tps6598x *tps, u32 status)
typec_set_pwr_opmode(tps->port, mode);
typec_set_pwr_role(tps->port, TPS_STATUS_TO_TYPEC_PORTROLE(status));
typec_set_vconn_role(tps->port, TPS_STATUS_TO_TYPEC_VCONN(status));
+ if (TPS_STATUS_TO_UPSIDE_DOWN(status))
+ typec_set_orientation(tps->port, TYPEC_ORIENTATION_REVERSE);
+ else
+ typec_set_orientation(tps->port, TYPEC_ORIENTATION_NORMAL);
tps6598x_set_data_role(tps, TPS_STATUS_TO_TYPEC_DATAROLE(status), true);
tps->partner = typec_register_partner(tps->port, &desc);
@@ -278,6 +282,7 @@ static void tps6598x_disconnect(struct tps6598x *tps, u32 status)
typec_set_pwr_opmode(tps->port, TYPEC_PWR_MODE_USB);
typec_set_pwr_role(tps->port, TPS_STATUS_TO_TYPEC_PORTROLE(status));
typec_set_vconn_role(tps->port, TPS_STATUS_TO_TYPEC_VCONN(status));
+ typec_set_orientation(tps->port, TYPEC_ORIENTATION_NONE);
tps6598x_set_data_role(tps, TPS_STATUS_TO_TYPEC_DATAROLE(status), false);
power_supply_changed(tps->psy);
diff --git a/drivers/usb/typec/tipd/tps6598x.h b/drivers/usb/typec/tipd/tps6598x.h
index 3dae84c524fb..527857549d69 100644
--- a/drivers/usb/typec/tipd/tps6598x.h
+++ b/drivers/usb/typec/tipd/tps6598x.h
@@ -17,6 +17,7 @@
/* TPS_REG_STATUS bits */
#define TPS_STATUS_PLUG_PRESENT BIT(0)
#define TPS_STATUS_PLUG_UPSIDE_DOWN BIT(4)
+#define TPS_STATUS_TO_UPSIDE_DOWN(s) (!!((s) & TPS_STATUS_PLUG_UPSIDE_DOWN))
#define TPS_STATUS_PORTROLE BIT(5)
#define TPS_STATUS_TO_TYPEC_PORTROLE(s) (!!((s) & TPS_STATUS_PORTROLE))
#define TPS_STATUS_DATAROLE BIT(6)
--
2.35.1