summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThorsten Leemhuis <fedora@leemhuis.info>2022-10-24 10:39:53 +0200
committerThorsten Leemhuis <fedora@leemhuis.info>2022-10-24 10:39:53 +0200
commitf1346e6b9f364f102f3f245b66108b69fec438a4 (patch)
tree3c72b47b289180a5661ca5e2c35ee5fe82121f0b
parentad168df4b1eaa4643036459d21bcde728bbe6420 (diff)
parent5110de1bf77af2a3d620f255c7136ca8367adef4 (diff)
downloadkernel-f1346e6b9f364f102f3f245b66108b69fec438a4.tar.gz
kernel-f1346e6b9f364f102f3f245b66108b69fec438a4.tar.xz
kernel-f1346e6b9f364f102f3f245b66108b69fec438a4.zip
Merge remote-tracking branch 'origin/f35' into f35-user-thl-vanilla-fedora
-rw-r--r--Patchlist.changelog3
-rwxr-xr-xkernel.spec10
-rw-r--r--patch-5.19-redhat.patch489
-rw-r--r--sources6
4 files changed, 81 insertions, 427 deletions
diff --git a/Patchlist.changelog b/Patchlist.changelog
index f135fb331..b02c60146 100644
--- a/Patchlist.changelog
+++ b/Patchlist.changelog
@@ -1,3 +1,6 @@
+"https://gitlab.com/cki-project/kernel-ark/-/commit"/382edc42e3e53cfc18b9a47f4d2f8ed8355804a3
+ 382edc42e3e53cfc18b9a47f4d2f8ed8355804a3 drm/vc4: hdmi: Fix HSM clock too low on Pi4
+
"https://gitlab.com/cki-project/kernel-ark/-/commit"/b7ac3893a05dddcf85e47e0f9fc3868bb80cba8e
b7ac3893a05dddcf85e47e0f9fc3868bb80cba8e mctp: prevent double key removal and unref
diff --git a/kernel.spec b/kernel.spec
index 6aa432a4e..df95d2d2f 100755
--- a/kernel.spec
+++ b/kernel.spec
@@ -136,7 +136,7 @@ Summary: The Linux kernel
# This allows pkg_release to have configurable %%{?dist} tag
%define specrelease 150%{?buildid}%{?dist}
# This defines the kabi tarball version
-%define kabiversion 5.19.15
+%define kabiversion 5.19.16
#
# End of genspec.sh variables
@@ -3144,6 +3144,14 @@ fi
#
#
%changelog
+* Fri Oct 21 2022 Justin M. Forbes <jforbes@fedoraproject.org> [5.19.16-1]
+- Bump for build (Justin M. Forbes)
+- drm/vc4: hdmi: Fix HSM clock too low on Pi4 (maxime@cerno.tech)
+
+* Sat Oct 15 2022 Justin M. Forbes <jforbes@fedoraproject.org> [5.19.16-0]
+- Reset build for version bump (Justin M. Forbes)
+- Linux v5.19.16
+
* Thu Oct 13 2022 Justin M. Forbes <jforbes@fedoraproject.org> [5.19.15-1]
- Bump for build (Justin M. Forbes)
- mctp: prevent double key removal and unref (Jeremy Kerr)
diff --git a/patch-5.19-redhat.patch b/patch-5.19-redhat.patch
index 2012e4518..86d7979c4 100644
--- a/patch-5.19-redhat.patch
+++ b/patch-5.19-redhat.patch
@@ -33,7 +33,8 @@
drivers/gpu/drm/v3d/v3d_debugfs.c | 18 +-
drivers/gpu/drm/v3d/v3d_drv.c | 12 +-
drivers/gpu/drm/v3d/v3d_gem.c | 12 +-
- drivers/gpu/drm/vc4/vc4_hdmi.c | 29 +
+ drivers/gpu/drm/vc4/vc4_hdmi.c | 46 +-
+ drivers/gpu/drm/vc4/vc4_hdmi.h | 1 +
drivers/hid/hid-rmi.c | 64 --
drivers/hwtracing/coresight/coresight-etm4x-core.c | 19 +
drivers/input/rmi4/rmi_driver.c | 124 +--
@@ -44,10 +45,8 @@
drivers/net/phy/bcm-phy-lib.h | 19 +
drivers/net/phy/bcm-phy-ptp.c | 944 +++++++++++++++++++++
drivers/net/phy/broadcom.c | 33 +-
- drivers/net/wireless/mac80211_hwsim.c | 2 +
drivers/pci/quirks.c | 24 +
drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 10 +-
- drivers/scsi/stex.c | 17 +-
drivers/soc/bcm/bcm2835-power.c | 72 +-
drivers/usb/core/hub.c | 7 +
include/linux/efi.h | 22 +-
@@ -56,17 +55,10 @@
include/linux/mfd/bcm2835-pm.h | 1 +
include/linux/rmi.h | 1 +
include/linux/security.h | 5 +
- include/scsi/scsi_cmnd.h | 2 +-
init/Kconfig | 2 +-
kernel/module/signing.c | 9 +-
net/bluetooth/hci_event.c | 20 +
net/ipv4/fib_semantics.c | 8 +-
- net/mac80211/ieee80211_i.h | 8 +
- net/mac80211/rx.c | 12 +-
- net/mac80211/util.c | 34 +-
- net/mctp/af_mctp.c | 23 +-
- net/mctp/route.c | 10 +-
- net/wireless/scan.c | 77 +-
scripts/pahole-flags.sh | 4 +
scripts/tags.sh | 2 +
security/integrity/platform_certs/load_uefi.c | 6 +-
@@ -74,7 +66,7 @@
security/lockdown/lockdown.c | 1 +
security/security.c | 6 +
tools/testing/selftests/net/fib_nexthops.sh | 5 +
- 76 files changed, 1939 insertions(+), 425 deletions(-)
+ 68 files changed, 1839 insertions(+), 358 deletions(-)
diff --git a/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml b/Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml
index e6485f7b046f..217c42874f41 100644
@@ -266,7 +258,7 @@ index 000000000000..733a26bd887a
+
+endmenu
diff --git a/Makefile b/Makefile
-index af05237987ef..ec594b2177f0 100644
+index a1d1978bbd03..d636b4d23342 100644
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,10 @@ $(if $(filter __%, $(MAKECMDGOALS)), \
@@ -1310,29 +1302,69 @@ index 2352e9640922..725a252e837b 100644
kfree(*container);
*container = NULL;
diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
-index 199bc398817f..eb3aaaca2b80 100644
+index 199bc398817f..3519b0c23d3b 100644
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
-@@ -2889,12 +2889,37 @@ static int vc4_hdmi_runtime_resume(struct device *dev)
+@@ -2732,9 +2732,16 @@ static int vc4_hdmi_init_resources(struct vc4_hdmi *vc4_hdmi)
+ DRM_ERROR("Failed to get HDMI state machine clock\n");
+ return PTR_ERR(vc4_hdmi->hsm_clock);
+ }
++
+ vc4_hdmi->audio_clock = vc4_hdmi->hsm_clock;
+ vc4_hdmi->cec_clock = vc4_hdmi->hsm_clock;
+
++ vc4_hdmi->hsm_rpm_clock = devm_clk_get(dev, "hdmi");
++ if (IS_ERR(vc4_hdmi->hsm_rpm_clock)) {
++ DRM_ERROR("Failed to get HDMI state machine clock\n");
++ return PTR_ERR(vc4_hdmi->hsm_rpm_clock);
++ }
++
+ return 0;
+ }
+
+@@ -2816,6 +2823,12 @@ static int vc5_hdmi_init_resources(struct vc4_hdmi *vc4_hdmi)
+ return PTR_ERR(vc4_hdmi->hsm_clock);
+ }
+
++ vc4_hdmi->hsm_rpm_clock = devm_clk_get(dev, "hdmi");
++ if (IS_ERR(vc4_hdmi->hsm_rpm_clock)) {
++ DRM_ERROR("Failed to get HDMI state machine clock\n");
++ return PTR_ERR(vc4_hdmi->hsm_rpm_clock);
++ }
++
+ vc4_hdmi->pixel_bvb_clock = devm_clk_get(dev, "bvb");
+ if (IS_ERR(vc4_hdmi->pixel_bvb_clock)) {
+ DRM_ERROR("Failed to get pixel bvb clock\n");
+@@ -2879,7 +2892,7 @@ static int vc4_hdmi_runtime_suspend(struct device *dev)
+ {
+ struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev);
+
+- clk_disable_unprepare(vc4_hdmi->hsm_clock);
++ clk_disable_unprepare(vc4_hdmi->hsm_rpm_clock);
+
+ return 0;
+ }
+@@ -2889,12 +2902,37 @@ static int vc4_hdmi_runtime_resume(struct device *dev)
struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev);
unsigned long __maybe_unused flags;
u32 __maybe_unused value;
+ unsigned long rate;
int ret;
+- ret = clk_prepare_enable(vc4_hdmi->hsm_clock);
+ /*
+ * The HSM clock is in the HDMI power domain, so we need to set
+ * its frequency while the power domain is active so that it
+ * keeps its rate.
+ */
-+ ret = clk_set_min_rate(vc4_hdmi->hsm_clock, HSM_MIN_CLOCK_FREQ);
-+ if (ret)
-+ return ret;
-+
- ret = clk_prepare_enable(vc4_hdmi->hsm_clock);
++ ret = clk_set_min_rate(vc4_hdmi->hsm_rpm_clock, HSM_MIN_CLOCK_FREQ);
if (ret)
return ret;
++ ret = clk_prepare_enable(vc4_hdmi->hsm_rpm_clock);
++ if (ret)
++ return ret;
++
+ /*
+ * Whenever the RaspberryPi boots without an HDMI monitor
+ * plugged in, the firmware won't have initialized the HSM clock
@@ -1342,7 +1374,7 @@ index 199bc398817f..eb3aaaca2b80 100644
+ * case, it will lead to a silent CPU stall. Let's make sure we
+ * prevent such a case.
+ */
-+ rate = clk_get_rate(vc4_hdmi->hsm_clock);
++ rate = clk_get_rate(vc4_hdmi->hsm_rpm_clock);
+ if (!rate) {
+ ret = -EINVAL;
+ goto err_disable_clk;
@@ -1351,7 +1383,7 @@ index 199bc398817f..eb3aaaca2b80 100644
if (vc4_hdmi->variant->reset)
vc4_hdmi->variant->reset(vc4_hdmi);
-@@ -2916,6 +2941,10 @@ static int vc4_hdmi_runtime_resume(struct device *dev)
+@@ -2916,6 +2954,10 @@ static int vc4_hdmi_runtime_resume(struct device *dev)
#endif
return 0;
@@ -1362,6 +1394,18 @@ index 199bc398817f..eb3aaaca2b80 100644
}
static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
+diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.h b/drivers/gpu/drm/vc4/vc4_hdmi.h
+index 1520387b317f..fbc0a55f18e1 100644
+--- a/drivers/gpu/drm/vc4/vc4_hdmi.h
++++ b/drivers/gpu/drm/vc4/vc4_hdmi.h
+@@ -171,6 +171,7 @@ struct vc4_hdmi {
+ struct clk *cec_clock;
+ struct clk *pixel_clock;
+ struct clk *hsm_clock;
++ struct clk *hsm_rpm_clock;
+ struct clk *audio_clock;
+ struct clk *pixel_bvb_clock;
+
diff --git a/drivers/hid/hid-rmi.c b/drivers/hid/hid-rmi.c
index 311eee599ce9..2460c6bd46f8 100644
--- a/drivers/hid/hid-rmi.c
@@ -2947,19 +2991,6 @@ index e36809aa6d30..876bc45ede60 100644
return 0;
}
-diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
-index b511e705a46e..6c81422fd226 100644
---- a/drivers/net/wireless/mac80211_hwsim.c
-+++ b/drivers/net/wireless/mac80211_hwsim.c
-@@ -4251,6 +4251,8 @@ static int hwsim_cloned_frame_received_nl(struct sk_buff *skb_2,
-
- rx_status.band = channel->band;
- rx_status.rate_idx = nla_get_u32(info->attrs[HWSIM_ATTR_RX_RATE]);
-+ if (rx_status.rate_idx >= data2->hw->wiphy->bands[rx_status.band]->n_bitrates)
-+ goto out;
- rx_status.signal = nla_get_u32(info->attrs[HWSIM_ATTR_SIGNAL]);
-
- hdr = (void *)skb->data;
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 2e68f50bc7ae..00e1d5bc83a5 100644
--- a/drivers/pci/quirks.c
@@ -3027,36 +3058,6 @@ index 5223d4c9afdf..39f14a5b78cd 100644
}
}
-diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c
-index e6420f2127ce..8def242675ef 100644
---- a/drivers/scsi/stex.c
-+++ b/drivers/scsi/stex.c
-@@ -665,16 +665,17 @@ static int stex_queuecommand_lck(struct scsi_cmnd *cmd)
- return 0;
- case PASSTHRU_CMD:
- if (cmd->cmnd[1] == PASSTHRU_GET_DRVVER) {
-- struct st_drvver ver;
-+ const struct st_drvver ver = {
-+ .major = ST_VER_MAJOR,
-+ .minor = ST_VER_MINOR,
-+ .oem = ST_OEM,
-+ .build = ST_BUILD_VER,
-+ .signature[0] = PASSTHRU_SIGNATURE,
-+ .console_id = host->max_id - 1,
-+ .host_no = hba->host->host_no,
-+ };
- size_t cp_len = sizeof(ver);
-
-- ver.major = ST_VER_MAJOR;
-- ver.minor = ST_VER_MINOR;
-- ver.oem = ST_OEM;
-- ver.build = ST_BUILD_VER;
-- ver.signature[0] = PASSTHRU_SIGNATURE;
-- ver.console_id = host->max_id - 1;
-- ver.host_no = hba->host->host_no;
- cp_len = scsi_sg_copy_from_buffer(cmd, &ver, cp_len);
- if (sizeof(ver) == cp_len)
- cmd->result = DID_OK << 16;
diff --git a/drivers/soc/bcm/bcm2835-power.c b/drivers/soc/bcm/bcm2835-power.c
index 1e0041ec8132..5bcd047768b6 100644
--- a/drivers/soc/bcm/bcm2835-power.c
@@ -3358,19 +3359,6 @@ index 3cc127bb5bfd..2fecdfb03eb5 100644
#endif /* CONFIG_SECURITY */
#if defined(CONFIG_SECURITY) && defined(CONFIG_WATCH_QUEUE)
-diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
-index 1e80e70dfa92..5ce1aac64edd 100644
---- a/include/scsi/scsi_cmnd.h
-+++ b/include/scsi/scsi_cmnd.h
-@@ -201,7 +201,7 @@ static inline unsigned int scsi_get_resid(struct scsi_cmnd *cmd)
- for_each_sg(scsi_sglist(cmd), sg, nseg, __i)
-
- static inline int scsi_sg_copy_from_buffer(struct scsi_cmnd *cmd,
-- void *buf, int buflen)
-+ const void *buf, int buflen)
- {
- return sg_copy_from_buffer(scsi_sglist(cmd), scsi_sg_count(cmd),
- buf, buflen);
diff --git a/init/Kconfig b/init/Kconfig
index c7900e8975f1..ea721c12c251 100644
--- a/init/Kconfig
@@ -3460,351 +3448,6 @@ index db7b2503f068..36653cd5964a 100644
nh = fib_info_nh(fi, 0);
if (cfg->fc_encap) {
if (fib_encap_match(net, cfg->fc_encap_type,
-diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
-index 48fbccbf2a54..44c8701af95c 100644
---- a/net/mac80211/ieee80211_i.h
-+++ b/net/mac80211/ieee80211_i.h
-@@ -1640,6 +1640,14 @@ struct ieee802_11_elems {
-
- /* whether a parse error occurred while retrieving these elements */
- bool parse_error;
-+
-+ /*
-+ * scratch buffer that can be used for various element parsing related
-+ * tasks, e.g., element de-fragmentation etc.
-+ */
-+ size_t scratch_len;
-+ u8 *scratch_pos;
-+ u8 scratch[];
- };
-
- static inline struct ieee80211_local *hw_to_local(
-diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
-index b938806a5184..2d584a86dbf3 100644
---- a/net/mac80211/rx.c
-+++ b/net/mac80211/rx.c
-@@ -1988,10 +1988,11 @@ ieee80211_rx_h_decrypt(struct ieee80211_rx_data *rx)
-
- if (mmie_keyidx < NUM_DEFAULT_KEYS + NUM_DEFAULT_MGMT_KEYS ||
- mmie_keyidx >= NUM_DEFAULT_KEYS + NUM_DEFAULT_MGMT_KEYS +
-- NUM_DEFAULT_BEACON_KEYS) {
-- cfg80211_rx_unprot_mlme_mgmt(rx->sdata->dev,
-- skb->data,
-- skb->len);
-+ NUM_DEFAULT_BEACON_KEYS) {
-+ if (rx->sdata->dev)
-+ cfg80211_rx_unprot_mlme_mgmt(rx->sdata->dev,
-+ skb->data,
-+ skb->len);
- return RX_DROP_MONITOR; /* unexpected BIP keyidx */
- }
-
-@@ -2139,7 +2140,8 @@ ieee80211_rx_h_decrypt(struct ieee80211_rx_data *rx)
- /* either the frame has been decrypted or will be dropped */
- status->flag |= RX_FLAG_DECRYPTED;
-
-- if (unlikely(ieee80211_is_beacon(fc) && result == RX_DROP_UNUSABLE))
-+ if (unlikely(ieee80211_is_beacon(fc) && result == RX_DROP_UNUSABLE &&
-+ rx->sdata->dev))
- cfg80211_rx_unprot_mlme_mgmt(rx->sdata->dev,
- skb->data, skb->len);
-
-diff --git a/net/mac80211/util.c b/net/mac80211/util.c
-index 3f698e508dd7..8f36ab8fcfb2 100644
---- a/net/mac80211/util.c
-+++ b/net/mac80211/util.c
-@@ -1439,6 +1439,8 @@ static size_t ieee802_11_find_bssid_profile(const u8 *start, size_t len,
- for_each_element_id(elem, WLAN_EID_MULTIPLE_BSSID, start, len) {
- if (elem->datalen < 2)
- continue;
-+ if (elem->data[0] < 1 || elem->data[0] > 8)
-+ continue;
-
- for_each_element(sub, elem->data + 1, elem->datalen - 1) {
- u8 new_bssid[ETH_ALEN];
-@@ -1501,25 +1503,27 @@ struct ieee802_11_elems *ieee802_11_parse_elems_crc(const u8 *start, size_t len,
- const struct element *non_inherit = NULL;
- u8 *nontransmitted_profile;
- int nontransmitted_profile_len = 0;
-+ size_t scratch_len = len;
-
-- elems = kzalloc(sizeof(*elems), GFP_ATOMIC);
-+ elems = kzalloc(sizeof(*elems) + scratch_len, GFP_ATOMIC);
- if (!elems)
- return NULL;
- elems->ie_start = start;
- elems->total_len = len;
--
-- nontransmitted_profile = kmalloc(len, GFP_ATOMIC);
-- if (nontransmitted_profile) {
-- nontransmitted_profile_len =
-- ieee802_11_find_bssid_profile(start, len, elems,
-- transmitter_bssid,
-- bss_bssid,
-- nontransmitted_profile);
-- non_inherit =
-- cfg80211_find_ext_elem(WLAN_EID_EXT_NON_INHERITANCE,
-- nontransmitted_profile,
-- nontransmitted_profile_len);
-- }
-+ elems->scratch_len = scratch_len;
-+ elems->scratch_pos = elems->scratch;
-+
-+ nontransmitted_profile = elems->scratch_pos;
-+ nontransmitted_profile_len =
-+ ieee802_11_find_bssid_profile(start, len, elems,
-+ transmitter_bssid,
-+ bss_bssid,
-+ nontransmitted_profile);
-+ elems->scratch_pos += nontransmitted_profile_len;
-+ elems->scratch_len -= nontransmitted_profile_len;
-+ non_inherit = cfg80211_find_ext_elem(WLAN_EID_EXT_NON_INHERITANCE,
-+ nontransmitted_profile,
-+ nontransmitted_profile_len);
-
- crc = _ieee802_11_parse_elems_crc(start, len, action, elems, filter,
- crc, non_inherit);
-@@ -1548,8 +1552,6 @@ struct ieee802_11_elems *ieee802_11_parse_elems_crc(const u8 *start, size_t len,
- offsetofend(struct ieee80211_bssid_index, dtim_count))
- elems->dtim_count = elems->bssid_index->dtim_count;
-
-- kfree(nontransmitted_profile);
--
- elems->crc = crc;
-
- return elems;
-diff --git a/net/mctp/af_mctp.c b/net/mctp/af_mctp.c
-index c2fc2a7b2528..b6b5e496fa40 100644
---- a/net/mctp/af_mctp.c
-+++ b/net/mctp/af_mctp.c
-@@ -295,11 +295,12 @@ __must_hold(&net->mctp.keys_lock)
- mctp_dev_release_key(key->dev, key);
- spin_unlock_irqrestore(&key->lock, flags);
-
-- hlist_del(&key->hlist);
-- hlist_del(&key->sklist);
--
-- /* unref for the lists */
-- mctp_key_unref(key);
-+ if (!hlist_unhashed(&key->hlist)) {
-+ hlist_del_init(&key->hlist);
-+ hlist_del_init(&key->sklist);
-+ /* unref for the lists */
-+ mctp_key_unref(key);
-+ }
-
- kfree_skb(skb);
- }
-@@ -373,9 +374,17 @@ static int mctp_ioctl_alloctag(struct mctp_sock *msk, unsigned long arg)
-
- ctl.tag = tag | MCTP_TAG_OWNER | MCTP_TAG_PREALLOC;
- if (copy_to_user((void __user *)arg, &ctl, sizeof(ctl))) {
-- spin_lock_irqsave(&key->lock, flags);
-- __mctp_key_remove(key, net, flags, MCTP_TRACE_KEY_DROPPED);
-+ unsigned long fl2;
-+ /* Unwind our key allocation: the keys list lock needs to be
-+ * taken before the individual key locks, and we need a valid
-+ * flags value (fl2) to pass to __mctp_key_remove, hence the
-+ * second spin_lock_irqsave() rather than a plain spin_lock().
-+ */
-+ spin_lock_irqsave(&net->mctp.keys_lock, flags);
-+ spin_lock_irqsave(&key->lock, fl2);
-+ __mctp_key_remove(key, net, fl2, MCTP_TRACE_KEY_DROPPED);
- mctp_key_unref(key);
-+ spin_unlock_irqrestore(&net->mctp.keys_lock, flags);
- return -EFAULT;
- }
-
-diff --git a/net/mctp/route.c b/net/mctp/route.c
-index 3b24b8d18b5b..2155f15a074c 100644
---- a/net/mctp/route.c
-+++ b/net/mctp/route.c
-@@ -228,12 +228,12 @@ __releases(&key->lock)
-
- if (!key->manual_alloc) {
- spin_lock_irqsave(&net->mctp.keys_lock, flags);
-- hlist_del(&key->hlist);
-- hlist_del(&key->sklist);
-+ if (!hlist_unhashed(&key->hlist)) {
-+ hlist_del_init(&key->hlist);
-+ hlist_del_init(&key->sklist);
-+ mctp_key_unref(key);
-+ }
- spin_unlock_irqrestore(&net->mctp.keys_lock, flags);
--
-- /* unref for the lists */
-- mctp_key_unref(key);
- }
-
- /* and one for the local reference */
-diff --git a/net/wireless/scan.c b/net/wireless/scan.c
-index 0134e5d5c81a..39fb9cc25cdc 100644
---- a/net/wireless/scan.c
-+++ b/net/wireless/scan.c
-@@ -143,18 +143,12 @@ static inline void bss_ref_get(struct cfg80211_registered_device *rdev,
- lockdep_assert_held(&rdev->bss_lock);
-
- bss->refcount++;
-- if (bss->pub.hidden_beacon_bss) {
-- bss = container_of(bss->pub.hidden_beacon_bss,
-- struct cfg80211_internal_bss,
-- pub);
-- bss->refcount++;
-- }
-- if (bss->pub.transmitted_bss) {
-- bss = container_of(bss->pub.transmitted_bss,
-- struct cfg80211_internal_bss,
-- pub);
-- bss->refcount++;
-- }
-+
-+ if (bss->pub.hidden_beacon_bss)
-+ bss_from_pub(bss->pub.hidden_beacon_bss)->refcount++;
-+
-+ if (bss->pub.transmitted_bss)
-+ bss_from_pub(bss->pub.transmitted_bss)->refcount++;
- }
-
- static inline void bss_ref_put(struct cfg80211_registered_device *rdev,
-@@ -304,7 +298,8 @@ static size_t cfg80211_gen_new_ie(const u8 *ie, size_t ielen,
- tmp_old = cfg80211_find_ie(WLAN_EID_SSID, ie, ielen);
- tmp_old = (tmp_old) ? tmp_old + tmp_old[1] + 2 : ie;
-
-- while (tmp_old + tmp_old[1] + 2 - ie <= ielen) {
-+ while (tmp_old + 2 - ie <= ielen &&
-+ tmp_old + tmp_old[1] + 2 - ie <= ielen) {
- if (tmp_old[0] == 0) {
- tmp_old++;
- continue;
-@@ -364,7 +359,8 @@ static size_t cfg80211_gen_new_ie(const u8 *ie, size_t ielen,
- * copied to new ie, skip ssid, capability, bssid-index ie
- */
- tmp_new = sub_copy;
-- while (tmp_new + tmp_new[1] + 2 - sub_copy <= subie_len) {
-+ while (tmp_new + 2 - sub_copy <= subie_len &&
-+ tmp_new + tmp_new[1] + 2 - sub_copy <= subie_len) {
- if (!(tmp_new[0] == WLAN_EID_NON_TX_BSSID_CAP ||
- tmp_new[0] == WLAN_EID_SSID)) {
- memcpy(pos, tmp_new, tmp_new[1] + 2);
-@@ -427,6 +423,15 @@ cfg80211_add_nontrans_list(struct cfg80211_bss *trans_bss,
-
- rcu_read_unlock();
-
-+ /*
-+ * This is a bit weird - it's not on the list, but already on another
-+ * one! The only way that could happen is if there's some BSSID/SSID
-+ * shared by multiple APs in their multi-BSSID profiles, potentially
-+ * with hidden SSID mixed in ... ignore it.
-+ */
-+ if (!list_empty(&nontrans_bss->nontrans_list))
-+ return -EINVAL;
-+
- /* add to the list */
- list_add_tail(&nontrans_bss->nontrans_list, &trans_bss->nontrans_list);
- return 0;
-@@ -1602,6 +1607,23 @@ struct cfg80211_non_tx_bss {
- u8 bssid_index;
- };
-
-+static void cfg80211_update_hidden_bsses(struct cfg80211_internal_bss *known,
-+ const struct cfg80211_bss_ies *new_ies,
-+ const struct cfg80211_bss_ies *old_ies)
-+{
-+ struct cfg80211_internal_bss *bss;
-+
-+ /* Assign beacon IEs to all sub entries */
-+ list_for_each_entry(bss, &known->hidden_list, hidden_list) {
-+ const struct cfg80211_bss_ies *ies;
-+
-+ ies = rcu_access_pointer(bss->pub.beacon_ies);
-+ WARN_ON(ies != old_ies);
-+
-+ rcu_assign_pointer(bss->pub.beacon_ies, new_ies);
-+ }
-+}
-+
- static bool
- cfg80211_update_known_bss(struct cfg80211_registered_device *rdev,
- struct cfg80211_internal_bss *known,
-@@ -1625,7 +1647,6 @@ cfg80211_update_known_bss(struct cfg80211_registered_device *rdev,
- kfree_rcu((struct cfg80211_bss_ies *)old, rcu_head);
- } else if (rcu_access_pointer(new->pub.beacon_ies)) {
- const struct cfg80211_bss_ies *old;
-- struct cfg80211_internal_bss *bss;
-
- if (known->pub.hidden_beacon_bss &&
- !list_empty(&known->hidden_list)) {
-@@ -1653,16 +1674,7 @@ cfg80211_update_known_bss(struct cfg80211_registered_device *rdev,
- if (old == rcu_access_pointer(known->pub.ies))
- rcu_assign_pointer(known->pub.ies, new->pub.beacon_ies);
-
-- /* Assign beacon IEs to all sub entries */
-- list_for_each_entry(bss, &known->hidden_list, hidden_list) {
-- const struct cfg80211_bss_ies *ies;
--
-- ies = rcu_access_pointer(bss->pub.beacon_ies);
-- WARN_ON(ies != old);
--
-- rcu_assign_pointer(bss->pub.beacon_ies,
-- new->pub.beacon_ies);
-- }
-+ cfg80211_update_hidden_bsses(known, new->pub.beacon_ies, old);
-
- if (old)
- kfree_rcu((struct cfg80211_bss_ies *)old, rcu_head);
-@@ -1739,6 +1751,8 @@ cfg80211_bss_update(struct cfg80211_registered_device *rdev,
- new->refcount = 1;
- INIT_LIST_HEAD(&new->hidden_list);
- INIT_LIST_HEAD(&new->pub.nontrans_list);
-+ /* we'll set this later if it was non-NULL */
-+ new->pub.transmitted_bss = NULL;
-
- if (rcu_access_pointer(tmp->pub.proberesp_ies)) {
- hidden = rb_find_bss(rdev, tmp, BSS_CMP_HIDE_ZLEN);
-@@ -2021,10 +2035,15 @@ cfg80211_inform_single_bss_data(struct wiphy *wiphy,
- spin_lock_bh(&rdev->bss_lock);
- if (cfg80211_add_nontrans_list(non_tx_data->tx_bss,
- &res->pub)) {
-- if (__cfg80211_unlink_bss(rdev, res))
-+ if (__cfg80211_unlink_bss(rdev, res)) {
- rdev->bss_generation++;
-+ res = NULL;
-+ }
- }
- spin_unlock_bh(&rdev->bss_lock);
-+
-+ if (!res)
-+ return NULL;
- }
-
- trace_cfg80211_return_bss(&res->pub);
-@@ -2143,6 +2162,8 @@ static void cfg80211_parse_mbssid_data(struct wiphy *wiphy,
- for_each_element_id(elem, WLAN_EID_MULTIPLE_BSSID, ie, ielen) {
- if (elem->datalen < 4)
- continue;
-+ if (elem->data[0] < 1 || (int)elem->data[0] > 8)
-+ continue;
- for_each_element(sub, elem->data + 1, elem->datalen - 1) {
- u8 profile_len;
-
-@@ -2279,7 +2300,7 @@ cfg80211_update_notlisted_nontrans(struct wiphy *wiphy,
- size_t new_ie_len;
- struct cfg80211_bss_ies *new_ies;
- const struct cfg80211_bss_ies *old;
-- u8 cpy_len;
-+ size_t cpy_len;
-
- lockdep_assert_held(&wiphy_to_rdev(wiphy)->bss_lock);
-
-@@ -2346,6 +2367,8 @@ cfg80211_update_notlisted_nontrans(struct wiphy *wiphy,
- } else {
- old = rcu_access_pointer(nontrans_bss->beacon_ies);
- rcu_assign_pointer(nontrans_bss->beacon_ies, new_ies);
-+ cfg80211_update_hidden_bsses(bss_from_pub(nontrans_bss),
-+ new_ies, old);
- rcu_assign_pointer(nontrans_bss->ies, new_ies);
- if (old)
- kfree_rcu((struct cfg80211_bss_ies *)old, rcu_head);
diff --git a/scripts/pahole-flags.sh b/scripts/pahole-flags.sh
index 0d99ef17e4a5..d4f3d63cb434 100755
--- a/scripts/pahole-flags.sh
@@ -3832,7 +3475,7 @@ index 01fab3d4f90b..2ae5dfc904f9 100755
# Use make KBUILD_ABS_SRCTREE=1 {tags|cscope}
# to force full paths for a non-O= build
diff --git a/security/integrity/platform_certs/load_uefi.c b/security/integrity/platform_certs/load_uefi.c
-index 093894a640dc..1c43a9462b4b 100644
+index b78753d27d8e..f0b37800431a 100644
--- a/security/integrity/platform_certs/load_uefi.c
+++ b/security/integrity/platform_certs/load_uefi.c
@@ -73,7 +73,8 @@ static __init void *get_cert_list(efi_char16_t *name, efi_guid_t *guid,
diff --git a/sources b/sources
index 69c5911e2..d4a8bb4d6 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (linux-5.19.15.tar.xz) = bbaadd05afa30937e4e019d7f4a3407f0b78076ffccca21f88a433d28aadd534a35091070ef619eb674a01349dc796c3aa79dd73a2e5c07b09d2ef639ee909ca
-SHA512 (kernel-abi-stablelists-5.19.15.tar.bz2) = bf3a8142d578a65fa9de2314a149a9d16061eedc03d751e4f352ad37bd4547141357513e41dc10dade7fc6e56d7b707976f00189e5bc9e92fa1bd0b20dbd9254
-SHA512 (kernel-kabi-dw-5.19.15.tar.bz2) = 3f400fd776efdd53e342db7adc0fabd2b747bf4c4d471796999974496670efabb87f9d91442745264369c169c17dabfa9a3c31da9de1611c27b0da1e5a6f6443
+SHA512 (linux-5.19.16.tar.xz) = 47163cd1429a09077134de1bc7f9e6fa3462a030a127a9d8f5268e9ecd1c26894e3edfeb002fff01fdc008a3c61d333d272d6a0d73df5528bc15079e3f93a993
+SHA512 (kernel-abi-stablelists-5.19.16.tar.bz2) = a8b1d3439b781f72257c65b7812aff563e08949efdecf987aae461fa5e3983d97584c14a96b3ac493c6b2cde38822755b829a99cf49338cf7a8cf89076ff73cf
+SHA512 (kernel-kabi-dw-5.19.16.tar.bz2) = e649054eca21dd03263304df8b17c30a7f86bd546e516d8371569905cb36648cf35cb24d05d36c20f6806580892200bf5f0254dd8d3bae9dee9b3ad57f2fd462