Compare commits

...

10 Commits

Author SHA1 Message Date
Thomas Lamprecht
3b923599d9 update ABI file for 6.8.8-2-pve
(generated with debian/scripts/abi-generate)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-06-24 16:21:27 +02:00
Thomas Lamprecht
7b21dc9155 bump version to 6.8.8-2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-06-24 11:57:44 +02:00
Thomas Lamprecht
04834cc60e cherry-pick "virtio-pci: Check if is_avq is NULL"
It's in master-next of current ubuntu noble kernel git tree and a null
check cannot really hurt.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-06-24 10:59:15 +02:00
Thomas Lamprecht
3604ba30ea fix #5554: improve e1000e stability on cable reconnection
Closes: https://bugzilla.proxmox.com/show_bug.cgi?id=5554
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-06-24 10:22:20 +02:00
Thomas Lamprecht
77af8d24c4 fix #5448: support SCSI contollers with bad VDP page length encoding again
The reporter has an Adaptec 5805 controller (using the aacraid
driver), which reports a byteswapped page length for VPD page 0. It
reports "02 00" as page length instead of "00 02".

This stopped working with kernel 6.8.4 due to commit b5fc07a5fb56
("scsi: core: Consult supported VPD page list prior to fetching page")

To address that issue limit the page search scope to the size of our
VPD buffer to guard against devices returning a larger page count than
requested.

Reported-by: Peter Schneider <pschneider1968@googlemail.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-06-20 10:55:23 +02:00
Thomas Lamprecht
8b2b863fa7 update ABI file for 6.8.8-1-pve
(generated with debian/scripts/abi-generate)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-06-10 15:14:56 +02:00
Thomas Lamprecht
19a6e1a733 update fwlist for 6.8.8-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-06-10 14:42:25 +02:00
Thomas Lamprecht
b2bfaa4f32 bump version to 6.8.8-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-06-10 13:42:25 +02:00
Thomas Lamprecht
159611cef0 update fix for managing block flush queue list
The patch from commit e5731f4 ("backport fix for managing block flush
queue list") caused some fallout when used with LVM on root, as that
uses some rather odd (but previously working fine) PREFLUSH
| POSTFLUSH format that was now causing the list to be used without
being initialized, resulting in freezes.

Link: https://lore.kernel.org/all/20240608143115.972486-1-chengming.zhou@linux.dev/
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-06-10 13:34:41 +02:00
Thomas Lamprecht
64439d549f rebase patches on top of Ubuntu-6.8.0-38.38
(generated with debian/scripts/import-upstream-tag)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-06-10 11:10:14 +02:00
15 changed files with 29195 additions and 29087 deletions

View File

@ -3,10 +3,10 @@ include /usr/share/dpkg/pkg-info.mk
# also bump proxmox-kernel-meta if the default MAJ.MIN version changes!
KERNEL_MAJ=6
KERNEL_MIN=8
KERNEL_PATCHLEVEL=4
KERNEL_PATCHLEVEL=8
# increment KREL for every published package release!
# rebuild packages with new KREL and run 'make abiupdate'
KREL=4
KREL=2
KERNEL_MAJMIN=$(KERNEL_MAJ).$(KERNEL_MIN)
KERNEL_VER=$(KERNEL_MAJMIN).$(KERNEL_PATCHLEVEL)

File diff suppressed because it is too large Load Diff

28965
abi-prev-6.8.8-2-pve Normal file

File diff suppressed because it is too large Load Diff

19
debian/changelog vendored
View File

@ -1,3 +1,22 @@
proxmox-kernel-6.8 (6.8.8-2) bookworm; urgency=medium
* fix #5448: support SCSI controllers with bad VDP page length encoding again
* fix #5554: improve e1000e stability on cable reconnection
* cherry-pick "virtio-pci: Check if is_avq is NULL"
-- Proxmox Support Team <support@proxmox.com> Mon, 24 Jun 2024 11:00:48 +0200
proxmox-kernel-6.8 (6.8.8-1) bookworm; urgency=medium
* update fix for managing block flush queue list to avioid a regression with
LVM
* update sources to Ubuntu-6.8.0-38.38 based on Linux 6.8.8
-- Proxmox Support Team <support@proxmox.com> Mon, 10 Jun 2024 13:42:20 +0200
proxmox-kernel-6.8 (6.8.4-4) bookworm; urgency=medium
* update ZFS to 2.2.4

View File

@ -1120,12 +1120,15 @@ iwlwifi-bz-a0-hr-b0-86.ucode kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.k
iwlwifi-cc-a0-77.ucode kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
iwlwifi-gl-b0-fm-b0-86.ucode kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
iwlwifi-gl-c0-fm-c0-86.ucode kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
iwlwifi-gl-c0-fm-c0.pnvm kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
iwlwifi-ma-a0-gf-a0-86.ucode kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
iwlwifi-ma-a0-gf4-a0-86.ucode kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
iwlwifi-ma-a0-hr-b0-86.ucode kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
iwlwifi-ma-a0-mr-a0-86.ucode kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
iwlwifi-ma-b0-gf-a0-86.ucode kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
iwlwifi-ma-b0-gf-a0.pnvm kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
iwlwifi-ma-b0-gf4-a0-86.ucode kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
iwlwifi-ma-b0-gf4-a0.pnvm kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
iwlwifi-ma-b0-hr-b0-86.ucode kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
iwlwifi-ma-b0-mr-a0-86.ucode kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
iwlwifi-sc-a0-fm-b0-86.ucode kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
@ -1134,10 +1137,17 @@ iwlwifi-sc-a0-gf-a0-86.ucode kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.k
iwlwifi-sc-a0-gf4-a0-86.ucode kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
iwlwifi-sc-a0-hr-b0-86.ucode kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
iwlwifi-sc-a0-wh-a0-86.ucode kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
iwlwifi-sc2-a0-fm-c0-86.ucode kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
iwlwifi-sc2-a0-wh-a0-86.ucode kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
iwlwifi-sc2f-a0-fm-c0-86.ucode kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
iwlwifi-sc2f-a0-wh-a0-86.ucode kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
iwlwifi-so-a0-gf-a0-86.ucode kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
iwlwifi-so-a0-gf-a0.pnvm kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
iwlwifi-so-a0-gf4-a0.pnvm kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
iwlwifi-so-a0-hr-b0-86.ucode kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
iwlwifi-so-a0-jf-b0-86.ucode kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
iwlwifi-ty-a0-gf-a0-86.ucode kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
iwlwifi-ty-a0-gf-a0.pnvm kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
kaweth/new_code.bin kernel/drivers/net/usb/kaweth.ko
kaweth/new_code_fix.bin kernel/drivers/net/usb/kaweth.ko
kaweth/trigger_code.bin kernel/drivers/net/usb/kaweth.ko
@ -1194,6 +1204,7 @@ liquidio/lio_23xx_nic.bin kernel/drivers/net/ethernet/cavium/liquidio/liquidio.k
liquidio/lio_410nv_nic.bin kernel/drivers/net/ethernet/cavium/liquidio/liquidio.ko
me2600_firmware.bin kernel/drivers/comedi/drivers/me_daq.ko
me4000_firmware.bin kernel/drivers/comedi/drivers/me4000.ko
mediatek/BT_RAM_CODE_MT7922_1_1_hdr.bin kernel/drivers/bluetooth/btmtk.ko
mediatek/BT_RAM_CODE_MT7961_1_2_hdr.bin kernel/drivers/bluetooth/btmtk.ko
mediatek/WIFI_MT7922_patch_mcu_1_1_hdr.bin kernel/drivers/net/wireless/mediatek/mt76/mt7921/mt7921e.ko
mediatek/WIFI_MT7961_patch_mcu_1_2_hdr.bin kernel/drivers/net/wireless/mediatek/mt76/mt7921/mt7921e.ko

View File

@ -55,10 +55,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 files changed, 111 insertions(+)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 3470cb524222..3c9192618839 100644
index 4272acb3d047..d18cc2c1f9c3 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -4399,6 +4399,15 @@
@@ -4400,6 +4400,15 @@
Also, it enforces the PCI Local Bus spec
rule that those bits should be 0 in system reset
events (useful for kexec/kdump cases).

View File

@ -14,10 +14,10 @@ Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index c9b8412f1c9d..67a9b4c1a511 100644
index c365aa06f886..c9066a7aa4c5 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -10464,7 +10464,7 @@ static struct net_device *netdev_wait_allrefs_any(struct list_head *list)
@@ -10470,7 +10470,7 @@ static struct net_device *netdev_wait_allrefs_any(struct list_head *list)
if (time_after(jiffies, warning_time +
READ_ONCE(netdev_unregister_timeout_secs) * HZ)) {
list_for_each_entry(dev, list, todo_list) {

View File

@ -78,7 +78,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 files changed, 21 insertions(+)
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index adba49afb5fe..e6e4408c8d51 100644
index 3a02276899db..e07a6089ba4b 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -262,6 +262,12 @@ static u64 cpuid_get_supported_xcr0(struct kvm_cpuid_entry2 *entries, int nent)
@ -95,7 +95,7 @@ index adba49afb5fe..e6e4408c8d51 100644
int nent)
{
diff --git a/arch/x86/kvm/cpuid.h b/arch/x86/kvm/cpuid.h
index 856e3037e74f..0ac5a84adcd5 100644
index 23dbb9eb277c..07da153802e4 100644
--- a/arch/x86/kvm/cpuid.h
+++ b/arch/x86/kvm/cpuid.h
@@ -32,6 +32,8 @@ int kvm_vcpu_ioctl_get_cpuid2(struct kvm_vcpu *vcpu,
@ -108,7 +108,7 @@ index 856e3037e74f..0ac5a84adcd5 100644
int cpuid_query_maxphyaddr(struct kvm_vcpu *vcpu);
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 8e4e48840290..3af8e426ead3 100644
index c84927216fad..880e2b87777e 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -5580,6 +5580,19 @@ static int kvm_vcpu_ioctl_x86_set_xsave(struct kvm_vcpu *vcpu,

View File

@ -11,7 +11,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index 8a1471f794cb..fa9c6e056f1b 100644
index c4c6240d14f9..5e037a9ea6a6 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -234,6 +234,7 @@ static int dmar_map_gfx = 1;

View File

@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Chengming Zhou <chengming.zhou@linux.dev>
Date: Tue, 4 Jun 2024 14:47:45 +0800
Date: Sat, 8 Jun 2024 22:31:15 +0800
Subject: [PATCH] block: fix request.queuelist usage in flush
Friedrich Weber reported a kernel crash problem and bisected to commit
@ -22,19 +22,27 @@ touch rq->queuelist after blk_mq_end_request() since we will reuse it to
add rq to the post-flush pending list in POSTFLUSH. If this is not true,
we will have to revert that commit IMHO.
This updated version adds "list_del_init(&rq->queuelist)" in flush rq
callback since the dm layer may submit request of a weird invalid format
(REQ_FSEQ_PREFLUSH | REQ_FSEQ_POSTFLUSH), which causes double list_add
if without this "list_del_init(&rq->queuelist)". The weird invalid format
problem should be fixed in dm layer.
Reported-by: Friedrich Weber <f.weber@proxmox.com>
Closes: https://lore.kernel.org/lkml/14b89dfb-505c-49f7-aebb-01c54451db40@proxmox.com/
Closes: https://lore.kernel.org/lkml/c9d03ff7-27c5-4ebd-b3f6-5a90d96f35ba@proxmox.com/
Fixes: 81ada09cc25e ("blk-flush: reuse rq queuelist in flush state machine")
Cc: Christoph Hellwig <hch@lst.de>
Cc: ming.lei@redhat.com
Cc: bvanassche@acm.org
Tested-by: Friedrich Weber <f.weber@proxmox.com>
Signed-off-by: Chengming Zhou <chengming.zhou@linux.dev>
---
block/blk-flush.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
block/blk-flush.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/block/blk-flush.c b/block/blk-flush.c
index 3f4d41952ef2..aa5e573dd010 100644
index 3f4d41952ef2..d72b57898b23 100644
--- a/block/blk-flush.c
+++ b/block/blk-flush.c
@@ -183,7 +183,7 @@ static void blk_flush_complete_seq(struct request *rq,
@ -46,3 +54,11 @@ index 3f4d41952ef2..aa5e573dd010 100644
break;
case REQ_FSEQ_DATA:
@@ -261,6 +261,7 @@ static enum rq_end_io_ret flush_end_io(struct request *flush_rq,
unsigned int seq = blk_flush_cur_seq(rq);
BUG_ON(seq != REQ_FSEQ_PREFLUSH && seq != REQ_FSEQ_POSTFLUSH);
+ list_del_init(&rq->queuelist);
blk_flush_complete_seq(rq, fq, seq, error);
}

View File

@ -1,50 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
Date: Wed, 3 Apr 2024 15:21:58 +0200
Subject: [PATCH] net: usb: ax88179_178a: avoid the interface always configured
as random address
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
After the commit d2689b6a86b9 ("net: usb: ax88179_178a: avoid two
consecutive device resets"), reset is not executed from bind operation and
mac address is not read from the device registers or the devicetree at that
moment. Since the check to configure if the assigned mac address is random
or not for the interface, happens after the bind operation from
usbnet_probe, the interface keeps configured as random address, although the
address is correctly read and set during open operation (the only reset
now).
In order to keep only one reset for the device and to avoid the interface
always configured as random address, after reset, configure correctly the
suitable field from the driver, if the mac address is read successfully from
the device registers or the devicetree. Take into account if a locally
administered address (random) was previously stored.
cc: stable@vger.kernel.org # 6.6+
Fixes: d2689b6a86b9 ("net: usb: ax88179_178a: avoid two consecutive device resets")
Reported-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20240403132158.344838-1-jtornosm@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 2e91bb99b9d4f756e92e83c4453f894dda220f09)
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
drivers/net/usb/ax88179_178a.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c
index d837c1887416..e0e9b4c53cb0 100644
--- a/drivers/net/usb/ax88179_178a.c
+++ b/drivers/net/usb/ax88179_178a.c
@@ -1273,6 +1273,8 @@ static void ax88179_get_mac_addr(struct usbnet *dev)
if (is_valid_ether_addr(mac)) {
eth_hw_addr_set(dev->net, mac);
+ if (!is_local_ether_addr(mac))
+ dev->net->addr_assign_type = NET_ADDR_PERM;
} else {
netdev_info(dev->net, "invalid MAC address, using random\n");
eth_hw_addr_random(dev->net);

View File

@ -1,61 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Chuck Lever <chuck.lever@oracle.com>
Date: Wed, 3 Apr 2024 10:36:25 -0400
Subject: [PATCH] SUNRPC: Fix a slow server-side memory leak with RPC-over-TCP
Jan Schunk reports that his small NFS servers suffer from memory
exhaustion after just a few days. A bisect shows that commit
e18e157bb5c8 ("SUNRPC: Send RPC message on TCP with a single
sock_sendmsg() call") is the first bad commit.
That commit assumed that sock_sendmsg() releases all the pages in
the underlying bio_vec array, but the reality is that it doesn't.
svc_xprt_release() releases the rqst's response pages, but the
record marker page fragment isn't one of those, so it is never
released.
This is a narrow fix that can be applied to stable kernels. A
more extensive fix is in the works.
Reported-by: Jan Schunk <scpcom@gmx.de>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218671
Fixes: e18e157bb5c8 ("SUNRPC: Send RPC message on TCP with a single sock_sendmsg() call")
Cc: Alexander Duyck <alexander.duyck@gmail.com>
Cc: Jakub Kacinski <kuba@kernel.org>
Cc: David Howells <dhowells@redhat.com>
Reviewed-by: David Howells <dhowells@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
(cherry picked from commit 05258a0a69b3c5d2c003f818702c0a52b6fea861)
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
net/sunrpc/svcsock.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 545017a3daa4..6b3f01beb294 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -1206,15 +1206,6 @@ static int svc_tcp_recvfrom(struct svc_rqst *rqstp)
* MSG_SPLICE_PAGES is used exclusively to reduce the number of
* copy operations in this path. Therefore the caller must ensure
* that the pages backing @xdr are unchanging.
- *
- * Note that the send is non-blocking. The caller has incremented
- * the reference count on each page backing the RPC message, and
- * the network layer will "put" these pages when transmission is
- * complete.
- *
- * This is safe for our RPC services because the memory backing
- * the head and tail components is never kmalloc'd. These always
- * come from pages in the svc_rqst::rq_pages array.
*/
static int svc_tcp_sendmsg(struct svc_sock *svsk, struct svc_rqst *rqstp,
rpc_fraghdr marker, unsigned int *sentp)
@@ -1244,6 +1235,7 @@ static int svc_tcp_sendmsg(struct svc_sock *svsk, struct svc_rqst *rqstp,
iov_iter_bvec(&msg.msg_iter, ITER_SOURCE, rqstp->rq_bvec,
1 + count, sizeof(marker) + rqstp->rq_res.len);
ret = sock_sendmsg(svsk->sk_sock, &msg);
+ page_frag_free(buf);
if (ret < 0)
return ret;
*sentp += ret;

View File

@ -0,0 +1,49 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: "Martin K. Petersen" <martin.petersen@oracle.com>
Date: Mon, 20 May 2024 22:30:40 -0400
Subject: [PATCH] scsi: core: Handle devices which return an unusually large
VPD page count
Peter Schneider reported that a system would no longer boot after
updating to 6.8.4. Peter bisected the issue and identified commit
b5fc07a5fb56 ("scsi: core: Consult supported VPD page list prior to
fetching page") as being the culprit.
Turns out the enclosure device in Peter's system reports a byteswapped
page length for VPD page 0. It reports "02 00" as page length instead
of "00 02". This causes us to attempt to access 516 bytes (page length
+ header) of information despite only 2 pages being present.
Limit the page search scope to the size of our VPD buffer to guard
against devices returning a larger page count than requested.
Link: https://lore.kernel.org/r/20240521023040.2703884-1-martin.petersen@oracle.com
Fixes: b5fc07a5fb56 ("scsi: core: Consult supported VPD page list prior to fetching page")
Cc: stable@vger.kernel.org
Reported-by: Peter Schneider <pschneider1968@googlemail.com>
Closes: https://lore.kernel.org/all/eec6ebbf-061b-4a7b-96dc-ea748aa4d035@googlemail.com/
Tested-by: Peter Schneider <pschneider1968@googlemail.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
---
drivers/scsi/scsi.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 8cad9792a562..b3ff3a633a1e 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -350,6 +350,13 @@ static int scsi_get_vpd_size(struct scsi_device *sdev, u8 page)
if (result < SCSI_VPD_HEADER_SIZE)
return 0;
+ if (result > sizeof(vpd)) {
+ dev_warn_once(&sdev->sdev_gendev,
+ "%s: long VPD page 0 length: %d bytes\n",
+ __func__, result);
+ result = sizeof(vpd);
+ }
+
result -= SCSI_VPD_HEADER_SIZE;
if (!memchr(&vpd[SCSI_VPD_HEADER_SIZE], page, result))
return 0;

View File

@ -0,0 +1,73 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Vitaly Lifshits <vitaly.lifshits@intel.com>
Date: Mon, 29 Apr 2024 10:10:40 -0700
Subject: [PATCH] e1000e: change usleep_range to udelay in PHY mdic access
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This is a partial revert of commit 6dbdd4de0362 ("e1000e: Workaround
for sporadic MDI error on Meteor Lake systems"). The referenced commit
used usleep_range inside the PHY access routines, which are sometimes
called from an atomic context. This can lead to a kernel panic in some
scenarios, such as cable disconnection and reconnection on vPro systems.
Solve this by changing the usleep_range calls back to udelay.
Fixes: 6dbdd4de0362 ("e1000e: Workaround for sporadic MDI error on Meteor Lake systems")
Cc: stable@vger.kernel.org
Reported-by: Jérôme Carretero <cJ@zougloub.eu>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218740
Closes: https://lore.kernel.org/lkml/a7eb665c74b5efb5140e6979759ed243072cb24a.camel@zougloub.eu/
Co-developed-by: Sasha Neftin <sasha.neftin@intel.com>
Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Signed-off-by: Vitaly Lifshits <vitaly.lifshits@intel.com>
Tested-by: Dima Ruinskiy <dima.ruinskiy@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20240429171040.1152516-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/ethernet/intel/e1000e/phy.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000e/phy.c b/drivers/net/ethernet/intel/e1000e/phy.c
index 93544f1cc2a5..f7ae0e0aa4a4 100644
--- a/drivers/net/ethernet/intel/e1000e/phy.c
+++ b/drivers/net/ethernet/intel/e1000e/phy.c
@@ -157,7 +157,7 @@ s32 e1000e_read_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 *data)
* the lower time out
*/
for (i = 0; i < (E1000_GEN_POLL_TIMEOUT * 3); i++) {
- usleep_range(50, 60);
+ udelay(50);
mdic = er32(MDIC);
if (mdic & E1000_MDIC_READY)
break;
@@ -181,7 +181,7 @@ s32 e1000e_read_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 *data)
* reading duplicate data in the next MDIC transaction.
*/
if (hw->mac.type == e1000_pch2lan)
- usleep_range(100, 150);
+ udelay(100);
if (success) {
*data = (u16)mdic;
@@ -237,7 +237,7 @@ s32 e1000e_write_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 data)
* the lower time out
*/
for (i = 0; i < (E1000_GEN_POLL_TIMEOUT * 3); i++) {
- usleep_range(50, 60);
+ udelay(50);
mdic = er32(MDIC);
if (mdic & E1000_MDIC_READY)
break;
@@ -261,7 +261,7 @@ s32 e1000e_write_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 data)
* reading duplicate data in the next MDIC transaction.
*/
if (hw->mac.type == e1000_pch2lan)
- usleep_range(100, 150);
+ udelay(100);
if (success)
return 0;

View File

@ -0,0 +1,48 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Li Zhang <zhanglikernel@gmail.com>
Date: Tue, 18 Jun 2024 07:28:00 +0200
Subject: [PATCH] virtio-pci: Check if is_avq is NULL
BugLink: https://bugs.launchpad.net/bugs/2067862
[bug]
In the virtio_pci_common.c function vp_del_vqs, vp_dev->is_avq is involved
to determine whether it is admin virtqueue, but this function vp_dev->is_avq
may be empty. For installations, virtio_pci_legacy does not assign a value
to vp_dev->is_avq.
[fix]
Check whether it is vp_dev->is_avq before use.
[test]
Test with virsh Attach device
Before this patch, the following command would crash the guest system
After applying the patch, everything seems to be working fine.
Signed-off-by: Li Zhang <zhanglikernel@gmail.com>
Message-Id: <1710566754-3532-1-git-send-email-zhanglikernel@gmail.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit c8fae27d141a32a1624d0d0d5419d94252824498)
Signed-off-by: Matthew Ruffell <matthew.ruffell@canonical.com>
Acked-by: Paolo Pisati <paolo.pisati@canonical.com>
Acked-by: Manuel Diewald <manuel.diewald@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
---
drivers/virtio/virtio_pci_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c
index b655fccaf773..3c18fc14cd66 100644
--- a/drivers/virtio/virtio_pci_common.c
+++ b/drivers/virtio/virtio_pci_common.c
@@ -236,7 +236,7 @@ void vp_del_vqs(struct virtio_device *vdev)
int i;
list_for_each_entry_safe(vq, n, &vdev->vqs, list) {
- if (vp_dev->is_avq(vdev, vq->index))
+ if (vp_dev->is_avq && vp_dev->is_avq(vdev, vq->index))
continue;
if (vp_dev->per_vq_vectors) {