Skip to contentSkip to conversation

Linux 5.4.261

DISCUSSION Greg Kroah-Hartman 1 participant 2 messages Nov 20, 2023 Stable branch

lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw

I'm announcing the release of the 5.4.261 kernel.

All users of the 5.4 kernel series must upgrade.

The updated 5.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.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

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

 Documentation/devicetree/bindings/interrupt-controller/ti,sci-intr.txt |    2 
 Makefile                                                               |    2 
 arch/arm/boot/dts/qcom-mdm9615.dtsi                                    |   14 
 arch/arm/lib/memset.S                                                  |    1 
 arch/arm64/boot/dts/qcom/sdm845-mtp.dts                                |    2 
 arch/powerpc/perf/imc-pmu.c                                            |    2 
 arch/powerpc/platforms/pseries/lpar.c                                  |    4 
 arch/powerpc/sysdev/xive/native.c                                      |    2 
 arch/sh/Kconfig.debug                                                  |   11 
 drivers/acpi/device_sysfs.c                                            |   10 
 drivers/base/regmap/regmap-debugfs.c                                   |    2 
 drivers/base/regmap/regmap.c                                           |   16 
 drivers/char/hw_random/geode-rng.c                                     |    6 
 drivers/clk/clk-npcm7xx.c                                              |    2 
 drivers/clk/clk-scmi.c                                                 |    1 
 drivers/clk/imx/Kconfig                                                |    1 
 drivers/clk/keystone/pll.c                                             |   15 
 drivers/clk/mediatek/clk-mt2701.c                                      |    8 
 drivers/clk/mediatek/clk-mt6779.c                                      |    4 
 drivers/clk/mediatek/clk-mt6797.c                                      |    6 
 drivers/clk/mediatek/clk-mt7629-eth.c                                  |    4 
 drivers/clk/mediatek/clk-mt7629.c                                      |    6 
 drivers/clk/qcom/clk-rcg2.c                                            |   14 
 drivers/clk/qcom/gcc-sm8150.c                                          |   98 +-
 drivers/crypto/caam/caamalg.c                                          |    3 
 drivers/crypto/caam/caamalg_qi2.c                                      |    3 
 drivers/crypto/chelsio/chtls/chtls_cm.c                                |    2 
 drivers/dma/pxa_dma.c                                                  |    1 
 drivers/dma/ti/edma.c                                                  |    4 
 drivers/firmware/ti_sci.c                                              |   48 -
 drivers/firmware/ti_sci.h                                              |    2 
 drivers/gpu/drm/drm_syncobj.c                                          |    3 
 drivers/gpu/drm/radeon/evergreen.c                                     |    7 
 drivers/gpu/drm/rockchip/cdn-dp-core.c                                 |   15 
 drivers/gpu/drm/rockchip/rockchip_drm_vop.c                            |    8 
 drivers/hid/hid-cp2112.c                                               |   23 
 drivers/hwmon/coretemp.c                                               |    2 
 drivers/i3c/master.c                                                   |    4 
 drivers/infiniband/hw/hfi1/efivar.c                                    |    2 
 drivers/input/rmi4/rmi_bus.c                                           |    2 
 drivers/irqchip/irq-ti-sci-inta.c                                      |    2 
 drivers/irqchip/irq-ti-sci-intr.c                                      |    2 
 drivers/leds/leds-pwm.c                                                |   41 
 drivers/leds/trigger/ledtrig-cpu.c                                     |   17 
 drivers/media/pci/bt8xx/bttv-driver.c                                  |    1 
 drivers/media/platform/s3c-camif/camif-capture.c                       |    6 
 drivers/media/usb/dvb-usb-v2/af9035.c                                  |   13 
 drivers/mfd/dln2.c                                                     |    1 
 drivers/misc/ti-st/st_core.c                                           |    7 
 drivers/mmc/core/mmc.c                                                 |    2 
 drivers/net/can/dev/dev.c                                              |   10 
 drivers/net/ethernet/broadcom/tg3.c                                    |    3 
 drivers/net/ethernet/intel/i40e/i40e_main.c                            |   10 
 drivers/net/ethernet/realtek/r8169_main.c                              |   15 
 drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h                         |    2 
 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c                    |   14 
 drivers/net/ipvlan/ipvlan_core.c                                       |    8 
 drivers/net/ipvlan/ipvlan_main.c                                       |    1 
 drivers/net/macsec.c                                                   |    6 
 drivers/net/wireless/mediatek/mt76/mt7603/core.c                       |    2 
 drivers/net/wireless/mediatek/mt76/mt7603/mac.c                        |   23 
 drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c                    |    2 
 drivers/net/wireless/realtek/rtlwifi/rtl8192c/dm_common.c              |    2 
 drivers/net/wireless/realtek/rtlwifi/rtl8723ae/dm.c                    |    2 
 drivers/net/wireless/realtek/rtw88/debug.c                             |    4 
 drivers/nvdimm/of_pmem.c                                               |    8 
 drivers/nvdimm/region_devs.c                                           |    8 
 drivers/pcmcia/cs.c                                                    |    1 
 drivers/pcmcia/ds.c                                                    |   14 
 drivers/platform/x86/wmi.c                                             |   50 -
 drivers/pwm/pwm-brcmstb.c                                              |    4 
 drivers/pwm/pwm-sti.c                                                  |   75 -
 drivers/reset/reset-ti-sci.c                                           |    2 
 drivers/rtc/rtc-pcf85363.c                                             |    2 
 drivers/scsi/ufs/ufshcd.c                                              |    2 
 drivers/soc/qcom/Kconfig                                               |   14 
 drivers/soc/qcom/Makefile                                              |    3 
 drivers/soc/qcom/llcc-qcom.c                                           |  462 ++++++++++
 drivers/soc/qcom/llcc-sdm845.c                                         |  100 --
 drivers/soc/qcom/llcc-slice.c                                          |  413 --------
 drivers/spi/Kconfig                                                    |    1 
 drivers/thermal/thermal_core.c                                         |    6 
 drivers/tty/tty_jobctrl.c                                              |   17 
 drivers/usb/dwc2/hcd.c                                                 |    2 
 drivers/usb/usbip/stub_dev.c                                           |    9 
 drivers/video/fbdev/fsl-diu-fb.c                                       |    2 
 drivers/video/fbdev/imsttfb.c                                          |   33 
 fs/btrfs/ioctl.c                                                       |   10 
 fs/ext4/extents.c                                                      |   10 
 fs/f2fs/file.c                                                         |    1 
 include/linux/idr.h                                                    |    6 
 include/linux/netdevice.h                                              |    1 
 include/linux/preempt.h                                                |   30 
 include/linux/soc/qcom/llcc-qcom.h                                     |   57 -
 include/linux/soc/ti/ti_sci_inta_msi.h                                 |    2 
 include/linux/soc/ti/ti_sci_protocol.h                                 |    2 
 include/net/flow.h                                                     |    2 
 include/net/netfilter/nf_nat_redirect.h                                |    3 
 include/net/tcp.h                                                      |   12 
 kernel/irq/matrix.c                                                    |    6 
 mm/readahead.c                                                         |    3 
 net/dccp/ipv4.c                                                        |    6 
 net/dccp/ipv6.c                                                        |    6 
 net/ipv4/syncookies.c                                                  |   22 
 net/ipv4/tcp_input.c                                                   |    9 
 net/ipv4/tcp_metrics.c                                                 |   15 
 net/ipv4/tcp_output.c                                                  |    2 
 net/ipv6/ip6_output.c                                                  |    8 
 net/ipv6/syncookies.c                                                  |    7 
 net/llc/llc_input.c                                                    |   10 
 net/llc/llc_s_ac.c                                                     |    3 
 net/llc/llc_station.c                                                  |    3 
 net/netfilter/nf_nat_redirect.c                                        |   98 +-
 net/netfilter/nft_redir.c                                              |   84 -
 net/netfilter/xt_REDIRECT.c                                            |   10 
 net/netfilter/xt_recent.c                                              |    2 
 net/smc/af_smc.c                                                       |    4 
 net/smc/smc.h                                                          |    5 
 net/smc/smc_cdc.c                                                      |    2 
 net/smc/smc_close.c                                                    |    2 
 net/tipc/netlink.c                                                     |    4 
 scripts/mod/file2alias.c                                               |   10 
 sound/soc/intel/skylake/skl-sst-utils.c                                |    1 
 sound/soc/ti/ams-delta.c                                               |    4 
 tools/iio/iio_generic_buffer.c                                         |   59 -
 125 files changed, 1191 insertions(+), 1116 deletions(-)

Aananth V (1):
tcp: call tcp_try_undo_recovery when an RTOd TFO SYNACK is ACKed

Abel Vesa (1):
clk: imx: Select MXC_CLK for CLK_IMX8QXP

Alexander A. Klimov (1):
firmware: ti_sci: Replace HTTP links with HTTPS ones

Alexandru Ardelean (1):
tools: iio: privatize globals and functions in iio_generic_buffer.c file

Amit Kumar Mahapatra (1):
spi: spi-zynq-qspi: add spi-mem to driver kconfig dependencies

Andrii Staikov (1):
i40e: fix potential memory leaks in i40e_remove()

Armin Wolf (2):
platform/x86: wmi: Fix probe failure when failing to register WMI devices platform/x86: wmi: Fix opening of char device

Arnd Bergmann (1):
fbdev: fsl-diu-fb: mark wr_reg_wa() static

Barnabás Pőcze (1):
platform/x86: wmi: remove unnecessary initializations

Ben Wolsieffer (1):
regmap: prevent noinc writes from clobbering cache

Benjamin Gray (1):
powerpc/xive: Fix endian conversion size

Cezary Rojewski (1):
ASoC: Intel: Skylake: Fix mem leak when parsing UUIDs fails

Chao Yu (1):
f2fs: fix to initialize map.m_pblk in f2fs_precache_extents()

Chen Ni (1):
libnvdimm/of_pmem: Use devm_kstrdup instead of kstrdup and check its return value

Chen Yu (1):
genirq/matrix: Exclude managed interrupts in irq_matrix_allocated()

Chenyuan Mi (1):
tools: iio: iio_generic_buffer: Fix some integer type and calculation

Christophe JAILLET (5):
ACPI: sysfs: Fix create_pnp_modalias() and create_of_modalias()
regmap: debugfs: Fix a erroneous check after snprintf() drm/rockchip: cdn-dp: Fix some error handling paths in cdn_dp_probe()
leds: trigger: ledtrig-cpu:: Fix 'output may be truncated' issue for 'cpu'
dmaengine: pxa_dma: Remove an erroneous BUG_ON() in pxad_free_desc()

D. Wythe (1):
net/smc: fix dangling sock under state SMC_APPFINCLOSEWAIT

Dan Carpenter (5):
thermal: core: prevent potential string overflow
clk: keystone: pll: fix a couple NULL vs IS_ERR() checks
dmaengine: ti: edma: handle irq_of_parse_and_map() errors
Input: synaptics-rmi4 - fix use after free in rmi_unregister_function()
fbdev: imsttfb: fix a resource leak in probe

Daniel Mentz (1):
scsi: ufs: core: Leave space for '\0' in utf8 desc string

Danila Tikhonov (1):

      clk: qcom: gcc-sm8150: Fix gcc_sdcc2_apps_clk_src

Danny Kaehn (1):
hid: cp2112: Fix duplicate workqueue initialization

Devi Priya (1):
clk: qcom: clk-rcg2: Fix clock rate overflow for high parent frequencies

Dhruva Gole (1):
firmware: ti_sci: Mark driver as non removable

Dinghao Liu (2):
mfd: dln2: Fix double put in dln2_probe
i3c: Fix potential refcount leak in i3c_master_register_new_i3c_devs

Dmitry Antipov (1):
wifi: rtlwifi: fix EDCA limit set by BT coexistence

Dmitry Baryshkov (2):
clk: qcom: gcc-sm8150: use ARRAY_SIZE instead of specifying num_parents
arm64: dts: qcom: sdm845-mtp: fix WiFi configuration

Dominique Martinet (1):
Revert "mmc: core: Capture correct oemid-bits for eMMC cards"

Eric Dumazet (9):
tcp_metrics: add missing barriers on delete
tcp_metrics: properly set tp->snd_ssthresh in tcp_init_metrics()
tcp_metrics: do not create an entry from tcp_init_metrics()
chtls: fix tp->rcv_tstamp initialization
tcp: Remove one extra ktime_get_ns() from cookie_init_timestamp
tcp: fix cookie_init_timestamp() overflows
net: add DEV_STATS_READ() helper
ipvlan: properly track tx_errors
inet: shrink struct flowi_common

Erik Kurzinger (1):
drm/syncobj: fix DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE

Felix Fietkau (1):
wifi: mt76: mt7603: rework/fix rx pse hang check

Filipe Manana (1):
btrfs: use u64 for buffer sizes in the tree search ioctls

Florian Fainelli (1):
pwm: brcmstb: Utilize appropriate clock APIs in suspend/resume

Florian Westphal (1):
netfilter: nat: fix ipv6 nat redirect with mapped and scoped addresses

Furong Xu (1):
net: stmmac: xgmac: Enable support for multiple Flexible PPS outputs

Gaurav Jain (2):
crypto: caam/qi2 - fix Chacha20 + Poly1305 self test failure
crypto: caam/jr - fix Chacha20 + Poly1305 self test failure

Geert Uytterhoeven (1):
sh: bios: Revive earlyprintk support

George Shuklin (1):
tg3: power down device only on SYSTEM_POWER_OFF

Gou Hao (1):
ext4: move 'ix' sanity check to corrent position

Greg Kroah-Hartman (1):

      Linux 5.4.261

Hans Verkuil (1):
media: dvb-usb-v2: af9035: fix missing unlock

Heiner Kallweit (2):
r8169: fix rare issue with broken rx after link-down on RTL8125
r8169: respect userspace disabling IFF_MULTICAST

Helge Deller (1):
fbdev: imsttfb: Fix error path of imsttfb_probe()

Javier Carrasco (1):
rtc: pcf85363: fix wrong mask/val parameters in regmap_update_bits call

Jeremy Sowden (1):
netfilter: nft_redir: use struct nf_nat_range2 throughout and deduplicate eval call-backs

Jia-Ju Bai (1):
usb: dwc2: fix possible NULL pointer dereference caused by driver concurrency

Jiasheng Jiang (5):
clk: mediatek: clk-mt6779: Add check for mtk_alloc_clk_data
clk: mediatek: clk-mt6797: Add check for mtk_alloc_clk_data
clk: mediatek: clk-mt7629-eth: Add check for mtk_alloc_clk_data
clk: mediatek: clk-mt7629: Add check for mtk_alloc_clk_data
clk: mediatek: clk-mt2701: Add check for mtk_alloc_clk_data

Jinjie Ruan (2):
wifi: rtw88: debug: Fix the NULL vs IS_ERR() bug for debugfs_create_file()
misc: st_core: Do not call kfree_skb() under spin_lock_irqsave()

Jonas Blixt (1):
USB: usbip: fix stub_dev hub disconnect

Jonas Gorski (1):
hwrng: geode - fix accessing registers

Jonas Karlman (2):
drm/rockchip: vop: Fix reset of state in duplicate state crtc funcs drm/rockchip: vop: Fix call to crtc reset helper

Jonathan Neuschäfer (1):
clk: npcm7xx: Fix incorrect kfree

Juhee Kang (1):
r8169: use tp_to_dev instead of open code

Katya Orlova (1):
media: s3c-camif: Avoid inappropriate kfree()

Konstantin Meskhidze (1):
drm/radeon: possible buffer overflow

Krzysztof Kozlowski (1):
ARM: dts: qcom: mdm9615: populate vsdcc fixed regulator

Kuninori Morimoto (1):
ASoC: ams-delta.c: use component after check

Kuniyuki Iwashima (2):
dccp: Call security_inet_conn_request() after setting IPv4 addresses. dccp/tcp: Call security_inet_conn_request() after setting IPv6 addresses.

Kursad Oney (1):
ARM: 9321/1: memset: cast the constant byte to unsigned char

Leon Romanovsky (1):
RDMA/hfi1: Workaround truncation compilation error

Linus Walleij (1):
HID: cp2112: Use irqchip template

Maciej Żenczykowski (1):
netfilter: xt_recent: fix (increase) ipv6 literal buffer length

Marc Kleine-Budde (2):
can: dev: can_restart(): don't crash kernel if carrier is OK
can: dev: can_restart(): fix race condition between controller restart and netif_carrier_on()

Masahiro Yamada (1):
modpost: fix tee MODULE_DEVICE_TABLE built on big-endian host

Matti Vaittinen (1):
tools: iio: iio_generic_buffer ensure alignment

NeilBrown (1):
Fix termination state for idr_for_each_entry_ul()

Patrick Thompson (1):
net: r8169: Disable multicast filter for RTL8168H and RTL8107E

Pavel Machek (1):
ledtrig-cpu: Limit to 8 CPUs

Reuben Hawkins (1):
vfs: fix readahead(2) on block devices

Sebastian Andrzej Siewior (1):
powerpc/imc-pmu: Use the correct spinlock initializer.

Shigeru Yoshida (1):
tipc: Change nla_policy for bearer-related names to NLA_NUL_STRING

Sudeep Holla (1):
clk: scmi: Free scmi_clk allocated when the clocks with invalid info are skipped

Thierry Reding (1):
pwm: sti: Avoid conditional gotos

Thomas Gleixner (1):
sched/rt: Provide migrate_disable/enable() inlines

Tomas Glozar (1):
nd_btt: Make BTT lanes preemptible

Uwe Kleine-König (5):
soc: qcom: llcc: Handle a second device without data corruption
leds: pwm: simplify if condition
leds: pwm: convert to atomic PWM API
leds: pwm: Don't disable the PWM when the LED should be off
pwm: sti: Reduce number of allocations and drop usage of chip_data

Vivek Gautam (2):
soc: qcom: llcc cleanup to get rid of sdm845 specific driver file
soc: qcom: Rename llcc-slice to llcc-qcom

Wang Yufen (1):
powerpc/pseries: fix potential memory leak in init_cpu_associativity()

Willem de Bruijn (1):
llc: verify mac len before reading mac header

Yan Zhai (1):
ipv6: avoid atomic fragment on GSO packets

Yang Yingliang (3):
pcmcia: cs: fix possible hung task and memory leak pccardd()
pcmcia: ds: fix refcount leak in pcmcia_device_add()
pcmcia: ds: fix possible name leak in error path in pcmcia_device_add()

Yi Yang (1):
tty: tty_jobctrl: fix pid memleak in disassociate_ctty()

Zhang Rui (1):
hwmon: (coretemp) Fix potentially truncated sysfs attribute name

Zheng Wang (1):

      media: bttv: fix use after free error due to btv->timeout timer
author maintainer
#1 lore raw
Documentation/devicetree/bindings/interrupt-controller/ti,sci-intr.txt +1 -1
index 1a8718f8855d..178fca08278f 100644
@@ -55,7 +55,7 @@ Required Properties:
 			corresponds to a range of host irqs.
 
 For more details on TISCI IRQ resource management refer:
-http://downloads.ti.com/tisci/esd/latest/2_tisci_msgs/rm/rm_irq.html
+https://downloads.ti.com/tisci/esd/latest/2_tisci_msgs/rm/rm_irq.html
 
 Example:
 --------
Makefile +1 -1
index 24dc30cd2472..e1892469e2c5 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 VERSION = 5
 PATCHLEVEL = 4
-SUBLEVEL = 260
+SUBLEVEL = 261
 EXTRAVERSION =
 NAME = Kleptomaniac Octopus
 
arch/arm/boot/dts/qcom-mdm9615.dtsi +6 -8
index ffb4dcdb62d2..8b3eb93ec451 100644
@@ -82,14 +82,12 @@
 		};
 	};
 
-	regulators {
-		vsdcc_fixed: vsdcc-regulator {
-			compatible = "regulator-fixed";
-			regulator-name = "SDCC Power";
-			regulator-min-microvolt = <2700000>;
-			regulator-max-microvolt = <2700000>;
-			regulator-always-on;
-		};
+	vsdcc_fixed: vsdcc-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "SDCC Power";
+		regulator-min-microvolt = <2700000>;
+		regulator-max-microvolt = <2700000>;
+		regulator-always-on;
 	};
 
 	soc: soc {
arch/arm/lib/memset.S +1 -0
index 6ca4535c47fb..e36d053a8a90 100644
@@ -16,6 +16,7 @@
 ENTRY(mmioset)
 ENTRY(memset)
 UNWIND( .fnstart         )
+	and	r1, r1, #255		@ cast to unsigned char
 	ands	r3, r0, #3		@ 1 unaligned?
 	mov	ip, r0			@ preserve r0 as return value
 	bne	6f			@ 1
arch/arm64/boot/dts/qcom/sdm845-mtp.dts +2 -0
index c57548b7b250..e5331a81249b 100644
@@ -468,6 +468,8 @@
 	vdd-1.8-xo-supply = <&vreg_l7a_1p8>;
 	vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
 	vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
+
+	qcom,snoc-host-cap-8bit-quirk;
 };
 
 /* PINCTRL - additions to nodes defined in sdm845.dtsi */
arch/powerpc/perf/imc-pmu.c +1 -1
index d42f2e091201..872313021eaa 100644
@@ -50,7 +50,7 @@ static int trace_imc_mem_size;
  * core and trace-imc
  */
 static struct imc_pmu_ref imc_global_refc = {
-	.lock = __SPIN_LOCK_INITIALIZER(imc_global_refc.lock),
+	.lock = __SPIN_LOCK_UNLOCKED(imc_global_refc.lock),
 	.id = 0,
 	.refc = 0,
 };
arch/powerpc/platforms/pseries/lpar.c +3 -1
index 55af0e4cf355..52e466d4a33c 100644
@@ -522,8 +522,10 @@ static ssize_t vcpudispatch_stats_write(struct file *file, const char __user *p,
 
 	if (cmd) {
 		rc = init_cpu_associativity();
-		if (rc)
+		if (rc) {
+			destroy_cpu_associativity();
 			goto out;
+		}
 
 		for_each_possible_cpu(cpu) {
 			disp = per_cpu_ptr(&vcpu_disp_data, cpu);
arch/powerpc/sysdev/xive/native.c +1 -1
index 3fd086533dcf..05c38da4bbee 100644
@@ -778,7 +778,7 @@ int xive_native_get_queue_info(u32 vp_id, u32 prio,
 	if (out_qpage)
 		*out_qpage = be64_to_cpu(qpage);
 	if (out_qsize)
-		*out_qsize = be32_to_cpu(qsize);
+		*out_qsize = be64_to_cpu(qsize);
 	if (out_qeoi_page)
 		*out_qeoi_page = be64_to_cpu(qeoi_page);
 	if (out_escalate_irq)
arch/sh/Kconfig.debug +11 -0
index 71acd3d9b9e8..dfc784f89797 100644
@@ -26,6 +26,17 @@ config STACK_DEBUG
 	  every function call and will therefore incur a major
 	  performance hit. Most users should say N.
 
+config EARLY_PRINTK
+	bool "Early printk"
+	depends on SH_STANDARD_BIOS
+	help
+	  Say Y here to redirect kernel printk messages to the serial port
+	  used by the SH-IPL bootloader, starting very early in the boot
+	  process and ending when the kernel's serial console is initialised.
+	  This option is only useful while porting the kernel to a new machine,
+	  when the kernel may crash or hang before the serial console is
+	  initialised.  If unsure, say N.
+
 config 4KSTACKS
 	bool "Use 4Kb for kernel stacks instead of 8Kb"
 	depends on DEBUG_KERNEL && (MMU || BROKEN) && !PAGE_SIZE_64KB
drivers/acpi/device_sysfs.c +6 -4
index fe8c7e79f472..566067a855a1 100644
@@ -156,8 +156,8 @@ static int create_pnp_modalias(struct acpi_device *acpi_dev, char *modalias,
 		return 0;
 
 	len = snprintf(modalias, size, "acpi:");
-	if (len <= 0)
-		return len;
+	if (len >= size)
+		return -ENOMEM;
 
 	size -= len;
 
@@ -210,8 +210,10 @@ static int create_of_modalias(struct acpi_device *acpi_dev, char *modalias,
 	len = snprintf(modalias, size, "of:N%sT", (char *)buf.pointer);
 	ACPI_FREE(buf.pointer);
 
-	if (len <= 0)
-		return len;
+	if (len >= size)
+		return -ENOMEM;
+
+	size -= len;
 
 	of_compatible = acpi_dev->data.of_compatible;
 	if (of_compatible->type == ACPI_TYPE_PACKAGE) {
drivers/base/regmap/regmap-debugfs.c +1 -1
index 4f2ff1b2b450..214d19d1337d 100644
@@ -49,7 +49,7 @@ static ssize_t regmap_name_read_file(struct file *file,
 		name = map->dev->driver->name;
 
 	ret = snprintf(buf, PAGE_SIZE, "%s\n", name);
-	if (ret < 0) {
+	if (ret >= PAGE_SIZE) {
 		kfree(buf);
 		return ret;
 	}
drivers/base/regmap/regmap.c +9 -7
index b5974cbbe78f..23574c328616 100644
@@ -1495,17 +1495,19 @@ static int _regmap_raw_write_impl(struct regmap *map, unsigned int reg,
 	}
 
 	if (!map->cache_bypass && map->format.parse_val) {
-		unsigned int ival;
+		unsigned int ival, offset;
 		int val_bytes = map->format.val_bytes;
-		for (i = 0; i < val_len / val_bytes; i++) {
-			ival = map->format.parse_val(val + (i * val_bytes));
-			ret = regcache_write(map,
-					     reg + regmap_get_offset(map, i),
-					     ival);
+
+		/* Cache the last written value for noinc writes */
+		i = noinc ? val_len - val_bytes : 0;
+		for (; i < val_len; i += val_bytes) {
+			ival = map->format.parse_val(val + i);
+			offset = noinc ? 0 : regmap_get_offset(map, i / val_bytes);
+			ret = regcache_write(map, reg + offset, ival);
 			if (ret) {
 				dev_err(map->dev,
 					"Error in caching of register: %x ret: %d\n",
-					reg + regmap_get_offset(map, i), ret);
+					reg + offset, ret);
 				return ret;
 			}
 		}
drivers/char/hw_random/geode-rng.c +4 -2
index 207272979f23..2f8289865ec8 100644
@@ -58,7 +58,8 @@ struct amd_geode_priv {
 
 static int geode_rng_data_read(struct hwrng *rng, u32 *data)
 {
-	void __iomem *mem = (void __iomem *)rng->priv;
+	struct amd_geode_priv *priv = (struct amd_geode_priv *)rng->priv;
+	void __iomem *mem = priv->membase;
 
 	*data = readl(mem + GEODE_RNG_DATA_REG);
 
@@ -67,7 +68,8 @@ static int geode_rng_data_read(struct hwrng *rng, u32 *data)
 
 static int geode_rng_data_present(struct hwrng *rng, int wait)
 {
-	void __iomem *mem = (void __iomem *)rng->priv;
+	struct amd_geode_priv *priv = (struct amd_geode_priv *)rng->priv;
+	void __iomem *mem = priv->membase;
 	int data, i;
 
 	for (i = 0; i < 20; i++) {
drivers/clk/clk-npcm7xx.c +1 -1
index 27a86b7a34db..c82df105b0a2 100644
@@ -647,7 +647,7 @@ static void __init npcm7xx_clk_init(struct device_node *clk_np)
 	return;
 
 npcm7xx_init_fail:
-	kfree(npcm7xx_clk_data->hws);
+	kfree(npcm7xx_clk_data);
 npcm7xx_init_np_err:
 	iounmap(clk_base);
 npcm7xx_init_error:
drivers/clk/clk-scmi.c +1 -0
index e3cdb4a282fe..d68de3773eb1 100644
@@ -170,6 +170,7 @@ static int scmi_clocks_probe(struct scmi_device *sdev)
 		sclk->info = handle->clk_ops->info_get(handle, idx);
 		if (!sclk->info) {
 			dev_dbg(dev, "invalid clock info for idx %d\n", idx);
+			devm_kfree(dev, sclk);
 			continue;
 		}
 
drivers/clk/imx/Kconfig +1 -0
index 1ac0c7990392..087170a9b148 100644
@@ -30,5 +30,6 @@ config CLK_IMX8QXP
 	bool "IMX8QXP SCU Clock"
 	depends on ARCH_MXC && IMX_SCU && ARM64
 	select MXC_CLK_SCU
+	select MXC_CLK
 	help
 	  Build the driver for IMX8QXP SCU based clocks.
drivers/clk/keystone/pll.c +9 -6
index ee5c72369334..6bbdd4705d71 100644
@@ -281,12 +281,13 @@ static void __init of_pll_div_clk_init(struct device_node *node)
 
 	clk = clk_register_divider(NULL, clk_name, parent_name, 0, reg, shift,
 				 mask, 0, NULL);
-	if (clk) {
-		of_clk_add_provider(node, of_clk_src_simple_get, clk);
-	} else {
+	if (IS_ERR(clk)) {
 		pr_err("%s: error registering divider %s\n", __func__, clk_name);
 		iounmap(reg);
+		return;
 	}
+
+	of_clk_add_provider(node, of_clk_src_simple_get, clk);
 }
 CLK_OF_DECLARE(pll_divider_clock, "ti,keystone,pll-divider-clock", of_pll_div_clk_init);
 
@@ -328,10 +329,12 @@ static void __init of_pll_mux_clk_init(struct device_node *node)
 	clk = clk_register_mux(NULL, clk_name, (const char **)&parents,
 				ARRAY_SIZE(parents) , 0, reg, shift, mask,
 				0, NULL);
-	if (clk)
-		of_clk_add_provider(node, of_clk_src_simple_get, clk);
-	else
+	if (IS_ERR(clk)) {
 		pr_err("%s: error registering mux %s\n", __func__, clk_name);
+		return;
+	}
+
+	of_clk_add_provider(node, of_clk_src_simple_get, clk);
 }
 CLK_OF_DECLARE(pll_mux_clock, "ti,keystone,pll-mux-clock", of_pll_mux_clk_init);
 
drivers/clk/mediatek/clk-mt2701.c +8 -0
index 695be0f77427..c67cd73aca17 100644
@@ -675,6 +675,8 @@ static int mtk_topckgen_init(struct platform_device *pdev)
 		return PTR_ERR(base);
 
 	clk_data = mtk_alloc_clk_data(CLK_TOP_NR);
+	if (!clk_data)
+		return -ENOMEM;
 
 	mtk_clk_register_fixed_clks(top_fixed_clks, ARRAY_SIZE(top_fixed_clks),
 								clk_data);
@@ -742,6 +744,8 @@ static void __init mtk_infrasys_init_early(struct device_node *node)
 
 	if (!infra_clk_data) {
 		infra_clk_data = mtk_alloc_clk_data(CLK_INFRA_NR);
+		if (!infra_clk_data)
+			return;
 
 		for (i = 0; i < CLK_INFRA_NR; i++)
 			infra_clk_data->clks[i] = ERR_PTR(-EPROBE_DEFER);
@@ -768,6 +772,8 @@ static int mtk_infrasys_init(struct platform_device *pdev)
 
 	if (!infra_clk_data) {
 		infra_clk_data = mtk_alloc_clk_data(CLK_INFRA_NR);
+		if (!infra_clk_data)
+			return -ENOMEM;
 	} else {
 		for (i = 0; i < CLK_INFRA_NR; i++) {
 			if (infra_clk_data->clks[i] == ERR_PTR(-EPROBE_DEFER))
@@ -896,6 +902,8 @@ static int mtk_pericfg_init(struct platform_device *pdev)
 		return PTR_ERR(base);
 
 	clk_data = mtk_alloc_clk_data(CLK_PERI_NR);
+	if (!clk_data)
+		return -ENOMEM;
 
 	mtk_clk_register_gates(node, peri_clks, ARRAY_SIZE(peri_clks),
 						clk_data);
drivers/clk/mediatek/clk-mt6779.c +4 -0
index 00920182bbe6..f7b5ec749ab9 100644
@@ -1216,6 +1216,8 @@ static int clk_mt6779_apmixed_probe(struct platform_device *pdev)
 	struct device_node *node = pdev->dev.of_node;
 
 	clk_data = mtk_alloc_clk_data(CLK_APMIXED_NR_CLK);
+	if (!clk_data)
+		return -ENOMEM;
 
 	mtk_clk_register_plls(node, plls, ARRAY_SIZE(plls), clk_data);
 
@@ -1237,6 +1239,8 @@ static int clk_mt6779_top_probe(struct platform_device *pdev)
 		return PTR_ERR(base);
 
 	clk_data = mtk_alloc_clk_data(CLK_TOP_NR_CLK);
+	if (!clk_data)
+		return -ENOMEM;
 
 	mtk_clk_register_fixed_clks(top_fixed_clks, ARRAY_SIZE(top_fixed_clks),
 				    clk_data);
drivers/clk/mediatek/clk-mt6797.c +6 -0
index f62b0428da0e..9bef47161bde 100644
@@ -392,6 +392,8 @@ static int mtk_topckgen_init(struct platform_device *pdev)
 		return PTR_ERR(base);
 
 	clk_data = mtk_alloc_clk_data(CLK_TOP_NR);
+	if (!clk_data)
+		return -ENOMEM;
 
 	mtk_clk_register_factors(top_fixed_divs, ARRAY_SIZE(top_fixed_divs),
 				 clk_data);
@@ -564,6 +566,8 @@ static void mtk_infrasys_init_early(struct device_node *node)
 
 	if (!infra_clk_data) {
 		infra_clk_data = mtk_alloc_clk_data(CLK_INFRA_NR);
+		if (!infra_clk_data)
+			return;
 
 		for (i = 0; i < CLK_INFRA_NR; i++)
 			infra_clk_data->clks[i] = ERR_PTR(-EPROBE_DEFER);
@@ -588,6 +592,8 @@ static int mtk_infrasys_init(struct platform_device *pdev)
 
 	if (!infra_clk_data) {
 		infra_clk_data = mtk_alloc_clk_data(CLK_INFRA_NR);
+		if (!infra_clk_data)
+			return -ENOMEM;
 	} else {
 		for (i = 0; i < CLK_INFRA_NR; i++) {
 			if (infra_clk_data->clks[i] == ERR_PTR(-EPROBE_DEFER))
drivers/clk/mediatek/clk-mt7629-eth.c +4 -0
index 88279d0ea1a7..3ab7b672f8c7 100644
@@ -83,6 +83,8 @@ static int clk_mt7629_ethsys_init(struct platform_device *pdev)
 	int r;
 
 	clk_data = mtk_alloc_clk_data(CLK_ETH_NR_CLK);
+	if (!clk_data)
+		return -ENOMEM;
 
 	mtk_clk_register_gates(node, eth_clks, CLK_ETH_NR_CLK, clk_data);
 
@@ -105,6 +107,8 @@ static int clk_mt7629_sgmiisys_init(struct platform_device *pdev)
 	int r;
 
 	clk_data = mtk_alloc_clk_data(CLK_SGMII_NR_CLK);
+	if (!clk_data)
+		return -ENOMEM;
 
 	mtk_clk_register_gates(node, sgmii_clks[id++], CLK_SGMII_NR_CLK,
 			       clk_data);
drivers/clk/mediatek/clk-mt7629.c +6 -0
index d6233994af5a..1e6abbddf02c 100644
@@ -581,6 +581,8 @@ static int mtk_topckgen_init(struct platform_device *pdev)
 		return PTR_ERR(base);
 
 	clk_data = mtk_alloc_clk_data(CLK_TOP_NR_CLK);
+	if (!clk_data)
+		return -ENOMEM;
 
 	mtk_clk_register_fixed_clks(top_fixed_clks, ARRAY_SIZE(top_fixed_clks),
 				    clk_data);
@@ -605,6 +607,8 @@ static int mtk_infrasys_init(struct platform_device *pdev)
 	int r;
 
 	clk_data = mtk_alloc_clk_data(CLK_INFRA_NR_CLK);
+	if (!clk_data)
+		return -ENOMEM;
 
 	mtk_clk_register_gates(node, infra_clks, ARRAY_SIZE(infra_clks),
 			       clk_data);
@@ -633,6 +637,8 @@ static int mtk_pericfg_init(struct platform_device *pdev)
 		return PTR_ERR(base);
 
 	clk_data = mtk_alloc_clk_data(CLK_PERI_NR_CLK);
+	if (!clk_data)
+		return -ENOMEM;
 
 	mtk_clk_register_gates(node, peri_clks, ARRAY_SIZE(peri_clks),
 			       clk_data);
drivers/clk/qcom/clk-rcg2.c +4 -10
index 89c1adeb84d4..40374f3d3d20 100644
@@ -146,17 +146,11 @@ static int clk_rcg2_set_parent(struct clk_hw *hw, u8 index)
 static unsigned long
 calc_rate(unsigned long rate, u32 m, u32 n, u32 mode, u32 hid_div)
 {
-	if (hid_div) {
-		rate *= 2;
-		rate /= hid_div + 1;
-	}
+	if (hid_div)
+		rate = mult_frac(rate, 2, hid_div + 1);
 
-	if (mode) {
-		u64 tmp = rate;
-		tmp *= m;
-		do_div(tmp, n);
-		rate = tmp;
-	}
+	if (mode)
+		rate = mult_frac(rate, m, n);
 
 	return rate;
 }
drivers/clk/qcom/gcc-sm8150.c +49 -49

386 lines not on this page · raw message

drivers/crypto/caam/caamalg.c +2 -1
index fdd994ee55e2..2db88213f13e 100644
@@ -553,7 +553,8 @@ static int chachapoly_setkey(struct crypto_aead *aead, const u8 *key,
 		return -EINVAL;
 	}
 
-	ctx->cdata.key_virt = key;
+	memcpy(ctx->key, key, keylen);
+	ctx->cdata.key_virt = ctx->key;
 	ctx->cdata.keylen = keylen - saltlen;
 
 	return chachapoly_set_sh_desc(aead);
drivers/crypto/caam/caamalg_qi2.c +2 -1
index 28692d068176..b8d277bfbd32 100644
@@ -639,7 +639,8 @@ static int chachapoly_setkey(struct crypto_aead *aead, const u8 *key,
 		return -EINVAL;
 	}
 
-	ctx->cdata.key_virt = key;
+	memcpy(ctx->key, key, keylen);
+	ctx->cdata.key_virt = ctx->key;
 	ctx->cdata.keylen = keylen - saltlen;
 
 	return chachapoly_set_sh_desc(aead);
drivers/crypto/chelsio/chtls/chtls_cm.c +1 -1
index 3b79bcd03e7b..40054731f800 100644
@@ -2092,7 +2092,7 @@ static void chtls_rx_ack(struct sock *sk, struct sk_buff *skb)
 
 		if (tp->snd_una != snd_una) {
 			tp->snd_una = snd_una;
-			tp->rcv_tstamp = tcp_time_stamp(tp);
+			tp->rcv_tstamp = tcp_jiffies32;
 			if (tp->snd_una == tp->snd_nxt &&
 			    !csk_flag_nochk(csk, CSK_TX_FAILOVER))
 				csk_reset_flag(csk, CSK_TX_WAIT_IDLE);
drivers/dma/pxa_dma.c +0 -1
index 68d9d60c051d..9ce75ff9fa1c 100644
@@ -723,7 +723,6 @@ static void pxad_free_desc(struct virt_dma_desc *vd)
 	dma_addr_t dma;
 	struct pxad_desc_sw *sw_desc = to_pxad_sw_desc(vd);
 
-	BUG_ON(sw_desc->nb_desc == 0);
 	for (i = sw_desc->nb_desc - 1; i >= 0; i--) {
 		if (i > 0)
 			dma = sw_desc->hw_desc[i - 1]->ddadr;
drivers/dma/ti/edma.c +2 -2
index 80b780e49971..b570f08888ee 100644
@@ -2361,7 +2361,7 @@ static int edma_probe(struct platform_device *pdev)
 	if (irq < 0 && node)
 		irq = irq_of_parse_and_map(node, 0);
 
-	if (irq >= 0) {
+	if (irq > 0) {
 		irq_name = devm_kasprintf(dev, GFP_KERNEL, "%s_ccint",
 					  dev_name(dev));
 		ret = devm_request_irq(dev, irq, dma_irq_handler, 0, irq_name,
@@ -2377,7 +2377,7 @@ static int edma_probe(struct platform_device *pdev)
 	if (irq < 0 && node)
 		irq = irq_of_parse_and_map(node, 2);
 
-	if (irq >= 0) {
+	if (irq > 0) {
 		irq_name = devm_kasprintf(dev, GFP_KERNEL, "%s_ccerrint",
 					  dev_name(dev));
 		ret = devm_request_irq(dev, irq, dma_ccerr_handler, 0, irq_name,
drivers/firmware/ti_sci.c +2 -46

71 lines not on this page · raw message

drivers/firmware/ti_sci.h +1 -1
index f0d068c03944..57cd04062994 100644
@@ -6,7 +6,7 @@
  * The system works in a message response protocol
  * See: http://processors.wiki.ti.com/index.php/TISCI for details
  *
- * Copyright (C)  2015-2016 Texas Instruments Incorporated - http://www.ti.com/
+ * Copyright (C)  2015-2016 Texas Instruments Incorporated - https://www.ti.com/
  */
 
 #ifndef __TI_SCI_H
drivers/gpu/drm/drm_syncobj.c +2 -1
index e558381c4c96..8b155e3377cf 100644
@@ -921,7 +921,8 @@ static signed long drm_syncobj_array_wait_timeout(struct drm_syncobj **syncobjs,
 		fence = drm_syncobj_fence_get(syncobjs[i]);
 		if (!fence || dma_fence_chain_find_seqno(&fence, points[i])) {
 			dma_fence_put(fence);
-			if (flags & DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT) {
+			if (flags & (DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT |
+				     DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE)) {
 				continue;
 			} else {
 				timeout = -EINVAL;
drivers/gpu/drm/radeon/evergreen.c +4 -3
index 1d978a3d9c82..2156590c3d15 100644
@@ -4819,14 +4819,15 @@ int evergreen_irq_process(struct radeon_device *rdev)
 			break;
 		case 44: /* hdmi */
 			afmt_idx = src_data;
-			if (!(afmt_status[afmt_idx] & AFMT_AZ_FORMAT_WTRIG))
-				DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
-
 			if (afmt_idx > 5) {
 				DRM_ERROR("Unhandled interrupt: %d %d\n",
 					  src_id, src_data);
 				break;
 			}
+
+			if (!(afmt_status[afmt_idx] & AFMT_AZ_FORMAT_WTRIG))
+				DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
+
 			afmt_status[afmt_idx] &= ~AFMT_AZ_FORMAT_WTRIG;
 			queue_hdmi = true;
 			DRM_DEBUG("IH: HDMI%d\n", afmt_idx + 1);
drivers/gpu/drm/rockchip/cdn-dp-core.c +13 -2
index 2ea672f4420d..df2656471e31 100644
@@ -1147,6 +1147,7 @@ static int cdn_dp_probe(struct platform_device *pdev)
 	struct cdn_dp_device *dp;
 	struct extcon_dev *extcon;
 	struct phy *phy;
+	int ret;
 	int i;
 
 	dp = devm_kzalloc(dev, sizeof(*dp), GFP_KERNEL);
@@ -1187,9 +1188,19 @@ static int cdn_dp_probe(struct platform_device *pdev)
 	mutex_init(&dp->lock);
 	dev_set_drvdata(dev, dp);
 
-	cdn_dp_audio_codec_init(dp, dev);
+	ret = cdn_dp_audio_codec_init(dp, dev);
+	if (ret)
+		return ret;
+
+	ret = component_add(dev, &cdn_dp_component_ops);
+	if (ret)
+		goto err_audio_deinit;
 
-	return component_add(dev, &cdn_dp_component_ops);
+	return 0;
+
+err_audio_deinit:
+	platform_device_unregister(dp->audio_pdev);
+	return ret;
 }
 
 static int cdn_dp_remove(struct platform_device *pdev)
drivers/gpu/drm/rockchip/rockchip_drm_vop.c +6 -2
index 1795adbd81d3..20aa93fe9e3f 100644
@@ -1291,7 +1291,8 @@ static struct drm_crtc_state *vop_crtc_duplicate_state(struct drm_crtc *crtc)
 	if (WARN_ON(!crtc->state))
 		return NULL;
 
-	rockchip_state = kzalloc(sizeof(*rockchip_state), GFP_KERNEL);
+	rockchip_state = kmemdup(to_rockchip_crtc_state(crtc->state),
+				 sizeof(*rockchip_state), GFP_KERNEL);
 	if (!rockchip_state)
 		return NULL;
 
@@ -1316,7 +1317,10 @@ static void vop_crtc_reset(struct drm_crtc *crtc)
 	if (crtc->state)
 		vop_crtc_destroy_state(crtc, crtc->state);
 
-	__drm_atomic_helper_crtc_reset(crtc, &crtc_state->base);
+	if (crtc_state)
+		__drm_atomic_helper_crtc_reset(crtc, &crtc_state->base);
+	else
+		__drm_atomic_helper_crtc_reset(crtc, NULL);
 }
 
 #ifdef CONFIG_DRM_ANALOGIX_DP
drivers/hid/hid-cp2112.c +12 -11
index 340408f8c8ab..648201b6c624 100644
@@ -1156,8 +1156,6 @@ static unsigned int cp2112_gpio_irq_startup(struct irq_data *d)
 	struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
 	struct cp2112_device *dev = gpiochip_get_data(gc);
 
-	INIT_DELAYED_WORK(&dev->gpio_poll_worker, cp2112_gpio_poll_callback);
-
 	if (!dev->gpio_poll) {
 		dev->gpio_poll = true;
 		schedule_delayed_work(&dev->gpio_poll_worker, 0);
@@ -1240,6 +1238,7 @@ static int cp2112_probe(struct hid_device *hdev, const struct hid_device_id *id)
 	struct cp2112_device *dev;
 	u8 buf[3];
 	struct cp2112_smbus_config_report config;
+	struct gpio_irq_chip *girq;
 	int ret;
 
 	dev = devm_kzalloc(&hdev->dev, sizeof(*dev), GFP_KERNEL);
@@ -1343,6 +1342,17 @@ static int cp2112_probe(struct hid_device *hdev, const struct hid_device_id *id)
 	dev->gc.can_sleep		= 1;
 	dev->gc.parent			= &hdev->dev;
 
+	girq = &dev->gc.irq;
+	girq->chip = &cp2112_gpio_irqchip;
+	/* The event comes from the outside so no parent handler */
+	girq->parent_handler = NULL;
+	girq->num_parents = 0;
+	girq->parents = NULL;
+	girq->default_type = IRQ_TYPE_NONE;
+	girq->handler = handle_simple_irq;
+
+	INIT_DELAYED_WORK(&dev->gpio_poll_worker, cp2112_gpio_poll_callback);
+
 	ret = gpiochip_add_data(&dev->gc, dev);
 	if (ret < 0) {
 		hid_err(hdev, "error registering gpio chip\n");
@@ -1358,17 +1368,8 @@ static int cp2112_probe(struct hid_device *hdev, const struct hid_device_id *id)
 	chmod_sysfs_attrs(hdev);
 	hid_hw_power(hdev, PM_HINT_NORMAL);
 
-	ret = gpiochip_irqchip_add(&dev->gc, &cp2112_gpio_irqchip, 0,
-				   handle_simple_irq, IRQ_TYPE_NONE);
-	if (ret) {
-		dev_err(dev->gc.parent, "failed to add IRQ chip\n");
-		goto err_sysfs_remove;
-	}
-
 	return ret;
 
-err_sysfs_remove:
-	sysfs_remove_group(&hdev->dev.kobj, &cp2112_attr_group);
 err_gpiochip_remove:
 	gpiochip_remove(&dev->gc);
 err_free_i2c:
drivers/hwmon/coretemp.c +1 -1
index e232f44f6c9a..0eabad344961 100644
@@ -41,7 +41,7 @@ MODULE_PARM_DESC(tjmax, "TjMax value in degrees Celsius");
 #define PKG_SYSFS_ATTR_NO	1	/* Sysfs attribute for package temp */
 #define BASE_SYSFS_ATTR_NO	2	/* Sysfs Base attr no for coretemp */
 #define NUM_REAL_CORES		128	/* Number of Real cores per cpu */
-#define CORETEMP_NAME_LENGTH	19	/* String Length of attrs */
+#define CORETEMP_NAME_LENGTH	28	/* String Length of attrs */
 #define MAX_CORE_ATTRS		4	/* Maximum no of basic attrs */
 #define TOTAL_ATTRS		(MAX_CORE_ATTRS + 1)
 #define MAX_CORE_DATA		(NUM_REAL_CORES + BASE_SYSFS_ATTR_NO)
drivers/i3c/master.c +3 -1
index 6cc71c90f85e..02dc8e29c828 100644
@@ -1469,9 +1469,11 @@ i3c_master_register_new_i3c_devs(struct i3c_master_controller *master)
 			desc->dev->dev.of_node = desc->boardinfo->of_node;
 
 		ret = device_register(&desc->dev->dev);
-		if (ret)
+		if (ret) {
 			dev_err(&master->dev,
 				"Failed to add I3C device (err = %d)\n", ret);
+			put_device(&desc->dev->dev);
+		}
 	}
 }
 
drivers/infiniband/hw/hfi1/efivar.c +1 -1
index d106d23016ba..75e39e403a58 100644
@@ -152,7 +152,7 @@ int read_hfi1_efi_var(struct hfi1_devdata *dd, const char *kind,
 		      unsigned long *size, void **return_data)
 {
 	char prefix_name[64];
-	char name[64];
+	char name[128];
 	int result;
 	int i;
 
drivers/input/rmi4/rmi_bus.c +1 -1
index af706a583656..1e3aaff310c9 100644
@@ -276,11 +276,11 @@ void rmi_unregister_function(struct rmi_function *fn)
 
 	device_del(&fn->dev);
 	of_node_put(fn->dev.of_node);
-	put_device(&fn->dev);
 
 	for (i = 0; i < fn->num_of_irqs; i++)
 		irq_dispose_mapping(fn->irq[i]);
 
+	put_device(&fn->dev);
 }
 
 /**
drivers/irqchip/irq-ti-sci-inta.c +1 -1
index 0a35499c4672..94cba5914788 100644
@@ -2,7 +2,7 @@
 /*
  * Texas Instruments' K3 Interrupt Aggregator irqchip driver
  *
- * Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/
+ * Copyright (C) 2018-2019 Texas Instruments Incorporated - https://www.ti.com/
  *	Lokesh Vutla <[email protected]>
  */
 
drivers/irqchip/irq-ti-sci-intr.c +1 -1
index 7d0163d85fb9..6b366d98fe3c 100644
@@ -2,7 +2,7 @@
 /*
  * Texas Instruments' K3 Interrupt Router irqchip driver
  *
- * Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/
+ * Copyright (C) 2018-2019 Texas Instruments Incorporated - https://www.ti.com/
  *	Lokesh Vutla <[email protected]>
  */
 
drivers/leds/leds-pwm.c +9 -32

79 lines not on this page · raw message

drivers/leds/trigger/ledtrig-cpu.c +12 -5
index 869976d1b734..f19baed61502 100644
@@ -2,14 +2,18 @@
 /*
  * ledtrig-cpu.c - LED trigger based on CPU activity
  *
- * This LED trigger will be registered for each possible CPU and named as
- * cpu0, cpu1, cpu2, cpu3, etc.
+ * This LED trigger will be registered for first 8 CPUs and named
+ * as cpu0..cpu7. There's additional trigger called cpu that
+ * is on when any CPU is active.
+ *
+ * If you want support for arbitrary number of CPUs, make it one trigger,
+ * with additional sysfs file selecting which CPU to watch.
  *
  * It can be bound to any LED just like other triggers using either a
  * board file or via sysfs interface.
  *
  * An API named ledtrig_cpu is exported for any user, who want to add CPU
- * activity indication in their code
+ * activity indication in their code.
  *
  * Copyright 2011 Linus Walleij <[email protected]>
  * Copyright 2011 - 2012 Bryan Wu <[email protected]>
@@ -126,7 +130,7 @@ static int ledtrig_prepare_down_cpu(unsigned int cpu)
 
 static int __init ledtrig_cpu_init(void)
 {
-	int cpu;
+	unsigned int cpu;
 	int ret;
 
 	/* Supports up to 9999 cpu cores */
@@ -145,7 +149,10 @@ static int __init ledtrig_cpu_init(void)
 	for_each_possible_cpu(cpu) {
 		struct led_trigger_cpu *trig = &per_cpu(cpu_trig, cpu);
 
-		snprintf(trig->name, MAX_NAME_LEN, "cpu%d", cpu);
+		if (cpu >= 8)
+			continue;
+
+		snprintf(trig->name, MAX_NAME_LEN, "cpu%u", cpu);
 
 		led_trigger_register_simple(trig->name, &trig->_trig);
 	}
drivers/media/pci/bt8xx/bttv-driver.c +1 -0
index 6441e7d63d97..a0be1ca89b29 100644
@@ -4258,6 +4258,7 @@ static void bttv_remove(struct pci_dev *pci_dev)
 
 	/* free resources */
 	free_irq(btv->c.pci->irq,btv);
+	del_timer_sync(&btv->timeout);
 	iounmap(btv->bt848_mmio);
 	release_mem_region(pci_resource_start(btv->c.pci,0),
 			   pci_resource_len(btv->c.pci,0));
drivers/media/platform/s3c-camif/camif-capture.c +2 -4
index 2fb45db8e4ba..d24ef08633ab 100644
@@ -1132,12 +1132,12 @@ int s3c_camif_register_video_node(struct camif_dev *camif, int idx)
 
 	ret = vb2_queue_init(q);
 	if (ret)
-		goto err_vd_rel;
+		return ret;
 
 	vp->pad.flags = MEDIA_PAD_FL_SINK;
 	ret = media_entity_pads_init(&vfd->entity, 1, &vp->pad);
 	if (ret)
-		goto err_vd_rel;
+		return ret;
 
 	video_set_drvdata(vfd, vp);
 
@@ -1170,8 +1170,6 @@ int s3c_camif_register_video_node(struct camif_dev *camif, int idx)
 	v4l2_ctrl_handler_free(&vp->ctrl_handler);
 err_me_cleanup:
 	media_entity_cleanup(&vfd->entity);
-err_vd_rel:
-	video_device_release(vfd);
 	return ret;
 }
 
drivers/media/usb/dvb-usb-v2/af9035.c +9 -4
index 66dd1bdf6440..c5f6af5debaf 100644
@@ -322,8 +322,10 @@ static int af9035_i2c_master_xfer(struct i2c_adapter *adap,
 			ret = -EOPNOTSUPP;
 		} else if ((msg[0].addr == state->af9033_i2c_addr[0]) ||
 			   (msg[0].addr == state->af9033_i2c_addr[1])) {
-			if (msg[0].len < 3 || msg[1].len < 1)
-				return -EOPNOTSUPP;
+			if (msg[0].len < 3 || msg[1].len < 1) {
+				ret = -EOPNOTSUPP;
+				goto unlock;
+			}
 			/* demod access via firmware interface */
 			reg = msg[0].buf[0] << 16 | msg[0].buf[1] << 8 |
 					msg[0].buf[2];
@@ -383,8 +385,10 @@ static int af9035_i2c_master_xfer(struct i2c_adapter *adap,
 			ret = -EOPNOTSUPP;
 		} else if ((msg[0].addr == state->af9033_i2c_addr[0]) ||
 			   (msg[0].addr == state->af9033_i2c_addr[1])) {
-			if (msg[0].len < 3)
-				return -EOPNOTSUPP;
+			if (msg[0].len < 3) {
+				ret = -EOPNOTSUPP;
+				goto unlock;
+			}
 			/* demod access via firmware interface */
 			reg = msg[0].buf[0] << 16 | msg[0].buf[1] << 8 |
 					msg[0].buf[2];
@@ -459,6 +463,7 @@ static int af9035_i2c_master_xfer(struct i2c_adapter *adap,
 		ret = -EOPNOTSUPP;
 	}
 
+unlock:
 	mutex_unlock(&d->i2c_mutex);
 
 	if (ret < 0)
drivers/mfd/dln2.c +0 -1
index 80952237e4b4..707f4287ab4a 100644
@@ -797,7 +797,6 @@ static int dln2_probe(struct usb_interface *interface,
 	dln2_stop_rx_urbs(dln2);
 
 out_free:
-	usb_put_dev(dln2->usb_dev);
 	dln2_free(dln2);
 
 	return ret;
drivers/misc/ti-st/st_core.c +4 -3
index 7d9e23aa0b92..c19460e7f0f1 100644
@@ -15,6 +15,7 @@
 #include <linux/skbuff.h>
 
 #include <linux/ti_wilink_st.h>
+#include <linux/netdevice.h>
 
 extern void st_kim_recv(void *, const unsigned char *, long);
 void st_int_recv(void *, const unsigned char *, long);
@@ -423,7 +424,7 @@ static void st_int_enqueue(struct st_data_s *st_gdata, struct sk_buff *skb)
 	case ST_LL_AWAKE_TO_ASLEEP:
 		pr_err("ST LL is illegal state(%ld),"
 			   "purging received skb.", st_ll_getstate(st_gdata));
-		kfree_skb(skb);
+		dev_kfree_skb_irq(skb);
 		break;
 	case ST_LL_ASLEEP:
 		skb_queue_tail(&st_gdata->tx_waitq, skb);
@@ -432,7 +433,7 @@ static void st_int_enqueue(struct st_data_s *st_gdata, struct sk_buff *skb)
 	default:
 		pr_err("ST LL is illegal state(%ld),"
 			   "purging received skb.", st_ll_getstate(st_gdata));
-		kfree_skb(skb);
+		dev_kfree_skb_irq(skb);
 		break;
 	}
 
@@ -486,7 +487,7 @@ void st_tx_wakeup(struct st_data_s *st_data)
 				spin_unlock_irqrestore(&st_data->lock, flags);
 				break;
 			}
-			kfree_skb(skb);
+			dev_kfree_skb_irq(skb);
 			spin_unlock_irqrestore(&st_data->lock, flags);
 		}
 		/* if wake-up is set in another context- restart sending */
drivers/mmc/core/mmc.c +1 -1
index 6609acf27923..ed939bb2f700 100644
@@ -95,7 +95,7 @@ static int mmc_decode_cid(struct mmc_card *card)
 	case 3: /* MMC v3.1 - v3.3 */
 	case 4: /* MMC v4 */
 		card->cid.manfid	= UNSTUFF_BITS(resp, 120, 8);
-		card->cid.oemid		= UNSTUFF_BITS(resp, 104, 8);
+		card->cid.oemid		= UNSTUFF_BITS(resp, 104, 16);
 		card->cid.prod_name[0]	= UNSTUFF_BITS(resp, 96, 8);
 		card->cid.prod_name[1]	= UNSTUFF_BITS(resp, 88, 8);
 		card->cid.prod_name[2]	= UNSTUFF_BITS(resp, 80, 8);
drivers/net/can/dev/dev.c +6 -4
index 322da89cb9c6..05a2c873af56 100644
@@ -552,7 +552,8 @@ static void can_restart(struct net_device *dev)
 	struct can_frame *cf;
 	int err;
 
-	BUG_ON(netif_carrier_ok(dev));
+	if (netif_carrier_ok(dev))
+		netdev_err(dev, "Attempt to restart for bus-off recovery, but carrier is OK?\n");
 
 	/* No synchronization needed because the device is bus-off and
 	 * no messages can come in or go out.
@@ -577,11 +578,12 @@ static void can_restart(struct net_device *dev)
 	priv->can_stats.restarts++;
 
 	/* Now restart the device */
-	err = priv->do_set_mode(dev, CAN_MODE_START);
-
 	netif_carrier_on(dev);
-	if (err)
+	err = priv->do_set_mode(dev, CAN_MODE_START);
+	if (err) {
 		netdev_err(dev, "Error %d during restart", err);
+		netif_carrier_off(dev);
+	}
 }
 
 static void can_restart_work(struct work_struct *work)
drivers/net/ethernet/broadcom/tg3.c +2 -1
index b16517d162cf..90bfaea6d629 100644
@@ -18164,7 +18164,8 @@ static void tg3_shutdown(struct pci_dev *pdev)
 	if (netif_running(dev))
 		dev_close(dev);
 
-	tg3_power_down(tp);
+	if (system_state == SYSTEM_POWER_OFF)
+		tg3_power_down(tp);
 
 	rtnl_unlock();
 
drivers/net/ethernet/intel/i40e/i40e_main.c +7 -3
index 351d4c53297f..3ccc248b1a8a 100644
@@ -15553,11 +15553,15 @@ static void i40e_remove(struct pci_dev *pdev)
 			i40e_switch_branch_release(pf->veb[i]);
 	}
 
-	/* Now we can shutdown the PF's VSI, just before we kill
+	/* Now we can shutdown the PF's VSIs, just before we kill
 	 * adminq and hmc.
 	 */
-	if (pf->vsi[pf->lan_vsi])
-		i40e_vsi_release(pf->vsi[pf->lan_vsi]);
+	for (i = pf->num_alloc_vsi; i--;)
+		if (pf->vsi[i]) {
+			i40e_vsi_close(pf->vsi[i]);
+			i40e_vsi_release(pf->vsi[i]);
+			pf->vsi[i] = NULL;
+		}
 
 	i40e_cloud_filter_exit(pf);
 
drivers/net/ethernet/realtek/r8169_main.c +12 -3
index fca2dbdd37af..28e2cd9c386a 100644
@@ -4288,9 +4288,13 @@ static void rtl_set_rx_mode(struct net_device *dev)
 		/* Unconditionally log net taps. */
 		netif_notice(tp, link, dev, "Promiscuous mode enabled\n");
 		rx_mode |= AcceptAllPhys;
+	} else if (!(dev->flags & IFF_MULTICAST)) {
+		rx_mode &= ~AcceptMulticast;
 	} else if (netdev_mc_count(dev) > MC_FILTER_LIMIT ||
 		   dev->flags & IFF_ALLMULTI ||
-		   tp->mac_version == RTL_GIGA_MAC_VER_35) {
+		   tp->mac_version == RTL_GIGA_MAC_VER_35 ||
+		   tp->mac_version == RTL_GIGA_MAC_VER_46 ||
+		   tp->mac_version == RTL_GIGA_MAC_VER_48) {
 		/* accept all multicasts */
 	} else if (netdev_mc_empty(dev)) {
 		rx_mode &= ~AcceptMulticast;
@@ -6293,12 +6297,17 @@ static void rtl8169_rx_missed(struct net_device *dev)
 static void r8169_phylink_handler(struct net_device *ndev)
 {
 	struct rtl8169_private *tp = netdev_priv(ndev);
+	struct device *d = tp_to_dev(tp);
 
 	if (netif_carrier_ok(ndev)) {
 		rtl_link_chg_patch(tp);
-		pm_request_resume(&tp->pci_dev->dev);
+		pm_request_resume(d);
+		netif_wake_queue(tp->dev);
 	} else {
-		pm_runtime_idle(&tp->pci_dev->dev);
+		/* In few cases rx is broken after link-down otherwise */
+		if (rtl_is_8125(tp))
+			rtl_reset_work(tp);
+		pm_runtime_idle(d);
 	}
 
 	if (net_ratelimit())
drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h +1 -1
index ff751ab3d765..5efb9cf99b52 100644
@@ -212,7 +212,7 @@
 	((val) << XGMAC_PPS_MINIDX(x))
 #define XGMAC_PPSCMD_START		0x2
 #define XGMAC_PPSCMD_STOP		0x5
-#define XGMAC_PPSEN0			BIT(4)
+#define XGMAC_PPSENx(x)			BIT(4 + (x) * 8)
 #define XGMAC_PPSx_TARGET_TIME_SEC(x)	(0x00000d80 + (x) * 0x10)
 #define XGMAC_PPSx_TARGET_TIME_NSEC(x)	(0x00000d84 + (x) * 0x10)
 #define XGMAC_TRGTBUSY0			BIT(31)
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c +13 -1
index 070bd7d1ae4c..06fe2f185e0b 100644
@@ -1101,7 +1101,19 @@ static int dwxgmac2_flex_pps_config(void __iomem *ioaddr, int index,
 
 	val |= XGMAC_PPSCMDx(index, XGMAC_PPSCMD_START);
 	val |= XGMAC_TRGTMODSELx(index, XGMAC_PPSCMD_START);
-	val |= XGMAC_PPSEN0;
+
+	/* XGMAC Core has 4 PPS outputs at most.
+	 *
+	 * Prior XGMAC Core 3.20, Fixed mode or Flexible mode are selectable for
+	 * PPS0 only via PPSEN0. PPS{1,2,3} are in Flexible mode by default,
+	 * and can not be switched to Fixed mode, since PPSEN{1,2,3} are
+	 * read-only reserved to 0.
+	 * But we always set PPSEN{1,2,3} do not make things worse ;-)
+	 *
+	 * From XGMAC Core 3.20 and later, PPSEN{0,1,2,3} are writable and must
+	 * be set, or the PPS outputs stay in Fixed PPS mode by default.
+	 */
+	val |= XGMAC_PPSENx(index);
 
 	writel(cfg->start.tv_sec, ioaddr + XGMAC_PPSx_TARGET_TIME_SEC(index));
 
drivers/net/ipvlan/ipvlan_core.c +4 -4
index ab09d110760e..b5a61b16a7ea 100644
@@ -442,12 +442,12 @@ static int ipvlan_process_v4_outbound(struct sk_buff *skb)
 
 	err = ip_local_out(net, skb->sk, skb);
 	if (unlikely(net_xmit_eval(err)))
-		dev->stats.tx_errors++;
+		DEV_STATS_INC(dev, tx_errors);
 	else
 		ret = NET_XMIT_SUCCESS;
 	goto out;
 err:
-	dev->stats.tx_errors++;
+	DEV_STATS_INC(dev, tx_errors);
 	kfree_skb(skb);
 out:
 	return ret;
@@ -483,12 +483,12 @@ static int ipvlan_process_v6_outbound(struct sk_buff *skb)
 
 	err = ip6_local_out(net, skb->sk, skb);
 	if (unlikely(net_xmit_eval(err)))
-		dev->stats.tx_errors++;
+		DEV_STATS_INC(dev, tx_errors);
 	else
 		ret = NET_XMIT_SUCCESS;
 	goto out;
 err:
-	dev->stats.tx_errors++;
+	DEV_STATS_INC(dev, tx_errors);
 	kfree_skb(skb);
 out:
 	return ret;
drivers/net/ipvlan/ipvlan_main.c +1 -0
index 5fea2e4a9310..4edec38437d0 100644
@@ -320,6 +320,7 @@ static void ipvlan_get_stats64(struct net_device *dev,
 		s->rx_dropped = rx_errs;
 		s->tx_dropped = tx_drps;
 	}
+	s->tx_errors = DEV_STATS_READ(dev, tx_errors);
 }
 
 static int ipvlan_vlan_rx_add_vid(struct net_device *dev, __be16 proto, u16 vid)
drivers/net/macsec.c +3 -3
index c16688327753..d5f2d895dba2 100644
@@ -2995,9 +2995,9 @@ static void macsec_get_stats64(struct net_device *dev,
 		s->tx_bytes   += tmp.tx_bytes;
 	}
 
-	s->rx_dropped = atomic_long_read(&dev->stats.__rx_dropped);
-	s->tx_dropped = atomic_long_read(&dev->stats.__tx_dropped);
-	s->rx_errors = atomic_long_read(&dev->stats.__rx_errors);
+	s->rx_dropped = DEV_STATS_READ(dev, rx_dropped);
+	s->tx_dropped = DEV_STATS_READ(dev, tx_dropped);
+	s->rx_errors = DEV_STATS_READ(dev, rx_errors);
 }
 
 static int macsec_get_iflink(const struct net_device *dev)
drivers/net/wireless/mediatek/mt76/mt7603/core.c +2 -0
index e5af4f3389cc..47e36937a6ec 100644
@@ -39,11 +39,13 @@ irqreturn_t mt7603_irq_handler(int irq, void *dev_instance)
 	}
 
 	if (intr & MT_INT_RX_DONE(0)) {
+		dev->rx_pse_check = 0;
 		mt7603_irq_disable(dev, MT_INT_RX_DONE(0));
 		napi_schedule(&dev->mt76.napi[0]);
 	}
 
 	if (intr & MT_INT_RX_DONE(1)) {
+		dev->rx_pse_check = 0;
 		mt7603_irq_disable(dev, MT_INT_RX_DONE(1));
 		napi_schedule(&dev->mt76.napi[1]);
 	}
drivers/net/wireless/mediatek/mt76/mt7603/mac.c +16 -7
index ff3f3d98b625..5cfea0d8c776 100644
@@ -1416,20 +1416,29 @@ static bool mt7603_rx_pse_busy(struct mt7603_dev *dev)
 {
 	u32 addr, val;
 
-	if (mt76_rr(dev, MT_MCU_DEBUG_RESET) & MT_MCU_DEBUG_RESET_QUEUES)
-		return true;
-
 	if (mt7603_rx_fifo_busy(dev))
-		return false;
+		goto out;
 
 	addr = mt7603_reg_map(dev, MT_CLIENT_BASE_PHYS_ADDR + MT_CLIENT_STATUS);
 	mt76_wr(dev, addr, 3);
 	val = mt76_rr(dev, addr) >> 16;
 
-	if (is_mt7628(dev) && (val & 0x4001) == 0x4001)
-		return true;
+	if (!(val & BIT(0)))
+		return false;
+
+	if (is_mt7628(dev))
+		val &= 0xa000;
+	else
+		val &= 0x8000;
+	if (!val)
+		return false;
+
+out:
+	if (mt76_rr(dev, MT_INT_SOURCE_CSR) &
+	    (MT_INT_RX_DONE(0) | MT_INT_RX_DONE(1)))
+		return false;
 
-	return (val & 0x8001) == 0x8001 || (val & 0xe001) == 0xe001;
+	return true;
 }
 
 static bool
drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c +1 -1
index 333e355c9281..1ade4bea1d3f 100644
@@ -805,7 +805,7 @@ static void rtl88e_dm_check_edca_turbo(struct ieee80211_hw *hw)
 	}
 
 	if (rtlpriv->btcoexist.bt_edca_dl != 0) {
-		edca_be_ul = rtlpriv->btcoexist.bt_edca_dl;
+		edca_be_dl = rtlpriv->btcoexist.bt_edca_dl;
 		bt_change_edca = true;
 	}
 
drivers/net/wireless/realtek/rtlwifi/rtl8192c/dm_common.c +1 -1
index f2908ee5f860..17680aa8c0bc 100644
@@ -640,7 +640,7 @@ static void rtl92c_dm_check_edca_turbo(struct ieee80211_hw *hw)
 	}
 
 	if (rtlpriv->btcoexist.bt_edca_dl != 0) {
-		edca_be_ul = rtlpriv->btcoexist.bt_edca_dl;
+		edca_be_dl = rtlpriv->btcoexist.bt_edca_dl;
 		bt_change_edca = true;
 	}
 
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/dm.c +1 -1
index d8260c7afe09..9afe6aace942 100644
@@ -578,7 +578,7 @@ static void rtl8723e_dm_check_edca_turbo(struct ieee80211_hw *hw)
 	}
 
 	if (rtlpriv->btcoexist.bt_edca_dl != 0) {
-		edca_be_ul = rtlpriv->btcoexist.bt_edca_dl;
+		edca_be_dl = rtlpriv->btcoexist.bt_edca_dl;
 		bt_change_edca = true;
 	}
 
drivers/net/wireless/realtek/rtw88/debug.c +2 -2
index 5a906101498d..12d81ad8b702 100644
@@ -658,9 +658,9 @@ static struct rtw_debugfs_priv rtw_debug_priv_rsvd_page = {
 #define rtw_debugfs_add_core(name, mode, fopname, parent)		\
 	do {								\
 		rtw_debug_priv_ ##name.rtwdev = rtwdev;			\
-		if (!debugfs_create_file(#name, mode,			\
+		if (IS_ERR(debugfs_create_file(#name, mode,		\
 					 parent, &rtw_debug_priv_ ##name,\
-					 &file_ops_ ##fopname))		\
+					 &file_ops_ ##fopname)))	\
 			pr_debug("Unable to initialize debugfs:%s\n",	\
 			       #name);					\
 	} while (0)
drivers/nvdimm/of_pmem.c +7 -1
index 97187d6c0bdb..d84776b1497f 100644
@@ -42,7 +42,13 @@ static int of_pmem_region_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	priv->bus_desc.attr_groups = bus_attr_groups;
-	priv->bus_desc.provider_name = kstrdup(pdev->name, GFP_KERNEL);
+	priv->bus_desc.provider_name = devm_kstrdup(&pdev->dev, pdev->name,
+							GFP_KERNEL);
+	if (!priv->bus_desc.provider_name) {
+		kfree(priv);
+		return -ENOMEM;
+	}
+
 	priv->bus_desc.module = THIS_MODULE;
 	priv->bus_desc.of_node = np;
 
drivers/nvdimm/region_devs.c +4 -4
index b8236a9e8750..bfa310ab52e7 100644
@@ -898,7 +898,8 @@ unsigned int nd_region_acquire_lane(struct nd_region *nd_region)
 {
 	unsigned int cpu, lane;
 
-	cpu = get_cpu();
+	migrate_disable();
+	cpu = smp_processor_id();
 	if (nd_region->num_lanes < nr_cpu_ids) {
 		struct nd_percpu_lane *ndl_lock, *ndl_count;
 
@@ -917,16 +918,15 @@ EXPORT_SYMBOL(nd_region_acquire_lane);
 void nd_region_release_lane(struct nd_region *nd_region, unsigned int lane)
 {
 	if (nd_region->num_lanes < nr_cpu_ids) {
-		unsigned int cpu = get_cpu();
+		unsigned int cpu = smp_processor_id();
 		struct nd_percpu_lane *ndl_lock, *ndl_count;
 
 		ndl_count = per_cpu_ptr(nd_region->lane, cpu);
 		ndl_lock = per_cpu_ptr(nd_region->lane, lane);
 		if (--ndl_count->count == 0)
 			spin_unlock(&ndl_lock->lock);
-		put_cpu();
 	}
-	put_cpu();
+	migrate_enable();
 }
 EXPORT_SYMBOL(nd_region_release_lane);
 
drivers/pcmcia/cs.c +1 -0
index f70197154a36..820cce7c8b40 100644
@@ -605,6 +605,7 @@ static int pccardd(void *__skt)
 		dev_warn(&skt->dev, "PCMCIA: unable to register socket\n");
 		skt->thread = NULL;
 		complete(&skt->thread_done);
+		put_device(&skt->dev);
 		return 0;
 	}
 	ret = pccard_sysfs_add_socket(&skt->dev);
drivers/pcmcia/ds.c +9 -5
index 09d06b082f8b..103862f7bdf1 100644
@@ -518,9 +518,6 @@ static struct pcmcia_device *pcmcia_device_add(struct pcmcia_socket *s,
 	/* by default don't allow DMA */
 	p_dev->dma_mask = DMA_MASK_NONE;
 	p_dev->dev.dma_mask = &p_dev->dma_mask;
-	dev_set_name(&p_dev->dev, "%d.%d", p_dev->socket->sock, p_dev->device_no);
-	if (!dev_name(&p_dev->dev))
-		goto err_free;
 	p_dev->devname = kasprintf(GFP_KERNEL, "pcmcia%s", dev_name(&p_dev->dev));
 	if (!p_dev->devname)
 		goto err_free;
@@ -578,8 +575,15 @@ static struct pcmcia_device *pcmcia_device_add(struct pcmcia_socket *s,
 
 	pcmcia_device_query(p_dev);
 
-	if (device_register(&p_dev->dev))
-		goto err_unreg;
+	dev_set_name(&p_dev->dev, "%d.%d", p_dev->socket->sock, p_dev->device_no);
+	if (device_register(&p_dev->dev)) {
+		mutex_lock(&s->ops_mutex);
+		list_del(&p_dev->socket_device_list);
+		s->device_count--;
+		mutex_unlock(&s->ops_mutex);
+		put_device(&p_dev->dev);
+		return NULL;
+	}
 
 	return p_dev;
 
drivers/platform/x86/wmi.c +21 -29

113 lines not on this page · raw message

drivers/pwm/pwm-brcmstb.c +2 -2
index fea612c45f20..fd8479cd6771 100644
@@ -298,7 +298,7 @@ static int brcmstb_pwm_suspend(struct device *dev)
 {
 	struct brcmstb_pwm *p = dev_get_drvdata(dev);
 
-	clk_disable(p->clk);
+	clk_disable_unprepare(p->clk);
 
 	return 0;
 }
@@ -307,7 +307,7 @@ static int brcmstb_pwm_resume(struct device *dev)
 {
 	struct brcmstb_pwm *p = dev_get_drvdata(dev);
 
-	clk_enable(p->clk);
+	clk_prepare_enable(p->clk);
 
 	return 0;
 }
drivers/pwm/pwm-sti.c +35 -40

116 lines not on this page · raw message

drivers/reset/reset-ti-sci.c +1 -1
index bf68729ab729..b799aefad547 100644
@@ -1,7 +1,7 @@
 /*
  * Texas Instrument's System Control Interface (TI-SCI) reset driver
  *
- * Copyright (C) 2015-2017 Texas Instruments Incorporated - http://www.ti.com/
+ * Copyright (C) 2015-2017 Texas Instruments Incorporated - https://www.ti.com/
  *	Andrew F. Davis <[email protected]>
  *
  * This program is free software; you can redistribute it and/or modify
drivers/rtc/rtc-pcf85363.c +1 -1
index 3450d615974d..bb962dce3ab2 100644
@@ -407,7 +407,7 @@ static int pcf85363_probe(struct i2c_client *client,
 	if (client->irq > 0) {
 		regmap_write(pcf85363->regmap, CTRL_FLAGS, 0);
 		regmap_update_bits(pcf85363->regmap, CTRL_PIN_IO,
-				   PIN_IO_INTA_OUT, PIN_IO_INTAPM);
+				   PIN_IO_INTAPM, PIN_IO_INTA_OUT);
 		ret = devm_request_threaded_irq(&client->dev, client->irq,
 						NULL, pcf85363_rtc_handle_irq,
 						IRQF_TRIGGER_LOW | IRQF_ONESHOT,
drivers/scsi/ufs/ufshcd.c +1 -1
index 9d13226d2324..363adf489079 100644
@@ -3265,7 +3265,7 @@ int ufshcd_read_string_desc(struct ufs_hba *hba, u8 desc_index,
 		 */
 		ret = utf16s_to_utf8s(uc_str->uc,
 				      uc_str->len - QUERY_DESC_HDR_SIZE,
-				      UTF16_BIG_ENDIAN, str, ascii_len);
+				      UTF16_BIG_ENDIAN, str, ascii_len - 1);
 
 		/* replace non-printable or non-ASCII characters with spaces */
 		for (i = 0; i < ret; i++)
drivers/soc/qcom/Kconfig +3 -11
index 31c44ea139ef..ddcbeb8d05b6 100644
@@ -59,17 +59,9 @@ config QCOM_LLCC
 	select REGMAP_MMIO
 	help
 	  Qualcomm Technologies, Inc. platform specific
-	  Last Level Cache Controller(LLCC) driver. This provides interfaces
-	  to clients that use the LLCC. Say yes here to enable LLCC slice
-	  driver.
-
-config QCOM_SDM845_LLCC
-	tristate "Qualcomm Technologies, Inc. SDM845 LLCC driver"
-	depends on QCOM_LLCC
-	help
-	  Say yes here to enable the LLCC driver for SDM845. This provides
-	  data required to configure LLCC so that clients can start using the
-	  LLCC slices.
+	  Last Level Cache Controller(LLCC) driver for platforms such as,
+	  SDM845. This provides interfaces to clients that use the LLCC.
+	  Say yes here to enable LLCC slice driver.
 
 config QCOM_MDT_LOADER
 	tristate
drivers/soc/qcom/Makefile +1 -2
index 162788701a77..2559fe948ce0 100644
@@ -21,7 +21,6 @@ obj-$(CONFIG_QCOM_SMSM)	+= smsm.o
 obj-$(CONFIG_QCOM_SOCINFO)	+= socinfo.o
 obj-$(CONFIG_QCOM_WCNSS_CTRL) += wcnss_ctrl.o
 obj-$(CONFIG_QCOM_APR) += apr.o
-obj-$(CONFIG_QCOM_LLCC) += llcc-slice.o
-obj-$(CONFIG_QCOM_SDM845_LLCC) += llcc-sdm845.o
+obj-$(CONFIG_QCOM_LLCC) += llcc-qcom.o
 obj-$(CONFIG_QCOM_RPMHPD) += rpmhpd.o
 obj-$(CONFIG_QCOM_RPMPD) += rpmpd.o
drivers/soc/qcom/llcc-qcom.c new file +462 -0

462 lines not on this page · raw message

drivers/soc/qcom/llcc-sdm845.c deleted +0 -100

100 lines not on this page · raw message

drivers/soc/qcom/llcc-slice.c deleted +0 -413

413 lines not on this page · raw message

drivers/spi/Kconfig +1 -0
index 5bf754208777..8570f7386a09 100644
@@ -865,6 +865,7 @@ config SPI_XTENSA_XTFPGA
 config SPI_ZYNQ_QSPI
 	tristate "Xilinx Zynq QSPI controller"
 	depends on ARCH_ZYNQ || COMPILE_TEST
+	depends on SPI_MEM
 	help
 	  This enables support for the Zynq Quad SPI controller
 	  in master mode.
drivers/thermal/thermal_core.c +4 -2
index f4490b812017..450a1eb90af5 100644
@@ -740,7 +740,8 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz,
 	if (result)
 		goto release_ida;
 
-	sprintf(dev->attr_name, "cdev%d_trip_point", dev->id);
+	snprintf(dev->attr_name, sizeof(dev->attr_name), "cdev%d_trip_point",
+		 dev->id);
 	sysfs_attr_init(&dev->attr.attr);
 	dev->attr.attr.name = dev->attr_name;
 	dev->attr.attr.mode = 0444;
@@ -749,7 +750,8 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz,
 	if (result)
 		goto remove_symbol_link;
 
-	sprintf(dev->weight_attr_name, "cdev%d_weight", dev->id);
+	snprintf(dev->weight_attr_name, sizeof(dev->weight_attr_name),
+		 "cdev%d_weight", dev->id);
 	sysfs_attr_init(&dev->weight_attr.attr);
 	dev->weight_attr.attr.name = dev->weight_attr_name;
 	dev->weight_attr.attr.mode = S_IWUSR | S_IRUGO;
drivers/tty/tty_jobctrl.c +11 -6
index 813be2c05262..c4bf741533ab 100644
@@ -290,12 +290,7 @@ void disassociate_ctty(int on_exit)
 		return;
 	}
 
-	spin_lock_irq(&current->sighand->siglock);
-	put_pid(current->signal->tty_old_pgrp);
-	current->signal->tty_old_pgrp = NULL;
-	tty = tty_kref_get(current->signal->tty);
-	spin_unlock_irq(&current->sighand->siglock);
-
+	tty = get_current_tty();
 	if (tty) {
 		unsigned long flags;
 
@@ -310,6 +305,16 @@ void disassociate_ctty(int on_exit)
 		tty_kref_put(tty);
 	}
 
+	/* If tty->ctrl.pgrp is not NULL, it may be assigned to
+	 * current->signal->tty_old_pgrp in a race condition, and
+	 * cause pid memleak. Release current->signal->tty_old_pgrp
+	 * after tty->ctrl.pgrp set to NULL.
+	 */
+	spin_lock_irq(&current->sighand->siglock);
+	put_pid(current->signal->tty_old_pgrp);
+	current->signal->tty_old_pgrp = NULL;
+	spin_unlock_irq(&current->sighand->siglock);
+
 	/* Now clear signal->tty under the lock */
 	read_lock(&tasklist_lock);
 	session_clear_tty(task_session(current));
drivers/usb/dwc2/hcd.c +1 -1
index a412ef67af18..7b8dee3087f3 100644
@@ -4684,8 +4684,8 @@ static int _dwc2_hcd_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
 	if (qh_allocated && qh->channel && qh->channel->qh == qh)
 		qh->channel->qh = NULL;
 fail2:
-	spin_unlock_irqrestore(&hsotg->lock, flags);
 	urb->hcpriv = NULL;
+	spin_unlock_irqrestore(&hsotg->lock, flags);
 	kfree(qtd);
 fail1:
 	if (qh_allocated) {
drivers/usb/usbip/stub_dev.c +7 -2
index 3c6d452e3bf4..4104eea03e80 100644
@@ -462,8 +462,13 @@ static void stub_disconnect(struct usb_device *udev)
 	/* release port */
 	rc = usb_hub_release_port(udev->parent, udev->portnum,
 				  (struct usb_dev_state *) udev);
-	if (rc) {
-		dev_dbg(&udev->dev, "unable to release port\n");
+	/*
+	 * NOTE: If a HUB disconnect triggered disconnect of the down stream
+	 * device usb_hub_release_port will return -ENODEV so we can safely ignore
+	 * that error here.
+	 */
+	if (rc && (rc != -ENODEV)) {
+		dev_dbg(&udev->dev, "unable to release port (%i)\n", rc);
 		return;
 	}
 
drivers/video/fbdev/fsl-diu-fb.c +1 -1
index d19f58263b4e..d4c2a6b3839e 100644
@@ -490,7 +490,7 @@ static enum fsl_diu_monitor_port fsl_diu_name_to_port(const char *s)
  * Workaround for failed writing desc register of planes.
  * Needed with MPC5121 DIU rev 2.0 silicon.
  */
-void wr_reg_wa(u32 *reg, u32 val)
+static void wr_reg_wa(u32 *reg, u32 val)
 {
 	do {
 		out_be32(reg, val);
drivers/video/fbdev/imsttfb.c +19 -14
index 9670e5b5fe32..3155424cca6b 100644
@@ -1489,8 +1489,8 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	if (!request_mem_region(addr, size, "imsttfb")) {
 		printk(KERN_ERR "imsttfb: Can't reserve memory region\n");
-		framebuffer_release(info);
-		return -ENODEV;
+		ret = -ENODEV;
+		goto release_info;
 	}
 
 	switch (pdev->device) {
@@ -1507,34 +1507,39 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 			printk(KERN_INFO "imsttfb: Device 0x%x unknown, "
 					 "contact maintainer.\n", pdev->device);
 			ret = -ENODEV;
-			goto error;
+			goto release_mem_region;
 	}
 
 	info->fix.smem_start = addr;
 	info->screen_base = (__u8 *)ioremap(addr, par->ramdac == IBM ?
 					    0x400000 : 0x800000);
 	if (!info->screen_base)
-		goto error;
+		goto release_mem_region;
 	info->fix.mmio_start = addr + 0x800000;
 	par->dc_regs = ioremap(addr + 0x800000, 0x1000);
 	if (!par->dc_regs)
-		goto error;
+		goto unmap_screen_base;
 	par->cmap_regs_phys = addr + 0x840000;
 	par->cmap_regs = (__u8 *)ioremap(addr + 0x840000, 0x1000);
 	if (!par->cmap_regs)
-		goto error;
+		goto unmap_dc_regs;
 	info->pseudo_palette = par->palette;
 	ret = init_imstt(info);
-	if (!ret)
-		pci_set_drvdata(pdev, info);
-	return ret;
+	if (ret)
+		goto unmap_cmap_regs;
+
+	pci_set_drvdata(pdev, info);
+	return 0;
 
-error:
-	if (par->dc_regs)
-		iounmap(par->dc_regs);
-	if (info->screen_base)
-		iounmap(info->screen_base);
+unmap_cmap_regs:
+	iounmap(par->cmap_regs);
+unmap_dc_regs:
[… more lines in the raw message]

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

fs/btrfs/ioctl.c +5 -5
index 775245b148bb..1575992d1f14 100644

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

fs/ext4/extents.c +5 -5
index 478c35d45378..98e1b1ddb4ec 100644

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

fs/f2fs/file.c +1 -0
index 8d4e66f36cf7..2330600dbe02 100644

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

include/linux/idr.h +4 -2
index ac6e946b6767..bbfd934cab22 100644

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

include/linux/netdevice.h +1 -0
index a3ade51bd9e2..a6bb64dccb88 100644

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

include/linux/preempt.h +30 -0
index bbb68dba37cc..bc3f1aecaa19 100644

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

include/linux/soc/qcom/llcc-qcom.h +21 -36

57 lines not on this page · raw message

include/linux/soc/ti/ti_sci_inta_msi.h +1 -1
index 11fb5048f5f6..e3aa8b14612e 100644

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

include/linux/soc/ti/ti_sci_protocol.h +1 -1
index 9531ec823298..0fc452dd96d4 100644

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

include/net/flow.h +1 -1
index d058e63fb59a..21e781c74ac5 100644

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

include/net/netfilter/nf_nat_redirect.h +1 -2
index 2418653a66db..279380de904c 100644

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

include/net/tcp.h +9 -3
index 4fcae463ba19..af67e19eba39 100644

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

kernel/irq/matrix.c +3 -3
index 8e586858bcf4..d25edbb87119 100644

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

mm/readahead.c +2 -1
index 2fe72cd29b47..95fbc02cae6a 100644

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

net/dccp/ipv4.c +3 -3
index 249beb41ff89..944cc34f707d 100644

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

net/dccp/ipv6.c +3 -3
index a7e393902253..c3a378ef95aa 100644

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

net/ipv4/syncookies.c +8 -14
index 3f6c9514c7a9..3cc22f776a31 100644

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

net/ipv4/tcp_input.c +5 -4
index c3f227c4c356..fe5ef114beba 100644

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

net/ipv4/tcp_metrics.c +7 -8
index e89e19a6852c..627e3be0f754 100644

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

net/ipv4/tcp_output.c +1 -1
index 16e0249b11f6..010743686017 100644

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

net/ipv6/ip6_output.c +7 -1
index 816275b2135f..d3455585e6a8 100644

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

net/ipv6/syncookies.c +4 -3
index 7e5550546594..8c3beffbaf06 100644

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

net/llc/llc_input.c +8 -2
index f9e801cc50f5..f4fb309185ce 100644

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

net/llc/llc_s_ac.c +3 -0
index 9fa3342c7a82..df26557a0244 100644

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

net/llc/llc_station.c +3 -0
index c29170e767a8..64e2c67e16ba 100644

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

net/netfilter/nf_nat_redirect.c +58 -40

98 lines not on this page · raw message

net/netfilter/nft_redir.c +31 -53

84 lines not on this page · raw message

net/netfilter/xt_REDIRECT.c +8 -2
index 353ca7801251..ff66b56a3f97 100644

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

net/netfilter/xt_recent.c +1 -1
index 3469b6073610..6fc0deb11aff 100644

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

net/smc/af_smc.c +2 -2
index b398d72a7bc3..e070b0e2a30c 100644

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

net/smc/smc.h +5 -0
index 878313f8d6c1..8c46eaf014a7 100644

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

net/smc/smc_cdc.c +1 -1
index d0b0f4c865b4..68e1155126cf 100644

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

net/smc/smc_close.c +1 -1
index 543948d970c5..a704234c1a2b 100644

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

net/tipc/netlink.c +2 -2
index e9bbf4a00881..5c58aff4d4fa 100644

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

scripts/mod/file2alias.c +5 -5
index 8c0d1c191d55..7b845483717b 100644

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

sound/soc/intel/skylake/skl-sst-utils.c +1 -0
index d43cbf4a71ef..d4db64d72b2c 100644

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

sound/soc/ti/ams-delta.c +3 -1
index 8e2fb81ad05c..84cbd7446b1e 100644

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

tools/iio/iio_generic_buffer.c +39 -20

59 lines not on this page · 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.