Skip to contentSkip to conversation

Linux 4.9.337

DISCUSSION Greg Kroah-Hartman 1 participant 3 messages Jan 7, 2023 Stable branch

lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw

I'm announcing the release of the 4.9.337 kernel.

All users of the 4.9 kernel series must upgrade.

The updated 4.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.9.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/alpha/kernel/entry.S                                   |    4 
 arch/arm/boot/dts/armada-370.dtsi                           |    2 
 arch/arm/boot/dts/armada-375.dtsi                           |    2 
 arch/arm/boot/dts/armada-380.dtsi                           |    4 
 arch/arm/boot/dts/armada-385.dtsi                           |    6 
 arch/arm/boot/dts/armada-39x.dtsi                           |    6 
 arch/arm/boot/dts/armada-xp-mv78230.dtsi                    |    8 -
 arch/arm/boot/dts/armada-xp-mv78260.dtsi                    |   16 +-
 arch/arm/boot/dts/dove.dtsi                                 |    2 
 arch/arm/boot/dts/spear600.dtsi                             |    2 
 arch/arm/mach-mmp/time.c                                    |   11 +
 arch/arm/nwfpe/Makefile                                     |    6 
 arch/mips/bcm63xx/clk.c                                     |    2 
 arch/mips/kernel/vpe-cmp.c                                  |    4 
 arch/mips/kernel/vpe-mt.c                                   |    4 
 arch/powerpc/kernel/rtas.c                                  |    7 -
 arch/powerpc/perf/callchain.c                               |    1 
 arch/powerpc/perf/hv-gpci-requests.h                        |    4 
 arch/powerpc/perf/hv-gpci.c                                 |   33 ++++
 arch/powerpc/perf/hv-gpci.h                                 |    1 
 arch/powerpc/perf/req-gen/perf.h                            |   20 ++
 arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c               |    1 
 arch/powerpc/platforms/83xx/mpc832x_rdb.c                   |    2 
 arch/x86/kernel/uprobes.c                                   |    4 
 arch/x86/xen/spinlock.c                                     |    6 
 block/blk-mq-sysfs.c                                        |   11 +
 block/partition-generic.c                                   |    6 
 drivers/acpi/acpica/dsmethod.c                              |   10 +
 drivers/acpi/acpica/utcopy.c                                |    7 -
 drivers/bluetooth/btusb.c                                   |    6 
 drivers/bluetooth/hci_bcsp.c                                |    2 
 drivers/bluetooth/hci_h5.c                                  |    2 
 drivers/bluetooth/hci_qca.c                                 |    2 
 drivers/char/hw_random/amd-rng.c                            |   18 +-
 drivers/char/hw_random/geode-rng.c                          |   36 ++++-
 drivers/char/ipmi/ipmi_msghandler.c                         |    8 -
 drivers/clk/rockchip/clk-pll.c                              |    1 
 drivers/clk/st/clkgen-fsyn.c                                |    5 
 drivers/cpuidle/dt_idle_states.c                            |    2 
 drivers/crypto/img-hash.c                                   |    8 -
 drivers/crypto/n2_core.c                                    |    6 
 drivers/dio/dio.c                                           |    8 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c                    |    1 
 drivers/gpu/drm/drm_connector.c                             |    3 
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c                   |    5 
 drivers/gpu/drm/radeon/radeon_bios.c                        |    1 
 drivers/gpu/drm/sti/sti_dvo.c                               |    7 -
 drivers/gpu/drm/sti/sti_hda.c                               |    7 -
 drivers/gpu/drm/sti/sti_hdmi.c                              |    7 -
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c                         |    3 
 drivers/hid/hid-ids.h                                       |    3 
 drivers/hid/hid-plantronics.c                               |    9 +
 drivers/hid/hid-sensor-custom.c                             |    2 
 drivers/hid/wacom_sys.c                                     |    8 +
 drivers/hid/wacom_wac.c                                     |    4 
 drivers/hid/wacom_wac.h                                     |    1 
 drivers/hsi/controllers/omap_ssi_core.c                     |   14 +-
 drivers/i2c/busses/i2c-ismt.c                               |    3 
 drivers/i2c/busses/i2c-pxa-pci.c                            |   10 -
 drivers/iio/adc/ad_sigma_delta.c                            |    8 -
 drivers/infiniband/ulp/ipoib/ipoib_netlink.c                |    7 +
 drivers/input/touchscreen/elants_i2c.c                      |    9 -
 drivers/iommu/amd_iommu_init.c                              |    7 +
 drivers/iommu/fsl_pamu.c                                    |    2 
 drivers/irqchip/irq-gic-pm.c                                |    2 
 drivers/isdn/hardware/mISDN/hfcmulti.c                      |   19 +-
 drivers/isdn/hardware/mISDN/hfcpci.c                        |   13 +
 drivers/isdn/hardware/mISDN/hfcsusb.c                       |   12 +
 drivers/macintosh/macio-adb.c                               |    4 
 drivers/macintosh/macio_asic.c                              |    2 
 drivers/mcb/mcb-core.c                                      |    4 
 drivers/mcb/mcb-parse.c                                     |    2 
 drivers/md/dm-cache-metadata.c                              |   55 ++++++-
 drivers/md/dm-cache-target.c                                |   11 -
 drivers/md/dm-thin-metadata.c                               |    9 +
 drivers/md/dm-thin.c                                        |    2 
 drivers/md/md.c                                             |    9 -
 drivers/md/raid1.c                                          |    1 
 drivers/media/dvb-core/dvbdev.c                             |    1 
 drivers/media/dvb-frontends/bcm3510.c                       |    1 
 drivers/media/dvb-frontends/stv0288.c                       |    5 
 drivers/media/i2c/ad5820.c                                  |   10 -
 drivers/media/pci/saa7164/saa7164-core.c                    |    4 
 drivers/media/pci/solo6x10/solo6x10-core.c                  |    1 
 drivers/media/platform/coda/coda-bit.c                      |   14 +-
 drivers/media/platform/exynos4-is/fimc-core.c               |    2 
 drivers/media/platform/exynos4-is/media-dev.c               |    6 
 drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c       |    1 
 drivers/media/platform/vivid/vivid-vid-cap.c                |    1 
 drivers/media/radio/si470x/radio-si470x-usb.c               |    4 
 drivers/media/rc/imon.c                                     |    6 
 drivers/media/usb/dvb-usb/az6027.c                          |    4 
 drivers/media/usb/dvb-usb/dvb-usb-init.c                    |    4 
 drivers/misc/cxl/guest.c                                    |   24 ++-
 drivers/misc/cxl/pci.c                                      |   20 +-
 drivers/misc/sgi-gru/grufault.c                             |   13 +
 drivers/misc/sgi-gru/grumain.c                              |   22 ++-
 drivers/misc/sgi-gru/grutables.h                            |    2 
 drivers/misc/tifm_7xx1.c                                    |    2 
 drivers/mmc/host/mmci.c                                     |    4 
 drivers/mmc/host/moxart-mmc.c                               |    4 
 drivers/mmc/host/mxcmmc.c                                   |    4 
 drivers/mmc/host/rtsx_usb_sdmmc.c                           |   11 +
 drivers/mmc/host/sdhci_f_sdh30.c                            |    3 
 drivers/mmc/host/toshsd.c                                   |    6 
 drivers/mmc/host/via-sdmmc.c                                |    4 
 drivers/mmc/host/vub300.c                                   |   13 +
 drivers/mmc/host/wbsd.c                                     |   12 +
 drivers/mtd/lpddr/lpddr2_nvm.c                              |    2 
 drivers/mtd/maps/pxa2xx-flash.c                             |    2 
 drivers/mtd/mtdcore.c                                       |    4 
 drivers/net/bonding/bond_main.c                             |    2 
 drivers/net/ethernet/amd/atarilance.c                       |    2 
 drivers/net/ethernet/amd/lance.c                            |    2 
 drivers/net/ethernet/apple/bmac.c                           |    2 
 drivers/net/ethernet/apple/mace.c                           |    2 
 drivers/net/ethernet/dnet.c                                 |    4 
 drivers/net/ethernet/intel/igb/igb_main.c                   |    8 -
 drivers/net/ethernet/myricom/myri10ge/myri10ge.c            |    1 
 drivers/net/ethernet/neterion/s2io.c                        |    2 
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c    |    2 
 drivers/net/ethernet/rdc/r6040.c                            |    5 
 drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c       |    3 
 drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h            |    2 
 drivers/net/ethernet/ti/netcp_core.c                        |    2 
 drivers/net/ethernet/xilinx/xilinx_emaclite.c               |    2 
 drivers/net/fddi/defxx.c                                    |   22 ++-
 drivers/net/hamradio/baycom_epp.c                           |    2 
 drivers/net/hamradio/scc.c                                  |    6 
 drivers/net/loopback.c                                      |    2 
 drivers/net/ntb_netdev.c                                    |    4 
 drivers/net/ppp/ppp_generic.c                               |    2 
 drivers/net/wan/farsync.c                                   |    2 
 drivers/net/wireless/ath/ar5523/ar5523.c                    |    6 
 drivers/net/wireless/ath/ath10k/pci.c                       |   20 +-
 drivers/net/wireless/ath/ath9k/hif_usb.c                    |   46 ++++--
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c |    5 
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c     |    2 
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c     |    1 
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h            |    2 
 drivers/nfc/pn533/pn533.c                                   |    4 
 drivers/parisc/led.c                                        |    3 
 drivers/pci/pci-sysfs.c                                     |   13 +
 drivers/pinctrl/pinconf-generic.c                           |    4 
 drivers/pnp/core.c                                          |    4 
 drivers/power/avs/smartreflex.c                             |    1 
 drivers/power/supply/power_supply_core.c                    |    2 
 drivers/rapidio/devices/rio_mport_cdev.c                    |   15 +-
 drivers/rapidio/rio-scan.c                                  |    8 -
 drivers/rapidio/rio.c                                       |    9 +
 drivers/regulator/core.c                                    |    2 
 drivers/rtc/rtc-snvs.c                                      |   16 ++
 drivers/rtc/rtc-st-lpc.c                                    |    1 
 drivers/s390/net/ctcm_main.c                                |   11 -
 drivers/s390/net/lcs.c                                      |    8 -
 drivers/s390/net/netiucv.c                                  |    9 -
 drivers/scsi/fcoe/fcoe.c                                    |    1 
 drivers/scsi/fcoe/fcoe_sysfs.c                              |   19 +-
 drivers/scsi/hpsa.c                                         |    7 -
 drivers/scsi/ipr.c                                          |   10 +
 drivers/scsi/snic/snic_disc.c                               |    3 
 drivers/soc/ti/knav_qmss_queue.c                            |    2 
 drivers/soc/ux500/ux500-soc-id.c                            |   10 -
 drivers/staging/rtl8192e/rtllib_rx.c                        |    2 
 drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c           |    4 
 drivers/tty/serial/amba-pl011.c                             |    3 
 drivers/tty/serial/pch_uart.c                               |    4 
 drivers/tty/serial/sunsab.c                                 |    8 +
 drivers/uio/uio_dmem_genirq.c                               |   13 +
 drivers/usb/gadget/function/f_uvc.c                         |    5 
 drivers/usb/gadget/udc/fotg210-udc.c                        |   12 -
 drivers/usb/serial/cp210x.c                                 |    2 
 drivers/usb/storage/alauda.c                                |    2 
 drivers/vfio/platform/vfio_platform_common.c                |    3 
 drivers/video/fbdev/Kconfig                                 |    1 
 drivers/video/fbdev/pm2fb.c                                 |    9 +
 drivers/video/fbdev/uvesafb.c                               |    1 
 drivers/video/fbdev/vermilion/vermilion.c                   |    4 
 drivers/video/fbdev/via/via-core.c                          |    9 +
 drivers/vme/bridges/vme_fake.c                              |    2 
 drivers/vme/bridges/vme_tsi148.c                            |    1 
 fs/binfmt_misc.c                                            |    8 -
 fs/char_dev.c                                               |    2 
 fs/cifs/connect.c                                           |    4 
 fs/ext4/ext4.h                                              |    2 
 fs/ext4/indirect.c                                          |    9 +
 fs/ext4/inode.c                                             |   10 +
 fs/ext4/ioctl.c                                             |   10 -
 fs/ext4/namei.c                                             |    3 
 fs/ext4/xattr.c                                             |    8 -
 fs/hfs/inode.c                                              |    2 
 fs/hfs/trans.c                                              |    2 
 fs/hfsplus/hfsplus_fs.h                                     |    2 
 fs/hfsplus/inode.c                                          |    4 
 fs/hfsplus/options.c                                        |    4 
 fs/jfs/jfs_dmap.c                                           |   27 +++
 fs/libfs.c                                                  |   22 ++-
 fs/nfs/nfs4proc.c                                           |   19 +-
 fs/nfs/nfs4xdr.c                                            |   10 -
 fs/nfsd/nfs4callback.c                                      |    4 
 fs/nilfs2/the_nilfs.c                                       |   31 +++-
 fs/ocfs2/stackglue.c                                        |    8 +
 fs/orangefs/orangefs-debugfs.c                              |    3 
 fs/orangefs/orangefs-mod.c                                  |    8 -
 fs/pnode.c                                                  |    2 
 fs/pstore/ram_core.c                                        |    6 
 fs/reiserfs/namei.c                                         |    4 
 fs/reiserfs/xattr_security.c                                |    2 
 fs/sysv/itree.c                                             |    2 
 fs/udf/balloc.c                                             |    5 
 fs/udf/inode.c                                              |   84 +++++-------
 fs/udf/namei.c                                              |    8 -
 fs/udf/truncate.c                                           |   48 ++----
 fs/udf/udfdecl.h                                            |    3 
 fs/xattr.c                                                  |    2 
 include/asm-generic/tlb.h                                   |    6 
 include/linux/can/platform/sja1000.h                        |    2 
 include/linux/eventfd.h                                     |    2 
 include/linux/fs.h                                          |   12 +
 include/linux/timerqueue.h                                  |    2 
 include/net/mrp.h                                           |    1 
 include/uapi/linux/swab.h                                   |    2 
 include/uapi/sound/asequencer.h                             |    8 -
 kernel/acct.c                                               |    2 
 kernel/events/core.c                                        |    8 -
 kernel/gcov/gcc_4_7.c                                       |    5 
 kernel/power/snapshot.c                                     |    4 
 kernel/trace/blktrace.c                                     |    3 
 kernel/trace/trace.c                                        |   15 ++
 lib/notifier-error-inject.c                                 |    2 
 mm/khugepaged.c                                             |   24 +++
 mm/memory.c                                                 |    5 
 net/802/mrp.c                                               |   18 +-
 net/bluetooth/hci_core.c                                    |    2 
 net/bluetooth/l2cap_core.c                                  |    3 
 net/core/skbuff.c                                           |    3 
 net/core/stream.c                                           |    6 
 net/ipv4/udp_tunnel.c                                       |    1 
 net/openvswitch/datapath.c                                  |   25 ++-
 net/sched/ematch.c                                          |    2 
 net/sunrpc/clnt.c                                           |    2 
 net/vmw_vsock/vmci_transport.c                              |    6 
 security/device_cgroup.c                                    |   33 ++++
 security/integrity/ima/ima_template.c                       |    4 
 sound/drivers/mts64.c                                       |    3 
 sound/pci/asihpi/hpioctl.c                                  |    2 
 sound/soc/codecs/pcm512x.c                                  |    8 -
 sound/soc/codecs/rt5670.c                                   |    2 
 sound/soc/codecs/wm8994.c                                   |    5 
 sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c            |    7 -
 sound/soc/pxa/mmp-pcm.c                                     |    2 
 sound/soc/rockchip/rockchip_spdif.c                         |    1 
 sound/soc/soc-ops.c                                         |    9 +
 sound/usb/line6/driver.c                                    |    3 
 sound/usb/line6/midi.c                                      |    6 
 sound/usb/line6/midibuf.c                                   |   25 ++-
 sound/usb/line6/midibuf.h                                   |    5 
 sound/usb/line6/pod.c                                       |    3 
 tools/testing/ktest/ktest.pl                                |    3 
 tools/testing/selftests/powerpc/dscr/dscr_sysfs_test.c      |    5 
 261 files changed, 1296 insertions(+), 559 deletions(-)

Aditya Garg (1):
hfsplus: fix bug causing custom uid and gid being unable to be assigned with mount

Akinobu Mita (2):
libfs: add DEFINE_SIMPLE_ATTRIBUTE_SIGNED for signed value lib/notifier-error-inject: fix error when writing -errno to debugfs file

Al Viro (1):
alpha: fix syscall entry in !AUDUT_SYSCALL case

Anastasia Belova (1):
MIPS: BCM63xx: Add check for NULL for clk in clk_enable

Andy Shevchenko (1):
fbdev: ssd1307fb: Drop optional dependency

Artem Chernyshev (1):
net: vmw_vsock: vmci: Check memcpy_from_msg()

Artem Egorkine (2):
ALSA: line6: correct midi status byte when receiving data from podxt
ALSA: line6: fix stack overflow in line6_midi_transmit

Baisong Zhong (2):
ALSA: seq: fix undefined behavior in bit shift for SNDRV_SEQ_FILTER_USE_EVENT
media: dvb-usb: az6027: fix null-ptr-deref in az6027_i2c_xfer()

Baokun Li (2):
ext4: add inode table check in __ext4_get_inode_loc to aovid possible infinite loop
ext4: fix bug_on in __es_tree_search caused by bad boot loader inode

Barnabás Pőcze (1):
timerqueue: Use rb_entry_safe() in timerqueue_getnext()

Bitterblue Smith (1):
wifi: rtl8xxxu: Add __packed to struct rtl8723bu_c2h

Bruno Thomsen (1):

      USB: serial: cp210x: add Kamstrup RF sniffer PIDs

Cai Xinchen (1):
rapidio: devices: fix missing put_device in mport_cdev_open

Charles Keepax (1):
ASoC: ops: Correct bounds check for second channel on SX controls

Chen Jiahao (1):
drivers: soc: ti: knav_qmss_queue: Mark knav_acc_firmwares as static

Chen Zhongjin (4):
perf: Fix possible memleak in pmu_dev_alloc()
fs: sysv: Fix sysv_nblocks() returns wrong value
scsi: fcoe: Fix transport not deattached when fcoe_if_init() fails
vme: Fix error not catched in fake_init()

Christian Brauner (1):
pnode: terminate at peers of source

Christophe JAILLET (3):
fbdev: uvesafb: Fixes an error handling path in uvesafb_probe() powerpc/52xx: Fix a resource leak in an error handling path
myri10ge: Fix an error handling path in myri10ge_probe()

Cong Wang (1):
net_sched: reject TCF_EM_SIMPLE case for complex ematch module

Corentin Labbe (1):
crypto: n2 - add missing hash statesize

Dan Aloni (1):
nfsd: under NFSv4.1, fix double svc_xprt_put on rpc_create failure

Dan Carpenter (2):
bonding: uninitialized variable in bond_miimon_inspect()
staging: rtl8192u: Fix use after free in ieee80211_rx()

Deren Wu (1):
mmc: vub300: fix warning - do not call blocking ops when !TASK_RUNNING

Dongliang Mu (1):
fs: jfs: fix shift-out-of-bounds in dbAllocAG

Doug Brown (1):
ARM: mmp: fix timer_read delay

Douglas Anderson (1):
Input: elants_i2c - properly handle the reset GPIO when power is off

Dragos Tatulea (1):
IB/IPoIB: Fix queue count inconsistency for PKEY child interfaces

Eelco Chaudron (1):
openvswitch: Fix flow lookup to use unmasked key

Eric Dumazet (1):
net: stream: purge sk_error_queue in sk_stream_kill_queues()

Eric Pilmore (1):
ntb_netdev: Use dev_kfree_skb_any() in interrupt context

Fedor Pchelkin (3):
wifi: ath9k: hif_usb: fix memory leak of urbs in ath9k_hif_usb_dealloc_tx_urbs()
wifi: ath9k: hif_usb: Fix use-after-free in ath9k_hif_usb_reg_in_cb()
wifi: ath9k: verify the expected usb_endpoints are present

Gaosheng Cui (6):
ALSA: mts64: fix possible null-ptr-defer in snd_mts64_interrupt
scsi: snic: Fix possible UAF in snic_tgt_create()
crypto: img-hash - Fix variable dereferenced before check 'hdev->req'
staging: vme_user: Fix possible UAF in tsi148_dma_list_add
rtc: st-lpc: Add missing clk_disable_unprepare in st_rtc_probe()
ext4: fix undefined behavior in bit shift for ext4_check_flag_values

Gautam Menghani (1):
media: imon: fix a race condition in send_packet()

Greg Kroah-Hartman (1):

      Linux 4.9.337

Hangbin Liu (1):
net/tunnel: wait until all sk_user_data reader finish before releasing the sock

Hans de Goede (1):
ASoC: rt5670: Remove unbalanced pm_runtime_put()

Heiko Schocher (1):
can: sja1000: fix size of OCR_MODE_MASK define

Hoi Pok Wu (1):
fs: jfs: fix shift-out-of-bounds in dbDiscardAG

Hui Tang (2):
mtd: lpddr2_nvm: Fix possible null-ptr-deref
i2c: pxa-pci: fix missing pci_disable_device() on error in ce4100_i2c_probe

Jan Kara (7):
udf: Discard preallocation before extending file with a hole
udf: Drop unused arguments of udf_delete_aext()
udf: Fix preallocation discarding at indirect extent boundary
udf: Do not bother looking for prealloc extents if i_lenExtents matches i_size
udf: Fix extending file within last block
ext4: avoid BUG_ON when creating xattrs
ext4: initialize quota before expanding inode in setproject ioctl

Jann Horn (2):
mm/khugepaged: fix GUP-fast interaction by sending IPI mm/khugepaged: invoke MMU notifiers in shmem/file collapse paths

Jason A. Donenfeld (2):
media: stv0288: use explicitly signed char
ARM: ux500: do not directly dereference __iomem

Jason Gerecke (1):
HID: wacom: Ensure bootloader PID is usable in hidraw mode

Jiamei Xie (1):
serial: amba-pl011: avoid SBSA UART accessing DMACR register

Jiang Li (1):
md/raid1: stop mdx_raid1 thread when raid1 array run failed

Jiasheng Jiang (3):
media: coda: Add check for dcoda_iram_alloc
media: coda: Add check for kmalloc
usb: storage: Add check for kcalloc

Kajol Jain (1):
powerpc/hv-gpci: Fix hv_gpci event list

Kees Cook (1):
igb: Do not free q_vector unless new one was allocated

Keita Suzuki (1):
media: dvb-core: Fix double free in dvb_register_device()

Kim Phillips (1):
iommu/amd: Fix ivrs_acpihid cmdline parsing code

Kory Maincent (1):
arm: dts: spear600: Fix clcd interrupt

Kunihiko Hayashi (1):
mmc: f-sdh30: Add quirks for broken timeout clock capability

Li Zetao (3):
ACPICA: Fix use-after-free in acpi_ut_copy_ipackage_to_ipackage()
net: farsync: Fix kmemleak when rmmods farsync
r6040: Fix kmemleak in probe and remove

Liang He (1):
media: c8sectpfe: Add of_node_put() when breaking out of loop

Linus Walleij (1):
usb: fotg210-udc: Fix ages old endianness issues

Liu Shixin (4):
media: vivid: fix compose size exceed boundary
ALSA: asihpi: fix missing pci_disable_device()
media: saa7164: fix missing pci_disable_device()
binfmt_misc: fix shift-out-of-bounds in check_special_flags

Luo Meng (2):
dm thin: Fix UAF in run_timer_softirq()
dm cache: Fix UAF in destroy()

Luís Henriques (1):
ext4: fix error code return to user-space in ext4_get_branch()

Marcus Folkesson (1):
HID: hid-sensor-custom: set fixed size for custom attributes

Marek Szyprowski (1):
ASoC: wm8994: Fix potential deadlock

Mark Brown (1):
ASoC: ops: Check bounds for second channel in snd_soc_put_volsw_sx()

Matt Redfearn (1):
include/uapi/linux/swab: Fix potentially missing __always_inline

Mazin Al Haddad (1):
media: dvb-usb: fix memory leak in dvb_usb_adapter_init()

Miaoqian Lin (1):
selftests/powerpc: Fix resource leaks

Mike Snitzer (2):
dm cache: Fix ABBA deadlock between shrink_slab and dm_cache_metadata_abort dm cache: set needs_check flag after aborting metadata

Mikulas Patocka (1):
md: fix a crash in mempool_free

Ming Lei (1):
block: unhash blkdev part inode when the part is deleted

Minsuk Kang (2):
nfc: pn533: Clear nfc_target before being used
wifi: brcmfmac: Fix potential shift-out-of-bounds in brcmf_fw_alloc_request()

Nathan Chancellor (7):
net: ethernet: ti: Fix return type of netcp_ndo_start_xmit()
hamradio: baycom_epp: Fix return type of baycom_send_packet() s390/ctcm: Fix return type of ctc{mp,}m_tx() s390/netiucv: Fix return type of netiucv_tx()
s390/lcs: Fix return type of lcs_start_xmit() drm/fsl-dcu: Fix return type of fsl_dcu_drm_connector_mode_valid() drm/sti: Fix return type of sti_{dvo,hda,hdmi}_connector_mode_valid()

Nathan Lynch (1):
powerpc/rtas: avoid scheduling in rtas_os_term()

Nicholas Piggin (1):
powerpc/perf: callchain validate kernel stack pointer bounds

Nick Desaulniers (1):
ARM: 9256/1: NWFPE: avoid compiler-generated __aeabi_uldivmod

Nuno Sá (1):
iio: adc: ad_sigma_delta: do not use internal iio_dev lock

Oleg Nesterov (1):

      uprobes/x86: Allow to probe a NOP instruction with 0x66 prefix

Ondrej Mosnacek (1):
fs: don't audit the capability check in simple_xattr_list()

Pali Rohár (6):
ARM: dts: dove: Fix assigned-addresses for every PCIe Root Port
ARM: dts: armada-370: Fix assigned-addresses for every PCIe Root Port
ARM: dts: armada-xp: Fix assigned-addresses for every PCIe Root Port
ARM: dts: armada-375: Fix assigned-addresses for every PCIe Root Port
ARM: dts: armada-38x: Fix assigned-addresses for every PCIe Root Port
ARM: dts: armada-39x: Fix assigned-addresses for every PCIe Root Port

Paulo Alcantara (1):
cifs: fix confusing debug message

Piergiorgio Beruto (1):
stmmac: fix potential division by 0

Rafael J. Wysocki (1):
ACPICA: Fix error code path in acpi_ds_call_control_method()

Rafael Mendonca (3):
vfio: platform: Do not pass return buffer to ACPI _RST method
uio: uio_dmem_genirq: Fix missing unlock in irq configuration
uio: uio_dmem_genirq: Fix deadlock between irq config and handling

Rasmus Villemoes (1):
net: loopback: use NET_NAME_PREDICTABLE for name_assign_type

Ricardo Ribalda (1):
media: i2c: ad5820: Fix error path

Rickard x Andersson (1):
gcov: add support for checksum field

Roberto Sassu (1):
reiserfs: Add missing calls to reiserfs_security_free()

Ryusuke Konishi (1):
nilfs2: fix shift-out-of-bounds/overflow in nilfs_sb2_bad_offset()

Sascha Hauer (1):
PCI/sysfs: Fix double free in error path

Schspa Shi (1):
mrp: introduce active flags to prevent UAF when applicant uninit

Shang XiaoJing (5):
ocfs2: fix memory leak in ocfs2_stack_glue_init()
irqchip: gic-pm: Use pm_runtime_resume_and_get() in gic_probe()
scsi: ipr: Fix WARNING in ipr_init()
fbdev: via: Fix error in via_core_init()
parisc: led: Fix potential null-ptr-deref in start_task()

Shigeru Yoshida (3):

      udf: Avoid double brelse() in udf_rename()
      wifi: ar5523: Fix use-after-free on ar5523_cmd() timed out
      media: si470x: Fix use-after-free in si470x_int_in_callback()

Simon Ser (1):
drm/connector: send hotplug uevent on connector cleanup

Stanislav Fomichev (1):
ppp: associate skb with a device at tx

Stefan Eichenberger (1):
rtc: snvs: Allow a time difference on clock register read

Stephen Boyd (1):
pstore: Avoid kcore oops by vmap()ing with VM_IOREMAP

Steven Rostedt (1):
ktest.pl minconfig: Unset configs instead of just removing them

Subash Abhinov Kasiviswanathan (1):
skbuff: Account for tail adjustment during pull operations

Sungwoo Kim (1):
Bluetooth: L2CAP: Fix u8 overflow

Szymon Heidrich (1):
usb: gadget: uvc: Prevent buffer overflow in setup handler

Terry Junge (1):
HID: plantronics: Additional PIDs for double volume key presses quirk

Trond Myklebust (2):
NFSv4.2: Fix a memory stomp in decode_attr_security_label
NFSv4: Fix a deadlock between nfs4_open_recover_helper() and delegreturn

Ulf Hansson (1):
cpuidle: dt: Return the correct numbers of parsed idle states

Ville Syrjälä (1):
drm/sti: Use drm_mode_copy()

Wang Jingjin (1):
ASoC: rockchip: spdif: Add missing clk_disable_unprepare() in rk_spdif_runtime_resume()

Wang ShaoBo (1):
SUNRPC: Fix missing release socket in rpc_sockname()

Wang Weiyang (2):
rapidio: fix possible UAF when kfifo_alloc() fails
device_cgroup: Roll back to original exceptions after copy failure

Wang Yufen (2):
wifi: brcmfmac: Fix error return code in brcmf_sdio_download_firmware()
ASoC: mediatek: mt8173-rt5650-rt5514: fix refcount leak in mt8173_rt5650_rt5514_dev_probe()

Xie Shaowen (1):
macintosh/macio-adb: check the return value of ioremap()

Xiongfeng Wang (6):
drm/radeon: Fix PCI device refcount leak in radeon_atrm_get_bios() drm/amdgpu: Fix PCI device refcount leak in amdgpu_atrm_get_bios()
hwrng: amd - Fix PCI device refcount leak
hwrng: geode - Fix PCI device refcount leak
serial: pch: Fix PCI device refcount leak in pch_request_dma()
fbdev: vermilion: decrease reference count in error path

Xiu Jianfeng (5):
x86/xen: Fix memory leak in xen_init_lock_cpu()
ima: Fix misuse of dereference of pointer in template_desc_init_fields()
wifi: ath10k: Fix return value in ath10k_pci_init()
clk: rockchip: Fix memory leak in rockchip_clk_register_pll()
clk: st: Fix memory leak in st_of_quadfs_setup()

Yan Lei (1):
media: dvb-frontends: fix leak of memory fw

Yang Jihong (2):
blktrace: Fix output non-blktrace event when blk_classic option enabled
tracing: Fix infinite loop in tracing_read_pipe on overflowed print_trace_line

Yang Yingliang (44):
MIPS: vpe-mt: fix possible memory leak while module exiting
MIPS: vpe-cmp: fix possible memory leak while module exiting
PNP: fix name memory leak in pnp_alloc_dev()
rapidio: fix possible name leaks when rio_add_device() fails
rapidio: rio: fix possible name leak in rio_register_mport()
regulator: core: fix unbalanced of node refcount in regulator_dev_lookup()
media: solo6x10: fix possible memory leak in solo_sysfs_init()
regulator: core: fix module refcount leak in set_supply()
mmc: moxart: fix return value check of mmc_add_host()
mmc: mxcmmc: fix return value check of mmc_add_host()
mmc: rtsx_usb_sdmmc: fix return value check of mmc_add_host()
mmc: toshsd: fix return value check of mmc_add_host()
mmc: vub300: fix return value check of mmc_add_host()
mmc: via-sdmmc: fix return value check of mmc_add_host()
mmc: wbsd: fix return value check of mmc_add_host()
mmc: mmci: fix return value check of mmc_add_host()
ethernet: s2io: don't call dev_kfree_skb() under spin_lock_irqsave()
net: apple: mace: don't call dev_kfree_skb() under spin_lock_irqsave()
net: apple: bmac: don't call dev_kfree_skb() under spin_lock_irqsave()
net: emaclite: don't call dev_kfree_skb() under spin_lock_irqsave()
net: ethernet: dnet: don't call dev_kfree_skb() under spin_lock_irqsave()
hamradio: don't call dev_kfree_skb() under spin_lock_irqsave()
net: amd: lance: don't call dev_kfree_skb() under spin_lock_irqsave()
Bluetooth: btusb: don't call kfree_skb() under spin_lock_irqsave()
Bluetooth: hci_qca: don't call kfree_skb() under spin_lock_irqsave()
Bluetooth: hci_h5: don't call kfree_skb() under spin_lock_irqsave()
Bluetooth: hci_bcsp: don't call kfree_skb() under spin_lock_irqsave()
Bluetooth: hci_core: don't call kfree_skb() under spin_lock_irqsave()
scsi: hpsa: Fix error handling in hpsa_add_sas_host()
scsi: hpsa: Fix possible memory leak in hpsa_add_sas_device()
scsi: fcoe: Fix possible name leak when device_register() fails
drivers: dio: fix possible memory leak in dio_init()
cxl: fix possible null-ptr-deref in cxl_guest_init_afu|adapter()
cxl: fix possible null-ptr-deref in cxl_pci_init_afu|adapter()
mcb: mcb-parse: fix error handing in chameleon_parse_gdd()
chardev: fix error handling in cdev_device_add()
fbdev: pm2fb: fix missing pci_disable_device()
HSI: omap_ssi_core: fix unbalanced pm_runtime_disable()
HSI: omap_ssi_core: fix possible memory leak in ssi_probe()
macintosh: fix possible memory leak in macio_add_one_device() powerpc/83xx/mpc832x_rdb: call platform_device_put() in error case in of_fsl_spi_probe()
mISDN: hfcsusb: don't call dev_kfree_skb/kfree_skb() under spin_lock_irqsave()
mISDN: hfcpci: don't call dev_kfree_skb/kfree_skb() under spin_lock_irqsave()
mISDN: hfcmulti: don't call dev_kfree_skb/kfree_skb() under spin_lock_irqsave()

Ye Bin (2):
blk-mq: fix possible memleak when register 'hctx' failed
ext4: init quota for 'old.inode' in 'ext4_rename'

Yongqiang Liu (1):
net: defxx: Fix missing err handling in dfx_init()

Yuan Can (5):
media: platform: exynos4-is: Fix error handling in fimc_md_init()
drivers: net: qlcnic: Fix potential memory leak in qlcnic_sriov_init()
serial: sunsab: Fix error handling in sunsab_init()
HSI: omap_ssi_core: Fix error handling in ssi_init() iommu/fsl_pamu: Fix resource leak in fsl_pamu_probe()

YueHaibing (1):
staging: rtl8192e: Fix potential use-after-free in rtllib_rx_Monitor()

Zack Rusin (1):
drm/vmwgfx: Validate the box size for the snooped cursor

Zeng Heng (2):
ASoC: pxa: fix null-pointer dereference in filter()
power: supply: fix residue sysfs file in error handle route of __power_supply_register()

Zhang Qilong (3):
soc: ti: smartreflex: Fix PM disable depth imbalance in omap_sr_probe
eventfd: change int to __u64 in eventfd_signal() ifndef CONFIG_EVENTFD
ASoC: pcm512x: Fix PM disable depth imbalance in pcm512x_probe

Zhang Xiaoxu (3):
mtd: Fix device name leak when register device failed in add_mtd_device()
orangefs: Fix sysfs not cleanup when dev init failed
orangefs: Fix kmemleak in orangefs_prepare_debugfs_help_string()

Zhang Yuchen (1):
ipmi: fix memleak when unload ipmi driver

ZhangPeng (3):
hfs: Fix OOB Write in hfs_asc2mac
pinctrl: pinconf-generic: add missing of_node_put()
hfs: fix OOB Read in __hfs_brec_find

Zheng Wang (1):
misc: sgi-gru: fix use-after-free error in gru_set_context_option, gru_fault and gru_handle_user_call_os

Zheng Yejian (1):
acct: fix potential integer overflow in encode_comp_t()

Zheng Yongjun (1):
mtd: maps: pxa2xx-flash: fix memory leak in probe

Zhengchao Shao (1):
drivers: mcb: fix resource leak in mcb_probe()

Zheyu Ma (1):
i2c: ismt: Fix an out-of-bounds bug in ismt_access()

Zhihao Cheng (1):

      dm thin: Use last transaction's pmd->root when commit failed

ruanjinjie (1):
misc: tifm: fix possible memory leak in tifm_7xx1_switch_media()

xiongxin (1):
PM: hibernate: Fix mistake in kerneldoc comment

author maintainer
#1 lore raw
Makefile +1 -1
index a2c74e89f20e..7d0153202217 100644
@@ -1,6 +1,6 @@
 VERSION = 4
 PATCHLEVEL = 9
-SUBLEVEL = 336
+SUBLEVEL = 337
 EXTRAVERSION =
 NAME = Roaring Lionus
 
arch/alpha/kernel/entry.S +3 -1
index 98703d99b565..d752ccc53b24 100644
@@ -468,8 +468,10 @@ entSys:
 #ifdef CONFIG_AUDITSYSCALL
 	lda     $6, _TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT
 	and     $3, $6, $3
-#endif
 	bne     $3, strace
+#else
+	blbs    $3, strace		/* check for SYSCALL_TRACE in disguise */
+#endif
 	beq	$4, 1f
 	ldq	$27, 0($5)
 1:	jsr	$26, ($27), alpha_ni_syscall
arch/arm/boot/dts/armada-370.dtsi +1 -1
index b4258105e91f..b00e328b54a1 100644
@@ -108,7 +108,7 @@
 
 			pcie@2,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82002800 0 0x80000 0 0x2000>;
+				assigned-addresses = <0x82001000 0 0x80000 0 0x2000>;
 				reg = <0x1000 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
arch/arm/boot/dts/armada-375.dtsi +1 -1
index 024f1b75b0a3..681c8458c8f2 100644
@@ -618,7 +618,7 @@
 
 			pcie@2,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
+				assigned-addresses = <0x82001000 0 0x44000 0 0x2000>;
 				reg = <0x1000 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
arch/arm/boot/dts/armada-380.dtsi +2 -2
index 5102d19cc8f4..43477ca6eaa3 100644
@@ -115,7 +115,7 @@
 			/* x1 port */
 			pcie@2,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
+				assigned-addresses = <0x82001000 0 0x40000 0 0x2000>;
 				reg = <0x1000 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
@@ -133,7 +133,7 @@
 			/* x1 port */
 			pcie@3,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
+				assigned-addresses = <0x82001800 0 0x44000 0 0x2000>;
 				reg = <0x1800 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
arch/arm/boot/dts/armada-385.dtsi +3 -3
index 8e67d2c083dd..0451bc14386c 100644
@@ -126,7 +126,7 @@
 			/* x1 port */
 			pcie@2,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
+				assigned-addresses = <0x82001000 0 0x40000 0 0x2000>;
 				reg = <0x1000 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
@@ -144,7 +144,7 @@
 			/* x1 port */
 			pcie@3,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
+				assigned-addresses = <0x82001800 0 0x44000 0 0x2000>;
 				reg = <0x1800 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
@@ -165,7 +165,7 @@
 			 */
 			pcie@4,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
+				assigned-addresses = <0x82002000 0 0x48000 0 0x2000>;
 				reg = <0x2000 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
arch/arm/boot/dts/armada-39x.dtsi +3 -3
index aeecfa7e5ea3..3ca83e37112b 100644
@@ -492,7 +492,7 @@
 			/* x1 port */
 			pcie@2,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
+				assigned-addresses = <0x82001000 0 0x40000 0 0x2000>;
 				reg = <0x1000 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
@@ -510,7 +510,7 @@
 			/* x1 port */
 			pcie@3,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
+				assigned-addresses = <0x82001800 0 0x44000 0 0x2000>;
 				reg = <0x1800 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
@@ -531,7 +531,7 @@
 			 */
 			pcie@4,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
+				assigned-addresses = <0x82002000 0 0x48000 0 0x2000>;
 				reg = <0x2000 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
arch/arm/boot/dts/armada-xp-mv78230.dtsi +4 -4
index 6e6d0f04bf2b..b6e787b994ad 100644
@@ -133,7 +133,7 @@
 
 			pcie@2,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
+				assigned-addresses = <0x82001000 0 0x44000 0 0x2000>;
 				reg = <0x1000 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
@@ -150,7 +150,7 @@
 
 			pcie@3,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
+				assigned-addresses = <0x82001800 0 0x48000 0 0x2000>;
 				reg = <0x1800 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
@@ -167,7 +167,7 @@
 
 			pcie@4,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x4c000 0 0x2000>;
+				assigned-addresses = <0x82002000 0 0x4c000 0 0x2000>;
 				reg = <0x2000 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
@@ -184,7 +184,7 @@
 
 			pcie@5,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x80000 0 0x2000>;
+				assigned-addresses = <0x82002800 0 0x80000 0 0x2000>;
 				reg = <0x2800 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
arch/arm/boot/dts/armada-xp-mv78260.dtsi +8 -8
index c5fdc99f0dbe..a4856b05440a 100644
@@ -148,7 +148,7 @@
 
 			pcie@2,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
+				assigned-addresses = <0x82001000 0 0x44000 0 0x2000>;
 				reg = <0x1000 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
@@ -165,7 +165,7 @@
 
 			pcie@3,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
+				assigned-addresses = <0x82001800 0 0x48000 0 0x2000>;
 				reg = <0x1800 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
@@ -182,7 +182,7 @@
 
 			pcie@4,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x4c000 0 0x2000>;
+				assigned-addresses = <0x82002000 0 0x4c000 0 0x2000>;
 				reg = <0x2000 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
@@ -199,7 +199,7 @@
 
 			pcie@5,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x80000 0 0x2000>;
+				assigned-addresses = <0x82002800 0 0x80000 0 0x2000>;
 				reg = <0x2800 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
@@ -216,7 +216,7 @@
 
 			pcie@6,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x84000 0 0x2000>;
+				assigned-addresses = <0x82003000 0 0x84000 0 0x2000>;
 				reg = <0x3000 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
@@ -233,7 +233,7 @@
 
 			pcie@7,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x88000 0 0x2000>;
+				assigned-addresses = <0x82003800 0 0x88000 0 0x2000>;
 				reg = <0x3800 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
@@ -250,7 +250,7 @@
 
 			pcie@8,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x8c000 0 0x2000>;
+				assigned-addresses = <0x82004000 0 0x8c000 0 0x2000>;
 				reg = <0x4000 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
@@ -267,7 +267,7 @@
 
 			pcie@9,0 {
 				device_type = "pci";
-				assigned-addresses = <0x82000800 0 0x42000 0 0x2000>;
+				assigned-addresses = <0x82004800 0 0x42000 0 0x2000>;
 				reg = <0x4800 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
arch/arm/boot/dts/dove.dtsi +1 -1
index 11342aeccb73..278c7321b1b9 100644
@@ -127,7 +127,7 @@
 			pcie1: pcie-port@1 {
 				device_type = "pci";
 				status = "disabled";
-				assigned-addresses = <0x82002800 0 0x80000 0 0x2000>;
+				assigned-addresses = <0x82001000 0 0x80000 0 0x2000>;
 				reg = <0x1000 0 0 0 0>;
 				clocks = <&gate_clk 5>;
 				marvell,pcie-port = <1>;
arch/arm/boot/dts/spear600.dtsi +1 -1
index bd379034993c..89318273d787 100644
@@ -53,7 +53,7 @@
 			compatible = "arm,pl110", "arm,primecell";
 			reg = <0xfc200000 0x1000>;
 			interrupt-parent = <&vic1>;
-			interrupts = <12>;
+			interrupts = <13>;
 			status = "disabled";
 		};
 
arch/arm/mach-mmp/time.c +7 -4
index 3c2c92aaa0ae..f06220a4b2e2 100644
@@ -52,18 +52,21 @@
 static void __iomem *mmp_timer_base = TIMERS_VIRT_BASE;
 
 /*
- * FIXME: the timer needs some delay to stablize the counter capture
+ * Read the timer through the CVWR register. Delay is required after requesting
+ * a read. The CR register cannot be directly read due to metastability issues
+ * documented in the PXA168 software manual.
  */
 static inline uint32_t timer_read(void)
 {
-	int delay = 100;
+	uint32_t val;
+	int delay = 3;
 
 	__raw_writel(1, mmp_timer_base + TMR_CVWR(1));
 
 	while (delay--)
-		cpu_relax();
+		val = __raw_readl(mmp_timer_base + TMR_CVWR(1));
 
-	return __raw_readl(mmp_timer_base + TMR_CVWR(1));
+	return val;
 }
 
 static u64 notrace mmp_read_sched_clock(void)
arch/arm/nwfpe/Makefile +6 -0
index deb3a82ddbdf..99136e74ddd5 100644
@@ -10,3 +10,9 @@ nwfpe-y				+= fpa11.o fpa11_cpdo.o fpa11_cpdt.o \
 				   entry.o
 
 nwfpe-$(CONFIG_FPE_NWFPE_XP)	+= extended_cpdo.o
+
+# Try really hard to avoid generating calls to __aeabi_uldivmod() from
+# float64_rem() due to loop elision.
+ifdef CONFIG_CC_IS_CLANG
+CFLAGS_softfloat.o	+= -mllvm -replexitval=never
+endif
arch/mips/bcm63xx/clk.c +2 -0
index 3be875a45c83..0b718a94656a 100644
@@ -316,6 +316,8 @@ static struct clk clk_periph = {
  */
 int clk_enable(struct clk *clk)
 {
+	if (!clk)
+		return 0;
 	mutex_lock(&clocks_mutex);
 	clk_enable_unlocked(clk);
 	mutex_unlock(&clocks_mutex);
arch/mips/kernel/vpe-cmp.c +2 -2
index 9268ebc0f61e..903c07bdc92d 100644
@@ -75,7 +75,6 @@ ATTRIBUTE_GROUPS(vpe);
 
 static void vpe_device_release(struct device *cd)
 {
-	kfree(cd);
 }
 
 static struct class vpe_class = {
@@ -157,6 +156,7 @@ int __init vpe_module_init(void)
 	device_del(&vpe_device);
 
 out_class:
+	put_device(&vpe_device);
 	class_unregister(&vpe_class);
 
 out_chrdev:
@@ -169,7 +169,7 @@ void __exit vpe_module_exit(void)
 {
 	struct vpe *v, *n;
 
-	device_del(&vpe_device);
+	device_unregister(&vpe_device);
 	class_unregister(&vpe_class);
 	unregister_chrdev(major, VPE_MODULE_NAME);
 
arch/mips/kernel/vpe-mt.c +2 -2
index 2e003b11a098..9fd7cd48ea1d 100644
@@ -313,7 +313,6 @@ ATTRIBUTE_GROUPS(vpe);
 
 static void vpe_device_release(struct device *cd)
 {
-	kfree(cd);
 }
 
 static struct class vpe_class = {
@@ -497,6 +496,7 @@ int __init vpe_module_init(void)
 	device_del(&vpe_device);
 
 out_class:
+	put_device(&vpe_device);
 	class_unregister(&vpe_class);
 
 out_chrdev:
@@ -509,7 +509,7 @@ void __exit vpe_module_exit(void)
 {
 	struct vpe *v, *n;
 
-	device_del(&vpe_device);
+	device_unregister(&vpe_device);
 	class_unregister(&vpe_class);
 	unregister_chrdev(major, VPE_MODULE_NAME);
 
arch/powerpc/kernel/rtas.c +6 -1
index 641f3e4c3380..9a77778bd24a 100644
@@ -733,10 +733,15 @@ void rtas_os_term(char *str)
 
 	snprintf(rtas_os_term_buf, 2048, "OS panic: %s", str);
 
+	/*
+	 * Keep calling as long as RTAS returns a "try again" status,
+	 * but don't use rtas_busy_delay(), which potentially
+	 * schedules.
+	 */
 	do {
 		status = rtas_call(rtas_token("ibm,os-term"), 1, 1, NULL,
 				   __pa(rtas_os_term_buf));
-	} while (rtas_busy_delay(status));
+	} while (rtas_busy_delay_time(status));
 
 	if (status != 0)
 		printk(KERN_EMERG "ibm,os-term call failed %d\n", status);
arch/powerpc/perf/callchain.c +1 -0
index 0fc26714780a..a4c4685096f8 100644
@@ -67,6 +67,7 @@ perf_callchain_kernel(struct perf_callchain_entry_ctx *entry, struct pt_regs *re
 		next_sp = fp[0];
 
 		if (next_sp == sp + STACK_INT_FRAME_SIZE &&
+		    validate_sp(sp, current, STACK_INT_FRAME_SIZE) &&
 		    fp[STACK_FRAME_MARKER] == STACK_FRAME_REGS_MARKER) {
 			/*
 			 * This looks like an interrupt frame for an
arch/powerpc/perf/hv-gpci-requests.h +4 -0
index 5ea24d16a74a..2530dd0c3788 100644
@@ -78,6 +78,7 @@ REQUEST(__field(0,	8,	partition_id)
 )
 #include I(REQUEST_END)
 
+#ifdef ENABLE_EVENTS_COUNTERINFO_V6
 /*
  * Not available for counter_info_version >= 0x8, use
  * run_instruction_cycles_by_partition(0x100) instead.
@@ -91,6 +92,7 @@ REQUEST(__field(0,	8,	partition_id)
 	__count(0x10,	8,	cycles)
 )
 #include I(REQUEST_END)
+#endif
 
 #define REQUEST_NAME system_performance_capabilities
 #define REQUEST_NUM 0x40
@@ -102,6 +104,7 @@ REQUEST(__field(0,	1,	perf_collect_privileged)
 )
 #include I(REQUEST_END)
 
+#ifdef ENABLE_EVENTS_COUNTERINFO_V6
 #define REQUEST_NAME processor_bus_utilization_abc_links
 #define REQUEST_NUM 0x50
 #define REQUEST_IDX_KIND "hw_chip_id=?"
@@ -193,6 +196,7 @@ REQUEST(__field(0,	4,	phys_processor_idx)
 	__count(0x28,	8,	instructions_completed)
 )
 #include I(REQUEST_END)
+#endif
 
 /* Processor_core_power_mode (0x95) skipped, no counters */
 /* Affinity_domain_information_by_virtual_processor (0xA0) skipped,
arch/powerpc/perf/hv-gpci.c +32 -1
index 160b86d9d819..126409bb5626 100644
@@ -74,7 +74,7 @@ static struct attribute_group format_group = {
 
 static struct attribute_group event_group = {
 	.name  = "events",
-	.attrs = hv_gpci_event_attrs,
+	/* .attrs is set in init */
 };
 
 #define HV_CAPS_ATTR(_name, _format)				\
@@ -292,6 +292,7 @@ static int hv_gpci_init(void)
 	int r;
 	unsigned long hret;
 	struct hv_perf_caps caps;
+	struct hv_gpci_request_buffer *arg;
 
 	hv_gpci_assert_offsets_correct();
 
@@ -310,6 +311,36 @@ static int hv_gpci_init(void)
 	/* sampling not supported */
 	h_gpci_pmu.capabilities |= PERF_PMU_CAP_NO_INTERRUPT;
 
+	arg = (void *)get_cpu_var(hv_gpci_reqb);
+	memset(arg, 0, HGPCI_REQ_BUFFER_SIZE);
+
+	/*
+	 * hcall H_GET_PERF_COUNTER_INFO populates the output
+	 * counter_info_version value based on the system hypervisor.
+	 * Pass the counter request 0x10 corresponds to request type
+	 * 'Dispatch_timebase_by_processor', to get the supported
+	 * counter_info_version.
+	 */
+	arg->params.counter_request = cpu_to_be32(0x10);
+
+	r = plpar_hcall_norets(H_GET_PERF_COUNTER_INFO,
+			virt_to_phys(arg), HGPCI_REQ_BUFFER_SIZE);
+	if (r) {
+		pr_devel("hcall failed, can't get supported counter_info_version: 0x%x\n", r);
+		arg->params.counter_info_version_out = 0x8;
+	}
+
+	/*
+	 * Use counter_info_version_out value to assign
+	 * required hv-gpci event list.
+	 */
+	if (arg->params.counter_info_version_out >= 0x8)
+		event_group.attrs = hv_gpci_event_attrs;
+	else
+		event_group.attrs = hv_gpci_event_attrs_v6;
+
+	put_cpu_var(hv_gpci_reqb);
+
 	r = perf_pmu_register(&h_gpci_pmu, h_gpci_pmu.name, -1);
 	if (r)
 		return r;
arch/powerpc/perf/hv-gpci.h +1 -0
index 86ede8275961..83300e73c398 100644
@@ -52,6 +52,7 @@ enum {
 #define REQUEST_FILE "../hv-gpci-requests.h"
 #define NAME_LOWER hv_gpci
 #define NAME_UPPER HV_GPCI
+#define ENABLE_EVENTS_COUNTERINFO_V6
 #include "req-gen/perf.h"
 #undef REQUEST_FILE
 #undef NAME_LOWER
arch/powerpc/perf/req-gen/perf.h +20 -0
index 1b122469323d..9628b57a8635 100644
@@ -137,6 +137,26 @@ PMU_EVENT_ATTR_STRING(							\
 #define REQUEST_(r_name, r_value, r_idx_1, r_fields)			\
 	r_fields
 
+/* Generate event list for platforms with counter_info_version 0x6 or below */
+static __maybe_unused struct attribute *hv_gpci_event_attrs_v6[] = {
+#include REQUEST_FILE
+	NULL
+};
+
+/*
+ * Based on getPerfCountInfo v1.018 documentation, some of the hv-gpci
+ * events were deprecated for platform firmware that supports
+ * counter_info_version 0x8 or above.
+ * Those deprecated events are still part of platform firmware that
+ * support counter_info_version 0x6 and below. As per the getPerfCountInfo
+ * v1.018 documentation there is no counter_info_version 0x7.
+ * Undefining macro ENABLE_EVENTS_COUNTERINFO_V6, to disable the addition of
+ * deprecated events in "hv_gpci_event_attrs" attribute group, for platforms
+ * that supports counter_info_version 0x8 or above.
+ */
+#undef ENABLE_EVENTS_COUNTERINFO_V6
+
+/* Generate event list for platforms with counter_info_version 0x8 or above*/
 static __maybe_unused struct attribute *hv_gpci_event_attrs[] = {
 #include REQUEST_FILE
 	NULL
arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c +1 -0
index 7bb42a0100de..caaaaf2bea52 100644
@@ -531,6 +531,7 @@ static int mpc52xx_lpbfifo_probe(struct platform_device *op)
  err_bcom_rx_irq:
 	bcom_gen_bd_rx_release(lpbfifo.bcom_rx_task);
  err_bcom_rx:
+	free_irq(lpbfifo.irq, &lpbfifo);
  err_irq:
 	iounmap(lpbfifo.regs);
 	lpbfifo.regs = NULL;
arch/powerpc/platforms/83xx/mpc832x_rdb.c +1 -1
index d7c9b186954d..3e5e51de9a0d 100644
@@ -111,7 +111,7 @@ static int __init of_fsl_spi_probe(char *type, char *compatible, u32 sysclk,
 
 		goto next;
 unreg:
-		platform_device_del(pdev);
+		platform_device_put(pdev);
 err:
 		pr_err("%s: registration failed\n", np->full_name);
 next:
arch/x86/kernel/uprobes.c +3 -1
index 52bb7413f352..953ed5b5a218 100644
@@ -718,8 +718,9 @@ static int branch_setup_xol_ops(struct arch_uprobe *auprobe, struct insn *insn)
 	switch (opc1) {
 	case 0xeb:	/* jmp 8 */
 	case 0xe9:	/* jmp 32 */
-	case 0x90:	/* prefix* + nop; same as jmp with .offs = 0 */
 		break;
+	case 0x90:	/* prefix* + nop; same as jmp with .offs = 0 */
+		goto setup;
 
 	case 0xe8:	/* call relative */
 		branch_clear_offset(auprobe, insn);
@@ -748,6 +749,7 @@ static int branch_setup_xol_ops(struct arch_uprobe *auprobe, struct insn *insn)
 			return -ENOTSUPP;
 	}
 
+setup:
 	auprobe->branch.opc1 = opc1;
 	auprobe->branch.ilen = insn->length;
 	auprobe->branch.offs = insn->immediate.value;
arch/x86/xen/spinlock.c +3 -3
index 44bf8a22c97b..4e540958ea36 100644
@@ -80,6 +80,7 @@ void xen_init_lock_cpu(int cpu)
 	     cpu, per_cpu(lock_kicker_irq, cpu));
 
 	name = kasprintf(GFP_KERNEL, "spinlock%d", cpu);
+	per_cpu(irq_name, cpu) = name;
 	irq = bind_ipi_to_irqhandler(XEN_SPIN_UNLOCK_VECTOR,
 				     cpu,
 				     dummy_handler,
@@ -90,7 +91,6 @@ void xen_init_lock_cpu(int cpu)
 	if (irq >= 0) {
 		disable_irq(irq); /* make sure it's never delivered */
 		per_cpu(lock_kicker_irq, cpu) = irq;
-		per_cpu(irq_name, cpu) = name;
 	}
 
 	printk("cpu %d spinlock event irq %d\n", cpu, irq);
@@ -103,6 +103,8 @@ void xen_uninit_lock_cpu(int cpu)
 	if (!xen_pvspin)
 		return;
 
+	kfree(per_cpu(irq_name, cpu));
+	per_cpu(irq_name, cpu) = NULL;
 	/*
 	 * When booting the kernel with 'mitigations=auto,nosmt', the secondary
 	 * CPUs are not activated, and lock_kicker_irq is not initialized.
@@ -113,8 +115,6 @@ void xen_uninit_lock_cpu(int cpu)
 
 	unbind_from_irqhandler(irq, NULL);
 	per_cpu(lock_kicker_irq, cpu) = -1;
-	kfree(per_cpu(irq_name, cpu));
-	per_cpu(irq_name, cpu) = NULL;
 }
 
 
block/blk-mq-sysfs.c +9 -2
index 5b64d9d7d147..fc9362e0a118 100644
@@ -380,7 +380,7 @@ static int blk_mq_register_hctx(struct blk_mq_hw_ctx *hctx)
 {
 	struct request_queue *q = hctx->queue;
 	struct blk_mq_ctx *ctx;
-	int i, ret;
+	int i, j, ret;
 
 	if (!hctx->nr_ctx)
 		return 0;
@@ -392,9 +392,16 @@ static int blk_mq_register_hctx(struct blk_mq_hw_ctx *hctx)
 	hctx_for_each_ctx(hctx, ctx, i) {
 		ret = kobject_add(&ctx->kobj, &hctx->kobj, "cpu%u", ctx->cpu);
 		if (ret)
-			break;
+			goto out;
 	}
 
+	return 0;
+out:
+	hctx_for_each_ctx(hctx, ctx, j) {
+		if (j < i)
+			kobject_del(&ctx->kobj);
+	}
+	kobject_del(&hctx->kobj);
 	return ret;
 }
 
block/partition-generic.c +6 -0
index 298c05f8b5e3..434c122cb958 100644
@@ -254,6 +254,7 @@ void delete_partition(struct gendisk *disk, int partno)
 {
 	struct disk_part_tbl *ptbl = disk->part_tbl;
 	struct hd_struct *part;
+	struct block_device *bdev;
 
 	if (partno >= ptbl->len)
 		return;
@@ -267,6 +268,11 @@ void delete_partition(struct gendisk *disk, int partno)
 	kobject_put(part->holder_dir);
 	device_del(part_to_dev(part));
 
+	bdev = bdget(part_devt(part));
+	if (bdev) {
+		remove_inode_hash(bdev->bd_inode);
+		bdput(bdev);
+	}
 	hd_struct_kill(part);
 }
 
drivers/acpi/acpica/dsmethod.c +8 -2
index 2b3210f42a46..b77d6b86e3f9 100644
@@ -547,7 +547,7 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
 	info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info));
 	if (!info) {
 		status = AE_NO_MEMORY;
-		goto cleanup;
+		goto pop_walk_state;
 	}
 
 	info->parameters = &this_walk_state->operands[0];
@@ -559,7 +559,7 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
 
 	ACPI_FREE(info);
 	if (ACPI_FAILURE(status)) {
-		goto cleanup;
+		goto pop_walk_state;
 	}
 
 	/*
@@ -591,6 +591,12 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
 
 	return_ACPI_STATUS(status);
 
+pop_walk_state:
+
+	/* On error, pop the walk state to be deleted from thread */
+
+	acpi_ds_pop_walk_state(thread);
+
 cleanup:
 
 	/* On error, we must terminate the method properly */
drivers/acpi/acpica/utcopy.c +0 -7
index 82f971402d85..646e296e4c13 100644
@@ -950,13 +950,6 @@ acpi_ut_copy_ipackage_to_ipackage(union acpi_operand_object *source_obj,
 	status = acpi_ut_walk_package_tree(source_obj, dest_obj,
 					   acpi_ut_copy_ielement_to_ielement,
 					   walk_state);
-	if (ACPI_FAILURE(status)) {
-
-		/* On failure, delete the destination package object */
-
-		acpi_ut_remove_reference(dest_obj);
-	}
-
 	return_ACPI_STATUS(status);
 }
 
drivers/bluetooth/btusb.c +3 -3
index 2069080191ee..532e492f92e0 100644
@@ -440,13 +440,13 @@ static inline void btusb_free_frags(struct btusb_data *data)
 
 	spin_lock_irqsave(&data->rxlock, flags);
 
-	kfree_skb(data->evt_skb);
+	dev_kfree_skb_irq(data->evt_skb);
 	data->evt_skb = NULL;
 
-	kfree_skb(data->acl_skb);
+	dev_kfree_skb_irq(data->acl_skb);
 	data->acl_skb = NULL;
 
-	kfree_skb(data->sco_skb);
+	dev_kfree_skb_irq(data->sco_skb);
 	data->sco_skb = NULL;
 
 	spin_unlock_irqrestore(&data->rxlock, flags);
drivers/bluetooth/hci_bcsp.c +1 -1
index 26f9982bab26..2056d5c01afa 100644
@@ -392,7 +392,7 @@ static void bcsp_pkt_cull(struct bcsp_struct *bcsp)
 		i++;
 
 		__skb_unlink(skb, &bcsp->unack);
-		kfree_skb(skb);
+		dev_kfree_skb_irq(skb);
 	}
 
 	if (skb_queue_empty(&bcsp->unack))
drivers/bluetooth/hci_h5.c +1 -1
index 0879d64b1caf..a947e3c0af18 100644
@@ -266,7 +266,7 @@ static void h5_pkt_cull(struct h5 *h5)
 			break;
 
 		__skb_unlink(skb, &h5->unack);
-		kfree_skb(skb);
+		dev_kfree_skb_irq(skb);
 	}
 
 	if (skb_queue_empty(&h5->unack))
drivers/bluetooth/hci_qca.c +1 -1
index 0986c324459f..af407cd8425f 100644
@@ -718,7 +718,7 @@ static int qca_enqueue(struct hci_uart *hu, struct sk_buff *skb)
 	default:
 		BT_ERR("Illegal tx state: %d (losing packet)",
 		       qca->tx_ibs_state);
-		kfree_skb(skb);
+		dev_kfree_skb_irq(skb);
 		break;
 	}
 
drivers/char/hw_random/amd-rng.c +13 -5
index 9959c762da2f..db3dd467194c 100644
@@ -143,15 +143,19 @@ static int __init mod_init(void)
 found:
 	err = pci_read_config_dword(pdev, 0x58, &pmbase);
 	if (err)
-		return err;
+		goto put_dev;
 
 	pmbase &= 0x0000FF00;
-	if (pmbase == 0)
-		return -EIO;
+	if (pmbase == 0) {
+		err = -EIO;
+		goto put_dev;
+	}
 
 	priv = kzalloc(sizeof(*priv), GFP_KERNEL);
-	if (!priv)
-		return -ENOMEM;
+	if (!priv) {
+		err = -ENOMEM;
+		goto put_dev;
+	}
 
 	if (!request_region(pmbase + PMBASE_OFFSET, PMBASE_SIZE, DRV_NAME)) {
 		dev_err(&pdev->dev, DRV_NAME " region 0x%x already in use!\n",
@@ -185,6 +189,8 @@ static int __init mod_init(void)
 	release_region(pmbase + PMBASE_OFFSET, PMBASE_SIZE);
 out:
 	kfree(priv);
+put_dev:
+	pci_dev_put(pdev);
 	return err;
 }
 
@@ -200,6 +206,8 @@ static void __exit mod_exit(void)
 
 	release_region(priv->pmbase + PMBASE_OFFSET, PMBASE_SIZE);
 
+	pci_dev_put(priv->pcidev);
+
 	kfree(priv);
 }
 
drivers/char/hw_random/geode-rng.c +28 -8
index e1d421a36a13..207272979f23 100644
@@ -51,6 +51,10 @@ static const struct pci_device_id pci_tbl[] = {
 };
 MODULE_DEVICE_TABLE(pci, pci_tbl);
 
+struct amd_geode_priv {
+	struct pci_dev *pcidev;
+	void __iomem *membase;
+};
 
 static int geode_rng_data_read(struct hwrng *rng, u32 *data)
 {
@@ -90,6 +94,7 @@ static int __init mod_init(void)
 	const struct pci_device_id *ent;
 	void __iomem *mem;
 	unsigned long rng_base;
+	struct amd_geode_priv *priv;
 
 	for_each_pci_dev(pdev) {
 		ent = pci_match_id(pci_tbl, pdev);
@@ -97,17 +102,26 @@ static int __init mod_init(void)
 			goto found;
 	}
 	/* Device not found. */
-	goto out;
+	return err;
 
 found:
+	priv = kzalloc(sizeof(*priv), GFP_KERNEL);
+	if (!priv) {
+		err = -ENOMEM;
+		goto put_dev;
+	}
+
 	rng_base = pci_resource_start(pdev, 0);
 	if (rng_base == 0)
-		goto out;
+		goto free_priv;
 	err = -ENOMEM;
 	mem = ioremap(rng_base, 0x58);
 	if (!mem)
-		goto out;
-	geode_rng.priv = (unsigned long)mem;
+		goto free_priv;
+
+	geode_rng.priv = (unsigned long)priv;
+	priv->membase = mem;
+	priv->pcidev = pdev;
 
 	pr_info("AMD Geode RNG detected\n");
 	err = hwrng_register(&geode_rng);
@@ -116,20 +130,26 @@ static int __init mod_init(void)
 		       err);
 		goto err_unmap;
 	}
-out:
 	return err;
 
 err_unmap:
 	iounmap(mem);
-	goto out;
+free_priv:
+	kfree(priv);
+put_dev:
+	pci_dev_put(pdev);
+	return err;
 }
 
 static void __exit mod_exit(void)
 {
-	void __iomem *mem = (void __iomem *)geode_rng.priv;
+	struct amd_geode_priv *priv;
 
+	priv = (struct amd_geode_priv *)geode_rng.priv;
 	hwrng_unregister(&geode_rng);
-	iounmap(mem);
+	iounmap(priv->membase);
+	pci_dev_put(priv->pcidev);
+	kfree(priv);
 }
 
 module_init(mod_init);
drivers/char/ipmi/ipmi_msghandler.c +6 -2
index 74044b52d2c6..97d3c9d4ebc7 100644
@@ -2930,12 +2930,16 @@ static void deliver_smi_err_response(ipmi_smi_t intf,
 				     struct ipmi_smi_msg *msg,
 				     unsigned char err)
 {
+	int rv;
 	msg->rsp[0] = msg->data[0] | 4;
 	msg->rsp[1] = msg->data[1];
 	msg->rsp[2] = err;
 	msg->rsp_size = 3;
-	/* It's an error, so it will never requeue, no need to check return. */
-	handle_one_recv_msg(intf, msg);
+
+	/* This will never requeue, but it may ask us to free the message. */
+	rv = handle_one_recv_msg(intf, msg);
+	if (rv == 0)
+		ipmi_free_smi_msg(msg);
 }
 
 static void cleanup_smi_msgs(ipmi_smi_t intf)
drivers/clk/rockchip/clk-pll.c +1 -0
index 9c1373e81683..347d659c8f34 100644
@@ -957,6 +957,7 @@ struct clk *rockchip_clk_register_pll(struct rockchip_clk_provider *ctx,
 	return mux_clk;
 
 err_pll:
+	kfree(pll->rate_table);
 	clk_unregister(mux_clk);
 	mux_clk = pll_clk;
 err_mux:
drivers/clk/st/clkgen-fsyn.c +3 -2
index 14819d919df1..715c5d3a5cde 100644
@@ -948,9 +948,10 @@ static void __init st_of_quadfs_setup(struct device_node *np,
 
 	clk = st_clk_register_quadfs_pll(pll_name, clk_parent_name, data,
 			reg, lock);
-	if (IS_ERR(clk))
+	if (IS_ERR(clk)) {
+		kfree(lock);
 		goto err_exit;
-	else
+	} else
 		pr_debug("%s: parent %s rate %u\n",
 			__clk_get_name(clk),
 			__clk_get_name(clk_get_parent(clk)),
drivers/cpuidle/dt_idle_states.c +1 -1
index ea11a33e7fff..1a79ac569770 100644
@@ -218,6 +218,6 @@ int dt_init_idle_driver(struct cpuidle_driver *drv,
 	 * also be 0 on platforms with missing DT idle states or legacy DT
 	 * configuration predating the DT idle states bindings.
 	 */
-	return i;
+	return state_idx - start_idx;
 }
 EXPORT_SYMBOL_GPL(dt_init_idle_driver);
drivers/crypto/img-hash.c +6 -2
index a2e77b87485b..157c8f5c879c 100644
@@ -359,12 +359,16 @@ static int img_hash_dma_init(struct img_hash_dev *hdev)
 static void img_hash_dma_task(unsigned long d)
 {
 	struct img_hash_dev *hdev = (struct img_hash_dev *)d;
-	struct img_hash_request_ctx *ctx = ahash_request_ctx(hdev->req);
+	struct img_hash_request_ctx *ctx;
 	u8 *addr;
 	size_t nbytes, bleft, wsend, len, tbc;
 	struct scatterlist tsg;
 
-	if (!hdev->req || !ctx->sg)
+	if (!hdev->req)
+		return;
+
+	ctx = ahash_request_ctx(hdev->req);
+	if (!ctx->sg)
 		return;
 
 	addr = sg_virt(ctx->sg);
drivers/crypto/n2_core.c +6 -0
index b365ad78ac27..e06774968fbb 100644
@@ -1271,6 +1271,7 @@ struct n2_hash_tmpl {
 	const u32	*hash_init;
 	u8		hw_op_hashsz;
 	u8		digest_size;
+	u8		statesize;
 	u8		block_size;
 	u8		auth_type;
 	u8		hmac_type;
@@ -1302,6 +1303,7 @@ static const struct n2_hash_tmpl hash_tmpls[] = {
 	  .hmac_type	= AUTH_TYPE_HMAC_MD5,
 	  .hw_op_hashsz	= MD5_DIGEST_SIZE,
 	  .digest_size	= MD5_DIGEST_SIZE,
+	  .statesize	= sizeof(struct md5_state),
 	  .block_size	= MD5_HMAC_BLOCK_SIZE },
 	{ .name		= "sha1",
 	  .hash_zero	= sha1_zero_message_hash,
@@ -1310,6 +1312,7 @@ static const struct n2_hash_tmpl hash_tmpls[] = {
 	  .hmac_type	= AUTH_TYPE_HMAC_SHA1,
 	  .hw_op_hashsz	= SHA1_DIGEST_SIZE,
 	  .digest_size	= SHA1_DIGEST_SIZE,
+	  .statesize	= sizeof(struct sha1_state),
 	  .block_size	= SHA1_BLOCK_SIZE },
 	{ .name		= "sha256",
 	  .hash_zero	= sha256_zero_message_hash,
@@ -1318,6 +1321,7 @@ static const struct n2_hash_tmpl hash_tmpls[] = {
 	  .hmac_type	= AUTH_TYPE_HMAC_SHA256,
 	  .hw_op_hashsz	= SHA256_DIGEST_SIZE,
 	  .digest_size	= SHA256_DIGEST_SIZE,
+	  .statesize	= sizeof(struct sha256_state),
 	  .block_size	= SHA256_BLOCK_SIZE },
 	{ .name		= "sha224",
 	  .hash_zero	= sha224_zero_message_hash,
@@ -1326,6 +1330,7 @@ static const struct n2_hash_tmpl hash_tmpls[] = {
 	  .hmac_type	= AUTH_TYPE_RESERVED,
 	  .hw_op_hashsz	= SHA256_DIGEST_SIZE,
 	  .digest_size	= SHA224_DIGEST_SIZE,
+	  .statesize	= sizeof(struct sha256_state),
 	  .block_size	= SHA224_BLOCK_SIZE },
 };
 #define NUM_HASH_TMPLS ARRAY_SIZE(hash_tmpls)
@@ -1465,6 +1470,7 @@ static int __n2_register_one_ahash(const struct n2_hash_tmpl *tmpl)
 
 	halg = &ahash->halg;
 	halg->digestsize = tmpl->digest_size;
+	halg->statesize = tmpl->statesize;
 
 	base = &halg->base;
 	snprintf(base->cra_name, CRYPTO_MAX_ALG_NAME, "%s", tmpl->name);
drivers/dio/dio.c +8 -0
index 55dd88d82d6d..e85895fc258d 100644
@@ -109,6 +109,12 @@ static char dio_no_name[] = { 0 };
 
 #endif /* CONFIG_DIO_CONSTANTS */
 
+static void dio_dev_release(struct device *dev)
+{
+	struct dio_dev *ddev = container_of(dev, typeof(struct dio_dev), dev);
+	kfree(ddev);
+}
+
 int __init dio_find(int deviceid)
 {
 	/* Called to find a DIO device before the full bus scan has run.
@@ -234,6 +240,7 @@ static int __init dio_init(void)
 		dev->bus = &dio_bus;
 		dev->dev.parent = &dio_bus.dev;
 		dev->dev.bus = &dio_bus_type;
+		dev->dev.release = dio_dev_release;
 		dev->scode = scode;
 		dev->resource.start = pa;
 		dev->resource.end = pa + DIO_SIZE(scode, va);
@@ -261,6 +268,7 @@ static int __init dio_init(void)
 		if (error) {
 			pr_err("DIO: Error registering device %s\n",
 			       dev->name);
+			put_device(&dev->dev);
 			continue;
 		}
 		error = dio_create_sysfs_dev_files(dev);
drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c +1 -0
index 2b6afe123f3d..d6ecce5fe1a6 100644
@@ -253,6 +253,7 @@ static bool amdgpu_atrm_get_bios(struct amdgpu_device *adev)
 
 	if (!found)
 		return false;
+	pci_dev_put(pdev);
 
 	adev->bios = kmalloc(size, GFP_KERNEL);
 	if (!adev->bios) {
drivers/gpu/drm/drm_connector.c +3 -0
index 0e934a9ac63c..86529c0b1ed4 100644
@@ -363,6 +363,9 @@ void drm_connector_cleanup(struct drm_connector *connector)
 	mutex_destroy(&connector->mutex);
 
 	memset(connector, 0, sizeof(*connector));
+
+	if (dev->registered)
+		drm_sysfs_hotplug_event(dev);
 }
 EXPORT_SYMBOL(drm_connector_cleanup);
 
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c +3 -2
index e1dd75b18118..5993d6ac85e6 100644
@@ -90,8 +90,9 @@ static int fsl_dcu_drm_connector_get_modes(struct drm_connector *connector)
 	return num_modes;
 }
 
-static int fsl_dcu_drm_connector_mode_valid(struct drm_connector *connector,
-					    struct drm_display_mode *mode)
+static enum drm_mode_status
+fsl_dcu_drm_connector_mode_valid(struct drm_connector *connector,
+				 struct drm_display_mode *mode)
 {
 	if (mode->hdisplay & 0xf)
 		return MODE_ERROR;
drivers/gpu/drm/radeon/radeon_bios.c +1 -0
index 21b6732425c5..82ea78fce748 100644
@@ -215,6 +215,7 @@ static bool radeon_atrm_get_bios(struct radeon_device *rdev)
 
 	if (!found)
 		return false;
+	pci_dev_put(pdev);
 
 	rdev->bios = kmalloc(size, GFP_KERNEL);
 	if (!rdev->bios) {
drivers/gpu/drm/sti/sti_dvo.c +4 -3
index e8c1ed08a9f7..10e33a89b74c 100644
@@ -296,7 +296,7 @@ static void sti_dvo_set_mode(struct drm_bridge *bridge,
 
 	DRM_DEBUG_DRIVER("\n");
 
-	memcpy(&dvo->mode, mode, sizeof(struct drm_display_mode));
+	drm_mode_copy(&dvo->mode, mode);
 
 	/* According to the path used (main or aux), the dvo clocks should
 	 * have a different parent clock. */
@@ -354,8 +354,9 @@ static int sti_dvo_connector_get_modes(struct drm_connector *connector)
 
 #define CLK_TOLERANCE_HZ 50
 
-static int sti_dvo_connector_mode_valid(struct drm_connector *connector,
-					struct drm_display_mode *mode)
+static enum drm_mode_status
+sti_dvo_connector_mode_valid(struct drm_connector *connector,
+			     struct drm_display_mode *mode)
 {
 	int target = mode->clock * 1000;
 	int target_min = target - CLK_TOLERANCE_HZ;
drivers/gpu/drm/sti/sti_hda.c +4 -3
index 08808e3701de..1c36758660f5 100644
@@ -528,7 +528,7 @@ static void sti_hda_set_mode(struct drm_bridge *bridge,
 
 	DRM_DEBUG_DRIVER("\n");
 
-	memcpy(&hda->mode, mode, sizeof(struct drm_display_mode));
+	drm_mode_copy(&hda->mode, mode);
 
 	if (!hda_get_mode_idx(hda->mode, &mode_idx)) {
 		DRM_ERROR("Undefined mode\n");
@@ -606,8 +606,9 @@ static int sti_hda_connector_get_modes(struct drm_connector *connector)
 
 #define CLK_TOLERANCE_HZ 50
 
-static int sti_hda_connector_mode_valid(struct drm_connector *connector,
-					struct drm_display_mode *mode)
+static enum drm_mode_status
+sti_hda_connector_mode_valid(struct drm_connector *connector,
+			     struct drm_display_mode *mode)
 {
 	int target = mode->clock * 1000;
 	int target_min = target - CLK_TOLERANCE_HZ;
drivers/gpu/drm/sti/sti_hdmi.c +4 -3
index a5412a6fbeca..28186bcc8139 100644
@@ -848,7 +848,7 @@ static void sti_hdmi_set_mode(struct drm_bridge *bridge,
 	DRM_DEBUG_DRIVER("\n");
 
 	/* Copy the drm display mode in the connector local structure */
-	memcpy(&hdmi->mode, mode, sizeof(struct drm_display_mode));
+	drm_mode_copy(&hdmi->mode, mode);
 
 	/* Update clock framerate according to the selected mode */
 	ret = clk_set_rate(hdmi->clk_pix, mode->clock * 1000);
@@ -906,8 +906,9 @@ static int sti_hdmi_connector_get_modes(struct drm_connector *connector)
 
 #define CLK_TOLERANCE_HZ 50
 
-static int sti_hdmi_connector_mode_valid(struct drm_connector *connector,
-					struct drm_display_mode *mode)
+static enum drm_mode_status
+sti_hdmi_connector_mode_valid(struct drm_connector *connector,
+			      struct drm_display_mode *mode)
 {
 	int target = mode->clock * 1000;
 	int target_min = target - CLK_TOLERANCE_HZ;
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +2 -1
index 39ac7566b705..e6403311ff93 100644
@@ -301,7 +301,8 @@ void vmw_kms_cursor_snoop(struct vmw_surface *srf,
 	if (cmd->dma.guest.ptr.offset % PAGE_SIZE ||
 	    box->x != 0    || box->y != 0    || box->z != 0    ||
 	    box->srcx != 0 || box->srcy != 0 || box->srcz != 0 ||
-	    box->d != 1    || box_count != 1) {
+	    box->d != 1    || box_count != 1 ||
+	    box->w > 64 || box->h > 64) {
 		/* TODO handle none page aligned offsets */
 		/* TODO handle more dst & src != 0 */
 		/* TODO handle more then one copy */
drivers/hid/hid-ids.h +3 -0
index 1f641870d860..4d69551dbc52 100644
@@ -816,7 +816,10 @@
 #define USB_DEVICE_ID_ORTEK_WKB2000	0x2000
 
 #define USB_VENDOR_ID_PLANTRONICS	0x047f
+#define USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3210_SERIES	0xc055
 #define USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3220_SERIES	0xc056
+#define USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3215_SERIES	0xc057
+#define USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3225_SERIES	0xc058
 
 #define USB_VENDOR_ID_PANASONIC		0x04da
 #define USB_DEVICE_ID_PANABOARD_UBT780	0x1044
drivers/hid/hid-plantronics.c +9 -0
index 460711c1124a..3b75cadd543f 100644
@@ -201,9 +201,18 @@ static int plantronics_probe(struct hid_device *hdev,
 }
 
 static const struct hid_device_id plantronics_devices[] = {
+	{ HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
+					 USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3210_SERIES),
+		.driver_data = PLT_QUIRK_DOUBLE_VOLUME_KEYS },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
 					 USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3220_SERIES),
 		.driver_data = PLT_QUIRK_DOUBLE_VOLUME_KEYS },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
+					 USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3215_SERIES),
+		.driver_data = PLT_QUIRK_DOUBLE_VOLUME_KEYS },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
+					 USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3225_SERIES),
+		.driver_data = PLT_QUIRK_DOUBLE_VOLUME_KEYS },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS, HID_ANY_ID) },
 	{ }
 };
drivers/hid/hid-sensor-custom.c +1 -1
index 3a84aaf1418b..683bfcb41926 100644
@@ -67,7 +67,7 @@ struct hid_sensor_sample {
 	u32 raw_len;
 } __packed;
 
-static struct attribute hid_custom_attrs[] = {
+static struct attribute hid_custom_attrs[HID_CUSTOM_TOTAL_ATTRS] = {
 	{.name = "name", .mode = S_IRUGO},
 	{.name = "units", .mode = S_IRUGO},
 	{.name = "unit-expo", .mode = S_IRUGO},
drivers/hid/wacom_sys.c +8 -0
index b74fcda49a22..9b7195283268 100644
@@ -69,6 +69,9 @@ static int wacom_raw_event(struct hid_device *hdev, struct hid_report *report,
 {
 	struct wacom *wacom = hid_get_drvdata(hdev);
 
+	if (wacom->wacom_wac.features.type == BOOTLOADER)
+		return 0;
+
 	if (size > WACOM_PKGLEN_MAX)
 		return 1;
 
@@ -2409,6 +2412,11 @@ static int wacom_probe(struct hid_device *hdev,
 		goto fail;
 	}
 
+	if (features->type == BOOTLOADER) {
+		hid_warn(hdev, "Using device in hidraw-only mode");
+		return hid_hw_start(hdev, HID_CONNECT_HIDRAW);
+	}
+
 	error = wacom_parse_and_register(wacom, false);
 	if (error)
 		goto fail;
drivers/hid/wacom_wac.c +4 -0
index bfce62dbe0ac..2d9800edda92 100644
@@ -3550,6 +3550,9 @@ static const struct wacom_features wacom_features_0x343 =
 static const struct wacom_features wacom_features_HID_ANY_ID =
 	{ "Wacom HID", .type = HID_GENERIC, .oVid = HID_ANY_ID, .oPid = HID_ANY_ID };
 
+static const struct wacom_features wacom_features_0x94 =
+	{ "Wacom Bootloader", .type = BOOTLOADER };
+
 #define USB_DEVICE_WACOM(prod)						\
 	HID_DEVICE(BUS_USB, HID_GROUP_WACOM, USB_VENDOR_ID_WACOM, prod),\
 	.driver_data = (kernel_ulong_t)&wacom_features_##prod
@@ -3623,6 +3626,7 @@ const struct hid_device_id wacom_ids[] = {
 	{ USB_DEVICE_WACOM(0x84) },
 	{ USB_DEVICE_WACOM(0x90) },
 	{ USB_DEVICE_WACOM(0x93) },
+	{ USB_DEVICE_WACOM(0x94) },
 	{ USB_DEVICE_WACOM(0x97) },
 	{ USB_DEVICE_WACOM(0x9A) },
 	{ USB_DEVICE_WACOM(0x9F) },
drivers/hid/wacom_wac.h +1 -0
index 324c40b0c119..ccdfe3c40708 100644
@@ -154,6 +154,7 @@ enum {
 	MTTPC,
 	MTTPC_B,
 	HID_GENERIC,
+	BOOTLOADER,
 	MAX_TYPE
 };
 
drivers/hsi/controllers/omap_ssi_core.c +11 -3
index 56de30c25063..c885c3bc2e85 100644
@@ -540,8 +540,10 @@ static int ssi_probe(struct platform_device *pd)
 	platform_set_drvdata(pd, ssi);
 
 	err = ssi_add_controller(ssi, pd);
-	if (err < 0)
+	if (err < 0) {
+		hsi_put_controller(ssi);
 		goto out1;
+	}
 
 	pm_runtime_enable(&pd->dev);
 
@@ -574,9 +576,9 @@ static int ssi_probe(struct platform_device *pd)
 	device_for_each_child(&pd->dev, NULL, ssi_remove_ports);
 out2:
 	ssi_remove_controller(ssi);
+	pm_runtime_disable(&pd->dev);
 out1:
 	platform_set_drvdata(pd, NULL);
-	pm_runtime_disable(&pd->dev);
 
 	return err;
 }
@@ -667,7 +669,13 @@ static int __init ssi_init(void) {
 	if (ret)
 		return ret;
 
-	return platform_driver_register(&ssi_port_pdriver);
+	ret = platform_driver_register(&ssi_port_pdriver);
+	if (ret) {
+		platform_driver_unregister(&ssi_pdriver);
+		return ret;
+	}
+
+	return 0;
 }
 module_init(ssi_init);
 
drivers/i2c/busses/i2c-ismt.c +3 -0
index b51adffa4841..e689c7acea62 100644
@@ -495,6 +495,9 @@ static int ismt_access(struct i2c_adapter *adap, u16 addr,
 		if (read_write == I2C_SMBUS_WRITE) {
 			/* Block Write */
 			dev_dbg(dev, "I2C_SMBUS_BLOCK_DATA:  WRITE\n");
+			if (data->block[0] < 1 || data->block[0] > I2C_SMBUS_BLOCK_MAX)
+				return -EINVAL;
+
 			dma_size = data->block[0] + 1;
 			dma_direction = DMA_TO_DEVICE;
 			desc->wr_len_cmd = dma_size;
drivers/i2c/busses/i2c-pxa-pci.c +3 -7
index 417464e9ea2a..3113b06b4fc1 100644
@@ -101,7 +101,7 @@ static int ce4100_i2c_probe(struct pci_dev *dev,
 	int i;
 	struct ce4100_devices *sds;
 
-	ret = pci_enable_device_mem(dev);
+	ret = pcim_enable_device(dev);
 	if (ret)
 		return ret;
 
@@ -110,10 +110,8 @@ static int ce4100_i2c_probe(struct pci_dev *dev,
 		return -EINVAL;
 	}
 	sds = kzalloc(sizeof(*sds), GFP_KERNEL);
-	if (!sds) {
-		ret = -ENOMEM;
-		goto err_mem;
-	}
+	if (!sds)
+		return -ENOMEM;
 
 	for (i = 0; i < ARRAY_SIZE(sds->pdev); i++) {
 		sds->pdev[i] = add_i2c_device(dev, i);
@@ -129,8 +127,6 @@ static int ce4100_i2c_probe(struct pci_dev *dev,
 
 err_dev_add:
 	kfree(sds);
-err_mem:
-	pci_disable_device(dev);
 	return ret;
 }
 
drivers/iio/adc/ad_sigma_delta.c +4 -4
index 30f200ad6b97..0832402c964f 100644
@@ -282,10 +282,10 @@ int ad_sigma_delta_single_conversion(struct iio_dev *indio_dev,
 	unsigned int sample, raw_sample;
 	int ret = 0;
 
-	if (iio_buffer_enabled(indio_dev))
-		return -EBUSY;
+	ret = iio_device_claim_direct_mode(indio_dev);
+	if (ret)
+		return ret;
 
-	mutex_lock(&indio_dev->mlock);
 	ad_sigma_delta_set_channel(sigma_delta, chan->address);
 
 	spi_bus_lock(sigma_delta->spi->master);
@@ -319,7 +319,7 @@ int ad_sigma_delta_single_conversion(struct iio_dev *indio_dev,
 	ad_sigma_delta_set_mode(sigma_delta, AD_SD_MODE_IDLE);
 	sigma_delta->bus_locked = false;
 	spi_bus_unlock(sigma_delta->spi->master);
-	mutex_unlock(&indio_dev->mlock);
+	iio_device_release_direct_mode(indio_dev);
 
 	if (ret)
 		return ret;
drivers/infiniband/ulp/ipoib/ipoib_netlink.c +7 -0
index cdc7df4fdb8a..20a6d1071014 100644
@@ -42,6 +42,11 @@ static const struct nla_policy ipoib_policy[IFLA_IPOIB_MAX + 1] = {
 	[IFLA_IPOIB_UMCAST]	= { .type = NLA_U16 },
 };
 
+static unsigned int ipoib_get_max_num_queues(void)
+{
+	return min_t(unsigned int, num_possible_cpus(), 128);
+}
+
 static int ipoib_fill_info(struct sk_buff *skb, const struct net_device *dev)
 {
 	struct ipoib_dev_priv *priv = netdev_priv(dev);
@@ -167,6 +172,8 @@ static struct rtnl_link_ops ipoib_link_ops __read_mostly = {
 	.dellink	= ipoib_unregister_child_dev,
 	.get_size	= ipoib_get_size,
 	.fill_info	= ipoib_fill_info,
+	.get_num_rx_queues = ipoib_get_max_num_queues,
+	.get_num_tx_queues = ipoib_get_max_num_queues,
 };
 
 int __init ipoib_netlink_init(void)
drivers/input/touchscreen/elants_i2c.c +3 -6
index 3e6003d32e56..184310a2ba69 100644
@@ -1088,14 +1088,12 @@ static int elants_i2c_power_on(struct elants_data *ts)
 	if (IS_ERR_OR_NULL(ts->reset_gpio))
 		return 0;
 
-	gpiod_set_value_cansleep(ts->reset_gpio, 1);
-
 	error = regulator_enable(ts->vcc33);
 	if (error) {
 		dev_err(&ts->client->dev,
 			"failed to enable vcc33 regulator: %d\n",
 			error);
-		goto release_reset_gpio;
+		return error;
 	}
 
 	error = regulator_enable(ts->vccio);
@@ -1104,7 +1102,7 @@ static int elants_i2c_power_on(struct elants_data *ts)
 			"failed to enable vccio regulator: %d\n",
 			error);
 		regulator_disable(ts->vcc33);
-		goto release_reset_gpio;
+		return error;
 	}
 
 	/*
@@ -1113,7 +1111,6 @@ static int elants_i2c_power_on(struct elants_data *ts)
 	 */
 	udelay(ELAN_POWERON_DELAY_USEC);
 
-release_reset_gpio:
 	gpiod_set_value_cansleep(ts->reset_gpio, 0);
 	if (error)
 		return error;
@@ -1182,7 +1179,7 @@ static int elants_i2c_probe(struct i2c_client *client,
 		return error;
 	}
 
-	ts->reset_gpio = devm_gpiod_get(&client->dev, "reset", GPIOD_OUT_LOW);
+	ts->reset_gpio = devm_gpiod_get(&client->dev, "reset", GPIOD_OUT_HIGH);
 	if (IS_ERR(ts->reset_gpio)) {
 		error = PTR_ERR(ts->reset_gpio);
 
drivers/iommu/amd_iommu_init.c +7 -0
index 03bf538eabda..9ebbd54f8f34 100644
@@ -2684,6 +2684,13 @@ static int __init parse_ivrs_acpihid(char *str)
 		return 1;
 	}
 
+	/*
+	 * Ignore leading zeroes after ':', so e.g., AMDI0095:00
+	 * will match AMDI0095:0 in the second strcmp in acpi_dev_hid_uid_match
+	 */
+	while (*uid == '0' && *(uid + 1))
+		uid++;
+
 	i = early_acpihid_map_size++;
 	memcpy(early_acpihid_map[i].hid, hid, strlen(hid));
 	memcpy(early_acpihid_map[i].uid, uid, strlen(uid));
drivers/iommu/fsl_pamu.c +1 -1
index a34355fca37a..4d6bdc465dde 100644
@@ -1131,7 +1131,7 @@ static int fsl_pamu_probe(struct platform_device *pdev)
 		ret = create_csd(ppaact_phys, mem_size, csd_port_id);
 		if (ret) {
 			dev_err(dev, "could not create coherence subdomain\n");
-			return ret;
+			goto error;
 		}
 	}
 
drivers/irqchip/irq-gic-pm.c +1 -1
index ecafd295c31c..21c5decfc55b 100644
@@ -112,7 +112,7 @@ static int gic_probe(struct platform_device *pdev)
 
 	pm_runtime_enable(dev);
 
-	ret = pm_runtime_get_sync(dev);
+	ret = pm_runtime_resume_and_get(dev);
 	if (ret < 0)
 		goto rpm_disable;
 
drivers/isdn/hardware/mISDN/hfcmulti.c +13 -6
index 8feb8e9e29a6..decec530bdf4 100644
@@ -3234,6 +3234,7 @@ static int
 hfcm_l1callback(struct dchannel *dch, u_int cmd)
 {
 	struct hfc_multi	*hc = dch->hw;
+	struct sk_buff_head	free_queue;
 	u_long	flags;
 
 	switch (cmd) {
@@ -3262,6 +3263,7 @@ hfcm_l1callback(struct dchannel *dch, u_int cmd)
 		l1_event(dch->l1, HW_POWERUP_IND);
 		break;
 	case HW_DEACT_REQ:
+		__skb_queue_head_init(&free_queue);
 		/* start deactivation */
 		spin_lock_irqsave(&hc->lock, flags);
 		if (hc->ctype == HFC_TYPE_E1) {
@@ -3281,20 +3283,21 @@ hfcm_l1callback(struct dchannel *dch, u_int cmd)
 				plxsd_checksync(hc, 0);
 			}
 		}
-		skb_queue_purge(&dch->squeue);
+		skb_queue_splice_init(&dch->squeue, &free_queue);
 		if (dch->tx_skb) {
-			dev_kfree_skb(dch->tx_skb);
+			__skb_queue_tail(&free_queue, dch->tx_skb);
 			dch->tx_skb = NULL;
 		}
 		dch->tx_idx = 0;
 		if (dch->rx_skb) {
-			dev_kfree_skb(dch->rx_skb);
+			__skb_queue_tail(&free_queue, dch->rx_skb);
 			dch->rx_skb = NULL;
 		}
 		test_and_clear_bit(FLG_TX_BUSY, &dch->Flags);
 		if (test_and_clear_bit(FLG_BUSY_TIMER, &dch->Flags))
 			del_timer(&dch->timer);
 		spin_unlock_irqrestore(&hc->lock, flags);
+		__skb_queue_purge(&free_queue);
 		break;
 	case HW_POWERUP_REQ:
 		spin_lock_irqsave(&hc->lock, flags);
@@ -3401,6 +3404,9 @@ handle_dmsg(struct mISDNchannel *ch, struct sk_buff *skb)
 	case PH_DEACTIVATE_REQ:
 		test_and_clear_bit(FLG_L2_ACTIVATED, &dch->Flags);
 		if (dch->dev.D.protocol != ISDN_P_TE_S0) {
+			struct sk_buff_head free_queue;
+
+			__skb_queue_head_init(&free_queue);
 			spin_lock_irqsave(&hc->lock, flags);
 			if (debug & DEBUG_HFCMULTI_MSG)
 				printk(KERN_DEBUG
@@ -3422,14 +3428,14 @@ handle_dmsg(struct mISDNchannel *ch, struct sk_buff *skb)
 				/* deactivate */
 				dch->state = 1;
 			}
-			skb_queue_purge(&dch->squeue);
+			skb_queue_splice_init(&dch->squeue, &free_queue);
 			if (dch->tx_skb) {
-				dev_kfree_skb(dch->tx_skb);
+				__skb_queue_tail(&free_queue, dch->tx_skb);
 				dch->tx_skb = NULL;
 			}
 			dch->tx_idx = 0;
 			if (dch->rx_skb) {
-				dev_kfree_skb(dch->rx_skb);
+				__skb_queue_tail(&free_queue, dch->rx_skb);
 				dch->rx_skb = NULL;
 			}
 			test_and_clear_bit(FLG_TX_BUSY, &dch->Flags);
@@ -3441,6 +3447,7 @@ handle_dmsg(struct mISDNchannel *ch, struct sk_buff *skb)
 #endif
 			ret = 0;
 			spin_unlock_irqrestore(&hc->lock, flags);
+			__skb_queue_purge(&free_queue);
 		} else
 			ret = l1_event(dch->l1, hh->prim);
 		break;
drivers/isdn/hardware/mISDN/hfcpci.c +9 -4
index 89cf1d695a01..e33b58f560bf 100644
@@ -1631,16 +1631,19 @@ hfcpci_l2l1D(struct mISDNchannel *ch, struct sk_buff *skb)
 		test_and_clear_bit(FLG_L2_ACTIVATED, &dch->Flags);
 		spin_lock_irqsave(&hc->lock, flags);
 		if (hc->hw.protocol == ISDN_P_NT_S0) {
+			struct sk_buff_head free_queue;
+
+			__skb_queue_head_init(&free_queue);
 			/* prepare deactivation */
 			Write_hfc(hc, HFCPCI_STATES, 0x40);
-			skb_queue_purge(&dch->squeue);
+			skb_queue_splice_init(&dch->squeue, &free_queue);
 			if (dch->tx_skb) {
-				dev_kfree_skb(dch->tx_skb);
+				__skb_queue_tail(&free_queue, dch->tx_skb);
 				dch->tx_skb = NULL;
 			}
 			dch->tx_idx = 0;
 			if (dch->rx_skb) {
-				dev_kfree_skb(dch->rx_skb);
+				__skb_queue_tail(&free_queue, dch->rx_skb);
 				dch->rx_skb = NULL;
 			}
 			test_and_clear_bit(FLG_TX_BUSY, &dch->Flags);
@@ -1653,10 +1656,12 @@ hfcpci_l2l1D(struct mISDNchannel *ch, struct sk_buff *skb)
 			hc->hw.mst_m &= ~HFCPCI_MASTER;
 			Write_hfc(hc, HFCPCI_MST_MODE, hc->hw.mst_m);
 			ret = 0;
+			spin_unlock_irqrestore(&hc->lock, flags);
+			__skb_queue_purge(&free_queue);
 		} else {
 			ret = l1_event(dch->l1, hh->prim);
+			spin_unlock_irqrestore(&hc->lock, flags);
 		}
-		spin_unlock_irqrestore(&hc->lock, flags);
 		break;
 	}
 	if (!ret)
drivers/isdn/hardware/mISDN/hfcsusb.c +8 -4
index 726fba452f5f..4c49ef9fc391 100644
@@ -337,20 +337,24 @@ hfcusb_l2l1D(struct mISDNchannel *ch, struct sk_buff *skb)
 		test_and_clear_bit(FLG_L2_ACTIVATED, &dch->Flags);
 
 		if (hw->protocol == ISDN_P_NT_S0) {
+			struct sk_buff_head free_queue;
+
+			__skb_queue_head_init(&free_queue);
 			hfcsusb_ph_command(hw, HFC_L1_DEACTIVATE_NT);
 			spin_lock_irqsave(&hw->lock, flags);
-			skb_queue_purge(&dch->squeue);
+			skb_queue_splice_init(&dch->squeue, &free_queue);
 			if (dch->tx_skb) {
-				dev_kfree_skb(dch->tx_skb);
+				__skb_queue_tail(&free_queue, dch->tx_skb);
 				dch->tx_skb = NULL;
 			}
 			dch->tx_idx = 0;
 			if (dch->rx_skb) {
-				dev_kfree_skb(dch->rx_skb);
+				__skb_queue_tail(&free_queue, dch->rx_skb);
 				dch->rx_skb = NULL;
 			}
 			test_and_clear_bit(FLG_TX_BUSY, &dch->Flags);
 			spin_unlock_irqrestore(&hw->lock, flags);
+			__skb_queue_purge(&free_queue);
 #ifdef FIXME
 			if (test_and_clear_bit(FLG_L1_BUSY, &dch->Flags))
 				dchannel_sched_event(&hc->dch, D_CLEARBUSY);
@@ -1340,7 +1344,7 @@ tx_iso_complete(struct urb *urb)
 					printk("\n");
 				}
 
-				dev_kfree_skb(tx_skb);
+				dev_consume_skb_irq(tx_skb);
 				tx_skb = NULL;
 				if (fifo->dch && get_next_dframe(fifo->dch))
 					tx_skb = fifo->dch->tx_skb;
drivers/macintosh/macio-adb.c +4 -0
index 87de8d9bcfad..e620c50768cd 100644
@@ -106,6 +106,10 @@ int macio_init(void)
 		return -ENXIO;
 	}
 	adb = ioremap(r.start, sizeof(struct adb_regs));
+	if (!adb) {
+		of_node_put(adbs);
+		return -ENOMEM;
+	}
 
 	out_8(&adb->ctrl.r, 0);
 	out_8(&adb->intr.r, 0);
drivers/macintosh/macio_asic.c +1 -1
index 3f041b187033..04da09af5531 100644
@@ -425,7 +425,7 @@ static struct macio_dev * macio_add_one_device(struct macio_chip *chip,
 	if (of_device_register(&dev->ofdev) != 0) {
 		printk(KERN_DEBUG"macio: device registration error for %s!\n",
 		       dev_name(&dev->ofdev.dev));
-		kfree(dev);
+		put_device(&dev->ofdev.dev);
 		return NULL;
 	}
 
drivers/mcb/mcb-core.c +3 -1
index 96801137a144..80e70d9fd402 100644
@@ -74,8 +74,10 @@ static int mcb_probe(struct device *dev)
 
 	get_device(dev);
 	ret = mdrv->probe(mdev, found_id);
-	if (ret)
+	if (ret) {
 		module_put(carrier_mod);
+		put_device(dev);
+	}
 
 	return ret;
 }
drivers/mcb/mcb-parse.c +1 -1
index 4ca2739b4fad..fdc35341ff6c 100644
@@ -107,7 +107,7 @@ static int chameleon_parse_gdd(struct mcb_bus *bus,
 	return 0;
 
 err:
-	mcb_free_dev(mdev);
+	put_device(&mdev->dev);
 
 	return ret;
 }
drivers/md/dm-cache-metadata.c +48 -7

87 lines not on this page · raw message

drivers/md/dm-cache-target.c +6 -5
index 1b7d77080d6b..5979fc3c01d7 100644
@@ -1030,16 +1030,16 @@ static void abort_transaction(struct cache *cache)
 	if (get_cache_mode(cache) >= CM_READ_ONLY)
 		return;
 
-	if (dm_cache_metadata_set_needs_check(cache->cmd)) {
-		DMERR("%s: failed to set 'needs_check' flag in metadata", dev_name);
-		set_cache_mode(cache, CM_FAIL);
-	}
-
 	DMERR_LIMIT("%s: aborting current metadata transaction", dev_name);
 	if (dm_cache_metadata_abort(cache->cmd)) {
 		DMERR("%s: failed to abort metadata transaction", dev_name);
 		set_cache_mode(cache, CM_FAIL);
 	}
+
+	if (dm_cache_metadata_set_needs_check(cache->cmd)) {
+		DMERR("%s: failed to set 'needs_check' flag in metadata", dev_name);
+		set_cache_mode(cache, CM_FAIL);
+	}
 }
 
 static void metadata_operation_failed(struct cache *cache, const char *op, int r)
@@ -2321,6 +2321,7 @@ static void destroy(struct cache *cache)
 	if (cache->prison)
 		dm_bio_prison_destroy(cache->prison);
 
+	cancel_delayed_work_sync(&cache->waker);
 	if (cache->wq)
 		destroy_workqueue(cache->wq);
 
drivers/md/dm-thin-metadata.c +9 -0
index b5bf2ecfaf91..0b56c8412fdf 100644
@@ -661,6 +661,15 @@ static int __open_metadata(struct dm_pool_metadata *pmd)
 		goto bad_cleanup_data_sm;
 	}
 
+	/*
+	 * For pool metadata opening process, root setting is redundant
+	 * because it will be set again in __begin_transaction(). But dm
+	 * pool aborting process really needs to get last transaction's
+	 * root to avoid accessing broken btree.
+	 */
+	pmd->root = le64_to_cpu(disk_super->data_mapping_root);
+	pmd->details_root = le64_to_cpu(disk_super->device_details_root);
+
 	__setup_btree_details(pmd);
 	dm_bm_unlock(sblock);
 
drivers/md/dm-thin.c +2 -0
index dcb753dbf86e..eb359e507391 100644
@@ -2935,6 +2935,8 @@ static void __pool_destroy(struct pool *pool)
 	dm_bio_prison_destroy(pool->prison);
 	dm_kcopyd_client_destroy(pool->copier);
 
+	cancel_delayed_work_sync(&pool->waker);
+	cancel_delayed_work_sync(&pool->no_space_timeout);
 	if (pool->wq)
 		destroy_workqueue(pool->wq);
 
drivers/md/md.c +6 -3
index 9e8373e7e287..4d33f5fcfed6 100644
@@ -360,13 +360,14 @@ static void md_end_flush(struct bio *bio)
 	struct md_rdev *rdev = bio->bi_private;
 	struct mddev *mddev = rdev->mddev;
 
+	bio_put(bio);
+
 	rdev_dec_pending(rdev, mddev);
 
 	if (atomic_dec_and_test(&mddev->flush_pending)) {
 		/* The pre-request flush has finished */
 		queue_work(md_wq, &mddev->flush_work);
 	}
-	bio_put(bio);
 }
 
 static void md_submit_flush_data(struct work_struct *ws);
@@ -725,10 +726,12 @@ static void super_written(struct bio *bio)
 		md_error(mddev, rdev);
 	}
 
+	bio_put(bio);
+
+	rdev_dec_pending(rdev, mddev);
+
 	if (atomic_dec_and_test(&mddev->pending_writes))
 		wake_up(&mddev->sb_wait);
-	rdev_dec_pending(rdev, mddev);
-	bio_put(bio);
 }
 
 void md_super_write(struct mddev *mddev, struct md_rdev *rdev,
drivers/md/raid1.c +1 -0
index 8a50da4f148f..26ae749184da 100644
@@ -2964,6 +2964,7 @@ static int raid1_run(struct mddev *mddev)
 	 * RAID1 needs at least one disk in active
 	 */
 	if (conf->raid_disks - mddev->degraded < 1) {
+		md_unregister_thread(&conf->thread);
 		ret = -EINVAL;
 		goto abort;
 	}
drivers/media/dvb-core/dvbdev.c +1 -0
index fb1284051d05..d3a0b293fddd 100644
@@ -317,6 +317,7 @@ static int dvb_create_media_entity(struct dvb_device *dvbdev,
 				       GFP_KERNEL);
 		if (!dvbdev->pads) {
 			kfree(dvbdev->entity);
+			dvbdev->entity = NULL;
 			return -ENOMEM;
 		}
 	}
drivers/media/dvb-frontends/bcm3510.c +1 -0
index bb698839e477..fc1dbdfb0cba 100644
@@ -648,6 +648,7 @@ static int bcm3510_download_firmware(struct dvb_frontend* fe)
 		deb_info("firmware chunk, addr: 0x%04x, len: 0x%04x, total length: 0x%04zx\n",addr,len,fw->size);
 		if ((ret = bcm3510_write_ram(st,addr,&b[i+4],len)) < 0) {
 			err("firmware download failed: %d\n",ret);
+			release_firmware(fw);
 			return ret;
 		}
 		i += 4 + len;
drivers/media/dvb-frontends/stv0288.c +2 -3
index 2b8c75f28d2e..a79483c2771b 100644
@@ -452,9 +452,8 @@ static int stv0288_set_frontend(struct dvb_frontend *fe)
 	struct stv0288_state *state = fe->demodulator_priv;
 	struct dtv_frontend_properties *c = &fe->dtv_property_cache;
 
-	char tm;
-	unsigned char tda[3];
-	u8 reg, time_out = 0;
+	u8 tda[3], reg, time_out = 0;
+	s8 tm;
 
 	dprintk("%s : FE_SET_FRONTEND\n", __func__);
 
drivers/media/i2c/ad5820.c +5 -5
index beab2f381b81..84e378cbc726 100644
@@ -320,18 +320,18 @@ static int ad5820_probe(struct i2c_client *client,
 
 	ret = media_entity_pads_init(&coil->subdev.entity, 0, NULL);
 	if (ret < 0)
-		goto cleanup2;
+		goto clean_mutex;
 
 	ret = v4l2_async_register_subdev(&coil->subdev);
 	if (ret < 0)
-		goto cleanup;
+		goto clean_entity;
 
 	return ret;
 
-cleanup2:
-	mutex_destroy(&coil->power_lock);
-cleanup:
+clean_entity:
 	media_entity_cleanup(&coil->subdev.entity);
+clean_mutex:
+	mutex_destroy(&coil->power_lock);
 	return ret;
 }
 
drivers/media/pci/saa7164/saa7164-core.c +3 -1
index 8bbd092fbe1d..d0ad0f5ba035 100644
@@ -1250,7 +1250,7 @@ static int saa7164_initdev(struct pci_dev *pci_dev,
 
 	if (saa7164_dev_setup(dev) < 0) {
 		err = -EINVAL;
-		goto fail_free;
+		goto fail_dev;
 	}
 
 	/* print pci info */
@@ -1422,6 +1422,8 @@ static int saa7164_initdev(struct pci_dev *pci_dev,
 
 fail_irq:
 	saa7164_dev_unregister(dev);
+fail_dev:
+	pci_disable_device(pci_dev);
 fail_free:
 	v4l2_device_unregister(&dev->v4l2_dev);
 	kfree(dev);
drivers/media/pci/solo6x10/solo6x10-core.c +1 -0
index f50d07229236..fc45d4aeb77e 100644
@@ -428,6 +428,7 @@ static int solo_sysfs_init(struct solo_dev *solo_dev)
 		     solo_dev->nr_chans);
 
 	if (device_register(dev)) {
+		put_device(dev);
 		dev->parent = NULL;
 		return -ENOMEM;
 	}
drivers/media/platform/coda/coda-bit.c +10 -4
index 7b4c93619c3d..a933c0cb24de 100644
@@ -595,7 +595,7 @@ static void coda_setup_iram(struct coda_ctx *ctx)
 		/* Only H.264BP and H.263P3 are considered */
 		iram_info->buf_dbk_y_use = coda_iram_alloc(iram_info, w64);
 		iram_info->buf_dbk_c_use = coda_iram_alloc(iram_info, w64);
-		if (!iram_info->buf_dbk_c_use)
+		if (!iram_info->buf_dbk_y_use || !iram_info->buf_dbk_c_use)
 			goto out;
 		iram_info->axi_sram_use |= dbk_bits;
 
@@ -619,7 +619,7 @@ static void coda_setup_iram(struct coda_ctx *ctx)
 
 		iram_info->buf_dbk_y_use = coda_iram_alloc(iram_info, w128);
 		iram_info->buf_dbk_c_use = coda_iram_alloc(iram_info, w128);
-		if (!iram_info->buf_dbk_c_use)
+		if (!iram_info->buf_dbk_y_use || !iram_info->buf_dbk_c_use)
 			goto out;
 		iram_info->axi_sram_use |= dbk_bits;
 
@@ -821,10 +821,16 @@ static int coda_start_encoding(struct coda_ctx *ctx)
 	}
 
 	if (dst_fourcc == V4L2_PIX_FMT_JPEG) {
-		if (!ctx->params.jpeg_qmat_tab[0])
+		if (!ctx->params.jpeg_qmat_tab[0]) {
 			ctx->params.jpeg_qmat_tab[0] = kmalloc(64, GFP_KERNEL);
-		if (!ctx->params.jpeg_qmat_tab[1])
+			if (!ctx->params.jpeg_qmat_tab[0])
+				return -ENOMEM;
+		}
+		if (!ctx->params.jpeg_qmat_tab[1]) {
 			ctx->params.jpeg_qmat_tab[1] = kmalloc(64, GFP_KERNEL);
+			if (!ctx->params.jpeg_qmat_tab[1])
+				return -ENOMEM;
+		}
 		coda_set_jpeg_compression_quality(ctx, ctx->params.jpeg_quality);
 	}
 
drivers/media/platform/exynos4-is/fimc-core.c +1 -1
index 8f89ca21b631..b86d6f724618 100644
@@ -1245,7 +1245,7 @@ int __init fimc_register_driver(void)
 	return platform_driver_register(&fimc_driver);
 }
 
-void __exit fimc_unregister_driver(void)
+void fimc_unregister_driver(void)
 {
 	platform_driver_unregister(&fimc_driver);
 }
drivers/media/platform/exynos4-is/media-dev.c +5 -1
index a1599659b88b..75f6f7acc46b 100644
@@ -1559,7 +1559,11 @@ static int __init fimc_md_init(void)
 	if (ret)
 		return ret;
 
-	return platform_driver_register(&fimc_md_driver);
+	ret = platform_driver_register(&fimc_md_driver);
+	if (ret)
+		fimc_unregister_driver();
+
+	return ret;
 }
 
 static void __exit fimc_md_exit(void)
drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c +1 -0
index 06e2cfd09855..c79dcc497e13 100644
@@ -953,6 +953,7 @@ static int configure_channels(struct c8sectpfei *fei)
 		if (ret) {
 			dev_err(fei->dev,
 				"configure_memdma_and_inputblock failed\n");
+			of_node_put(child);
 			goto err_unmap;
 		}
 		index++;
drivers/media/platform/vivid/vivid-vid-cap.c +1 -0
index 198b26687b57..b7bda691fa57 100644
@@ -915,6 +915,7 @@ int vivid_vid_cap_s_selection(struct file *file, void *fh, struct v4l2_selection
 			if (dev->has_compose_cap) {
 				v4l2_rect_set_min_size(compose, &min_rect);
 				v4l2_rect_set_max_size(compose, &max_rect);
+				v4l2_rect_map_inside(compose, &fmt);
 			}
 			dev->fmt_cap_rect = fmt;
 			tpg_s_buf_height(&dev->tpg, fmt.height);
drivers/media/radio/si470x/radio-si470x-usb.c +3 -1
index a8a0ff9a1f83..6724c5287cc3 100644
@@ -741,8 +741,10 @@ static int si470x_usb_driver_probe(struct usb_interface *intf,
 
 	/* start radio */
 	retval = si470x_start_usb(radio);
-	if (retval < 0)
+	if (retval < 0 && !radio->int_in_running)
 		goto err_buf;
+	else if (retval < 0)	/* in case of radio->int_in_running == 1 */
+		goto err_all;
 
 	/* set initial frequency */
 	si470x_set_freq(radio, 87.5 * FREQ_MUL); /* available in all regions */
drivers/media/rc/imon.c +3 -3
index 0b386fd518cc..9c644b4fb22d 100644
@@ -622,15 +622,14 @@ static int send_packet(struct imon_context *ictx)
 		pr_err_ratelimited("error submitting urb(%d)\n", retval);
 	} else {
 		/* Wait for transmission to complete (or abort) */
-		mutex_unlock(&ictx->lock);
 		retval = wait_for_completion_interruptible(
 				&ictx->tx.finished);
 		if (retval) {
 			usb_kill_urb(ictx->tx_urb);
 			pr_err_ratelimited("task interrupted\n");
 		}
-		mutex_lock(&ictx->lock);
 
+		ictx->tx.busy = false;
 		retval = ictx->tx.status;
 		if (retval)
 			pr_err_ratelimited("packet tx failed (%d)\n", retval);
@@ -939,7 +938,8 @@ static ssize_t vfd_write(struct file *file, const char __user *buf,
 		return -ENODEV;
 	}
 
-	mutex_lock(&ictx->lock);
+	if (mutex_lock_interruptible(&ictx->lock))
+		return -ERESTARTSYS;
 
 	if (!ictx->dev_present_intf0) {
 		pr_err_ratelimited("no iMON device present\n");
drivers/media/usb/dvb-usb/az6027.c +4 -0
index 382c8075ef52..f2b5ba1d2809 100644
@@ -978,6 +978,10 @@ static int az6027_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], int n
 		if (msg[i].addr == 0x99) {
 			req = 0xBE;
 			index = 0;
+			if (msg[i].len < 1) {
+				i = -EOPNOTSUPP;
+				break;
+			}
 			value = msg[i].buf[0] & 0x00ff;
 			length = 1;
 			az6027_usb_out_op(d, req, value, index, data, length);
drivers/media/usb/dvb-usb/dvb-usb-init.c +3 -1
index 690c1e06fbfa..28077f3c9edf 100644
@@ -84,7 +84,7 @@ static int dvb_usb_adapter_init(struct dvb_usb_device *d, short *adapter_nrs)
 
 		ret = dvb_usb_adapter_stream_init(adap);
 		if (ret)
-			return ret;
+			goto stream_init_err;
 
 		ret = dvb_usb_adapter_dvb_init(adap, adapter_nrs);
 		if (ret)
@@ -117,6 +117,8 @@ static int dvb_usb_adapter_init(struct dvb_usb_device *d, short *adapter_nrs)
 	dvb_usb_adapter_dvb_exit(adap);
 dvb_init_err:
 	dvb_usb_adapter_stream_exit(adap);
+stream_init_err:
+	kfree(adap->priv);
 	return ret;
 }
 
drivers/misc/cxl/guest.c +14 -10
index d08509cd978a..2cefe1f3ce7e 100644
@@ -969,10 +969,10 @@ int cxl_guest_init_afu(struct cxl *adapter, int slice, struct device_node *afu_n
 	 * if it returns an error!
 	 */
 	if ((rc = cxl_register_afu(afu)))
-		goto err_put1;
+		goto err_put_dev;
 
 	if ((rc = cxl_sysfs_afu_add(afu)))
-		goto err_put1;
+		goto err_del_dev;
 
 	/*
 	 * pHyp doesn't expose the programming models supported by the
@@ -988,7 +988,7 @@ int cxl_guest_init_afu(struct cxl *adapter, int slice, struct device_node *afu_n
 		afu->modes_supported = CXL_MODE_DIRECTED;
 
 	if ((rc = cxl_afu_select_best_mode(afu)))
-		goto err_put2;
+		goto err_remove_sysfs;
 
 	adapter->afu[afu->slice] = afu;
 
@@ -1008,10 +1008,12 @@ int cxl_guest_init_afu(struct cxl *adapter, int slice, struct device_node *afu_n
 
 	return 0;
 
-err_put2:
+err_remove_sysfs:
 	cxl_sysfs_afu_remove(afu);
-err_put1:
-	device_unregister(&afu->dev);
+err_del_dev:
+	device_del(&afu->dev);
+err_put_dev:
+	put_device(&afu->dev);
 	free = false;
 	guest_release_serr_irq(afu);
 err2:
@@ -1145,18 +1147,20 @@ struct cxl *cxl_guest_init_adapter(struct device_node *np, struct platform_devic
 	 * even if it returns an error!
 	 */
 	if ((rc = cxl_register_adapter(adapter)))
-		goto err_put1;
+		goto err_put_dev;
 
 	if ((rc = cxl_sysfs_adapter_add(adapter)))
-		goto err_put1;
+		goto err_del_dev;
 
 	/* release the context lock as the adapter is configured */
 	cxl_adapter_context_unlock(adapter);
 
 	return adapter;
 
-err_put1:
-	device_unregister(&adapter->dev);
+err_del_dev:
+	device_del(&adapter->dev);
+err_put_dev:
+	put_device(&adapter->dev);
 	free = false;
 	cxl_guest_remove_chardev(adapter);
 err1:
drivers/misc/cxl/pci.c +12 -8
index a5422f483ad5..f7417033a7a8 100644
@@ -1187,10 +1187,10 @@ static int pci_init_afu(struct cxl *adapter, int slice, struct pci_dev *dev)
 	 * if it returns an error!
 	 */
 	if ((rc = cxl_register_afu(afu)))
-		goto err_put1;
+		goto err_put_dev;
 
 	if ((rc = cxl_sysfs_afu_add(afu)))
-		goto err_put1;
+		goto err_del_dev;
 
 	adapter->afu[afu->slice] = afu;
 
@@ -1199,10 +1199,12 @@ static int pci_init_afu(struct cxl *adapter, int slice, struct pci_dev *dev)
 
 	return 0;
 
-err_put1:
+err_del_dev:
+	device_del(&afu->dev);
+err_put_dev:
 	pci_deconfigure_afu(afu);
 	cxl_debugfs_afu_remove(afu);
-	device_unregister(&afu->dev);
+	put_device(&afu->dev);
 	return rc;
 
 err_free_native:
@@ -1589,23 +1591,25 @@ static struct cxl *cxl_pci_init_adapter(struct pci_dev *dev)
 	 * even if it returns an error!
 	 */
 	if ((rc = cxl_register_adapter(adapter)))
-		goto err_put1;
+		goto err_put_dev;
 
 	if ((rc = cxl_sysfs_adapter_add(adapter)))
-		goto err_put1;
+		goto err_del_dev;
 
 	/* Release the context lock as adapter is configured */
 	cxl_adapter_context_unlock(adapter);
 
 	return adapter;
 
-err_put1:
+err_del_dev:
+	device_del(&adapter->dev);
+err_put_dev:
 	/* This should mirror cxl_remove_adapter, except without the
 	 * sysfs parts
 	 */
 	cxl_debugfs_adapter_remove(adapter);
 	cxl_deconfigure_adapter(adapter);
-	device_unregister(&adapter->dev);
+	put_device(&adapter->dev);
 	return ERR_PTR(rc);
 
 err_release:
drivers/misc/sgi-gru/grufault.c +11 -2
index 6fb773dbcd0c..a43a496ca9b9 100644
@@ -656,6 +656,7 @@ int gru_handle_user_call_os(unsigned long cb)
 	if ((cb & (GRU_HANDLE_STRIDE - 1)) || ucbnum >= GRU_NUM_CB)
 		return -EINVAL;
 
+again:
 	gts = gru_find_lock_gts(cb);
 	if (!gts)
 		return -EINVAL;
@@ -664,7 +665,11 @@ int gru_handle_user_call_os(unsigned long cb)
 	if (ucbnum >= gts->ts_cbr_au_count * GRU_CBR_AU_SIZE)
 		goto exit;
 
-	gru_check_context_placement(gts);
+	if (gru_check_context_placement(gts)) {
+		gru_unlock_gts(gts);
+		gru_unload_context(gts, 1);
+		goto again;
+	}
 
 	/*
 	 * CCH may contain stale data if ts_force_cch_reload is set.
@@ -882,7 +887,11 @@ int gru_set_context_option(unsigned long arg)
 		} else {
 			gts->ts_user_blade_id = req.val1;
 			gts->ts_user_chiplet_id = req.val0;
-			gru_check_context_placement(gts);
+			if (gru_check_context_placement(gts)) {
+				gru_unlock_gts(gts);
+				gru_unload_context(gts, 1);
+				return ret;
+			}
 		}
 		break;
 	case sco_gseg_owner:
drivers/misc/sgi-gru/grumain.c +18 -4
index 33741ad4a74a..bc2d5233660c 100644
@@ -729,9 +729,10 @@ static int gru_check_chiplet_assignment(struct gru_state *gru,
  * chiplet. Misassignment can occur if the process migrates to a different
  * blade or if the user changes the selected blade/chiplet.
  */
-void gru_check_context_placement(struct gru_thread_state *gts)
+int gru_check_context_placement(struct gru_thread_state *gts)
 {
 	struct gru_state *gru;
+	int ret = 0;
 
 	/*
 	 * If the current task is the context owner, verify that the
@@ -739,15 +740,23 @@ void gru_check_context_placement(struct gru_thread_state *gts)
 	 * references. Pthread apps use non-owner references to the CBRs.
 	 */
 	gru = gts->ts_gru;
+	/*
+	 * If gru or gts->ts_tgid_owner isn't initialized properly, return
+	 * success to indicate that the caller does not need to unload the
+	 * gru context.The caller is responsible for their inspection and
+	 * reinitialization if needed.
+	 */
 	if (!gru || gts->ts_tgid_owner != current->tgid)
-		return;
+		return ret;
 
 	if (!gru_check_chiplet_assignment(gru, gts)) {
 		STAT(check_context_unload);
-		gru_unload_context(gts, 1);
+		ret = -EINVAL;
 	} else if (gru_retarget_intr(gts)) {
 		STAT(check_context_retarget_intr);
 	}
+
+	return ret;
 }
 
 
@@ -946,7 +955,12 @@ int gru_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
 	mutex_lock(&gts->ts_ctxlock);
 	preempt_disable();
 
-	gru_check_context_placement(gts);
+	if (gru_check_context_placement(gts)) {
+		preempt_enable();
+		mutex_unlock(&gts->ts_ctxlock);
+		gru_unload_context(gts, 1);
+		return VM_FAULT_NOPAGE;
+	}
 
 	if (!gts->ts_gru) {
 		STAT(load_user_context);
drivers/misc/sgi-gru/grutables.h +1 -1
index 5c3ce2459675..a1dfca557fc3 100644
@@ -651,7 +651,7 @@ extern int gru_user_flush_tlb(unsigned long arg);
 extern int gru_user_unload_context(unsigned long arg);
 extern int gru_get_exception_detail(unsigned long arg);
 extern int gru_set_context_option(unsigned long address);
-extern void gru_check_context_placement(struct gru_thread_state *gts);
+extern int gru_check_context_placement(struct gru_thread_state *gts);
 extern int gru_cpu_fault_map_id(void);
 extern struct vm_area_struct *gru_find_vma(unsigned long vaddr);
 extern void gru_flush_all_tlb(struct gru_state *gru);
drivers/misc/tifm_7xx1.c +1 -1
index a37a42f67088..8498282d1212 100644
@@ -194,7 +194,7 @@ static void tifm_7xx1_switch_media(struct work_struct *work)
 				spin_unlock_irqrestore(&fm->lock, flags);
 			}
 			if (sock)
-				tifm_free_device(&sock->dev);
+				put_device(&sock->dev);
 		}
 		spin_lock_irqsave(&fm->lock, flags);
 	}
drivers/mmc/host/mmci.c +3 -1
index df990bb8c873..347dffaea105 100644
@@ -1718,7 +1718,9 @@ static int mmci_probe(struct amba_device *dev,
 	pm_runtime_set_autosuspend_delay(&dev->dev, 50);
 	pm_runtime_use_autosuspend(&dev->dev);
 
-	mmc_add_host(mmc);
+	ret = mmc_add_host(mmc);
+	if (ret)
+		goto clk_disable;
 
 	pm_runtime_put(&dev->dev);
 	return 0;
drivers/mmc/host/moxart-mmc.c +3 -1
index 4f8588c3bf53..48645b736ba5 100644
@@ -662,7 +662,9 @@ static int moxart_probe(struct platform_device *pdev)
 		goto out;
 
 	dev_set_drvdata(dev, mmc);
-	mmc_add_host(mmc);
+	ret = mmc_add_host(mmc);
+	if (ret)
+		goto out;
 
 	dev_dbg(dev, "IRQ=%d, FIFO is %d bytes\n", irq, host->fifo_width);
 
drivers/mmc/host/mxcmmc.c +3 -1
index fb3ca8296273..2c57cccb0fa1 100644
@@ -1159,7 +1159,9 @@ static int mxcmci_probe(struct platform_device *pdev)
 	host->watchdog.function = &mxcmci_watchdog;
 	host->watchdog.data = (unsigned long)mmc;
 
-	mmc_add_host(mmc);
+	ret = mmc_add_host(mmc);
+	if (ret)
+		goto out_free_dma;
 
 	return 0;
 
drivers/mmc/host/rtsx_usb_sdmmc.c +10 -1
index 6e9c0f8fddb1..817fbf510d1e 100644
@@ -1355,6 +1355,7 @@ static int rtsx_usb_sdmmc_drv_probe(struct platform_device *pdev)
 #ifdef RTSX_USB_USE_LEDS_CLASS
 	int err;
 #endif
+	int ret;
 
 	ucr = usb_get_intfdata(to_usb_interface(pdev->dev.parent));
 	if (!ucr)
@@ -1391,7 +1392,15 @@ static int rtsx_usb_sdmmc_drv_probe(struct platform_device *pdev)
 	INIT_WORK(&host->led_work, rtsx_usb_update_led);
 
 #endif
-	mmc_add_host(mmc);
+	ret = mmc_add_host(mmc);
+	if (ret) {
+#ifdef RTSX_USB_USE_LEDS_CLASS
+		led_classdev_unregister(&host->led);
+#endif
+		mmc_free_host(mmc);
+		pm_runtime_disable(&pdev->dev);
+		return ret;
+	}
 
 	return 0;
 }
drivers/mmc/host/sdhci_f_sdh30.c +3 -0
index 111b66f5439b..43e787954293 100644
@@ -180,6 +180,9 @@ static int sdhci_f_sdh30_probe(struct platform_device *pdev)
 	if (reg & SDHCI_CAN_DO_8BIT)
 		priv->vendor_hs200 = F_SDH30_EMMC_HS200;
 
+	if (!(reg & SDHCI_TIMEOUT_CLK_MASK))
+		host->quirks |= SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK;
+
 	ret = sdhci_add_host(host);
 	if (ret)
 		goto err_add_host;
drivers/mmc/host/toshsd.c +5 -1
index 553ef41bb806..c0d3b289d8d4 100644
@@ -655,7 +655,9 @@ static int toshsd_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	if (ret)
 		goto unmap;
 
-	mmc_add_host(mmc);
+	ret = mmc_add_host(mmc);
+	if (ret)
+		goto free_irq;
 
 	base = pci_resource_start(pdev, 0);
 	dev_dbg(&pdev->dev, "MMIO %pa, IRQ %d\n", &base, pdev->irq);
@@ -664,6 +666,8 @@ static int toshsd_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	return 0;
 
+free_irq:
+	free_irq(pdev->irq, host);
 unmap:
 	pci_iounmap(pdev, host->ioaddr);
 release:
drivers/mmc/host/via-sdmmc.c +3 -1
index a3472127bea3..74ac1ac55f42 100644
@@ -1162,7 +1162,9 @@ static int via_sd_probe(struct pci_dev *pcidev,
 	    pcidev->subsystem_device == 0x3891)
 		sdhost->quirks = VIA_CRDR_QUIRK_300MS_PWRDELAY;
 
-	mmc_add_host(mmc);
+	ret = mmc_add_host(mmc);
+	if (ret)
+		goto unmap;
 
 	return 0;
 
drivers/mmc/host/vub300.c +10 -3
index 875e438ab973..58d3a22ba8dc 100644
@@ -2056,6 +2056,7 @@ static void vub300_enable_sdio_irq(struct mmc_host *mmc, int enable)
 		return;
 	kref_get(&vub300->kref);
 	if (enable) {
+		set_current_state(TASK_RUNNING);
 		mutex_lock(&vub300->irq_mutex);
 		if (vub300->irqs_queued) {
 			vub300->irqs_queued -= 1;
@@ -2071,6 +2072,7 @@ static void vub300_enable_sdio_irq(struct mmc_host *mmc, int enable)
 			vub300_queue_poll_work(vub300, 0);
 		}
 		mutex_unlock(&vub300->irq_mutex);
+		set_current_state(TASK_INTERRUPTIBLE);
 	} else {
 		vub300->irq_enabled = 0;
 	}
@@ -2312,14 +2314,14 @@ static int vub300_probe(struct usb_interface *interface,
 				0x0000, 0x0000, &vub300->system_port_status,
 				sizeof(vub300->system_port_status), 1000);
 	if (retval < 0) {
-		goto error4;
+		goto error5;
 	} else if (sizeof(vub300->system_port_status) == retval) {
 		vub300->card_present =
 			(0x0001 & vub300->system_port_status.port_flags) ? 1 : 0;
 		vub300->read_only =
 			(0x0010 & vub300->system_port_status.port_flags) ? 1 : 0;
 	} else {
-		goto error4;
+		goto error5;
 	}
 	usb_set_intfdata(interface, vub300);
 	INIT_DELAYED_WORK(&vub300->pollwork, vub300_pollwork_thread);
@@ -2345,8 +2347,13 @@ static int vub300_probe(struct usb_interface *interface,
 			 "USB vub300 remote SDIO host controller[%d]"
 			 "connected with no SD/SDIO card inserted\n",
 			 interface_to_InterfaceNumber(interface));
-	mmc_add_host(mmc);
+	retval = mmc_add_host(mmc);
+	if (retval)
+		goto error6;
+
 	return 0;
+error6:
+	del_timer_sync(&vub300->inactivity_timer);
 error5:
 	mmc_free_host(mmc);
 	/*
drivers/mmc/host/wbsd.c +11 -1
index c3fd16d997ca..402b044c9a0b 100644
@@ -1712,7 +1712,17 @@ static int wbsd_init(struct device *dev, int base, int irq, int dma,
 	 */
 	wbsd_init_device(host);
 
-	mmc_add_host(mmc);
+	ret = mmc_add_host(mmc);
+	if (ret) {
+		if (!pnp)
+			wbsd_chip_poweroff(host);
+
+		wbsd_release_resources(host);
+		wbsd_free_mmc(dev);
+
+		mmc_free_host(mmc);
+		return ret;
+	}
 
 	pr_info("%s: W83L51xD", mmc_hostname(mmc));
 	if (host->chip_id != 0)
drivers/mtd/lpddr/lpddr2_nvm.c +2 -0
index 5e36366d9b36..19b00225c7ef 100644
@@ -448,6 +448,8 @@ static int lpddr2_nvm_probe(struct platform_device *pdev)
 
 	/* lpddr2_nvm address range */
 	add_range = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	if (!add_range)
+		return -ENODEV;
 
 	/* Populate map_info data structure */
 	*map = (struct map_info) {
drivers/mtd/maps/pxa2xx-flash.c +2 -0
index 2cde28ed95c9..59d2fe1f46e1 100644
@@ -69,6 +69,7 @@ static int pxa2xx_flash_probe(struct platform_device *pdev)
 	if (!info->map.virt) {
 		printk(KERN_WARNING "Failed to ioremap %s\n",
 		       info->map.name);
+		kfree(info);
 		return -ENOMEM;
 	}
 	info->map.cached =
@@ -91,6 +92,7 @@ static int pxa2xx_flash_probe(struct platform_device *pdev)
 		iounmap((void *)info->map.virt);
 		if (info->map.cached)
 			iounmap(info->map.cached);
+		kfree(info);
 		return -EIO;
 	}
 	info->mtd->dev.parent = &pdev->dev;
drivers/mtd/mtdcore.c +3 -1
index d46e4adf6d2b..4cf97cdbdefe 100644
@@ -552,8 +552,10 @@ int add_mtd_device(struct mtd_info *mtd)
 	dev_set_drvdata(&mtd->dev, mtd);
 	of_node_get(mtd_get_of_node(mtd));
 	error = device_register(&mtd->dev);
-	if (error)
+	if (error) {
+		put_device(&mtd->dev);
 		goto fail_added;
+	}
 
 	device_create(&mtd_class, mtd->dev.parent, MTD_DEVT(i) + 1, NULL,
 		      "mtd%dro", i);
drivers/net/bonding/bond_main.c +1 -1
index 33843b89ab04..d606e0a6b335 100644
@@ -2052,10 +2052,10 @@ static int bond_slave_info_query(struct net_device *bond_dev, struct ifslave *in
 /* called with rcu_read_lock() */
 static int bond_miimon_inspect(struct bonding *bond)
 {
+	bool ignore_updelay = false;
 	int link_state, commit = 0;
 	struct list_head *iter;
 	struct slave *slave;
-	bool ignore_updelay;
 
 	ignore_updelay = !rcu_dereference(bond->curr_active_slave);
 
drivers/net/ethernet/amd/atarilance.c +1 -1
index 35a9f252ceb6..421e47f8b54a 100644
@@ -826,7 +826,7 @@ lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
 	lp->memcpy_f( PKTBUF_ADDR(head), (void *)skb->data, skb->len );
 	head->flag = TMD1_OWN_CHIP | TMD1_ENP | TMD1_STP;
 	dev->stats.tx_bytes += skb->len;
-	dev_kfree_skb( skb );
+	dev_consume_skb_irq(skb);
 	lp->cur_tx++;
 	while( lp->cur_tx >= TX_RING_SIZE && lp->dirty_tx >= TX_RING_SIZE ) {
 		lp->cur_tx -= TX_RING_SIZE;
drivers/net/ethernet/amd/lance.c +1 -1
index abb1ba228b26..3495e0b4d3ef 100644
@@ -998,7 +998,7 @@ static netdev_tx_t lance_start_xmit(struct sk_buff *skb,
 		skb_copy_from_linear_data(skb, &lp->tx_bounce_buffs[entry], skb->len);
 		lp->tx_ring[entry].base =
 			((u32)isa_virt_to_bus((lp->tx_bounce_buffs + entry)) & 0xffffff) | 0x83000000;
-		dev_kfree_skb(skb);
+		dev_consume_skb_irq(skb);
 	} else {
 		lp->tx_skbuff[entry] = skb;
 		lp->tx_ring[entry].base = ((u32)isa_virt_to_bus(skb->data) & 0xffffff) | 0x83000000;
drivers/net/ethernet/apple/bmac.c +1 -1
index ffa7e7e6d18d..01874e1dbb8b 100644
@@ -1518,7 +1518,7 @@ static void bmac_tx_timeout(unsigned long data)
 	i = bp->tx_empty;
 	++dev->stats.tx_errors;
 	if (i != bp->tx_fill) {
-		dev_kfree_skb(bp->tx_bufs[i]);
+		dev_kfree_skb_irq(bp->tx_bufs[i]);
 		bp->tx_bufs[i] = NULL;
 		if (++i >= N_TX_RING) i = 0;
 		bp->tx_empty = i;
drivers/net/ethernet/apple/mace.c +1 -1
index e58a7c73766e..ea6199425b67 100644
@@ -843,7 +843,7 @@ static void mace_tx_timeout(unsigned long data)
     if (mp->tx_bad_runt) {
 	mp->tx_bad_runt = 0;
     } else if (i != mp->tx_fill) {
-	dev_kfree_skb(mp->tx_bufs[i]);
+	dev_kfree_skb_irq(mp->tx_bufs[i]);
 	if (++i >= N_TX_RING)
 	    i = 0;
 	mp->tx_empty = i;
drivers/net/ethernet/dnet.c +2 -2
index c3b64cdd0dec..62fcedd6f732 100644
@@ -558,11 +558,11 @@ static netdev_tx_t dnet_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
 	skb_tx_timestamp(skb);
 
+	spin_unlock_irqrestore(&bp->lock, flags);
+
 	/* free the buffer */
 	dev_kfree_skb(skb);
 
-	spin_unlock_irqrestore(&bp->lock, flags);
-
 	return NETDEV_TX_OK;
 }
 
drivers/net/ethernet/intel/igb/igb_main.c +6 -2
index 2e713e5f75cd..bbca786f0427 100644
@@ -1219,8 +1219,12 @@ static int igb_alloc_q_vector(struct igb_adapter *adapter,
 	if (!q_vector) {
 		q_vector = kzalloc(size, GFP_KERNEL);
 	} else if (size > ksize(q_vector)) {
-		kfree_rcu(q_vector, rcu);
-		q_vector = kzalloc(size, GFP_KERNEL);
+		struct igb_q_vector *new_q_vector;
+
+		new_q_vector = kzalloc(size, GFP_KERNEL);
+		if (new_q_vector)
+			kfree_rcu(q_vector, rcu);
+		q_vector = new_q_vector;
 	} else {
 		memset(q_vector, 0, size);
 	}
drivers/net/ethernet/myricom/myri10ge/myri10ge.c +1 -0
index 5eeba263b5f8..d50cee7aae4d 100644
@@ -4152,6 +4152,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	myri10ge_free_slices(mgp);
 
 abort_with_firmware:
+	kfree(mgp->msix_vectors);
 	myri10ge_dummy_rdma(mgp, 0);
 
 abort_with_ioremap:
drivers/net/ethernet/neterion/s2io.c +1 -1
index a66f4b867e3a..a66b797cdbbe 100644
@@ -2384,7 +2384,7 @@ static void free_tx_buffers(struct s2io_nic *nic)
 			skb = s2io_txdl_getskb(&mac_control->fifos[i], txdp, j);
 			if (skb) {
 				swstats->mem_freed += skb->truesize;
-				dev_kfree_skb(skb);
+				dev_kfree_skb_irq(skb);
 				cnt++;
 			}
 		}
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c +2 -0
index 44caa7c2077e..d89d9247b7b9 100644
@@ -222,6 +222,8 @@ int qlcnic_sriov_init(struct qlcnic_adapter *adapter, int num_vfs)
 	return 0;
 
 qlcnic_destroy_async_wq:
+	while (i--)
+		kfree(sriov->vf_info[i].vp);
 	destroy_workqueue(bc->bc_async_wq);
 
 qlcnic_destroy_trans_wq:
drivers/net/ethernet/rdc/r6040.c +4 -1
index 065a63123863..4a963b4ec0eb 100644
@@ -1185,10 +1185,12 @@ static int r6040_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 	err = register_netdev(dev);
 	if (err) {
 		dev_err(&pdev->dev, "Failed to register net device\n");
-		goto err_out_mdio_unregister;
+		goto err_out_phy_disconnect;
 	}
 	return 0;
 
+err_out_phy_disconnect:
+	phy_disconnect(dev->phydev);
 err_out_mdio_unregister:
 	mdiobus_unregister(lp->mii_bus);
 err_out_mdio:
@@ -1212,6 +1214,7 @@ static void r6040_remove_one(struct pci_dev *pdev)
 	struct r6040_private *lp = netdev_priv(dev);
 
 	unregister_netdev(dev);
+	phy_disconnect(dev->phydev);
 	mdiobus_unregister(lp->mii_bus);
 	mdiobus_free(lp->mii_bus);
 	netif_napi_del(&lp->napi);
drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c +2 -1
index 5b91a95476de..c925a8fb1993 100644
@@ -57,7 +57,8 @@ static u32 stmmac_config_sub_second_increment(void __iomem *ioaddr,
 	if (!(value & PTP_TCR_TSCTRLSSR))
 		data = (data * 1000) / 465;
 
-	data &= PTP_SSIR_SSINC_MASK;
+	if (data > PTP_SSIR_SSINC_MAX)
+		data = PTP_SSIR_SSINC_MAX;
 
 	reg_value = data;
 	if (gmac4)
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h +1 -1
index 174777cd888e..06fd27fc9a08 100644
@@ -69,7 +69,7 @@
 #define	PTP_TCR_TSENMACADDR	BIT(18)
 
 /* SSIR defines */
-#define	PTP_SSIR_SSINC_MASK		0xff
+#define	PTP_SSIR_SSINC_MAX		0xff
 #define	GMAC4_PTP_SSIR_SSINC_SHIFT	16
 
 #endif	/* __STMMAC_PTP_H__ */
drivers/net/ethernet/ti/netcp_core.c +1 -1
index c17967b23d3c..957701d48712 100644
@@ -1237,7 +1237,7 @@ static int netcp_tx_submit_skb(struct netcp_intf *netcp,
 }
 
 /* Submit the packet */
-static int netcp_ndo_start_xmit(struct sk_buff *skb, struct net_device *ndev)
+static netdev_tx_t netcp_ndo_start_xmit(struct sk_buff *skb, struct net_device *ndev)
 {
 	struct netcp_intf *netcp = netdev_priv(ndev);
 	int subqueue = skb_get_queue_mapping(skb);
drivers/net/ethernet/xilinx/xilinx_emaclite.c +1 -1
index cdcc86060749..99c7872504fe 100644
@@ -537,7 +537,7 @@ static void xemaclite_tx_timeout(struct net_device *dev)
 	xemaclite_enable_interrupts(lp);
 
 	if (lp->deferred_skb) {
-		dev_kfree_skb(lp->deferred_skb);
+		dev_kfree_skb_irq(lp->deferred_skb);
 		lp->deferred_skb = NULL;
 		dev->stats.tx_errors++;
 	}
drivers/net/fddi/defxx.c +18 -4
index bdcf4aa34566..bb3c7781cdfa 100644
@@ -3844,10 +3844,24 @@ static int dfx_init(void)
 	int status;
 
 	status = pci_register_driver(&dfx_pci_driver);
-	if (!status)
-		status = eisa_driver_register(&dfx_eisa_driver);
-	if (!status)
-		status = tc_register_driver(&dfx_tc_driver);
+	if (status)
+		goto err_pci_register;
+
+	status = eisa_driver_register(&dfx_eisa_driver);
+	if (status)
+		goto err_eisa_register;
+
+	status = tc_register_driver(&dfx_tc_driver);
+	if (status)
+		goto err_tc_register;
+
+	return 0;
+
+err_tc_register:
+	eisa_driver_unregister(&dfx_eisa_driver);
+err_eisa_register:
+	pci_unregister_driver(&dfx_pci_driver);
+err_pci_register:
 	return status;
 }
 
drivers/net/hamradio/baycom_epp.c +1 -1
index 78dbc44540f6..b7831d0fd084 100644
@@ -768,7 +768,7 @@ static void epp_bh(struct work_struct *work)
  * ===================== network driver interface =========================
  */
 
-static int baycom_send_packet(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t baycom_send_packet(struct sk_buff *skb, struct net_device *dev)
 {
 	struct baycom_state *bc = netdev_priv(dev);
 
drivers/net/hamradio/scc.c +3 -3
index b8083161ef46..9b9daf45adad 100644
@@ -299,12 +299,12 @@ static inline void scc_discard_buffers(struct scc_channel *scc)
 	spin_lock_irqsave(&scc->lock, flags);	
 	if (scc->tx_buff != NULL)
 	{
-		dev_kfree_skb(scc->tx_buff);
+		dev_kfree_skb_irq(scc->tx_buff);
 		scc->tx_buff = NULL;
 	}
 	
 	while (!skb_queue_empty(&scc->tx_queue))
-		dev_kfree_skb(skb_dequeue(&scc->tx_queue));
+		dev_kfree_skb_irq(skb_dequeue(&scc->tx_queue));
 
 	spin_unlock_irqrestore(&scc->lock, flags);
 }
@@ -1666,7 +1666,7 @@ static netdev_tx_t scc_net_tx(struct sk_buff *skb, struct net_device *dev)
 	if (skb_queue_len(&scc->tx_queue) > scc->dev->tx_queue_len) {
 		struct sk_buff *skb_del;
 		skb_del = skb_dequeue(&scc->tx_queue);
-		dev_kfree_skb(skb_del);
+		dev_kfree_skb_irq(skb_del);
 	}
 	skb_queue_tail(&scc->tx_queue, skb);
 	netif_trans_update(dev);
drivers/net/loopback.c +1 -1
index 1b65f0f975cf..f04f9a87840e 100644
@@ -194,7 +194,7 @@ static __net_init int loopback_net_init(struct net *net)
 	int err;
 
 	err = -ENOMEM;
-	dev = alloc_netdev(0, "lo", NET_NAME_UNKNOWN, loopback_setup);
+	dev = alloc_netdev(0, "lo", NET_NAME_PREDICTABLE, loopback_setup);
 	if (!dev)
 		goto out;
 
drivers/net/ntb_netdev.c +2 -2
index bd6c19ceab30..c4a3143cef25 100644
@@ -140,7 +140,7 @@ static void ntb_netdev_rx_handler(struct ntb_transport_qp *qp, void *qp_data,
 enqueue_again:
 	rc = ntb_transport_rx_enqueue(qp, skb, skb->data, ndev->mtu + ETH_HLEN);
 	if (rc) {
-		dev_kfree_skb(skb);
+		dev_kfree_skb_any(skb);
 		ndev->stats.rx_errors++;
 		ndev->stats.rx_fifo_errors++;
 	}
@@ -195,7 +195,7 @@ static void ntb_netdev_tx_handler(struct ntb_transport_qp *qp, void *qp_data,
 		ndev->stats.tx_aborted_errors++;
 	}
 
-	dev_kfree_skb(skb);
+	dev_kfree_skb_any(skb);
 
 	if (ntb_transport_tx_free_entry(dev->qp) >= tx_start) {
 		/* Make sure anybody stopping the queue after this sees the new
drivers/net/ppp/ppp_generic.c +2 -0
index 6287d2ad77c6..f6cf25cba16e 100644
@@ -1541,6 +1541,8 @@ ppp_send_frame(struct ppp *ppp, struct sk_buff *skb)
 	int len;
 	unsigned char *cp;
 
+	skb->dev = ppp->dev;
+
 	if (proto < 0x8000) {
 #ifdef CONFIG_PPP_FILTER
 		/* check if we should pass this packet */
drivers/net/wan/farsync.c +2 -0
index 3c9cbf908ec7..e8522014a67a 100644
@@ -2620,6 +2620,7 @@ fst_remove_one(struct pci_dev *pdev)
 	for (i = 0; i < card->nports; i++) {
 		struct net_device *dev = port_to_dev(&card->ports[i]);
 		unregister_hdlc_device(dev);
+		free_netdev(dev);
 	}
 
 	fst_disable_intr(card);
@@ -2640,6 +2641,7 @@ fst_remove_one(struct pci_dev *pdev)
 				    card->tx_dma_handle_card);
 	}
 	fst_card_array[card->card_no] = NULL;
+	kfree(card);
 }
 
 static struct pci_driver fst_driver = {
drivers/net/wireless/ath/ar5523/ar5523.c +6 -0
index 0c6b33c464cd..187061a43f7f 100644
@@ -241,6 +241,11 @@ static void ar5523_cmd_tx_cb(struct urb *urb)
 	}
 }
 
+static void ar5523_cancel_tx_cmd(struct ar5523 *ar)
+{
+	usb_kill_urb(ar->tx_cmd.urb_tx);
+}
+
 static int ar5523_cmd(struct ar5523 *ar, u32 code, const void *idata,
 		      int ilen, void *odata, int olen, int flags)
 {
@@ -280,6 +285,7 @@ static int ar5523_cmd(struct ar5523 *ar, u32 code, const void *idata,
 	}
 
 	if (!wait_for_completion_timeout(&cmd->done, 2 * HZ)) {
+		ar5523_cancel_tx_cmd(ar);
 		cmd->odata = NULL;
 		ar5523_err(ar, "timeout waiting for command %02x reply\n",
 			   code);
drivers/net/wireless/ath/ath10k/pci.c +12 -8
index d96e062647fd..450eb7b31256 100644
@@ -3381,18 +3381,22 @@ static struct pci_driver ath10k_pci_driver = {
 
 static int __init ath10k_pci_init(void)
 {
-	int ret;
+	int ret1, ret2;
 
-	ret = pci_register_driver(&ath10k_pci_driver);
-	if (ret)
+	ret1 = pci_register_driver(&ath10k_pci_driver);
+	if (ret1)
 		printk(KERN_ERR "failed to register ath10k pci driver: %d\n",
-		       ret);
+		       ret1);
 
-	ret = ath10k_ahb_init();
-	if (ret)
-		printk(KERN_ERR "ahb init failed: %d\n", ret);
+	ret2 = ath10k_ahb_init();
+	if (ret2)
+		printk(KERN_ERR "ahb init failed: %d\n", ret2);
 
-	return ret;
+	if (ret1 && ret2)
+		return ret1;
+
+	/* registered to at least one bus */
+	return 0;
 }
 module_init(ath10k_pci_init);
 
drivers/net/wireless/ath/ath9k/hif_usb.c +29 -17

111 lines not on this page · raw message

drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c +5 -0
index 33a7378164b8..6675de16e3b9 100644
@@ -572,6 +572,11 @@ int brcmf_fw_map_chip_to_name(u32 chip, u32 chiprev,
 	u32 i;
 	char end;
 
+	if (chiprev >= BITS_PER_TYPE(u32)) {
+		brcmf_err("Invalid chip revision %u\n", chiprev);
+		return NULL;
+	}
+
 	for (i = 0; i < table_size; i++) {
 		if (mapping_table[i].chipid == chip &&
 		    mapping_table[i].revmask & BIT(chiprev))
drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +1 -1
index 9e90737f4d49..45464bcd0960 100644
@@ -578,7 +578,7 @@ static int brcmf_pcie_exit_download_state(struct brcmf_pciedev_info *devinfo,
 	}
 
 	if (!brcmf_chip_set_active(devinfo->ci, resetintr))
-		return -EINVAL;
+		return -EIO;
 	return 0;
 }
 
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +1 -0
index d8f34883c096..d80aee2f5802 100644
@@ -3310,6 +3310,7 @@ static int brcmf_sdio_download_firmware(struct brcmf_sdio *bus,
 	/* Take arm out of reset */
 	if (!brcmf_chip_set_active(bus->ci, rstvec)) {
 		brcmf_err("error getting out of ARM core reset\n");
+		bcmerror = -EIO;
 		goto err;
 	}
 
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h +1 -1
index 9143b173935d..c2c0e5635795 100644
@@ -1191,7 +1191,7 @@ struct rtl8723bu_c2h {
 			u8 dummy3_0;
 		} __packed ra_report;
 	};
-};
+} __packed;
 
 struct rtl8xxxu_fileops;
 
drivers/nfc/pn533/pn533.c +4 -0
index 806309ee4165..fe81946a9ab4 100644
@@ -1294,6 +1294,8 @@ static int pn533_poll_dep_complete(struct pn533 *dev, void *arg,
 	if (IS_ERR(resp))
 		return PTR_ERR(resp);
 
+	memset(&nfc_target, 0, sizeof(struct nfc_target));
+
 	rsp = (struct pn533_cmd_jump_dep_response *)resp->data;
 
 	rc = rsp->status & PN533_CMD_RET_MASK;
@@ -1776,6 +1778,8 @@ static int pn533_in_dep_link_up_complete(struct pn533 *dev, void *arg,
 
 		dev_dbg(dev->dev, "Creating new target\n");
 
+		memset(&nfc_target, 0, sizeof(struct nfc_target));
+
 		nfc_target.supported_protocols = NFC_PROTO_NFC_DEP_MASK;
 		nfc_target.nfcid1_len = 10;
 		memcpy(nfc_target.nfcid1, rsp->nfcid3t, nfc_target.nfcid1_len);
drivers/parisc/led.c +3 -0
index 3a91e06926ad..e800e83fa225 100644
@@ -141,6 +141,9 @@ static int start_task(void)
 
 	/* Create the work queue and queue the LED task */
 	led_wq = create_singlethread_workqueue("led_wq");	
+	if (!led_wq)
+		return -ENOMEM;
+
 	queue_delayed_work(led_wq, &led_task, 0);
 
 	return 0;
drivers/pci/pci-sysfs.c +9 -4
index 717540161223..faec4ae77ee2 100644
@@ -1167,11 +1167,9 @@ static int pci_create_attr(struct pci_dev *pdev, int num, int write_combine)
 
 	sysfs_bin_attr_init(res_attr);
 	if (write_combine) {
-		pdev->res_attr_wc[num] = res_attr;
 		sprintf(res_attr_name, "resource%d_wc", num);
 		res_attr->mmap = pci_mmap_resource_wc;
 	} else {
-		pdev->res_attr[num] = res_attr;
 		sprintf(res_attr_name, "resource%d", num);
 		res_attr->mmap = pci_mmap_resource_uc;
 	}
@@ -1184,10 +1182,17 @@ static int pci_create_attr(struct pci_dev *pdev, int num, int write_combine)
 	res_attr->size = pci_resource_len(pdev, num);
 	res_attr->private = &pdev->resource[num];
 	retval = sysfs_create_bin_file(&pdev->dev.kobj, res_attr);
-	if (retval)
+	if (retval) {
 		kfree(res_attr);
+		return retval;
+	}
 
-	return retval;
+	if (write_combine)
+		pdev->res_attr_wc[num] = res_attr;
+	else
+		pdev->res_attr[num] = res_attr;
+
+	return 0;
 }
 
 /**
drivers/pinctrl/pinconf-generic.c +3 -1
index 074a7e044e25..b0e41fb3623d 100644
@@ -384,8 +384,10 @@ int pinconf_generic_dt_node_to_map(struct pinctrl_dev *pctldev,
 	for_each_child_of_node(np_config, np) {
 		ret = pinconf_generic_dt_subnode_to_map(pctldev, np, map,
 					&reserved_maps, num_maps, type);
-		if (ret < 0)
+		if (ret < 0) {
+			of_node_put(np);
 			goto exit;
+		}
 	}
 	return 0;
 
drivers/pnp/core.c +2 -2
index b54620e53830..3d5865c7694b 100644
@@ -159,14 +159,14 @@ struct pnp_dev *pnp_alloc_dev(struct pnp_protocol *protocol, int id,
 	dev->dev.coherent_dma_mask = dev->dma_mask;
 	dev->dev.release = &pnp_release_device;
 
-	dev_set_name(&dev->dev, "%02x:%02x", dev->protocol->number, dev->number);
-
 	dev_id = pnp_add_id(dev, pnpid);
 	if (!dev_id) {
 		kfree(dev);
 		return NULL;
 	}
 
+	dev_set_name(&dev->dev, "%02x:%02x", dev->protocol->number, dev->number);
+
 	return dev;
 }
 
drivers/power/avs/smartreflex.c +1 -0
index bb7b817cca59..a695c87ae459 100644
@@ -971,6 +971,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
 err_debugfs:
 	debugfs_remove_recursive(sr_info->dbg_dir);
 err_list_del:
+	pm_runtime_disable(&pdev->dev);
 	list_del(&sr_info->node);
 	return ret;
 }
drivers/power/supply/power_supply_core.c +1 -1
index cb0b3d3d132f..af156b7f346f 100644
@@ -807,8 +807,8 @@ __power_supply_register(struct device *parent,
 register_cooler_failed:
 	psy_unregister_thermal(psy);
 register_thermal_failed:
-	device_del(dev);
 wakeup_init_failed:
+	device_del(dev);
 device_add_failed:
 check_supplies_failed:
 dev_set_name_failed:
drivers/rapidio/devices/rio_mport_cdev.c +9 -6
index c246d3a2fc5f..2c232217fd35 100644
@@ -1864,8 +1864,11 @@ static int rio_mport_add_riodev(struct mport_cdev_priv *priv,
 		rio_init_dbell_res(&rdev->riores[RIO_DOORBELL_RESOURCE],
 				   0, 0xffff);
 	err = rio_add_device(rdev);
-	if (err)
-		goto cleanup;
+	if (err) {
+		put_device(&rdev->dev);
+		return err;
+	}
+
 	rio_dev_get(rdev);
 
 	return 0;
@@ -1961,10 +1964,6 @@ static int mport_cdev_open(struct inode *inode, struct file *filp)
 
 	priv->md = chdev;
 
-	mutex_lock(&chdev->file_mutex);
-	list_add_tail(&priv->list, &chdev->file_list);
-	mutex_unlock(&chdev->file_mutex);
-
 	INIT_LIST_HEAD(&priv->db_filters);
 	INIT_LIST_HEAD(&priv->pw_filters);
 	spin_lock_init(&priv->fifo_lock);
@@ -1973,6 +1972,7 @@ static int mport_cdev_open(struct inode *inode, struct file *filp)
 			  sizeof(struct rio_event) * MPORT_EVENT_DEPTH,
 			  GFP_KERNEL);
 	if (ret < 0) {
+		put_device(&chdev->dev);
 		dev_err(&chdev->dev, DRV_NAME ": kfifo_alloc failed\n");
 		ret = -ENOMEM;
 		goto err_fifo;
@@ -1984,6 +1984,9 @@ static int mport_cdev_open(struct inode *inode, struct file *filp)
 	spin_lock_init(&priv->req_lock);
 	mutex_init(&priv->dma_lock);
 #endif
+	mutex_lock(&chdev->file_mutex);
+	list_add_tail(&priv->list, &chdev->file_list);
+	mutex_unlock(&chdev->file_mutex);
 
 	filp->private_data = priv;
 	goto out;
drivers/rapidio/rio-scan.c +6 -2
index 23429bdaca84..26ab8c463dae 100644
@@ -460,8 +460,12 @@ static struct rio_dev *rio_setup_device(struct rio_net *net,
 				   0, 0xffff);
 
 	ret = rio_add_device(rdev);
-	if (ret)
-		goto cleanup;
+	if (ret) {
+		if (rswitch)
+			kfree(rswitch->route_table);
+		put_device(&rdev->dev);
+		return NULL;
+	}
 
 	rio_dev_get(rdev);
 
drivers/rapidio/rio.c +7 -2
index 37042858c2db..4710286096dc 100644
@@ -2275,11 +2275,16 @@ int rio_register_mport(struct rio_mport *port)
 	atomic_set(&port->state, RIO_DEVICE_RUNNING);
 
 	res = device_register(&port->dev);
-	if (res)
+	if (res) {
 		dev_err(&port->dev, "RIO: mport%d registration failed ERR=%d\n",
 			port->id, res);
-	else
+		mutex_lock(&rio_mport_list_lock);
+		list_del(&port->node);
+		mutex_unlock(&rio_mport_list_lock);
+		put_device(&port->dev);
+	} else {
 		dev_dbg(&port->dev, "RIO: registered mport%d\n", port->id);
+	}
 
 	return res;
 }
drivers/regulator/core.c +2 -0
index 23323add5b0b..cbc3397258f6 100644
@@ -1157,6 +1157,7 @@ static int set_supply(struct regulator_dev *rdev,
 
 	rdev->supply = create_regulator(supply_rdev, &rdev->dev, "SUPPLY");
 	if (rdev->supply == NULL) {
+		module_put(supply_rdev->owner);
 		err = -ENOMEM;
 		return err;
 	}
@@ -1471,6 +1472,7 @@ static struct regulator_dev *regulator_dev_lookup(struct device *dev,
 		node = of_get_regulator(dev, supply);
 		if (node) {
 			r = of_find_regulator_by_node(node);
+			of_node_put(node);
 			if (r)
 				return r;
 			*ret = -EPROBE_DEFER;
drivers/rtc/rtc-snvs.c +14 -2
index 71eee39520f0..792089ffc274 100644
@@ -39,6 +39,14 @@
 #define SNVS_LPPGDR_INIT	0x41736166
 #define CNTR_TO_SECS_SH		15
 
+/* The maximum RTC clock cycles that are allowed to pass between two
+ * consecutive clock counter register reads. If the values are corrupted a
+ * bigger difference is expected. The RTC frequency is 32kHz. With 320 cycles
+ * we end at 10ms which should be enough for most cases. If it once takes
+ * longer than expected we do a retry.
+ */
+#define MAX_RTC_READ_DIFF_CYCLES	320
+
 struct snvs_rtc_data {
 	struct rtc_device *rtc;
 	struct regmap *regmap;
@@ -63,6 +71,7 @@ static u64 rtc_read_lpsrt(struct snvs_rtc_data *data)
 static u32 rtc_read_lp_counter(struct snvs_rtc_data *data)
 {
 	u64 read1, read2;
+	s64 diff;
 	unsigned int timeout = 100;
 
 	/* As expected, the registers might update between the read of the LSB
@@ -73,7 +82,8 @@ static u32 rtc_read_lp_counter(struct snvs_rtc_data *data)
 	do {
 		read2 = read1;
 		read1 = rtc_read_lpsrt(data);
-	} while (read1 != read2 && --timeout);
+		diff = read1 - read2;
+	} while (((diff < 0) || (diff > MAX_RTC_READ_DIFF_CYCLES)) && --timeout);
 	if (!timeout)
 		dev_err(&data->rtc->dev, "Timeout trying to get valid LPSRT Counter read\n");
 
@@ -85,13 +95,15 @@ static u32 rtc_read_lp_counter(struct snvs_rtc_data *data)
 static int rtc_read_lp_counter_lsb(struct snvs_rtc_data *data, u32 *lsb)
 {
 	u32 count1, count2;
+	s32 diff;
 	unsigned int timeout = 100;
 
 	regmap_read(data->regmap, data->offset + SNVS_LPSRTCLR, &count1);
 	do {
 		count2 = count1;
 		regmap_read(data->regmap, data->offset + SNVS_LPSRTCLR, &count1);
-	} while (count1 != count2 && --timeout);
+		diff = count1 - count2;
+	} while (((diff < 0) || (diff > MAX_RTC_READ_DIFF_CYCLES)) && --timeout);
 	if (!timeout) {
 		dev_err(&data->rtc->dev, "Timeout trying to get valid LPSRT Counter read\n");
 		return -ETIMEDOUT;
drivers/rtc/rtc-st-lpc.c +1 -0
index 74c0a336ceea..85756ef63c22 100644
@@ -249,6 +249,7 @@ static int st_rtc_probe(struct platform_device *pdev)
 
 	rtc->clkrate = clk_get_rate(rtc->clk);
 	if (!rtc->clkrate) {
+		clk_disable_unprepare(rtc->clk);
 		dev_err(&pdev->dev, "Unable to fetch clock rate\n");
 		return -EINVAL;
 	}
drivers/s390/net/ctcm_main.c +2 -9
index e22b9ac3e564..ab48eef72d4f 100644
@@ -866,16 +866,9 @@ static int ctcmpc_transmit_skb(struct channel *ch, struct sk_buff *skb)
 /**
  * Start transmission of a packet.
  * Called from generic network device layer.
- *
- *  skb		Pointer to buffer containing the packet.
- *  dev		Pointer to interface struct.
- *
- * returns 0 if packet consumed, !0 if packet rejected.
- *         Note: If we return !0, then the packet is free'd by
- *               the generic network layer.
  */
 /* first merge version - leaving both functions separated */
-static int ctcm_tx(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t ctcm_tx(struct sk_buff *skb, struct net_device *dev)
 {
 	struct ctcm_priv *priv = dev->ml_priv;
 
@@ -918,7 +911,7 @@ static int ctcm_tx(struct sk_buff *skb, struct net_device *dev)
 }
 
 /* unmerged MPC variant of ctcm_tx */
-static int ctcmpc_tx(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t ctcmpc_tx(struct sk_buff *skb, struct net_device *dev)
 {
 	int len = 0;
 	struct ctcm_priv *priv = dev->ml_priv;
drivers/s390/net/lcs.c +3 -5
index 4d3caad7e981..3bd2241c13e8 100644
@@ -1544,9 +1544,8 @@ lcs_txbuffer_cb(struct lcs_channel *channel, struct lcs_buffer *buffer)
 /**
  * Packet transmit function called by network stack
  */
-static int
-__lcs_start_xmit(struct lcs_card *card, struct sk_buff *skb,
-		 struct net_device *dev)
+static netdev_tx_t __lcs_start_xmit(struct lcs_card *card, struct sk_buff *skb,
+				    struct net_device *dev)
 {
 	struct lcs_header *header;
 	int rc = NETDEV_TX_OK;
@@ -1607,8 +1606,7 @@ __lcs_start_xmit(struct lcs_card *card, struct sk_buff *skb,
 	return rc;
 }
 
-static int
-lcs_start_xmit(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t lcs_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct lcs_card *card;
 	int rc;
drivers/s390/net/netiucv.c +1 -8
index b0e8ffdf864b..3465ea3d667b 100644
@@ -1361,15 +1361,8 @@ static int netiucv_pm_restore_thaw(struct device *dev)
 /**
  * Start transmission of a packet.
  * Called from generic network device layer.
- *
- * @param skb Pointer to buffer containing the packet.
- * @param dev Pointer to interface struct.
- *
- * @return 0 if packet consumed, !0 if packet rejected.
- *         Note: If we return !0, then the packet is free'd by
- *               the generic network layer.
  */
-static int netiucv_tx(struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t netiucv_tx(struct sk_buff *skb, struct net_device *dev)
 {
 	struct netiucv_priv *privptr = netdev_priv(dev);
 	int rc;
drivers/scsi/fcoe/fcoe.c +1 -0
index 9bd41a35a78a..42b00b9f4be8 100644
@@ -2518,6 +2518,7 @@ static int __init fcoe_init(void)
 
 out_free:
 	mutex_unlock(&fcoe_config_mutex);
+	fcoe_transport_detach(&fcoe_sw_transport);
 out_destroy:
 	destroy_workqueue(fcoe_wq);
 	return rc;
drivers/scsi/fcoe/fcoe_sysfs.c +10 -9
index 0675fd128734..17a45131a379 100644
@@ -752,14 +752,15 @@ struct fcoe_ctlr_device *fcoe_ctlr_device_add(struct device *parent,
 
 	dev_set_name(&ctlr->dev, "ctlr_%d", ctlr->id);
 	error = device_register(&ctlr->dev);
-	if (error)
-		goto out_del_q2;
+	if (error) {
+		destroy_workqueue(ctlr->devloss_work_q);
+		destroy_workqueue(ctlr->work_q);
+		put_device(&ctlr->dev);
+		return NULL;
+	}
 
 	return ctlr;
 
-out_del_q2:
-	destroy_workqueue(ctlr->devloss_work_q);
-	ctlr->devloss_work_q = NULL;
 out_del_q:
 	destroy_workqueue(ctlr->work_q);
 	ctlr->work_q = NULL;
@@ -958,16 +959,16 @@ struct fcoe_fcf_device *fcoe_fcf_device_add(struct fcoe_ctlr_device *ctlr,
 	fcf->selected = new_fcf->selected;
 
 	error = device_register(&fcf->dev);
-	if (error)
-		goto out_del;
+	if (error) {
+		put_device(&fcf->dev);
+		goto out;
+	}
 
 	fcf->state = FCOE_FCF_STATE_CONNECTED;
 	list_add_tail(&fcf->peers, &ctlr->fcfs);
 
 	return fcf;
 
-out_del:
-	kfree(fcf);
 out:
 	return NULL;
 }
drivers/scsi/hpsa.c +5 -2
index 7f1d6d52d48b..aa1e388e86f2 100644
@@ -9837,7 +9837,8 @@ static int hpsa_add_sas_host(struct ctlr_info *h)
 	return 0;
 
 free_sas_phy:
-	hpsa_free_sas_phy(hpsa_sas_phy);
+	sas_phy_free(hpsa_sas_phy->phy);
+	kfree(hpsa_sas_phy);
 free_sas_port:
 	hpsa_free_sas_port(hpsa_sas_port);
 free_sas_node:
@@ -9873,10 +9874,12 @@ static int hpsa_add_sas_device(struct hpsa_sas_node *hpsa_sas_node,
 
 	rc = hpsa_sas_port_add_rphy(hpsa_sas_port, rphy);
 	if (rc)
-		goto free_sas_port;
+		goto free_sas_rphy;
 
 	return 0;
 
+free_sas_rphy:
+	sas_rphy_free(rphy);
 free_sas_port:
 	hpsa_free_sas_port(hpsa_sas_port);
 	device->sas_port = NULL;
drivers/scsi/ipr.c +9 -1
index 7760b9a1e0ae..96c45cc091a6 100644
@@ -10772,11 +10772,19 @@ static struct notifier_block ipr_notifier = {
  **/
 static int __init ipr_init(void)
 {
+	int rc;
+
 	ipr_info("IBM Power RAID SCSI Device Driver version: %s %s\n",
 		 IPR_DRIVER_VERSION, IPR_DRIVER_DATE);
 
 	register_reboot_notifier(&ipr_notifier);
-	return pci_register_driver(&ipr_driver);
+	rc = pci_register_driver(&ipr_driver);
+	if (rc) {
+		unregister_reboot_notifier(&ipr_notifier);
+		return rc;
+	}
+
+	return 0;
 }
 
 /**
drivers/scsi/snic/snic_disc.c +3 -0
index b106596cc0cf..69c5e26a9d5b 100644
@@ -317,6 +317,9 @@ snic_tgt_create(struct snic *snic, struct snic_tgt_id *tgtid)
 			      ret);
[… more lines in the raw message]

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

drivers/soc/ti/knav_qmss_queue.c +1 -1
index 5248649b0b41..5faafe677341 100644

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

drivers/soc/ux500/ux500-soc-id.c +4 -6
index 6c1be74e5fcc..86a1a3c408df 100644

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

drivers/staging/rtl8192e/rtllib_rx.c +1 -1
index 247475aa522e..23c917342943 100644

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

drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c +3 -1
index 89cbc077a48d..085cc86e7c32 100644

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

drivers/tty/serial/amba-pl011.c +3 -0
index ad1d665e9962..59092f1d2856 100644

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

drivers/tty/serial/pch_uart.c +4 -0
index 30b577384a1d..e8d450fdbb04 100644

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

drivers/tty/serial/sunsab.c +7 -1
index b5e3195b3697..60fc4ed3f042 100644

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

drivers/uio/uio_dmem_genirq.c +7 -6
index a00b4aee6c79..b4b7fa05b29b 100644

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

drivers/usb/gadget/function/f_uvc.c +3 -2
index 89da34ef7b3f..83d2db09ae7c 100644

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

drivers/usb/gadget/udc/fotg210-udc.c +6 -6
index 9e102ba9cf66..88415a3a9b43 100644

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

drivers/usb/serial/cp210x.c +2 -0
index ddb795a5cd75..7cfa0529a4b2 100644

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

drivers/usb/storage/alauda.c +2 -0
index 878b4b8761f5..3dbd60540372 100644

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

drivers/vfio/platform/vfio_platform_common.c +1 -2
index 9b1b6c1e218d..d5b15630050b 100644

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

drivers/video/fbdev/Kconfig +0 -1
index c0d4e645f3b5..e2c51e2ffc80 100644

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

drivers/video/fbdev/pm2fb.c +7 -2
index 9b32b9fc44a5..6e8bd281ee0f 100644

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

drivers/video/fbdev/uvesafb.c +1 -0
index 9fe0d0bcdf62..01a3d9931348 100644

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

drivers/video/fbdev/vermilion/vermilion.c +3 -1
index 1c1e95a0b8fa..9774e9513ad0 100644

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

drivers/video/fbdev/via/via-core.c +8 -1
index 1d28e16888e9..84f7835956a9 100644

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

drivers/vme/bridges/vme_fake.c +2 -0
index e81ec763b555..150ee8b3507f 100644

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

drivers/vme/bridges/vme_tsi148.c +1 -0
index fc1b634b969a..2058403f8806 100644

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

fs/binfmt_misc.c +4 -4
index 2bda9245cabe..558e4007131e 100644

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

fs/char_dev.c +1 -1
index 1bbb966c0783..9f79fd345e79 100644

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

fs/cifs/connect.c +3 -1
index a4a76f1d275c..3d71b37073ce 100644

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

fs/ext4/ext4.h +1 -1
index 1b62bd9e7312..75372afe2525 100644

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

fs/ext4/indirect.c +8 -1
index ff7e1ac6ee53..30165eb46c32 100644

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

fs/ext4/inode.c +9 -1
index f1bcf89e1ae6..83360503d4d6 100644

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

fs/ext4/ioctl.c +5 -5
index e7384a6e6a08..ac9f678ac4ae 100644

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

fs/ext4/namei.c +3 -0
index 1281181215aa..1ed95357eb52 100644

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

fs/ext4/xattr.c +0 -8
index 6b14ecb382df..e6e9225c881d 100644

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

fs/hfs/inode.c +2 -0
index de0d6d4c46b6..cd4eee5b8358 100644

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

fs/hfs/trans.c +1 -1
index 39f5e343bf4d..fdb0edb8a607 100644

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

fs/hfsplus/hfsplus_fs.h +2 -0
index 35cd703c6604..bbc72087dd4c 100644

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

fs/hfsplus/inode.c +2 -2
index cfd380e2743d..f5ed9269c276 100644

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

fs/hfsplus/options.c +4 -0
index bb806e58c977..f7465e0a9247 100644

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

fs/jfs/jfs_dmap.c +21 -6
index a07fbb60ac3c..0ca1ad2610df 100644

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

fs/libfs.c +19 -3
index 835d25e33509..75eeddc35b57 100644

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

fs/nfs/nfs4proc.c +12 -7
index 5baf6ed7732d..4771fc16d7d1 100644

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

fs/nfs/nfs4xdr.c +4 -6
index b50c97c6aecb..fc5583531fc0 100644

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

fs/nfsd/nfs4callback.c +3 -1
index 172f697864ab..39d6b5c53131 100644

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

fs/nilfs2/the_nilfs.c +27 -4
index 9bbdd152c296..3e143c2da06d 100644

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

fs/ocfs2/stackglue.c +7 -1
index 03e1c6cd6f3c..52ee7c90dc5c 100644

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

fs/orangefs/orangefs-debugfs.c +3 -0
index 7d7df003f9d8..401d70944e49 100644

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

fs/orangefs/orangefs-mod.c +4 -4
index 4113eb0495bf..74b8ee19e167 100644

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

fs/pnode.c +1 -1
index 64e9a401d67d..7cb21856de2c 100644

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

fs/pstore/ram_core.c +5 -1
index 11e558efd61e..b56cf56ae926 100644

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

fs/reiserfs/namei.c +4 -0
index 1c900f322089..c58aafadd784 100644

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

fs/reiserfs/xattr_security.c +1 -1
index e4cbb7719906..ae241b94ba93 100644

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

fs/sysv/itree.c +1 -1
index 08d3e630b49c..f5b0837511cf 100644

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

fs/udf/balloc.c +2 -3
index e0fd65fe73e8..6f2bfbf248c9 100644

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

fs/udf/inode.c +38 -46

84 lines not on this page · raw message

fs/udf/namei.c +4 -4
index aefa939176e1..0ab842460ed3 100644

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

fs/udf/truncate.c +15 -33

48 lines not on this page · raw message

fs/udf/udfdecl.h +1 -2
index 263829ef1873..c46f75d528bb 100644

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

fs/xattr.c +1 -1
index c0fd99c95aa1..d66983d1e57c 100644

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

include/asm-generic/tlb.h +6 -0
index e9851100c0f7..4b1c142be08c 100644

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

include/linux/can/platform/sja1000.h +1 -1
index 93570b61ec6c..919f3329d822 100644

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

include/linux/eventfd.h +1 -1
index ff0b981f078e..c5a383162c0b 100644

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

include/linux/fs.h +10 -2
index 9e4a75005280..a794954e2c8e 100644

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

include/linux/timerqueue.h +1 -1
index 42868a9b4365..df7841c6fdf4 100644

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

include/net/mrp.h +1 -0
index 31912c3be772..9338d6305159 100644

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

include/uapi/linux/swab.h +1 -1
index 51502eabdb05..0915a8781eae 100644

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

include/uapi/sound/asequencer.h +4 -4
index 7b7659a79ac4..98c8f6b56dff 100644

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

kernel/acct.c +2 -0
index 37f1dc696fbd..928ed84f50df 100644

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

kernel/events/core.c +5 -3
index 58ef731d52c7..a25b5a8182ec 100644

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

kernel/gcov/gcc_4_7.c +5 -0
index a221c118f381..65bf44cf4090 100644

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

kernel/power/snapshot.c +2 -2
index 5dfac92521fa..b02850cfc8ee 100644

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

kernel/trace/blktrace.c +2 -1
index 056107787f4a..c6b58ff8ea72 100644

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

kernel/trace/trace.c +14 -1
index de1638df2b09..f614a5fee614 100644

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

lib/notifier-error-inject.c +1 -1
index eb4a04afea80..125ea8ce23a4 100644

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

mm/khugepaged.c +23 -1
index 0f1bdbae45e2..04080415b47d 100644

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

mm/memory.c +5 -0
index 36d46e19df96..a93ea671b8f1 100644

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

net/802/mrp.c +13 -5
index 4ee3af3d400b..ac6b6374a1fc 100644

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

net/bluetooth/hci_core.c +1 -1
index 6f99da11d207..61ffa0f12925 100644

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

net/bluetooth/l2cap_core.c +2 -1
index 5e7fb30b2320..cbf0a9d5aabc 100644

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

net/core/skbuff.c +3 -0
index 5dcdbffdee49..0186fbe06281 100644

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

net/core/stream.c +6 -0
index 05b63feac7e5..6f5979c6f2b0 100644

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

net/ipv4/udp_tunnel.c +1 -0
index 58bd39fb14b4..1f530a9b0357 100644

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

net/openvswitch/datapath.c +16 -9
index 56999d8528a4..e4404f5053ae 100644

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

net/sched/ematch.c +2 -0
index d4d6f9c91e8c..59340d633253 100644

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

net/sunrpc/clnt.c +1 -1
index eef2f732fbe3..9447670b5a63 100644

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

net/vmw_vsock/vmci_transport.c +5 -1
index c09efcdf72d2..d096ef9d1c89 100644

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

security/device_cgroup.c +29 -4
index db3bdc91c520..22856d9e1102 100644

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

security/integrity/ima/ima_template.c +2 -2
index febd12ed9b55..fdba86fa90ee 100644

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

sound/drivers/mts64.c +3 -0
index fd4d18df84d3..03b1b49c1afe 100644

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

sound/pci/asihpi/hpioctl.c +1 -1
index 0d5ff00cdabc..90245f9d6c36 100644

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

sound/soc/codecs/pcm512x.c +4 -4
index c0807b82399a..614d39258e40 100644

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

sound/soc/codecs/rt5670.c +0 -2
index fdc14e50d3b9..13b944bcde71 100644

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

sound/soc/codecs/wm8994.c +5 -0
index f289762cd676..1feeeed4bfb2 100644

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

sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c +5 -2
index 52fdd766ee82..8fbc59199d58 100644

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

sound/soc/pxa/mmp-pcm.c +1 -1
index 96df9b2d8fc4..d32a276e9205 100644

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

sound/soc/rockchip/rockchip_spdif.c +1 -0
index f387d7bae3d4..e4073c48faf6 100644

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

sound/soc/soc-ops.c +8 -1
index 5479927391d4..b1d4dd47f999 100644

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

sound/usb/line6/driver.c +2 -1
index 8cca0befcf01..de8bb9c91474 100644

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

sound/usb/line6/midi.c +4 -2
index 4f4ebe90f1a8..b908be4d347b 100644

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

sound/usb/line6/midibuf.c +17 -8
index c931d48801eb..4622234723a6 100644

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

sound/usb/line6/midibuf.h +4 -1
index 6ea21ffb6627..187f49c975c2 100644

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

sound/usb/line6/pod.c +2 -1
index aaa192aee883..81c2abacc612 100644

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

tools/testing/ktest/ktest.pl +2 -1
index 223d88e25e05..74b4455c8839 100755

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

tools/testing/selftests/powerpc/dscr/dscr_sysfs_test.c +4 -1
index 17fb1b43c320..d6fb6f1125f9 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.

author maintainer
#2 lore raw
In reply to Greg Kroah-Hartman
Quoted 3 lines · Greg Kroah-Hartman

I'm announcing the release of the 4.9.337 kernel.

All users of the 4.9 kernel series must upgrade.

Note, this is the LAST 4.9.y kernel to be released.

This kernel is now END-OF-LIFE and you should move to 4.14.y at the least, 6.1.y is the better option.

As I stated in the -rc announcement, if this is a problem for anyone, please let me know. I am already working with a few groups to move them off of this now-expired kernel tree, feel free to reach out if you need help as well.

thanks,

greg k-h