Skip to contentSkip to conversation

Linux 5.1.1

DISCUSSION Greg KH 2 participants 3 messages May 11, 2019 Stable branch

lore
Share & tools
lore

Greg KH

author maintainer
#0 lore raw

I'm announcing the release of the 5.1.1 kernel.

All users of the 5.1 kernel series must upgrade.

The updated 5.1.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.1.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/arm64/include/asm/futex.h         |   55 ++-
 drivers/acpi/acpi_lpss.c               |    4 
 drivers/bluetooth/hci_bcm.c            |   20 +
 drivers/cpufreq/armada-37xx-cpufreq.c  |   22 +
 drivers/hv/hv.c                        |    1 
 drivers/hwtracing/intel_th/pci.c       |    5 
 drivers/i3c/master.c                   |    5 
 drivers/iio/adc/qcom-spmi-adc5.c       |    1 
 drivers/scsi/lpfc/lpfc_attr.c          |  196 ++++++-------
 drivers/scsi/lpfc/lpfc_ct.c            |   12 
 drivers/scsi/lpfc/lpfc_debugfs.c       |  474 ++++++++++++++++-----------------
 drivers/scsi/lpfc/lpfc_debugfs.h       |    6 
 drivers/scsi/qla2xxx/qla_attr.c        |    4 
 drivers/scsi/qla2xxx/qla_nvme.c        |   19 -
 drivers/scsi/qla2xxx/qla_target.c      |    4 
 drivers/soc/sunxi/Kconfig              |    1 
 drivers/staging/greybus/power_supply.c |    2 
 drivers/staging/most/cdev/cdev.c       |    2 
 drivers/staging/most/sound/sound.c     |    2 
 drivers/staging/wilc1000/wilc_netdev.c |    2 
 drivers/usb/class/cdc-acm.c            |   32 +-
 drivers/usb/dwc3/Kconfig               |    6 
 drivers/usb/dwc3/core.c                |    2 
 drivers/usb/musb/Kconfig               |    2 
 drivers/usb/serial/f81232.c            |   39 ++
 drivers/usb/storage/scsiglue.c         |   26 -
 drivers/usb/storage/uas.c              |   35 +-
 include/net/bluetooth/hci_core.h       |    3 
 kernel/futex.c                         |  188 ++++++++-----
 kernel/irq/manage.c                    |    4 
 lib/ubsan.c                            |   49 +--
 net/bluetooth/hci_conn.c               |    8 
 net/bluetooth/hidp/sock.c              |    1 
 net/bluetooth/l2cap_core.c             |    9 
 sound/soc/intel/common/sst-firmware.c  |    8 
 36 files changed, 715 insertions(+), 536 deletions(-)

Alan Stern (1):
usb-storage: Set virt_boundary_mask to avoid SG overflows

Alexander Shishkin (1):
intel_th: pci: Add Comet Lake support

Andrew Vasquez (1):
scsi: qla2xxx: Fix incorrect region-size setting in optrom SYSFS routines

Andrey Ryabinin (1):
ubsan: Fix nasty -Wbuiltin-declaration-mismatch GCC-9 warnings

Bjorn Andersson (1):
iio: adc: qcom-spmi-adc5: Fix of-based module autoloading

Chen-Yu Tsai (1):
Bluetooth: hci_bcm: Fix empty regulator supplies for Intel Macs

Christian Gromm (1):
staging: most: sound: pass correct device when creating a sound card

Dan Carpenter (1):
i3c: Fix a shift wrap bug in i3c_bus_set_addr_slot_status()

Dexuan Cui (1):
Drivers: hv: vmbus: Remove the undesired put_cpu_ptr() in hv_synic_cleanup()

Giridhar Malavali (1):
scsi: qla2xxx: Set remote port devloss timeout to 0

Greg Kroah-Hartman (1):

      Linux 5.1.1

Gregory CLEMENT (1):
cpufreq: armada-37xx: fix frequency calculation for opp

Hans de Goede (1):
ACPI / LPSS: Use acpi_lpss_* instead of acpi_subsys_* functions for hibernate

Ji-Ze Hong (Peter Hong) (1):
USB: serial: f81232: fix interrupt worker not stop

Johan Hovold (2):
staging: greybus: power_supply: fix prop-descriptor request size
USB: cdc-acm: fix unthrottle races

Luiz Augusto von Dentz (1):
Bluetooth: Fix not initializing L2CAP tx_credits

Marc Gonzalez (1):
usb: dwc3: Allow building USB_DWC3_QCOM without EXTCON

Marcel Holtmann (1):
Bluetooth: Align minimum encryption key size for LE and BR/EDR connections

Oliver Neukum (1):
UAS: fix alignment of scatter/gather segments

Prasad Sodagudi (1):
genirq: Prevent use-after-free and work list corruption

Quinn Tran (1):
scsi: qla2xxx: Fix device staying in blocked state

Ross Zwisler (1):
ASoC: Intel: avoid Oops if DMA setup fails

Samuel Holland (1):
soc: sunxi: Fix missing dependency on REGMAP_MMIO

Silvio Cesare (1):
scsi: lpfc: change snprintf to scnprintf for possible overflow

Suresh Udipi (1):
staging: most: cdev: fix chrdev_region leak in mod_exit

Tetsuo Handa (1):
staging: wilc1000: Avoid GFP_KERNEL allocation from atomic context.

Thinh Nguyen (1):
usb: dwc3: Fix default lpm_nyet_threshold value

Will Deacon (2):
locking/futex: Allow low-level atomic operations to return -EAGAIN
arm64: futex: Bound number of LDXR/STXR loops in FUTEX_WAKE_OP

Young Xiao (1):
Bluetooth: hidp: fix buffer overflow

author maintainer
#1 lore raw
Makefile +1 -1
index 26c92f892d24..bf604f77e5e5 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 VERSION = 5
 PATCHLEVEL = 1
-SUBLEVEL = 0
+SUBLEVEL = 1
 EXTRAVERSION =
 NAME = Shy Crocodile
 
arch/arm64/include/asm/futex.h +34 -21

109 lines not on this page · raw message

drivers/acpi/acpi_lpss.c +2 -2
index 1e2a10a06b9d..cf768608437e 100644
@@ -1142,8 +1142,8 @@ static struct dev_pm_domain acpi_lpss_pm_domain = {
 		.thaw_noirq = acpi_subsys_thaw_noirq,
 		.poweroff = acpi_subsys_suspend,
 		.poweroff_late = acpi_lpss_suspend_late,
-		.poweroff_noirq = acpi_subsys_suspend_noirq,
-		.restore_noirq = acpi_subsys_resume_noirq,
+		.poweroff_noirq = acpi_lpss_suspend_noirq,
+		.restore_noirq = acpi_lpss_resume_noirq,
 		.restore_early = acpi_lpss_resume_early,
 #endif
 		.runtime_suspend = acpi_lpss_runtime_suspend,
drivers/bluetooth/hci_bcm.c +16 -4
index ddbe518c3e5b..b5d31d583d60 100644
@@ -228,9 +228,15 @@ static int bcm_gpio_set_power(struct bcm_device *dev, bool powered)
 	int err;
 
 	if (powered && !dev->res_enabled) {
-		err = regulator_bulk_enable(BCM_NUM_SUPPLIES, dev->supplies);
-		if (err)
-			return err;
+		/* Intel Macs use bcm_apple_get_resources() and don't
+		 * have regulator supplies configured.
+		 */
+		if (dev->supplies[0].supply) {
+			err = regulator_bulk_enable(BCM_NUM_SUPPLIES,
+						    dev->supplies);
+			if (err)
+				return err;
+		}
 
 		/* LPO clock needs to be 32.768 kHz */
 		err = clk_set_rate(dev->lpo_clk, 32768);
@@ -259,7 +265,13 @@ static int bcm_gpio_set_power(struct bcm_device *dev, bool powered)
 	if (!powered && dev->res_enabled) {
 		clk_disable_unprepare(dev->txco_clk);
 		clk_disable_unprepare(dev->lpo_clk);
-		regulator_bulk_disable(BCM_NUM_SUPPLIES, dev->supplies);
+
+		/* Intel Macs use bcm_apple_get_resources() and don't
+		 * have regulator supplies configured.
+		 */
+		if (dev->supplies[0].supply)
+			regulator_bulk_disable(BCM_NUM_SUPPLIES,
+					       dev->supplies);
 	}
 
 	/* wait for device to power on and come out of reset */
drivers/cpufreq/armada-37xx-cpufreq.c +19 -3
index 75491fc841a6..0df16eb1eb3c 100644
@@ -359,11 +359,11 @@ static int __init armada37xx_cpufreq_driver_init(void)
 	struct armada_37xx_dvfs *dvfs;
 	struct platform_device *pdev;
 	unsigned long freq;
-	unsigned int cur_frequency;
+	unsigned int cur_frequency, base_frequency;
 	struct regmap *nb_pm_base, *avs_base;
 	struct device *cpu_dev;
 	int load_lvl, ret;
-	struct clk *clk;
+	struct clk *clk, *parent;
 
 	nb_pm_base =
 		syscon_regmap_lookup_by_compatible("marvell,armada-3700-nb-pm");
@@ -399,6 +399,22 @@ static int __init armada37xx_cpufreq_driver_init(void)
 		return PTR_ERR(clk);
 	}
 
+	parent = clk_get_parent(clk);
+	if (IS_ERR(parent)) {
+		dev_err(cpu_dev, "Cannot get parent clock for CPU0\n");
+		clk_put(clk);
+		return PTR_ERR(parent);
+	}
+
+	/* Get parent CPU frequency */
+	base_frequency =  clk_get_rate(parent);
+
+	if (!base_frequency) {
+		dev_err(cpu_dev, "Failed to get parent clock rate for CPU\n");
+		clk_put(clk);
+		return -EINVAL;
+	}
+
 	/* Get nominal (current) CPU frequency */
 	cur_frequency = clk_get_rate(clk);
 	if (!cur_frequency) {
@@ -431,7 +447,7 @@ static int __init armada37xx_cpufreq_driver_init(void)
 	for (load_lvl = ARMADA_37XX_DVFS_LOAD_0; load_lvl < LOAD_LEVEL_NR;
 	     load_lvl++) {
 		unsigned long u_volt = avs_map[dvfs->avs[load_lvl]] * 1000;
-		freq = cur_frequency / dvfs->divider[load_lvl];
+		freq = base_frequency / dvfs->divider[load_lvl];
 		ret = dev_pm_opp_add(cpu_dev, freq, u_volt);
 		if (ret)
 			goto remove_opp;
drivers/hv/hv.c +0 -1
index 632d25674e7f..45653029ee18 100644
@@ -408,7 +408,6 @@ int hv_synic_cleanup(unsigned int cpu)
 
 		clockevents_unbind_device(hv_cpu->clk_evt, cpu);
 		hv_ce_shutdown(hv_cpu->clk_evt);
-		put_cpu_ptr(hv_cpu);
 	}
 
 	hv_get_synint_state(VMBUS_MESSAGE_SINT, shared_sint.as_uint64);
drivers/hwtracing/intel_th/pci.c +5 -0
index 1cf6290d6435..70f2cb90adc5 100644
@@ -165,6 +165,11 @@ static const struct pci_device_id intel_th_pci_id_table[] = {
 		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x34a6),
 		.driver_data = (kernel_ulong_t)&intel_th_2x,
 	},
+	{
+		/* Comet Lake */
+		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x02a6),
+		.driver_data = (kernel_ulong_t)&intel_th_2x,
+	},
 	{ 0 },
 };
 
drivers/i3c/master.c +3 -2
index 1412abcff010..5f4bd52121fe 100644
@@ -385,8 +385,9 @@ static void i3c_bus_set_addr_slot_status(struct i3c_bus *bus, u16 addr,
 		return;
 
 	ptr = bus->addrslots + (bitpos / BITS_PER_LONG);
-	*ptr &= ~(I3C_ADDR_SLOT_STATUS_MASK << (bitpos % BITS_PER_LONG));
-	*ptr |= status << (bitpos % BITS_PER_LONG);
+	*ptr &= ~((unsigned long)I3C_ADDR_SLOT_STATUS_MASK <<
+						(bitpos % BITS_PER_LONG));
+	*ptr |= (unsigned long)status << (bitpos % BITS_PER_LONG);
 }
 
 static bool i3c_bus_dev_addr_is_avail(struct i3c_bus *bus, u8 addr)
drivers/iio/adc/qcom-spmi-adc5.c +1 -0
index 6a866cc187f7..21fdcde77883 100644
@@ -664,6 +664,7 @@ static const struct of_device_id adc5_match_table[] = {
 	},
 	{ }
 };
+MODULE_DEVICE_TABLE(of, adc5_match_table);
 
 static int adc5_get_dt_data(struct adc5_chip *adc, struct device_node *node)
 {
drivers/scsi/lpfc/lpfc_attr.c +100 -96

637 lines not on this page · raw message

drivers/scsi/lpfc/lpfc_ct.c +6 -6
index 7290573110fe..2e3949c6cd07 100644
@@ -1430,7 +1430,7 @@ lpfc_vport_symbolic_port_name(struct lpfc_vport *vport, char *symbol,
 	 * Name object.  NPIV is not in play so this integer
 	 * value is sufficient and unique per FC-ID.
 	 */
-	n = snprintf(symbol, size, "%d", vport->phba->brd_no);
+	n = scnprintf(symbol, size, "%d", vport->phba->brd_no);
 	return n;
 }
 
@@ -1444,26 +1444,26 @@ lpfc_vport_symbolic_node_name(struct lpfc_vport *vport, char *symbol,
 
 	lpfc_decode_firmware_rev(vport->phba, fwrev, 0);
 
-	n = snprintf(symbol, size, "Emulex %s", vport->phba->ModelName);
+	n = scnprintf(symbol, size, "Emulex %s", vport->phba->ModelName);
 	if (size < n)
 		return n;
 
-	n += snprintf(symbol + n, size - n, " FV%s", fwrev);
+	n += scnprintf(symbol + n, size - n, " FV%s", fwrev);
 	if (size < n)
 		return n;
 
-	n += snprintf(symbol + n, size - n, " DV%s.",
+	n += scnprintf(symbol + n, size - n, " DV%s.",
 		      lpfc_release_version);
 	if (size < n)
 		return n;
 
-	n += snprintf(symbol + n, size - n, " HN:%s.",
+	n += scnprintf(symbol + n, size - n, " HN:%s.",
 		      init_utsname()->nodename);
 	if (size < n)
 		return n;
 
 	/* Note :- OS name is "Linux" */
-	n += snprintf(symbol + n, size - n, " OS:%s\n",
+	n += scnprintf(symbol + n, size - n, " OS:%s\n",
 		      init_utsname()->sysname);
 	return n;
 }
drivers/scsi/lpfc/lpfc_debugfs.c +240 -234

1,430 lines not on this page · raw message

drivers/scsi/lpfc/lpfc_debugfs.h +3 -3
index 93ab7dfb8ee0..2700f373b46a 100644
@@ -348,7 +348,7 @@ lpfc_debug_dump_qe(struct lpfc_queue *q, uint32_t idx)
 	pword = q->qe[idx].address;
 
 	len = 0;
-	len += snprintf(line_buf+len, LPFC_LBUF_SZ-len, "QE[%04d]: ", idx);
+	len += scnprintf(line_buf+len, LPFC_LBUF_SZ-len, "QE[%04d]: ", idx);
 	if (qe_word_cnt > 8)
 		printk(KERN_ERR "%s\n", line_buf);
 
@@ -359,11 +359,11 @@ lpfc_debug_dump_qe(struct lpfc_queue *q, uint32_t idx)
 			if (qe_word_cnt > 8) {
 				len = 0;
 				memset(line_buf, 0, LPFC_LBUF_SZ);
-				len += snprintf(line_buf+len, LPFC_LBUF_SZ-len,
+				len += scnprintf(line_buf+len, LPFC_LBUF_SZ-len,
 						"%03d: ", i);
 			}
 		}
-		len += snprintf(line_buf+len, LPFC_LBUF_SZ-len, "%08x ",
+		len += scnprintf(line_buf+len, LPFC_LBUF_SZ-len, "%08x ",
 				((uint32_t)*pword) & 0xffffffff);
 		pword++;
 	}
drivers/scsi/qla2xxx/qla_attr.c +2 -2
index f928c4d3a1ef..70d92334e721 100644
@@ -364,7 +364,7 @@ qla2x00_sysfs_write_optrom_ctl(struct file *filp, struct kobject *kobj,
 		}
 
 		ha->optrom_region_start = start;
-		ha->optrom_region_size = start + size;
+		ha->optrom_region_size = size;
 
 		ha->optrom_state = QLA_SREADING;
 		ha->optrom_buffer = vmalloc(ha->optrom_region_size);
@@ -437,7 +437,7 @@ qla2x00_sysfs_write_optrom_ctl(struct file *filp, struct kobject *kobj,
 		}
 
 		ha->optrom_region_start = start;
-		ha->optrom_region_size = start + size;
+		ha->optrom_region_size = size;
 
 		ha->optrom_state = QLA_SWRITING;
 		ha->optrom_buffer = vmalloc(ha->optrom_region_size);
drivers/scsi/qla2xxx/qla_nvme.c +7 -12
index 41c85da3ab32..34dd8bf3fb31 100644
@@ -615,7 +615,6 @@ static void qla_nvme_unregister_remote_port(struct work_struct *work)
 	struct fc_port *fcport = container_of(work, struct fc_port,
 	    nvme_del_work);
 	struct qla_nvme_rport *qla_rport, *trport;
-	scsi_qla_host_t *base_vha;
 
 	if (!IS_ENABLED(CONFIG_NVME_FC))
 		return;
@@ -623,23 +622,19 @@ static void qla_nvme_unregister_remote_port(struct work_struct *work)
 	ql_log(ql_log_warn, NULL, 0x2112,
 	    "%s: unregister remoteport on %p\n",__func__, fcport);
 
-	base_vha = pci_get_drvdata(fcport->vha->hw->pdev);
-	if (test_bit(PFLG_DRIVER_REMOVING, &base_vha->pci_flags)) {
-		ql_dbg(ql_dbg_disc, fcport->vha, 0x2114,
-		    "%s: Notify FC-NVMe transport, set devloss=0\n",
-		    __func__);
-
-		nvme_fc_set_remoteport_devloss(fcport->nvme_remote_port, 0);
-	}
-
 	list_for_each_entry_safe(qla_rport, trport,
 	    &fcport->vha->nvme_rport_list, list) {
 		if (qla_rport->fcport == fcport) {
 			ql_log(ql_log_info, fcport->vha, 0x2113,
 			    "%s: fcport=%p\n", __func__, fcport);
+			nvme_fc_set_remoteport_devloss
+				(fcport->nvme_remote_port, 0);
 			init_completion(&fcport->nvme_del_done);
-			nvme_fc_unregister_remoteport(
-			    fcport->nvme_remote_port);
+			if (nvme_fc_unregister_remoteport
+			    (fcport->nvme_remote_port))
+				ql_log(ql_log_info, fcport->vha, 0x2114,
+				    "%s: Failed to unregister nvme_remote_port\n",
+				    __func__);
 			wait_for_completion(&fcport->nvme_del_done);
 			break;
 		}
drivers/scsi/qla2xxx/qla_target.c +2 -2
index 582d1663f971..697eee1d8847 100644
@@ -980,6 +980,8 @@ void qlt_free_session_done(struct work_struct *work)
 		sess->send_els_logo);
 
 	if (!IS_SW_RESV_ADDR(sess->d_id)) {
+		qla2x00_mark_device_lost(vha, sess, 0, 0);
+
 		if (sess->send_els_logo) {
 			qlt_port_logo_t logo;
 
@@ -1160,8 +1162,6 @@ void qlt_unreg_sess(struct fc_port *sess)
 	if (sess->se_sess)
 		vha->hw->tgt.tgt_ops->clear_nacl_from_fcport_map(sess);
 
-	qla2x00_mark_device_lost(vha, sess, 0, 0);
-
 	sess->deleted = QLA_SESS_DELETION_IN_PROGRESS;
 	sess->disc_state = DSC_DELETE_PEND;
 	sess->last_rscn_gen = sess->rscn_gen;
drivers/soc/sunxi/Kconfig +1 -0
index 353b07e40176..e84eb4e59f58 100644
@@ -4,6 +4,7 @@
 config SUNXI_SRAM
 	bool
 	default ARCH_SUNXI
+	select REGMAP_MMIO
 	help
 	  Say y here to enable the SRAM controller support. This
 	  device is responsible on mapping the SRAM in the sunXi SoCs
drivers/staging/greybus/power_supply.c +1 -1
index 0529e5628c24..ae5c0285a942 100644
@@ -520,7 +520,7 @@ static int gb_power_supply_prop_descriptors_get(struct gb_power_supply *gbpsy)
 
 	op = gb_operation_create(connection,
 				 GB_POWER_SUPPLY_TYPE_GET_PROP_DESCRIPTORS,
-				 sizeof(req), sizeof(*resp) + props_count *
+				 sizeof(*req), sizeof(*resp) + props_count *
 				 sizeof(struct gb_power_supply_props_desc),
 				 GFP_KERNEL);
 	if (!op)
drivers/staging/most/cdev/cdev.c +1 -1
index f2b347cda8b7..d5f236889021 100644
@@ -549,7 +549,7 @@ static void __exit mod_exit(void)
 		destroy_cdev(c);
 		destroy_channel(c);
 	}
-	unregister_chrdev_region(comp.devno, 1);
+	unregister_chrdev_region(comp.devno, CHRDEV_REGION_SIZE);
 	ida_destroy(&comp.minor_id);
 	class_destroy(comp.class);
 }
drivers/staging/most/sound/sound.c +1 -1
index 79ab3a78c5ec..1e6f47cfe42c 100644
@@ -622,7 +622,7 @@ static int audio_probe_channel(struct most_interface *iface, int channel_id,
 	INIT_LIST_HEAD(&adpt->dev_list);
 	iface->priv = adpt;
 	list_add_tail(&adpt->list, &adpt_list);
-	ret = snd_card_new(&iface->dev, -1, "INIC", THIS_MODULE,
+	ret = snd_card_new(iface->driver_dev, -1, "INIC", THIS_MODULE,
 			   sizeof(*channel), &adpt->card);
 	if (ret < 0)
 		goto err_free_adpt;
drivers/staging/wilc1000/wilc_netdev.c +1 -1
index 1787154ee088..ba78c08a17f1 100644
@@ -708,7 +708,7 @@ static void wilc_set_multicast_list(struct net_device *dev)
 		return;
 	}
 
-	mc_list = kmalloc_array(dev->mc.count, ETH_ALEN, GFP_KERNEL);
+	mc_list = kmalloc_array(dev->mc.count, ETH_ALEN, GFP_ATOMIC);
 	if (!mc_list)
 		return;
 
drivers/usb/class/cdc-acm.c +25 -7
index ec666eb4b7b4..c03aa8550980 100644
@@ -470,12 +470,12 @@ static void acm_read_bulk_callback(struct urb *urb)
 	struct acm *acm = rb->instance;
 	unsigned long flags;
 	int status = urb->status;
+	bool stopped = false;
+	bool stalled = false;
 
 	dev_vdbg(&acm->data->dev, "got urb %d, len %d, status %d\n",
 		rb->index, urb->actual_length, status);
 
-	set_bit(rb->index, &acm->read_urbs_free);
-
 	if (!acm->dev) {
 		dev_dbg(&acm->data->dev, "%s - disconnected\n", __func__);
 		return;
@@ -488,15 +488,16 @@ static void acm_read_bulk_callback(struct urb *urb)
 		break;
 	case -EPIPE:
 		set_bit(EVENT_RX_STALL, &acm->flags);
-		schedule_work(&acm->work);
-		return;
+		stalled = true;
+		break;
 	case -ENOENT:
 	case -ECONNRESET:
 	case -ESHUTDOWN:
 		dev_dbg(&acm->data->dev,
 			"%s - urb shutting down with status: %d\n",
 			__func__, status);
-		return;
+		stopped = true;
+		break;
 	default:
 		dev_dbg(&acm->data->dev,
 			"%s - nonzero urb status received: %d\n",
@@ -505,10 +506,24 @@ static void acm_read_bulk_callback(struct urb *urb)
 	}
 
 	/*
-	 * Unthrottle may run on another CPU which needs to see events
-	 * in the same order. Submission has an implict barrier
+	 * Make sure URB processing is done before marking as free to avoid
+	 * racing with unthrottle() on another CPU. Matches the barriers
+	 * implied by the test_and_clear_bit() in acm_submit_read_urb().
 	 */
 	smp_mb__before_atomic();
+	set_bit(rb->index, &acm->read_urbs_free);
+	/*
+	 * Make sure URB is marked as free before checking the throttled flag
+	 * to avoid racing with unthrottle() on another CPU. Matches the
+	 * smp_mb() in unthrottle().
+	 */
+	smp_mb__after_atomic();
+
+	if (stopped || stalled) {
+		if (stalled)
+			schedule_work(&acm->work);
+		return;
+	}
 
 	/* throttle device if requested by tty */
 	spin_lock_irqsave(&acm->read_lock, flags);
@@ -842,6 +857,9 @@ static void acm_tty_unthrottle(struct tty_struct *tty)
 	acm->throttle_req = 0;
 	spin_unlock_irq(&acm->read_lock);
 
+	/* Matches the smp_mb__after_atomic() in acm_read_bulk_callback(). */
+	smp_mb();
+
 	if (was_throttled)
 		acm_submit_read_urbs(acm, GFP_KERNEL);
 }
drivers/usb/dwc3/Kconfig +4 -2
index 2b1494460d0c..784309435916 100644
@@ -54,7 +54,8 @@ comment "Platform Glue Driver Support"
 
 config USB_DWC3_OMAP
 	tristate "Texas Instruments OMAP5 and similar Platforms"
-	depends on EXTCON && (ARCH_OMAP2PLUS || COMPILE_TEST)
+	depends on ARCH_OMAP2PLUS || COMPILE_TEST
+	depends on EXTCON || !EXTCON
 	depends on OF
 	default USB_DWC3
 	help
@@ -115,7 +116,8 @@ config USB_DWC3_ST
 
 config USB_DWC3_QCOM
 	tristate "Qualcomm Platform"
-	depends on EXTCON && (ARCH_QCOM || COMPILE_TEST)
+	depends on ARCH_QCOM || COMPILE_TEST
+	depends on EXTCON || !EXTCON
 	depends on OF
 	default USB_DWC3
 	help
drivers/usb/dwc3/core.c +1 -1
index a1b126f90261..f944cea4056b 100644
@@ -1218,7 +1218,7 @@ static void dwc3_get_properties(struct dwc3 *dwc)
 	u8			tx_max_burst_prd;
 
 	/* default to highest possible threshold */
-	lpm_nyet_threshold = 0xff;
+	lpm_nyet_threshold = 0xf;
 
 	/* default to -3.5dB de-emphasis */
 	tx_de_emphasis = 1;
drivers/usb/musb/Kconfig +1 -1
index f742fddc5e2c..52f8e2b57ad5 100644
@@ -67,7 +67,7 @@ config USB_MUSB_SUNXI
 	depends on NOP_USB_XCEIV
 	depends on PHY_SUN4I_USB
 	depends on EXTCON
-	depends on GENERIC_PHY
+	select GENERIC_PHY
 	select SUNXI_SRAM
 
 config USB_MUSB_DAVINCI
drivers/usb/serial/f81232.c +39 -0
index 0dcdcb4b2cde..dee6f2caf9b5 100644
@@ -556,9 +556,12 @@ static int f81232_open(struct tty_struct *tty, struct usb_serial_port *port)
 
 static void f81232_close(struct usb_serial_port *port)
 {
+	struct f81232_private *port_priv = usb_get_serial_port_data(port);
+
 	f81232_port_disable(port);
 	usb_serial_generic_close(port);
 	usb_kill_urb(port->interrupt_in_urb);
+	flush_work(&port_priv->interrupt_work);
 }
 
 static void f81232_dtr_rts(struct usb_serial_port *port, int on)
@@ -632,6 +635,40 @@ static int f81232_port_remove(struct usb_serial_port *port)
 	return 0;
 }
 
+static int f81232_suspend(struct usb_serial *serial, pm_message_t message)
+{
+	struct usb_serial_port *port = serial->port[0];
+	struct f81232_private *port_priv = usb_get_serial_port_data(port);
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(port->read_urbs); ++i)
+		usb_kill_urb(port->read_urbs[i]);
+
+	usb_kill_urb(port->interrupt_in_urb);
+
+	if (port_priv)
+		flush_work(&port_priv->interrupt_work);
+
+	return 0;
+}
+
+static int f81232_resume(struct usb_serial *serial)
+{
+	struct usb_serial_port *port = serial->port[0];
+	int result;
+
+	if (tty_port_initialized(&port->port)) {
+		result = usb_submit_urb(port->interrupt_in_urb, GFP_NOIO);
+		if (result) {
+			dev_err(&port->dev, "submit interrupt urb failed: %d\n",
+					result);
+			return result;
+		}
+	}
+
+	return usb_serial_generic_resume(serial);
+}
+
 static struct usb_serial_driver f81232_device = {
 	.driver = {
 		.owner =	THIS_MODULE,
@@ -655,6 +692,8 @@ static struct usb_serial_driver f81232_device = {
 	.read_int_callback =	f81232_read_int_callback,
 	.port_probe =		f81232_port_probe,
 	.port_remove =		f81232_port_remove,
+	.suspend =		f81232_suspend,
+	.resume =		f81232_resume,
 };
 
 static struct usb_serial_driver * const serial_drivers[] = {
drivers/usb/storage/scsiglue.c +12 -14
index a73ea495d5a7..59190d88fa9f 100644
@@ -65,6 +65,7 @@ static const char* host_info(struct Scsi_Host *host)
 static int slave_alloc (struct scsi_device *sdev)
 {
 	struct us_data *us = host_to_us(sdev->host);
+	int maxp;
 
 	/*
 	 * Set the INQUIRY transfer length to 36.  We don't use any of
@@ -74,20 +75,17 @@ static int slave_alloc (struct scsi_device *sdev)
 	sdev->inquiry_len = 36;
 
 	/*
-	 * USB has unusual DMA-alignment requirements: Although the
-	 * starting address of each scatter-gather element doesn't matter,
-	 * the length of each element except the last must be divisible
-	 * by the Bulk maxpacket value.  There's currently no way to
-	 * express this by block-layer constraints, so we'll cop out
-	 * and simply require addresses to be aligned at 512-byte
-	 * boundaries.  This is okay since most block I/O involves
-	 * hardware sectors that are multiples of 512 bytes in length,
-	 * and since host controllers up through USB 2.0 have maxpacket
-	 * values no larger than 512.
-	 *
-	 * But it doesn't suffice for Wireless USB, where Bulk maxpacket
-	 * values can be as large as 2048.  To make that work properly
-	 * will require changes to the block layer.
+	 * USB has unusual scatter-gather requirements: the length of each
+	 * scatterlist element except the last must be divisible by the
+	 * Bulk maxpacket value.  Fortunately this value is always a
+	 * power of 2.  Inform the block layer about this requirement.
+	 */
+	maxp = usb_maxpacket(us->pusb_dev, us->recv_bulk_pipe, 0);
+	blk_queue_virt_boundary(sdev->request_queue, maxp - 1);
+
+	/*
+	 * Some host controllers may have alignment requirements.
+	 * We'll play it safe by requiring 512-byte alignment always.
 	 */
 	blk_queue_update_dma_alignment(sdev->request_queue, (512 - 1));
 
drivers/usb/storage/uas.c +22 -13
index a6d68191c861..047c5922618f 100644
@@ -789,24 +789,33 @@ static int uas_slave_alloc(struct scsi_device *sdev)
 {
 	struct uas_dev_info *devinfo =
 		(struct uas_dev_info *)sdev->host->hostdata;
+	int maxp;
 
 	sdev->hostdata = devinfo;
 
 	/*
-	 * USB has unusual DMA-alignment requirements: Although the
-	 * starting address of each scatter-gather element doesn't matter,
-	 * the length of each element except the last must be divisible
-	 * by the Bulk maxpacket value.  There's currently no way to
-	 * express this by block-layer constraints, so we'll cop out
-	 * and simply require addresses to be aligned at 512-byte
-	 * boundaries.  This is okay since most block I/O involves
-	 * hardware sectors that are multiples of 512 bytes in length,
-	 * and since host controllers up through USB 2.0 have maxpacket
-	 * values no larger than 512.
+	 * We have two requirements here. We must satisfy the requirements
+	 * of the physical HC and the demands of the protocol, as we
+	 * definitely want no additional memory allocation in this path
+	 * ruling out using bounce buffers.
 	 *
-	 * But it doesn't suffice for Wireless USB, where Bulk maxpacket
-	 * values can be as large as 2048.  To make that work properly
-	 * will require changes to the block layer.
+	 * For a transmission on USB to continue we must never send
+	 * a package that is smaller than maxpacket. Hence the length of each
+         * scatterlist element except the last must be divisible by the
+         * Bulk maxpacket value.
+	 * If the HC does not ensure that through SG,
+	 * the upper layer must do that. We must assume nothing
+	 * about the capabilities off the HC, so we use the most
+	 * pessimistic requirement.
+	 */
+
+	maxp = usb_maxpacket(devinfo->udev, devinfo->data_in_pipe, 0);
+	blk_queue_virt_boundary(sdev->request_queue, maxp - 1);
+
+	/*
+	 * The protocol has no requirements on alignment in the strict sense.
+	 * Controllers may or may not have alignment restrictions.
+	 * As this is not exported, we use an extremely conservative guess.
 	 */
 	blk_queue_update_dma_alignment(sdev->request_queue, (512 - 1));
 
include/net/bluetooth/hci_core.h +3 -0
index 094e61e07030..05b1b96f4d9e 100644
@@ -190,6 +190,9 @@ struct adv_info {
 
 #define HCI_MAX_SHORT_NAME_LENGTH	10
 
+/* Min encryption key size to match with SMP */
+#define HCI_MIN_ENC_KEY_SIZE		7
+
 /* Default LE RPA expiry time, 15 minutes */
 #define HCI_DEFAULT_RPA_TIMEOUT		(15 * 60)
 
kernel/futex.c +117 -71

272 lines not on this page · raw message

kernel/irq/manage.c +3 -1
index 1401afa0d58a..53a081392115 100644

Lines of this file are not shown. View the raw message.

lib/ubsan.c +23 -26

49 lines not on this page · raw message

net/bluetooth/hci_conn.c +8 -0
index bd4978ce8c45..3cf0764d5793 100644

Lines of this file are not shown. View the raw message.

net/bluetooth/hidp/sock.c +1 -0
index 9f85a1943be9..2151913892ce 100644

Lines of this file are not shown. View the raw message.

net/bluetooth/l2cap_core.c +4 -5
index f17e393b43b4..b53acd6c9a3d 100644

Lines of this file are not shown. View the raw message.

sound/soc/intel/common/sst-firmware.c +6 -2
index 1e067504b604..f830e59f93ea 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.

#2 lore raw
In reply to Greg KH

Thanks, a bunch Greg! :)

Quoted 142 lines · Greg KH

I'm announcing the release of the 5.1.1 kernel.

All users of the 5.1 kernel series must upgrade.

The updated 5.1.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.1.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/arm64/include/asm/futex.h         |   55 ++-
drivers/acpi/acpi_lpss.c               |    4
drivers/bluetooth/hci_bcm.c            |   20 +
drivers/cpufreq/armada-37xx-cpufreq.c  |   22 +
drivers/hv/hv.c                        |    1
drivers/hwtracing/intel_th/pci.c       |    5
drivers/i3c/master.c                   |    5
drivers/iio/adc/qcom-spmi-adc5.c       |    1
drivers/scsi/lpfc/lpfc_attr.c          |  196 ++++++-------
drivers/scsi/lpfc/lpfc_ct.c            |   12
drivers/scsi/lpfc/lpfc_debugfs.c       |  474 ++++++++++++++++-----------------
drivers/scsi/lpfc/lpfc_debugfs.h       |    6
drivers/scsi/qla2xxx/qla_attr.c        |    4
drivers/scsi/qla2xxx/qla_nvme.c        |   19 -
drivers/scsi/qla2xxx/qla_target.c      |    4
drivers/soc/sunxi/Kconfig              |    1
drivers/staging/greybus/power_supply.c |    2
drivers/staging/most/cdev/cdev.c       |    2
drivers/staging/most/sound/sound.c     |    2
drivers/staging/wilc1000/wilc_netdev.c |    2
drivers/usb/class/cdc-acm.c            |   32 +-
drivers/usb/dwc3/Kconfig               |    6
drivers/usb/dwc3/core.c                |    2
drivers/usb/musb/Kconfig               |    2
drivers/usb/serial/f81232.c            |   39 ++
drivers/usb/storage/scsiglue.c         |   26 -
drivers/usb/storage/uas.c              |   35 +-
include/net/bluetooth/hci_core.h       |    3
kernel/futex.c                         |  188 ++++++++-----
kernel/irq/manage.c                    |    4
lib/ubsan.c                            |   49 +--
net/bluetooth/hci_conn.c               |    8
net/bluetooth/hidp/sock.c              |    1
net/bluetooth/l2cap_core.c             |    9
sound/soc/intel/common/sst-firmware.c  |    8
36 files changed, 715 insertions(+), 536 deletions(-)

Alan Stern (1):
usb-storage: Set virt_boundary_mask to avoid SG overflows

Alexander Shishkin (1):
intel_th: pci: Add Comet Lake support

Andrew Vasquez (1):
scsi: qla2xxx: Fix incorrect region-size setting in optrom SYSFS routines

Andrey Ryabinin (1):
ubsan: Fix nasty -Wbuiltin-declaration-mismatch GCC-9 warnings

Bjorn Andersson (1):
iio: adc: qcom-spmi-adc5: Fix of-based module autoloading

Chen-Yu Tsai (1):
Bluetooth: hci_bcm: Fix empty regulator supplies for Intel Macs

Christian Gromm (1):
staging: most: sound: pass correct device when creating a sound card

Dan Carpenter (1):
i3c: Fix a shift wrap bug in i3c_bus_set_addr_slot_status()

Dexuan Cui (1):
Drivers: hv: vmbus: Remove the undesired put_cpu_ptr() in hv_synic_cleanup()

Giridhar Malavali (1):
scsi: qla2xxx: Set remote port devloss timeout to 0

Greg Kroah-Hartman (1):

     Linux 5.1.1

Gregory CLEMENT (1):
cpufreq: armada-37xx: fix frequency calculation for opp

Hans de Goede (1):
ACPI / LPSS: Use acpi_lpss_* instead of acpi_subsys_* functions for hibernate

Ji-Ze Hong (Peter Hong) (1):
USB: serial: f81232: fix interrupt worker not stop

Johan Hovold (2):
staging: greybus: power_supply: fix prop-descriptor request size
USB: cdc-acm: fix unthrottle races

Luiz Augusto von Dentz (1):
Bluetooth: Fix not initializing L2CAP tx_credits

Marc Gonzalez (1):
usb: dwc3: Allow building USB_DWC3_QCOM without EXTCON

Marcel Holtmann (1):
Bluetooth: Align minimum encryption key size for LE and BR/EDR connections

Oliver Neukum (1):
UAS: fix alignment of scatter/gather segments

Prasad Sodagudi (1):
genirq: Prevent use-after-free and work list corruption

Quinn Tran (1):
scsi: qla2xxx: Fix device staying in blocked state

Ross Zwisler (1):
ASoC: Intel: avoid Oops if DMA setup fails

Samuel Holland (1):
soc: sunxi: Fix missing dependency on REGMAP_MMIO

Silvio Cesare (1):
scsi: lpfc: change snprintf to scnprintf for possible overflow

Suresh Udipi (1):
staging: most: cdev: fix chrdev_region leak in mod_exit

Tetsuo Handa (1):
staging: wilc1000: Avoid GFP_KERNEL allocation from atomic context.

Thinh Nguyen (1):
usb: dwc3: Fix default lpm_nyet_threshold value

Will Deacon (2):
locking/futex: Allow low-level atomic operations to return -EAGAIN
arm64: futex: Bound number of LDXR/STXR loops in FUTEX_WAKE_OP

Young Xiao (1):
Bluetooth: hidp: fix buffer overflow