Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
- sound/pci/hda/patch_realtek.c | 1 +
+ sound/pci/hda/patch_realtek.c | 1 +
1 file changed, 1 insertion(+)
-diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
-index a88ed60dcd96a..48155aa52828c 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
-@@ -9904,6 +9904,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
+@@ -9907,6 +9907,7 @@ static const struct snd_pci_quirk alc269
SND_PCI_QUIRK(0x1558, 0xc019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1558, 0xc022, "Clevo NH77[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC233_FIXUP_LENOVO_MULTI_CODECS),
SND_PCI_QUIRK(0x17aa, 0x1048, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340),
SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE),
SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE),
---
-2.43.0
-
--- /dev/null
+From 13a5b21197587a3d9cac9e1a00de9b91526a55e4 Mon Sep 17 00:00:00 2001
+From: Aabish Malik <aabishmalik3337@gmail.com>
+Date: Fri, 29 Dec 2023 22:33:54 +0530
+Subject: ALSA: hda/realtek: enable SND_PCI_QUIRK for hp pavilion 14-ec1xxx series
+
+From: Aabish Malik <aabishmalik3337@gmail.com>
+
+commit 13a5b21197587a3d9cac9e1a00de9b91526a55e4 upstream.
+
+The HP Pavilion 14 ec1xxx series uses the HP mainboard 8A0F with the
+ALC287 codec.
+The mute led can be enabled using the already existing
+ALC287_FIXUP_HP_GPIO_LED quirk.
+Tested on an HP Pavilion ec1003AU
+
+Signed-off-by: Aabish Malik <aabishmalik3337@gmail.com>
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20231229170352.742261-3-aabishmalik3337@gmail.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/pci/hda/patch_realtek.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -9663,6 +9663,7 @@ static const struct snd_pci_quirk alc269
+ SND_PCI_QUIRK(0x103c, 0x89c6, "Zbook Fury 17 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
+ SND_PCI_QUIRK(0x103c, 0x89ca, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
+ SND_PCI_QUIRK(0x103c, 0x89d3, "HP EliteBook 645 G9 (MB 89D2)", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
++ SND_PCI_QUIRK(0x103c, 0x8a0f, "HP Pavilion 14-ec1xxx", ALC287_FIXUP_HP_GPIO_LED),
+ SND_PCI_QUIRK(0x103c, 0x8a20, "HP Laptop 15s-fq5xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
+ SND_PCI_QUIRK(0x103c, 0x8a25, "HP Victus 16-d1xxx (MB 8A25)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
+ SND_PCI_QUIRK(0x103c, 0x8a78, "HP Dev One", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST),
--- /dev/null
+From b6ce6e6c79e4ec650887f1fe391a70e54972001a Mon Sep 17 00:00:00 2001
+From: Siddhesh Dharme <siddheshdharme18@gmail.com>
+Date: Thu, 4 Jan 2024 11:37:36 +0530
+Subject: ALSA: hda/realtek: Fix mute and mic-mute LEDs for HP ProBook 440 G6
+
+From: Siddhesh Dharme <siddheshdharme18@gmail.com>
+
+commit b6ce6e6c79e4ec650887f1fe391a70e54972001a upstream.
+
+LEDs in 'HP ProBook 440 G6' laptop are controlled by ALC236 codec.
+Enable already existing quirk 'ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF'
+to fix mute and mic-mute LEDs.
+
+Signed-off-by: Siddhesh Dharme <siddheshdharme18@gmail.com>
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20240104060736.5149-1-siddheshdharme18@gmail.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/pci/hda/patch_realtek.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -9581,6 +9581,7 @@ static const struct snd_pci_quirk alc269
+ SND_PCI_QUIRK(0x103c, 0x84da, "HP OMEN dc0019-ur", ALC295_FIXUP_HP_OMEN),
+ SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3),
+ SND_PCI_QUIRK(0x103c, 0x8519, "HP Spectre x360 15-df0xxx", ALC285_FIXUP_HP_SPECTRE_X360),
++ SND_PCI_QUIRK(0x103c, 0x8537, "HP ProBook 440 G6", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
+ SND_PCI_QUIRK(0x103c, 0x860f, "HP ZBook 15 G6", ALC285_FIXUP_HP_GPIO_AMP_INIT),
+ SND_PCI_QUIRK(0x103c, 0x861f, "HP Elite Dragonfly G1", ALC285_FIXUP_HP_GPIO_AMP_INIT),
+ SND_PCI_QUIRK(0x103c, 0x869d, "HP", ALC236_FIXUP_HP_MUTE_LED),
--- /dev/null
+From 18a434f32fa61b3fda8ddcd9a63d5274569c6a41 Mon Sep 17 00:00:00 2001
+From: Andy Chi <andy.chi@canonical.com>
+Date: Tue, 2 Jan 2024 10:49:15 +0800
+Subject: ALSA: hda/realtek: fix mute/micmute LEDs for a HP ZBook
+
+From: Andy Chi <andy.chi@canonical.com>
+
+commit 18a434f32fa61b3fda8ddcd9a63d5274569c6a41 upstream.
+
+There is a HP ZBook which using ALC236 codec and need the
+ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF quirk to make mute LED
+and micmute LED work.
+
+[ confirmed that the new entries are for new models that have no
+ proper name, so the strings are left as "HP" which will be updated
+ eventually later -- tiwai ]
+
+Signed-off-by: Andy Chi <andy.chi@canonical.com>
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20240102024916.19093-1-andy.chi@canonical.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/pci/hda/patch_realtek.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -9708,6 +9708,7 @@ static const struct snd_pci_quirk alc269
+ SND_PCI_QUIRK(0x103c, 0x8c70, "HP EliteBook 835 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
+ SND_PCI_QUIRK(0x103c, 0x8c71, "HP EliteBook 845 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
+ SND_PCI_QUIRK(0x103c, 0x8c72, "HP EliteBook 865 G11", ALC287_FIXUP_CS35L41_I2C_2_HP_GPIO_LED),
++ SND_PCI_QUIRK(0x103c, 0x8c96, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
+ SND_PCI_QUIRK(0x103c, 0x8ca4, "HP ZBook Fury", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
+ SND_PCI_QUIRK(0x103c, 0x8ca7, "HP ZBook Fury", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
+ SND_PCI_QUIRK(0x103c, 0x8cf5, "HP ZBook Studio 16", ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED),
--- /dev/null
+From 7257bcf3bdc785eabc4eef1f329a59815b032508 Mon Sep 17 00:00:00 2001
+From: Shyam Prasad N <sprasad@microsoft.com>
+Date: Fri, 29 Dec 2023 11:16:15 +0000
+Subject: cifs: cifs_chan_is_iface_active should be called with chan_lock held
+
+From: Shyam Prasad N <sprasad@microsoft.com>
+
+commit 7257bcf3bdc785eabc4eef1f329a59815b032508 upstream.
+
+cifs_chan_is_iface_active checks the channels of a session to see
+if the associated iface is active. This should always happen
+with chan_lock held. However, these two callers of this function
+were missing this locking.
+
+This change makes sure the function calls are protected with
+proper locking.
+
+Fixes: b54034a73baf ("cifs: during reconnect, update interface if necessary")
+Fixes: fa1d0508bdd4 ("cifs: account for primary channel in the interface list")
+Cc: stable@vger.kernel.org
+Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
+Signed-off-by: Steve French <stfrench@microsoft.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/smb/client/connect.c | 7 +++++--
+ fs/smb/client/smb2ops.c | 7 ++++++-
+ 2 files changed, 11 insertions(+), 3 deletions(-)
+
+--- a/fs/smb/client/connect.c
++++ b/fs/smb/client/connect.c
+@@ -258,10 +258,13 @@ cifs_mark_tcp_ses_conns_for_reconnect(st
+ spin_lock(&cifs_tcp_ses_lock);
+ list_for_each_entry_safe(ses, nses, &pserver->smb_ses_list, smb_ses_list) {
+ /* check if iface is still active */
+- if (!cifs_chan_is_iface_active(ses, server))
++ spin_lock(&ses->chan_lock);
++ if (!cifs_chan_is_iface_active(ses, server)) {
++ spin_unlock(&ses->chan_lock);
+ cifs_chan_update_iface(ses, server);
++ spin_lock(&ses->chan_lock);
++ }
+
+- spin_lock(&ses->chan_lock);
+ if (!mark_smb_session && cifs_chan_needs_reconnect(ses, server)) {
+ spin_unlock(&ses->chan_lock);
+ continue;
+--- a/fs/smb/client/smb2ops.c
++++ b/fs/smb/client/smb2ops.c
+@@ -778,9 +778,14 @@ SMB3_request_interfaces(const unsigned i
+ goto out;
+
+ /* check if iface is still active */
++ spin_lock(&ses->chan_lock);
+ pserver = ses->chans[0].server;
+- if (pserver && !cifs_chan_is_iface_active(ses, pserver))
++ if (pserver && !cifs_chan_is_iface_active(ses, pserver)) {
++ spin_unlock(&ses->chan_lock);
+ cifs_chan_update_iface(ses, pserver);
++ spin_lock(&ses->chan_lock);
++ }
++ spin_unlock(&ses->chan_lock);
+
+ out:
+ kfree(out_buf);
--- /dev/null
+From 09eeb0723f219fbd96d8865bf9b935e03ee2ec22 Mon Sep 17 00:00:00 2001
+From: Shyam Prasad N <sprasad@microsoft.com>
+Date: Fri, 29 Dec 2023 11:16:16 +0000
+Subject: cifs: do not depend on release_iface for maintaining iface_list
+
+From: Shyam Prasad N <sprasad@microsoft.com>
+
+commit 09eeb0723f219fbd96d8865bf9b935e03ee2ec22 upstream.
+
+parse_server_interfaces should be in complete charge of maintaining
+the iface_list linked list. Today, iface entries are removed
+from the list only when the last refcount is dropped.
+i.e. in release_iface. However, this can result in undercounting
+of refcount if the server stops advertising interfaces (which
+Azure SMB server does).
+
+This change puts parse_server_interfaces in full charge of
+maintaining the iface_list. So if an empty list is returned
+by the server, the entries in the list will immediately be
+removed. This way, a following call to the same function will
+not find entries in the list.
+
+Fixes: aa45dadd34e4 ("cifs: change iface_list from array to sorted linked list")
+Cc: stable@vger.kernel.org
+Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
+Signed-off-by: Steve French <stfrench@microsoft.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/smb/client/cifsglob.h | 1 -
+ fs/smb/client/smb2ops.c | 27 +++++++++++++++++----------
+ 2 files changed, 17 insertions(+), 11 deletions(-)
+
+--- a/fs/smb/client/cifsglob.h
++++ b/fs/smb/client/cifsglob.h
+@@ -972,7 +972,6 @@ release_iface(struct kref *ref)
+ struct cifs_server_iface *iface = container_of(ref,
+ struct cifs_server_iface,
+ refcount);
+- list_del_init(&iface->iface_head);
+ kfree(iface);
+ }
+
+--- a/fs/smb/client/smb2ops.c
++++ b/fs/smb/client/smb2ops.c
+@@ -588,16 +588,12 @@ parse_server_interfaces(struct network_i
+ }
+
+ /*
+- * Go through iface_list and do kref_put to remove
+- * any unused ifaces. ifaces in use will be removed
+- * when the last user calls a kref_put on it
++ * Go through iface_list and mark them as inactive
+ */
+ list_for_each_entry_safe(iface, niface, &ses->iface_list,
+- iface_head) {
++ iface_head)
+ iface->is_active = 0;
+- kref_put(&iface->refcount, release_iface);
+- ses->iface_count--;
+- }
++
+ spin_unlock(&ses->iface_lock);
+
+ /*
+@@ -672,10 +668,7 @@ parse_server_interfaces(struct network_i
+ iface_head) {
+ ret = iface_cmp(iface, &tmp_iface);
+ if (!ret) {
+- /* just get a ref so that it doesn't get picked/freed */
+ iface->is_active = 1;
+- kref_get(&iface->refcount);
+- ses->iface_count++;
+ spin_unlock(&ses->iface_lock);
+ goto next_iface;
+ } else if (ret < 0) {
+@@ -742,6 +735,20 @@ next_iface:
+ }
+
+ out:
++ /*
++ * Go through the list again and put the inactive entries
++ */
++ spin_lock(&ses->iface_lock);
++ list_for_each_entry_safe(iface, niface, &ses->iface_list,
++ iface_head) {
++ if (!iface->is_active) {
++ list_del(&iface->iface_head);
++ kref_put(&iface->refcount, release_iface);
++ ses->iface_count--;
++ }
++ }
++ spin_unlock(&ses->iface_lock);
++
+ return rc;
+ }
+
--- /dev/null
+From 11f9eb899ecc8c02b769cf8d2532ba12786a7af7 Mon Sep 17 00:00:00 2001
+From: Jocelyn Falempe <jfalempe@redhat.com>
+Date: Thu, 14 Dec 2023 17:38:06 +0100
+Subject: drm/mgag200: Fix gamma lut not initialized for G200ER, G200EV, G200SE
+
+From: Jocelyn Falempe <jfalempe@redhat.com>
+
+commit 11f9eb899ecc8c02b769cf8d2532ba12786a7af7 upstream.
+
+When mgag200 switched from simple KMS to regular atomic helpers,
+the initialization of the gamma settings was lost.
+This leads to a black screen, if the bios/uefi doesn't use the same
+pixel color depth.
+This has been fixed with commit ad81e23426a6 ("drm/mgag200: Fix gamma
+lut not initialized.") for most G200, but G200ER, G200EV, G200SE use
+their own version of crtc_helper_atomic_enable() and need to be fixed
+too.
+
+Fixes: 1baf9127c482 ("drm/mgag200: Replace simple-KMS with regular atomic helpers")
+Cc: <stable@vger.kernel.org> #v6.1+
+Reported-by: Roger Sewell <roger.sewell@cantab.net>
+Suggested-by: Roger Sewell <roger.sewell@cantab.net>
+Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
+Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
+Link: https://patchwork.freedesktop.org/patch/msgid/20231214163849.359691-1-jfalempe@redhat.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/mgag200/mgag200_drv.h | 5 +++++
+ drivers/gpu/drm/mgag200/mgag200_g200er.c | 5 +++++
+ drivers/gpu/drm/mgag200/mgag200_g200ev.c | 5 +++++
+ drivers/gpu/drm/mgag200/mgag200_g200se.c | 5 +++++
+ drivers/gpu/drm/mgag200/mgag200_mode.c | 10 +++++-----
+ 5 files changed, 25 insertions(+), 5 deletions(-)
+
+--- a/drivers/gpu/drm/mgag200/mgag200_drv.h
++++ b/drivers/gpu/drm/mgag200/mgag200_drv.h
+@@ -390,6 +390,11 @@ void mgag200_primary_plane_helper_atomic
+ .destroy = drm_plane_cleanup, \
+ DRM_GEM_SHADOW_PLANE_FUNCS
+
++void mgag200_crtc_set_gamma_linear(struct mga_device *mdev, const struct drm_format_info *format);
++void mgag200_crtc_set_gamma(struct mga_device *mdev,
++ const struct drm_format_info *format,
++ struct drm_color_lut *lut);
++
+ enum drm_mode_status mgag200_crtc_helper_mode_valid(struct drm_crtc *crtc,
+ const struct drm_display_mode *mode);
+ int mgag200_crtc_helper_atomic_check(struct drm_crtc *crtc, struct drm_atomic_state *new_state);
+--- a/drivers/gpu/drm/mgag200/mgag200_g200er.c
++++ b/drivers/gpu/drm/mgag200/mgag200_g200er.c
+@@ -202,6 +202,11 @@ static void mgag200_g200er_crtc_helper_a
+
+ mgag200_g200er_reset_tagfifo(mdev);
+
++ if (crtc_state->gamma_lut)
++ mgag200_crtc_set_gamma(mdev, format, crtc_state->gamma_lut->data);
++ else
++ mgag200_crtc_set_gamma_linear(mdev, format);
++
+ mgag200_enable_display(mdev);
+
+ if (funcs->enable_vidrst)
+--- a/drivers/gpu/drm/mgag200/mgag200_g200ev.c
++++ b/drivers/gpu/drm/mgag200/mgag200_g200ev.c
+@@ -203,6 +203,11 @@ static void mgag200_g200ev_crtc_helper_a
+
+ mgag200_g200ev_set_hiprilvl(mdev);
+
++ if (crtc_state->gamma_lut)
++ mgag200_crtc_set_gamma(mdev, format, crtc_state->gamma_lut->data);
++ else
++ mgag200_crtc_set_gamma_linear(mdev, format);
++
+ mgag200_enable_display(mdev);
+
+ if (funcs->enable_vidrst)
+--- a/drivers/gpu/drm/mgag200/mgag200_g200se.c
++++ b/drivers/gpu/drm/mgag200/mgag200_g200se.c
+@@ -334,6 +334,11 @@ static void mgag200_g200se_crtc_helper_a
+
+ mgag200_g200se_set_hiprilvl(mdev, adjusted_mode, format);
+
++ if (crtc_state->gamma_lut)
++ mgag200_crtc_set_gamma(mdev, format, crtc_state->gamma_lut->data);
++ else
++ mgag200_crtc_set_gamma_linear(mdev, format);
++
+ mgag200_enable_display(mdev);
+
+ if (funcs->enable_vidrst)
+--- a/drivers/gpu/drm/mgag200/mgag200_mode.c
++++ b/drivers/gpu/drm/mgag200/mgag200_mode.c
+@@ -28,8 +28,8 @@
+ * This file contains setup code for the CRTC.
+ */
+
+-static void mgag200_crtc_set_gamma_linear(struct mga_device *mdev,
+- const struct drm_format_info *format)
++void mgag200_crtc_set_gamma_linear(struct mga_device *mdev,
++ const struct drm_format_info *format)
+ {
+ int i;
+
+@@ -65,9 +65,9 @@ static void mgag200_crtc_set_gamma_linea
+ }
+ }
+
+-static void mgag200_crtc_set_gamma(struct mga_device *mdev,
+- const struct drm_format_info *format,
+- struct drm_color_lut *lut)
++void mgag200_crtc_set_gamma(struct mga_device *mdev,
++ const struct drm_format_info *format,
++ struct drm_color_lut *lut)
+ {
+ int i;
+
--- /dev/null
+From 971079464001c6856186ca137778e534d983174a Mon Sep 17 00:00:00 2001
+From: Paolo Bonzini <pbonzini@redhat.com>
+Date: Thu, 4 Jan 2024 16:15:17 +0100
+Subject: KVM: x86/pmu: fix masking logic for MSR_CORE_PERF_GLOBAL_CTRL
+
+From: Paolo Bonzini <pbonzini@redhat.com>
+
+commit 971079464001c6856186ca137778e534d983174a upstream.
+
+When commit c59a1f106f5c ("KVM: x86/pmu: Add IA32_PEBS_ENABLE
+MSR emulation for extended PEBS") switched the initialization of
+cpuc->guest_switch_msrs to use compound literals, it screwed up
+the boolean logic:
+
++ u64 pebs_mask = cpuc->pebs_enabled & x86_pmu.pebs_capable;
+...
+- arr[0].guest = intel_ctrl & ~cpuc->intel_ctrl_host_mask;
+- arr[0].guest &= ~(cpuc->pebs_enabled & x86_pmu.pebs_capable);
++ .guest = intel_ctrl & (~cpuc->intel_ctrl_host_mask | ~pebs_mask),
+
+Before the patch, the value of arr[0].guest would have been intel_ctrl &
+~cpuc->intel_ctrl_host_mask & ~pebs_mask. The intent is to always treat
+PEBS events as host-only because, while the guest runs, there is no way
+to tell the processor about the virtual address where to put PEBS records
+intended for the host.
+
+Unfortunately, the new expression can be expanded to
+
+ (intel_ctrl & ~cpuc->intel_ctrl_host_mask) | (intel_ctrl & ~pebs_mask)
+
+which makes no sense; it includes any bit that isn't *both* marked as
+exclude_guest and using PEBS. So, reinstate the old logic. Another
+way to write it could be "intel_ctrl & ~(cpuc->intel_ctrl_host_mask |
+pebs_mask)", presumably the intention of the author of the faulty.
+However, I personally find the repeated application of A AND NOT B to
+be a bit more readable.
+
+This shows up as guest failures when running concurrent long-running
+perf workloads on the host, and was reported to happen with rcutorture.
+All guests on a given host would die simultaneously with something like an
+instruction fault or a segmentation violation.
+
+Reported-by: Paul E. McKenney <paulmck@kernel.org>
+Analyzed-by: Sean Christopherson <seanjc@google.com>
+Tested-by: Paul E. McKenney <paulmck@kernel.org>
+Cc: stable@vger.kernel.org
+Fixes: c59a1f106f5c ("KVM: x86/pmu: Add IA32_PEBS_ENABLE MSR emulation for extended PEBS")
+Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/x86/events/intel/core.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+--- a/arch/x86/events/intel/core.c
++++ b/arch/x86/events/intel/core.c
+@@ -4033,12 +4033,17 @@ static struct perf_guest_switch_msr *int
+ u64 pebs_mask = cpuc->pebs_enabled & x86_pmu.pebs_capable;
+ int global_ctrl, pebs_enable;
+
++ /*
++ * In addition to obeying exclude_guest/exclude_host, remove bits being
++ * used for PEBS when running a guest, because PEBS writes to virtual
++ * addresses (not physical addresses).
++ */
+ *nr = 0;
+ global_ctrl = (*nr)++;
+ arr[global_ctrl] = (struct perf_guest_switch_msr){
+ .msr = MSR_CORE_PERF_GLOBAL_CTRL,
+ .host = intel_ctrl & ~cpuc->intel_ctrl_guest_mask,
+- .guest = intel_ctrl & (~cpuc->intel_ctrl_host_mask | ~pebs_mask),
++ .guest = intel_ctrl & ~cpuc->intel_ctrl_host_mask & ~pebs_mask,
+ };
+
+ if (!x86_pmu.pebs)
--- /dev/null
+From 4c0288299fd09ee7c6fbe2f57421f314d8c981db Mon Sep 17 00:00:00 2001
+From: Paolo Abeni <pabeni@redhat.com>
+Date: Tue, 26 Dec 2023 13:10:18 +0100
+Subject: mptcp: prevent tcp diag from closing listener subflows
+
+From: Paolo Abeni <pabeni@redhat.com>
+
+commit 4c0288299fd09ee7c6fbe2f57421f314d8c981db upstream.
+
+The MPTCP protocol does not expect that any other entity could change
+the first subflow status when such socket is listening.
+Unfortunately the TCP diag interface allows aborting any TCP socket,
+including MPTCP listeners subflows. As reported by syzbot, that trigger
+a WARN() and could lead to later bigger trouble.
+
+The MPTCP protocol needs to do some MPTCP-level cleanup actions to
+properly shutdown the listener. To keep the fix simple, prevent
+entirely the diag interface from stopping such listeners.
+
+We could refine the diag callback in a later, larger patch targeting
+net-next.
+
+Fixes: 57fc0f1ceaa4 ("mptcp: ensure listener is unhashed before updating the sk status")
+Cc: stable@vger.kernel.org
+Reported-by: <syzbot+5a01c3a666e726bc8752@syzkaller.appspotmail.com>
+Closes: https://lore.kernel.org/netdev/0000000000004f4579060c68431b@google.com/
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Reviewed-by: Mat Martineau <martineau@kernel.org>
+Signed-off-by: Matthieu Baerts <matttbe@kernel.org>
+Link: https://lore.kernel.org/r/20231226-upstream-net-20231226-mptcp-prevent-warn-v1-2-1404dcc431ea@kernel.org
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/mptcp/subflow.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+--- a/net/mptcp/subflow.c
++++ b/net/mptcp/subflow.c
+@@ -1899,6 +1899,17 @@ static void tcp_release_cb_override(stru
+ tcp_release_cb(ssk);
+ }
+
++static int tcp_abort_override(struct sock *ssk, int err)
++{
++ /* closing a listener subflow requires a great deal of care.
++ * keep it simple and just prevent such operation
++ */
++ if (inet_sk_state_load(ssk) == TCP_LISTEN)
++ return -EINVAL;
++
++ return tcp_abort(ssk, err);
++}
++
+ static struct tcp_ulp_ops subflow_ulp_ops __read_mostly = {
+ .name = "mptcp",
+ .owner = THIS_MODULE,
+@@ -1942,6 +1953,7 @@ void __init mptcp_subflow_init(void)
+
+ tcp_prot_override = tcp_prot;
+ tcp_prot_override.release_cb = tcp_release_cb_override;
++ tcp_prot_override.diag_destroy = tcp_abort_override;
+
+ #if IS_ENABLED(CONFIG_MPTCP_IPV6)
+ /* In struct mptcp_subflow_request_sock, we assume the TCP request sock
+@@ -1977,6 +1989,7 @@ void __init mptcp_subflow_init(void)
+
+ tcpv6_prot_override = tcpv6_prot;
+ tcpv6_prot_override.release_cb = tcp_release_cb_override;
++ tcpv6_prot_override.diag_destroy = tcp_abort_override;
+ #endif
+
+ mptcp_diag_subflow_init(&subflow_ulp_ops);
--- /dev/null
+From f93e71aea6c60ebff8adbd8941e678302d377869 Mon Sep 17 00:00:00 2001
+From: Bjorn Helgaas <bhelgaas@google.com>
+Date: Mon, 1 Jan 2024 12:08:18 -0600
+Subject: Revert "PCI/ASPM: Remove pcie_aspm_pm_state_change()"
+
+From: Bjorn Helgaas <bhelgaas@google.com>
+
+commit f93e71aea6c60ebff8adbd8941e678302d377869 upstream.
+
+This reverts commit 08d0cc5f34265d1a1e3031f319f594bd1970976c.
+
+Michael reported that when attempting to resume from suspend to RAM on ASUS
+mini PC PN51-BB757MDE1 (DMI model: MINIPC PN51-E1), 08d0cc5f3426
+("PCI/ASPM: Remove pcie_aspm_pm_state_change()") caused a 12-second delay
+with no output, followed by a reboot.
+
+Workarounds include:
+
+ - Reverting 08d0cc5f3426 ("PCI/ASPM: Remove pcie_aspm_pm_state_change()")
+ - Booting with "pcie_aspm=off"
+ - Booting with "pcie_aspm.policy=performance"
+ - "echo 0 | sudo tee /sys/bus/pci/devices/0000:03:00.0/link/l1_aspm"
+ before suspending
+ - Connecting a USB flash drive
+
+Link: https://lore.kernel.org/r/20240102232550.1751655-1-helgaas@kernel.org
+Fixes: 08d0cc5f3426 ("PCI/ASPM: Remove pcie_aspm_pm_state_change()")
+Reported-by: Michael Schaller <michael@5challer.de>
+Link: https://lore.kernel.org/r/76c61361-b8b4-435f-a9f1-32b716763d62@5challer.de
+Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/pci/pci.c | 6 ++++++
+ drivers/pci/pci.h | 2 ++
+ drivers/pci/pcie/aspm.c | 19 +++++++++++++++++++
+ 3 files changed, 27 insertions(+)
+
+--- a/drivers/pci/pci.c
++++ b/drivers/pci/pci.c
+@@ -1302,6 +1302,9 @@ static int pci_set_full_power_state(stru
+ pci_restore_bars(dev);
+ }
+
++ if (dev->bus->self)
++ pcie_aspm_pm_state_change(dev->bus->self);
++
+ return 0;
+ }
+
+@@ -1396,6 +1399,9 @@ static int pci_set_low_power_state(struc
+ pci_power_name(dev->current_state),
+ pci_power_name(state));
+
++ if (dev->bus->self)
++ pcie_aspm_pm_state_change(dev->bus->self);
++
+ return 0;
+ }
+
+--- a/drivers/pci/pci.h
++++ b/drivers/pci/pci.h
+@@ -561,10 +561,12 @@ bool pcie_wait_for_link(struct pci_dev *
+ #ifdef CONFIG_PCIEASPM
+ void pcie_aspm_init_link_state(struct pci_dev *pdev);
+ void pcie_aspm_exit_link_state(struct pci_dev *pdev);
++void pcie_aspm_pm_state_change(struct pci_dev *pdev);
+ void pcie_aspm_powersave_config_link(struct pci_dev *pdev);
+ #else
+ static inline void pcie_aspm_init_link_state(struct pci_dev *pdev) { }
+ static inline void pcie_aspm_exit_link_state(struct pci_dev *pdev) { }
++static inline void pcie_aspm_pm_state_change(struct pci_dev *pdev) { }
+ static inline void pcie_aspm_powersave_config_link(struct pci_dev *pdev) { }
+ #endif
+
+--- a/drivers/pci/pcie/aspm.c
++++ b/drivers/pci/pcie/aspm.c
+@@ -1055,6 +1055,25 @@ void pcie_aspm_exit_link_state(struct pc
+ up_read(&pci_bus_sem);
+ }
+
++/* @pdev: the root port or switch downstream port */
++void pcie_aspm_pm_state_change(struct pci_dev *pdev)
++{
++ struct pcie_link_state *link = pdev->link_state;
++
++ if (aspm_disabled || !link)
++ return;
++ /*
++ * Devices changed PM state, we should recheck if latency
++ * meets all functions' requirement
++ */
++ down_read(&pci_bus_sem);
++ mutex_lock(&aspm_lock);
++ pcie_update_aspm_capable(link->root);
++ pcie_config_aspm_path(link);
++ mutex_unlock(&aspm_lock);
++ up_read(&pci_bus_sem);
++}
++
+ void pcie_aspm_powersave_config_link(struct pci_dev *pdev)
+ {
+ struct pcie_link_state *link = pdev->link_state;
keys-dns-fix-missing-size-check-of-v1-server-list-header.patch
block-don-t-invalidate-pagecache-for-invalid-falloc-modes.patch
+alsa-hda-realtek-enable-snd_pci_quirk-for-hp-pavilion-14-ec1xxx-series.patch
+alsa-hda-realtek-fix-mute-micmute-leds-for-a-hp-zbook.patch
+alsa-hda-realtek-fix-mute-and-mic-mute-leds-for-hp-probook-440-g6.patch
+mptcp-prevent-tcp-diag-from-closing-listener-subflows.patch
+revert-pci-aspm-remove-pcie_aspm_pm_state_change.patch
+drm-mgag200-fix-gamma-lut-not-initialized-for-g200er-g200ev-g200se.patch
+cifs-cifs_chan_is_iface_active-should-be-called-with-chan_lock-held.patch
+cifs-do-not-depend-on-release_iface-for-maintaining-iface_list.patch
+kvm-x86-pmu-fix-masking-logic-for-msr_core_perf_global_ctrl.patch
wifi-iwlwifi-pcie-don-t-synchronize-irqs-from-irq.patch
drm-bridge-ti-sn65dsi86-never-store-more-than-msg-si.patch
netfilter-use-skb_ip_totlen-and-iph_totlen.patch