Skip to contentSkip to conversation

Linux 4.14.251

DISCUSSION Greg Kroah-Hartman 1 participant 2 messages Oct 17, 2021 Stable branch

lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw

I'm announcing the release of the 4.14.251 kernel.

All users of the 4.14 kernel series must upgrade.

The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary

thanks,

greg k-h

------------

 Makefile                                    |    2 
 arch/arm/boot/dts/omap3430-sdp.dts          |    2 
 arch/arm/boot/dts/qcom-apq8064.dtsi         |    3 
 arch/arm/mach-imx/pm-imx6.c                 |    2 
 arch/m68k/kernel/signal.c                   |   88 ++++++++++++--------------
 arch/mips/net/bpf_jit.c                     |   57 ++++++++++++----
 arch/powerpc/boot/dts/fsl/t1023rdb.dts      |    2 
 arch/x86/events/core.c                      |    1 
 arch/xtensa/kernel/irq.c                    |    2 
 drivers/gpu/drm/nouveau/nouveau_debugfs.c   |    1 
 drivers/hid/hid-apple.c                     |    7 ++
 drivers/i2c/i2c-core-acpi.c                 |    1 
 drivers/net/ethernet/intel/i40e/i40e_main.c |    2 
 drivers/net/ethernet/sun/Kconfig            |    1 
 drivers/net/phy/bcm7xxx.c                   |   94 ++++++++++++++++++++++++++++
 drivers/net/phy/mdio_bus.c                  |    7 ++
 drivers/ptp/ptp_pch.c                       |    1 
 drivers/scsi/ses.c                          |    2 
 drivers/scsi/virtio_scsi.c                  |    4 -
 drivers/usb/Kconfig                         |    3 
 drivers/usb/class/cdc-acm.c                 |    8 ++
 drivers/xen/balloon.c                       |   21 ++++--
 fs/nfsd/nfs4xdr.c                           |   19 +++--
 fs/overlayfs/dir.c                          |   10 ++
 include/linux/sched.h                       |    2 
 kernel/bpf/stackmap.c                       |    3 
 lib/test_bpf.c                              |   63 ++++++++++++++++++
 net/bridge/br_netlink.c                     |    2 
 net/core/rtnetlink.c                        |    2 
 net/ipv6/netfilter/ip6_tables.c             |    1 
 net/mac80211/rx.c                           |    3 
 net/netlink/af_netlink.c                    |   14 ++--
 net/sched/sch_fifo.c                        |    3 
 33 files changed, 335 insertions(+), 98 deletions(-)

Al Viro (1):
m68k: Handle arrivals of multiple signals correctly

Anand K Mistry (1):
perf/x86: Reset destroy callback on event init failure

Andy Shevchenko (1):
ptp_pch: Load module automatically if ID matches

Ben Hutchings (1):
Partially revert "usb: Kconfig: using select for USB_COMMON dependency"

Colin Ian King (1):

      scsi: virtio_scsi: Fix spelling mistake "Unsupport" -> "Unsupported"

Daniel Borkmann (1):
bpf: add also cbpf long jump test cases with heavy expansion

David Heidelberg (1):
ARM: dts: qcom: apq8064: use compatible which contains chipid

Eric Dumazet (4):
net_sched: fix NULL deref in fifo_set_limit()
net: bridge: use nla_total_size_64bit() in br_get_linkxstats_size()
netlink: annotate data races around nlk->bound
rtnetlink: fix if_nlmsg_stats_size() under estimation

Florian Fainelli (1):
net: phy: bcm7xxx: Fixed indirect MMD operations

Greg Kroah-Hartman (1):

      Linux 4.14.251

Jamie Iles (1):
i2c: acpi: fix resource leak in reconfiguration device addition

Jeremy Sowden (1):
netfilter: ip6_tables: zero-initialize fragment offset

Jiapeng Chong (1):
scsi: ses: Fix unsigned comparison with less than zero

Jiri Benc (1):
i40e: fix endless loop under rtnl

Johan Hovold (2):
USB: cdc-acm: fix racy tty buffer accesses
USB: cdc-acm: fix break reporting

Juergen Gross (1):
xen/balloon: fix cancelled balloon action

Max Filippov (1):
xtensa: call irqchip_init only when CONFIG_USE_OF is selected

Mizuho Mori (1):
HID: apple: Fix logical maximum and usage maximum of Magic Keyboard JIS

Oleksij Rempel (1):
ARM: imx6: disable the GIC CPU interface before calling stby-poweroff sequence

Pali Rohár (1):
powerpc/fsl/dts: Fix phy-connection-type for fm1mac3

Pavel Skripkin (1):
phy: mdio: fix memory leak

Peter Zijlstra (1):
sched: Always inline is_percpu_thread()

Piotr Krysiuk (1):
bpf, mips: Validate conditional branch offsets

Randy Dunlap (1):
net: sun: SUNVNET_COMMON should depend on INET

Roger Quadros (1):
ARM: dts: omap3430-sdp: Fix NAND device node

Tatsuhiko Yasumatsu (1):
bpf: Fix integer overflow in prealloc_elems_and_freelist()

Trond Myklebust (1):
nfsd4: Handle the NFSv4 READDIR 'dircount' hint being zero

Yang Yingliang (1):
drm/nouveau/debugfs: fix file release memory leak

YueHaibing (1):
mac80211: Drop frames from invalid MAC address in ad-hoc mode

Zheng Liang (1):
ovl: fix missing negative dentry check in ovl_rename()

author maintainer
#1 lore raw
Makefile +1 -1
index 7fed41bc6a4f..184089eb1bdb 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 VERSION = 4
 PATCHLEVEL = 14
-SUBLEVEL = 250
+SUBLEVEL = 251
 EXTRAVERSION =
 NAME = Petit Gorille
 
arch/arm/boot/dts/omap3430-sdp.dts +1 -1
index 908951eb5943..e4ee935f7b38 100644
@@ -104,7 +104,7 @@
 
 	nand@1,0 {
 		compatible = "ti,omap2-nand";
-		reg = <0 0 4>; /* CS0, offset 0, IO size 4 */
+		reg = <1 0 4>; /* CS1, offset 0, IO size 4 */
 		interrupt-parent = <&gpmc>;
 		interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
 			     <1 IRQ_TYPE_NONE>;	/* termcount */
arch/arm/boot/dts/qcom-apq8064.dtsi +1 -2
index eef243998392..459358b54ab4 100644
@@ -1114,7 +1114,7 @@
 		};
 
 		gpu: adreno-3xx@4300000 {
-			compatible = "qcom,adreno-3xx";
+			compatible = "qcom,adreno-320.2", "qcom,adreno";
 			reg = <0x04300000 0x20000>;
 			reg-names = "kgsl_3d0_reg_memory";
 			interrupts = <GIC_SPI 80 0>;
@@ -1129,7 +1129,6 @@
 			    <&mmcc GFX3D_AHB_CLK>,
 			    <&mmcc GFX3D_AXI_CLK>,
 			    <&mmcc MMSS_IMEM_AHB_CLK>;
-			qcom,chipid = <0x03020002>;
 
 			iommus = <&gfx3d 0
 				  &gfx3d 1
arch/arm/mach-imx/pm-imx6.c +2 -0
index c7dcb0b20730..5182b04ac878 100644
@@ -15,6 +15,7 @@
 #include <linux/io.h>
 #include <linux/irq.h>
 #include <linux/genalloc.h>
+#include <linux/irqchip/arm-gic.h>
 #include <linux/mfd/syscon.h>
 #include <linux/mfd/syscon/imx6q-iomuxc-gpr.h>
 #include <linux/of.h>
@@ -608,6 +609,7 @@ static void __init imx6_pm_common_init(const struct imx6_pm_socdata
 
 static void imx6_pm_stby_poweroff(void)
 {
+	gic_cpu_if_down(0);
 	imx6_set_lpm(STOP_POWER_OFF);
 	imx6q_suspend_finish(0);
 
arch/m68k/kernel/signal.c +42 -46

184 lines not on this page · raw message

arch/mips/net/bpf_jit.c +43 -14

121 lines not on this page · raw message

arch/powerpc/boot/dts/fsl/t1023rdb.dts +1 -1
index 5ba6fbfca274..f82f85c65964 100644
@@ -154,7 +154,7 @@
 
 			fm1mac3: ethernet@e4000 {
 				phy-handle = <&sgmii_aqr_phy3>;
-				phy-connection-type = "sgmii-2500";
+				phy-connection-type = "2500base-x";
 				sleep = <&rcpm 0x20000000>;
 			};
 
arch/x86/events/core.c +1 -0
index c1f7b3cb84a9..39c298afa2ea 100644
@@ -2094,6 +2094,7 @@ static int x86_pmu_event_init(struct perf_event *event)
 	if (err) {
 		if (event->destroy)
 			event->destroy(event);
+		event->destroy = NULL;
 	}
 
 	if (ACCESS_ONCE(x86_pmu.attr_rdpmc))
arch/xtensa/kernel/irq.c +1 -1
index 18e4ef34ac45..4182189b29de 100644
@@ -145,7 +145,7 @@ unsigned xtensa_get_ext_irq_no(unsigned irq)
 
 void __init init_IRQ(void)
 {
-#ifdef CONFIG_OF
+#ifdef CONFIG_USE_OF
 	irqchip_init();
 #else
 #ifdef CONFIG_HAVE_SMP
drivers/gpu/drm/nouveau/nouveau_debugfs.c +1 -0
index 4561a786fab0..cce4833a6083 100644
@@ -185,6 +185,7 @@ static const struct file_operations nouveau_pstate_fops = {
 	.open = nouveau_debugfs_pstate_open,
 	.read = seq_read,
 	.write = nouveau_debugfs_pstate_set,
+	.release = single_release,
 };
 
 static struct drm_info_list nouveau_debugfs_list[] = {
drivers/hid/hid-apple.c +7 -0
index b58ab769aa7b..4e3dd3f55a96 100644
@@ -304,12 +304,19 @@ static int apple_event(struct hid_device *hdev, struct hid_field *field,
 
 /*
  * MacBook JIS keyboard has wrong logical maximum
+ * Magic Keyboard JIS has wrong logical maximum
  */
 static __u8 *apple_report_fixup(struct hid_device *hdev, __u8 *rdesc,
 		unsigned int *rsize)
 {
 	struct apple_sc *asc = hid_get_drvdata(hdev);
 
+	if(*rsize >=71 && rdesc[70] == 0x65 && rdesc[64] == 0x65) {
+		hid_info(hdev,
+			 "fixing up Magic Keyboard JIS report descriptor\n");
+		rdesc[64] = rdesc[70] = 0xe7;
+	}
+
 	if ((asc->quirks & APPLE_RDESC_JIS) && *rsize >= 60 &&
 			rdesc[53] == 0x65 && rdesc[59] == 0x65) {
 		hid_info(hdev,
drivers/i2c/i2c-core-acpi.c +1 -0
index 52ae674ebf5b..6f42856c1507 100644
@@ -395,6 +395,7 @@ static int i2c_acpi_notify(struct notifier_block *nb, unsigned long value,
 			break;
 
 		i2c_acpi_register_device(adapter, adev, &info);
+		put_device(&adapter->dev);
 		break;
 	case ACPI_RECONFIG_DEVICE_REMOVE:
 		if (!acpi_device_enumerated(adev))
drivers/net/ethernet/intel/i40e/i40e_main.c +1 -1
index 65c17e39c405..1555d32ddb96 100644
@@ -6958,7 +6958,7 @@ static int i40e_get_capabilities(struct i40e_pf *pf)
 		if (pf->hw.aq.asq_last_status == I40E_AQ_RC_ENOMEM) {
 			/* retry with a larger buffer */
 			buf_len = data_size;
-		} else if (pf->hw.aq.asq_last_status != I40E_AQ_RC_OK) {
+		} else if (pf->hw.aq.asq_last_status != I40E_AQ_RC_OK || err) {
 			dev_info(&pf->pdev->dev,
 				 "capability discovery failed, err %s aq_err %s\n",
 				 i40e_stat_str(&pf->hw, err),
drivers/net/ethernet/sun/Kconfig +1 -0
index b2caf5132bd2..eea4179e63eb 100644
@@ -72,6 +72,7 @@ config CASSINI
 config SUNVNET_COMMON
 	tristate "Common routines to support Sun Virtual Networking"
 	depends on SUN_LDOMS
+	depends on INET
 	default m
 
 config SUNVNET
drivers/net/phy/bcm7xxx.c +94 -0

113 lines not on this page · raw message

drivers/net/phy/mdio_bus.c +7 -0
index 5fc7b6c1a442..5ef9bbbab3db 100644
@@ -344,6 +344,13 @@ int __mdiobus_register(struct mii_bus *bus, struct module *owner)
 	bus->dev.groups = NULL;
 	dev_set_name(&bus->dev, "%s", bus->id);
 
+	/* We need to set state to MDIOBUS_UNREGISTERED to correctly release
+	 * the device in mdiobus_free()
+	 *
+	 * State will be updated later in this function in case of success
+	 */
+	bus->state = MDIOBUS_UNREGISTERED;
+
 	err = device_register(&bus->dev);
 	if (err) {
 		pr_err("mii_bus %s failed to register\n", bus->id);
drivers/ptp/ptp_pch.c +1 -0
index b3285175f20f..8461d7f92d31 100644
@@ -698,6 +698,7 @@ static const struct pci_device_id pch_ieee1588_pcidev_id[] = {
 	 },
 	{0}
 };
+MODULE_DEVICE_TABLE(pci, pch_ieee1588_pcidev_id);
 
 static struct pci_driver pch_driver = {
 	.name = KBUILD_MODNAME,
drivers/scsi/ses.c +1 -1
index 4b993607887c..84b234bbd07d 100644
@@ -134,7 +134,7 @@ static int ses_recv_diag(struct scsi_device *sdev, int page_code,
 static int ses_send_diag(struct scsi_device *sdev, int page_code,
 			 void *buf, int bufflen)
 {
-	u32 result;
+	int result;
 
 	unsigned char cmd[] = {
 		SEND_DIAGNOSTIC,
drivers/scsi/virtio_scsi.c +2 -2
index 1f4bd7d0154d..2839701ffab5 100644
@@ -336,7 +336,7 @@ static void virtscsi_handle_transport_reset(struct virtio_scsi *vscsi,
 		}
 		break;
 	default:
-		pr_info("Unsupport virtio scsi event reason %x\n", event->reason);
+		pr_info("Unsupported virtio scsi event reason %x\n", event->reason);
 	}
 }
 
@@ -389,7 +389,7 @@ static void virtscsi_handle_event(struct work_struct *work)
 		virtscsi_handle_param_change(vscsi, event);
 		break;
 	default:
-		pr_err("Unsupport virtio scsi event %x\n", event->event);
+		pr_err("Unsupported virtio scsi event %x\n", event->event);
 	}
 	virtscsi_kick_event(vscsi, event_node);
 }
drivers/usb/Kconfig +1 -2
index 72eb3e41e3b6..5923ebcffcdf 100644
@@ -174,8 +174,7 @@ source "drivers/usb/typec/Kconfig"
 
 config USB_LED_TRIG
 	bool "USB LED Triggers"
-	depends on LEDS_CLASS && LEDS_TRIGGERS
-	select USB_COMMON
+	depends on LEDS_CLASS && USB_COMMON && LEDS_TRIGGERS
 	help
 	  This option adds LED triggers for USB host and/or gadget activity.
 
drivers/usb/class/cdc-acm.c +8 -0
index bd9a11782e15..c653635ce5c2 100644
@@ -351,6 +351,9 @@ static void acm_process_notification(struct acm *acm, unsigned char *buf)
 			acm->iocount.overrun++;
 		spin_unlock(&acm->read_lock);
 
+		if (newctrl & ACM_CTRL_BRK)
+			tty_flip_buffer_push(&acm->port);
+
 		if (difference)
 			wake_up_all(&acm->wioctl);
 
@@ -486,11 +489,16 @@ static int acm_submit_read_urbs(struct acm *acm, gfp_t mem_flags)
 
 static void acm_process_read_urb(struct acm *acm, struct urb *urb)
 {
+	unsigned long flags;
+
 	if (!urb->actual_length)
 		return;
 
+	spin_lock_irqsave(&acm->read_lock, flags);
 	tty_insert_flip_string(&acm->port, urb->transfer_buffer,
 			urb->actual_length);
+	spin_unlock_irqrestore(&acm->read_lock, flags);
+
 	tty_flip_buffer_push(&acm->port);
 }
 
drivers/xen/balloon.c +15 -6
index a697c64a6506..92bb71c040f9 100644
@@ -571,12 +571,12 @@ static enum bp_state decrease_reservation(unsigned long nr_pages, gfp_t gfp)
 }
 
 /*
- * Stop waiting if either state is not BP_EAGAIN and ballooning action is
- * needed, or if the credit has changed while state is BP_EAGAIN.
+ * Stop waiting if either state is BP_DONE and ballooning action is
+ * needed, or if the credit has changed while state is not BP_DONE.
  */
 static bool balloon_thread_cond(enum bp_state state, long credit)
 {
-	if (state != BP_EAGAIN)
+	if (state == BP_DONE)
 		credit = 0;
 
 	return current_credit() != credit || kthread_should_stop();
@@ -596,10 +596,19 @@ static int balloon_thread(void *unused)
 
 	set_freezable();
 	for (;;) {
-		if (state == BP_EAGAIN)
-			timeout = balloon_stats.schedule_delay * HZ;
-		else
+		switch (state) {
+		case BP_DONE:
+		case BP_ECANCELED:
 			timeout = 3600 * HZ;
+			break;
+		case BP_EAGAIN:
+			timeout = balloon_stats.schedule_delay * HZ;
+			break;
+		case BP_WAIT:
+			timeout = HZ;
+			break;
+		}
+
 		credit = current_credit();
 
 		wait_event_freezable_timeout(balloon_thread_wq,
fs/nfsd/nfs4xdr.c +11 -8
index c1e923334012..2e7349b2dd4d 100644
@@ -3082,15 +3082,18 @@ nfsd4_encode_dirent(void *ccdv, const char *name, int namlen,
 		goto fail;
 	cd->rd_maxcount -= entry_bytes;
 	/*
-	 * RFC 3530 14.2.24 describes rd_dircount as only a "hint", so
-	 * let's always let through the first entry, at least:
+	 * RFC 3530 14.2.24 describes rd_dircount as only a "hint", and
+	 * notes that it could be zero. If it is zero, then the server
+	 * should enforce only the rd_maxcount value.
 	 */
-	if (!cd->rd_dircount)
-		goto fail;
-	name_and_cookie = 4 + 4 * XDR_QUADLEN(namlen) + 8;
-	if (name_and_cookie > cd->rd_dircount && cd->cookie_offset)
-		goto fail;
-	cd->rd_dircount -= min(cd->rd_dircount, name_and_cookie);
+	if (cd->rd_dircount) {
+		name_and_cookie = 4 + 4 * XDR_QUADLEN(namlen) + 8;
+		if (name_and_cookie > cd->rd_dircount && cd->cookie_offset)
+			goto fail;
+		cd->rd_dircount -= min(cd->rd_dircount, name_and_cookie);
+		if (!cd->rd_dircount)
+			cd->rd_maxcount = 0;
+	}
 
 	cd->cookie_offset = cookie_offset;
 skip_entry:
fs/overlayfs/dir.c +7 -3
index 5bdc85ad13a2..4869fa508616 100644
@@ -1032,9 +1032,13 @@ static int ovl_rename(struct inode *olddir, struct dentry *old,
 				goto out_dput;
 		}
 	} else {
-		if (!d_is_negative(newdentry) &&
-		    (!new_opaque || !ovl_is_whiteout(newdentry)))
-			goto out_dput;
+		if (!d_is_negative(newdentry)) {
+			if (!new_opaque || !ovl_is_whiteout(newdentry))
+				goto out_dput;
+		} else {
+			if (flags & RENAME_EXCHANGE)
+				goto out_dput;
+		}
 	}
 
 	if (olddentry == trap)
include/linux/sched.h +1 -1
index 99650f05c271..914cc8b180ed 100644
@@ -1390,7 +1390,7 @@ extern struct pid *cad_pid;
 #define tsk_used_math(p)			((p)->flags & PF_USED_MATH)
 #define used_math()				tsk_used_math(current)
 
-static inline bool is_percpu_thread(void)
+static __always_inline bool is_percpu_thread(void)
 {
 #ifdef CONFIG_SMP
 	return (current->flags & PF_NO_SETAFFINITY) &&
kernel/bpf/stackmap.c +2 -1
index 1d4c3fba0f8c..099dc780a92f 100644
@@ -28,7 +28,8 @@ struct bpf_stack_map {
 
 static int prealloc_elems_and_freelist(struct bpf_stack_map *smap)
 {
-	u32 elem_size = sizeof(struct stack_map_bucket) + smap->map.value_size;
+	u64 elem_size = sizeof(struct stack_map_bucket) +
+			(u64)smap->map.value_size;
 	int err;
 
 	smap->elems = bpf_map_area_alloc(elem_size * smap->map.max_entries,
lib/test_bpf.c +63 -0

75 lines not on this page · raw message

net/bridge/br_netlink.c +1 -1
index 08190db0a2dc..79e306ec1416 100644
@@ -1437,7 +1437,7 @@ static size_t br_get_linkxstats_size(const struct net_device *dev, int attr)
 	}
 
 	return numvls * nla_total_size(sizeof(struct bridge_vlan_xstats)) +
-	       nla_total_size(sizeof(struct br_mcast_stats)) +
+	       nla_total_size_64bit(sizeof(struct br_mcast_stats)) +
 	       nla_total_size(0);
 }
 
net/core/rtnetlink.c +1 -1
index 3bcaecc7ba69..d7e2cb7ae1fa 100644
@@ -4053,7 +4053,7 @@ static int rtnl_fill_statsinfo(struct sk_buff *skb, struct net_device *dev,
 static size_t if_nlmsg_stats_size(const struct net_device *dev,
 				  u32 filter_mask)
 {
-	size_t size = 0;
+	size_t size = NLMSG_ALIGN(sizeof(struct if_stats_msg));
 
 	if (stats_attr_valid(filter_mask, IFLA_STATS_LINK_64, 0))
 		size += nla_total_size_64bit(sizeof(struct rtnl_link_stats64));
net/ipv6/netfilter/ip6_tables.c +1 -0
index d0d5e4372730..93f444154728 100644
@@ -275,6 +275,7 @@ ip6t_do_table(struct sk_buff *skb,
 	 * things we don't know, ie. tcp syn flag or ports).  If the
 	 * rule is also a fragment-specific rule, non-fragments won't
 	 * match it. */
+	acpar.fragoff = 0;
 	acpar.hotdrop = false;
 	acpar.state   = state;
 
net/mac80211/rx.c +2 -1
index 87926c6fe0bf..cbe1177d95f9 100644
@@ -3714,7 +3714,8 @@ static bool ieee80211_accept_frame(struct ieee80211_rx_data *rx)
 		if (!bssid)
 			return false;
 		if (ether_addr_equal(sdata->vif.addr, hdr->addr2) ||
-		    ether_addr_equal(sdata->u.ibss.bssid, hdr->addr2))
+		    ether_addr_equal(sdata->u.ibss.bssid, hdr->addr2) ||
+		    !is_valid_ether_addr(hdr->addr2))
 			return false;
 		if (ieee80211_is_beacon(hdr->frame_control))
 			return true;
net/netlink/af_netlink.c +10 -4
index 955041c54702..d1fd9f7c867e 100644
@@ -567,7 +567,10 @@ static int netlink_insert(struct sock *sk, u32 portid)
 
 	/* We need to ensure that the socket is hashed and visible. */
 	smp_wmb();
-	nlk_sk(sk)->bound = portid;
+	/* Paired with lockless reads from netlink_bind(),
+	 * netlink_connect() and netlink_sendmsg().
+	 */
+	WRITE_ONCE(nlk_sk(sk)->bound, portid);
 
 err:
 	release_sock(sk);
@@ -986,7 +989,8 @@ static int netlink_bind(struct socket *sock, struct sockaddr *addr,
 	else if (nlk->ngroups < 8*sizeof(groups))
 		groups &= (1UL << nlk->ngroups) - 1;
 
-	bound = nlk->bound;
+	/* Paired with WRITE_ONCE() in netlink_insert() */
+	bound = READ_ONCE(nlk->bound);
 	if (bound) {
 		/* Ensure nlk->portid is up-to-date. */
 		smp_rmb();
@@ -1072,8 +1076,9 @@ static int netlink_connect(struct socket *sock, struct sockaddr *addr,
 
 	/* No need for barriers here as we return to user-space without
 	 * using any of the bound attributes.
+	 * Paired with WRITE_ONCE() in netlink_insert().
 	 */
-	if (!nlk->bound)
+	if (!READ_ONCE(nlk->bound))
 		err = netlink_autobind(sock);
 
 	if (err == 0) {
@@ -1839,7 +1844,8 @@ static int netlink_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
 		dst_group = nlk->dst_group;
 	}
 
-	if (!nlk->bound) {
+	/* Paired with WRITE_ONCE() in netlink_insert() */
+	if (!READ_ONCE(nlk->bound)) {
 		err = netlink_autobind(sock);
 		if (err)
 			goto out;
net/sched/sch_fifo.c +3 -0
index 1e37247656f8..8b7110cbcce4 100644
@@ -151,6 +151,9 @@ int fifo_set_limit(struct Qdisc *q, unsigned int limit)
 	if (strncmp(q->ops->id + 1, "fifo", 4) != 0)
 		return 0;
 
+	if (!q->ops->change)
+		return 0;
+
 	nla = kmalloc(nla_attr_size(sizeof(struct tc_fifo_qopt)), GFP_KERNEL);
 	if (nla) {
 		nla->nla_type = RTM_NEWQDISC;