Skip to contentSkip to conversation

Linux 4.14.326

DISCUSSION Greg Kroah-Hartman 1 participant 2 messages Sep 23, 2023 Stable branch

lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw

I'm announcing the release of the 4.14.326 kernel.

All users of the 4.14 kernel series must upgrade.

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

thanks,

greg k-h

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

 Makefile                                             |    2 
 arch/arm/boot/dts/bcm53573.dtsi                      |    3 
 arch/arm/boot/dts/s3c6410-mini6410.dts               |    2 
 arch/arm/boot/dts/s5pv210-smdkv210.dts               |    2 
 arch/arm/kernel/hw_breakpoint.c                      |    8 
 arch/arm/mach-omap2/powerdomain.c                    |    2 
 arch/arm/mach-pxa/sharpsl_pm.c                       |    2 
 arch/arm/mach-pxa/spitz.c                            |   14 
 arch/arm64/kernel/hw_breakpoint.c                    |    4 
 arch/m68k/fpsp040/skeleton.S                         |    4 
 arch/m68k/ifpsp060/os.S                              |    4 
 arch/m68k/kernel/relocate_kernel.S                   |    4 
 arch/mips/alchemy/devboards/db1000.c                 |    8 
 arch/mips/alchemy/devboards/db1200.c                 |   19 
 arch/mips/alchemy/devboards/db1300.c                 |   10 
 arch/parisc/include/asm/led.h                        |    4 
 arch/parisc/include/asm/processor.h                  |    1 
 arch/parisc/kernel/processor.c                       |   18 
 arch/powerpc/kernel/head_32.S                        |    2 
 arch/powerpc/kernel/iommu.c                          |   17 
 arch/powerpc/kernel/vmlinux.lds.S                    |    1 
 arch/powerpc/platforms/pseries/ibmebus.c             |    1 
 arch/x86/include/asm/virtext.h                       |    6 
 arch/x86/kernel/apm_32.c                             |    6 
 crypto/asymmetric_keys/x509_public_key.c             |    5 
 drivers/acpi/acpica/psopcode.c                       |    2 
 drivers/acpi/video_detect.c                          |    9 
 drivers/amba/bus.c                                   |    1 
 drivers/ata/pata_ftide010.c                          |    1 
 drivers/ata/sata_gemini.c                            |    1 
 drivers/base/regmap/regcache-rbtree.c                |   10 
 drivers/bluetooth/btsdio.c                           |    1 
 drivers/bluetooth/hci_nokia.c                        |    6 
 drivers/char/tpm/tpm_tis_core.c                      |   15 
 drivers/clk/keystone/pll.c                           |    2 
 drivers/clk/qcom/gcc-mdm9615.c                       |    2 
 drivers/clk/sunxi-ng/ccu_mmc_timing.c                |    2 
 drivers/cpufreq/powernow-k8.c                        |    3 
 drivers/crypto/caam/caampkc.c                        |    4 
 drivers/crypto/stm32/stm32-hash.c                    |    2 
 drivers/devfreq/devfreq.c                            |    1 
 drivers/dma/Kconfig                                  |    2 
 drivers/dma/ste_dma40.c                              |    4 
 drivers/gpu/drm/ast/ast_post.c                       |    2 
 drivers/gpu/drm/bridge/adv7511/adv7511_drv.c         |    9 
 drivers/gpu/drm/exynos/exynos_drm_crtc.c             |    5 
 drivers/hid/hid-multitouch.c                         |   13 
 drivers/hid/wacom.h                                  |    1 
 drivers/hid/wacom_sys.c                              |   25 
 drivers/hid/wacom_wac.c                              |    1 
 drivers/hid/wacom_wac.h                              |    1 
 drivers/iio/industrialio-core.c                      |    2 
 drivers/infiniband/ulp/isert/ib_isert.c              |    2 
 drivers/md/raid1.c                                   |    3 
 drivers/media/dvb-frontends/ascot2e.c                |    2 
 drivers/media/dvb-frontends/atbm8830.c               |    2 
 drivers/media/dvb-frontends/au8522_dig.c             |    2 
 drivers/media/dvb-frontends/bcm3510.c                |    2 
 drivers/media/dvb-frontends/cx22700.c                |    2 
 drivers/media/dvb-frontends/cx22702.c                |    2 
 drivers/media/dvb-frontends/cx24110.c                |    2 
 drivers/media/dvb-frontends/cx24113.c                |    2 
 drivers/media/dvb-frontends/cx24116.c                |    2 
 drivers/media/dvb-frontends/cx24120.c                |    6 
 drivers/media/dvb-frontends/cx24123.c                |    2 
 drivers/media/dvb-frontends/cxd2820r_core.c          |    2 
 drivers/media/dvb-frontends/cxd2841er.c              |    4 
 drivers/media/dvb-frontends/dib0070.c                |    2 
 drivers/media/dvb-frontends/dib0090.c                |    4 
 drivers/media/dvb-frontends/dib3000mb.c              |    2 
 drivers/media/dvb-frontends/dib3000mc.c              |    2 
 drivers/media/dvb-frontends/dib7000m.c               |    2 
 drivers/media/dvb-frontends/dib7000p.c               |    4 
 drivers/media/dvb-frontends/dib8000.c                |    2 
 drivers/media/dvb-frontends/dib9000.c                |    2 
 drivers/media/dvb-frontends/drx39xyj/drxj.c          |    2 
 drivers/media/dvb-frontends/drxd_hard.c              |    2 
 drivers/media/dvb-frontends/drxk_hard.c              |    2 
 drivers/media/dvb-frontends/ds3000.c                 |    2 
 drivers/media/dvb-frontends/dvb-pll.c                |    2 
 drivers/media/dvb-frontends/ec100.c                  |    2 
 drivers/media/dvb-frontends/helene.c                 |    4 
 drivers/media/dvb-frontends/horus3a.c                |    2 
 drivers/media/dvb-frontends/isl6405.c                |    2 
 drivers/media/dvb-frontends/isl6421.c                |    2 
 drivers/media/dvb-frontends/isl6423.c                |    2 
 drivers/media/dvb-frontends/itd1000.c                |    2 
 drivers/media/dvb-frontends/ix2505v.c                |    2 
 drivers/media/dvb-frontends/l64781.c                 |    2 
 drivers/media/dvb-frontends/lg2160.c                 |    2 
 drivers/media/dvb-frontends/lgdt3305.c               |    2 
 drivers/media/dvb-frontends/lgdt3306a.c              |    2 
 drivers/media/dvb-frontends/lgs8gxx.c                |    2 
 drivers/media/dvb-frontends/lnbh25.c                 |    2 
 drivers/media/dvb-frontends/lnbp21.c                 |    4 
 drivers/media/dvb-frontends/lnbp22.c                 |    2 
 drivers/media/dvb-frontends/m88ds3103.c              |    2 
 drivers/media/dvb-frontends/m88rs2000.c              |    2 
 drivers/media/dvb-frontends/mb86a16.c                |    2 
 drivers/media/dvb-frontends/mb86a20s.c               |    2 
 drivers/media/dvb-frontends/mt312.c                  |    2 
 drivers/media/dvb-frontends/mt352.c                  |    2 
 drivers/media/dvb-frontends/nxt200x.c                |    2 
 drivers/media/dvb-frontends/nxt6000.c                |    2 
 drivers/media/dvb-frontends/or51132.c                |    2 
 drivers/media/dvb-frontends/or51211.c                |    2 
 drivers/media/dvb-frontends/s5h1409.c                |    2 
 drivers/media/dvb-frontends/s5h1411.c                |    2 
 drivers/media/dvb-frontends/s5h1420.c                |    2 
 drivers/media/dvb-frontends/s5h1432.c                |    2 
 drivers/media/dvb-frontends/s921.c                   |    2 
 drivers/media/dvb-frontends/si21xx.c                 |    2 
 drivers/media/dvb-frontends/sp887x.c                 |    2 
 drivers/media/dvb-frontends/stb0899_drv.c            |    2 
 drivers/media/dvb-frontends/stb6000.c                |    2 
 drivers/media/dvb-frontends/stb6100.c                |    2 
 drivers/media/dvb-frontends/stv0288.c                |    2 
 drivers/media/dvb-frontends/stv0297.c                |    2 
 drivers/media/dvb-frontends/stv0299.c                |    2 
 drivers/media/dvb-frontends/stv0367.c                |    6 
 drivers/media/dvb-frontends/stv0900_core.c           |    2 
 drivers/media/dvb-frontends/stv6110.c                |    2 
 drivers/media/dvb-frontends/stv6110x.c               |    2 
 drivers/media/dvb-frontends/tda10021.c               |    2 
 drivers/media/dvb-frontends/tda10023.c               |    2 
 drivers/media/dvb-frontends/tda10048.c               |    2 
 drivers/media/dvb-frontends/tda1004x.c               |    4 
 drivers/media/dvb-frontends/tda10086.c               |    2 
 drivers/media/dvb-frontends/tda665x.c                |    2 
 drivers/media/dvb-frontends/tda8083.c                |    2 
 drivers/media/dvb-frontends/tda8261.c                |    2 
 drivers/media/dvb-frontends/tda826x.c                |    2 
 drivers/media/dvb-frontends/ts2020.c                 |    2 
 drivers/media/dvb-frontends/tua6100.c                |    2 
 drivers/media/dvb-frontends/ves1820.c                |    2 
 drivers/media/dvb-frontends/ves1x93.c                |    2 
 drivers/media/dvb-frontends/zl10036.c                |    2 
 drivers/media/dvb-frontends/zl10039.c                |    2 
 drivers/media/dvb-frontends/zl10353.c                |    2 
 drivers/media/pci/bt8xx/dst.c                        |    2 
 drivers/media/pci/bt8xx/dst_ca.c                     |    2 
 drivers/media/pci/cx23885/cx23885-video.c            |    2 
 drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c |    5 
 drivers/media/tuners/fc0011.c                        |    2 
 drivers/media/tuners/fc0012.c                        |    2 
 drivers/media/tuners/fc0013.c                        |    2 
 drivers/media/tuners/max2165.c                       |    2 
 drivers/media/tuners/mc44s803.c                      |    2 
 drivers/media/tuners/mt2060.c                        |    2 
 drivers/media/tuners/mt2131.c                        |    2 
 drivers/media/tuners/mt2266.c                        |    2 
 drivers/media/tuners/mxl5005s.c                      |    2 
 drivers/media/tuners/qt1010.c                        |   13 
 drivers/media/tuners/tda18218.c                      |    2 
 drivers/media/tuners/xc4000.c                        |    2 
 drivers/media/tuners/xc5000.c                        |    2 
 drivers/media/usb/dvb-usb-v2/af9035.c                |   14 
 drivers/media/usb/dvb-usb-v2/anysee.c                |    2 
 drivers/media/usb/dvb-usb-v2/az6007.c                |    8 
 drivers/media/usb/dvb-usb/af9005.c                   |    5 
 drivers/media/usb/dvb-usb/dw2102.c                   |   24 
 drivers/media/usb/dvb-usb/m920x.c                    |    5 
 drivers/media/usb/go7007/go7007-i2c.c                |    2 
 drivers/media/usb/siano/smsusb.c                     |   21 
 drivers/mmc/host/Kconfig                             |    5 
 drivers/mtd/nand/brcmnand/brcmnand.c                 |  112 +-
 drivers/net/arcnet/arcnet.c                          |    2 
 drivers/net/can/usb/gs_usb.c                         |    5 
 drivers/net/ethernet/atheros/alx/ethtool.c           |    5 
 drivers/net/ethernet/atheros/atl1c/atl1c_main.c      |    7 
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c     |    9 
 drivers/net/ethernet/intel/igb/igb.h                 |    4 
 drivers/net/ethernet/intel/igb/igb_main.c            |   16 
 drivers/net/ethernet/intel/igbvf/igbvf.h             |    4 
 drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c         |   28 
 drivers/net/ethernet/mediatek/mtk_eth_soc.c          |    3 
 drivers/net/macsec.c                                 |    3 
 drivers/net/usb/qmi_wwan.c                           |    1 
 drivers/net/wireless/ath/ath10k/pci.c                |    9 
 drivers/net/wireless/ath/ath9k/ahb.c                 |    4 
 drivers/net/wireless/ath/ath9k/htc_drv_debug.c       |    2 
 drivers/net/wireless/ath/ath9k/pci.c                 |    4 
 drivers/net/wireless/ath/ath9k/wmi.c                 |   14 
 drivers/net/wireless/marvell/mwifiex/debugfs.c       |    9 
 drivers/net/wireless/marvell/mwifiex/sta_rx.c        |   12 
 drivers/net/wireless/marvell/mwifiex/tdls.c          |    9 
 drivers/net/wireless/marvell/mwifiex/uap_txrx.c      |   30 
 drivers/net/wireless/marvell/mwifiex/util.c          |   10 
 drivers/ntb/ntb_transport.c                          |   19 
 drivers/of/unittest.c                                |   10 
 drivers/parisc/led.c                                 |    4 
 drivers/pci/hotplug/pciehp_hpc.c                     |   12 
 drivers/pinctrl/pinctrl-amd.c                        |    4 
 drivers/pwm/pwm-lpc32xx.c                            |   16 
 drivers/rpmsg/qcom_glink_native.c                    |    4 
 drivers/rtc/rtc-ds1685.c                             |    2 
 drivers/s390/block/dasd_3990_erp.c                   |    2 
 drivers/scsi/be2iscsi/be_iscsi.c                     |    4 
 drivers/scsi/fcoe/fcoe_ctlr.c                        |   20 
 drivers/scsi/hosts.c                                 |    4 
 drivers/scsi/qedf/qedf_dbg.h                         |    2 
 drivers/scsi/qedf/qedf_debugfs.c                     |   28 
 drivers/scsi/qedi/qedi_main.c                        |    5 
 drivers/scsi/qla2xxx/qla_isr.c                       |    1 
 drivers/scsi/qla2xxx/qla_nvme.c                      |    2 
 drivers/scsi/qla4xxx/ql4_os.c                        |   15 
 drivers/scsi/scsi_transport_iscsi.c                  |    8 
 drivers/spi/spi-tegra20-sflash.c                     |    6 
 drivers/target/iscsi/iscsi_target_configfs.c         |   54 -
 drivers/tty/serial/cpm_uart/cpm_uart_core.c          |   13 
 drivers/tty/serial/sc16is7xx.c                       |   11 
 drivers/tty/serial/serial-tegra.c                    |    6 
 drivers/usb/gadget/function/f_mass_storage.c         |    2 
 drivers/usb/gadget/udc/fsl_qe_udc.c                  |    6 
 drivers/usb/phy/phy-mxs-usb.c                        |   10 
 drivers/usb/serial/option.c                          |    7 
 drivers/video/backlight/bd6107.c                     |    2 
 drivers/video/backlight/gpio_backlight.c             |    2 
 drivers/video/backlight/lv5207lp.c                   |    2 
 drivers/video/fbdev/ep93xx-fb.c                      |    1 
 drivers/watchdog/intel-mid_wdt.c                     |    1 
 fs/attr.c                                            |   20 
 fs/autofs4/waitq.c                                   |    3 
 fs/btrfs/delayed-inode.c                             |   19 
 fs/btrfs/extent-tree.c                               |    5 
 fs/cifs/smb2ops.c                                    |    1 
 fs/ext2/xattr.c                                      |    4 
 fs/jfs/jfs_dmap.c                                    |    1 
 fs/jfs/jfs_extent.c                                  |    5 
 fs/jfs/jfs_imap.c                                    |    1 
 fs/lockd/mon.c                                       |    3 
 fs/namei.c                                           |    2 
 fs/nfs/blocklayout/dev.c                             |    4 
 fs/nfs/pnfs_dev.c                                    |    2 
 fs/nfsd/blocklayoutxdr.c                             |    9 
 fs/nfsd/flexfilelayoutxdr.c                          |    9 
 fs/nfsd/nfs4proc.c                                   |    4 
 fs/nfsd/nfs4xdr.c                                    |   25 
 fs/nilfs2/alloc.c                                    |    3 
 fs/nilfs2/inode.c                                    |    7 
 fs/nilfs2/segment.c                                  |    5 
 fs/nls/nls_base.c                                    |    4 
 fs/ocfs2/namei.c                                     |    4 
 fs/proc/base.c                                       |    3 
 fs/pstore/ram_core.c                                 |    2 
 fs/reiserfs/journal.c                                |    4 
 fs/udf/balloc.c                                      |   31 
 fs/udf/inode.c                                       |   41 -
 include/linux/if_arp.h                               |    4 
 include/linux/nls.h                                  |    2 
 include/linux/perf_event.h                           |   22 
 include/net/lwtunnel.h                               |    5 
 include/scsi/scsi_host.h                             |    2 
 include/uapi/linux/sync_file.h                       |    2 
 kernel/auditsc.c                                     |    2 
 kernel/cgroup/namespace.c                            |    6 
 kernel/module.c                                      |   15 
 lib/kobject.c                                        |    5 
 lib/mpi/mpi-cmp.c                                    |    8 
 lib/ubsan.c                                          |   24 
 lib/ubsan.h                                          |    5 
 net/9p/trans_virtio.c                                |    2 
 net/core/sock.c                                      |    9 
 net/dccp/ipv4.c                                      |   13 
 net/dccp/ipv6.c                                      |   15 
 net/ipv4/igmp.c                                      |    3 
 net/ipv4/ip_output.c                                 |    2 
 net/ipv4/tcp_timer.c                                 |   18 
 net/ipv6/addrconf.c                                  |    2 
 net/ipv6/ip6_output.c                                |    2 
 net/kcm/kcmsock.c                                    |   15 
 net/netfilter/ipset/ip_set_hash_netportnet.c         |    1 
 net/netfilter/xt_sctp.c                              |    2 
 net/netfilter/xt_u32.c                               |   21 
 net/netlabel/netlabel_kapi.c                         |    3 
 net/netrom/af_netrom.c                               |    5 
 net/sched/Kconfig                                    |   28 
 net/sched/Makefile                                   |    2 
 net/sched/cls_fw.c                                   |    1 
 net/sched/cls_rsvp.c                                 |   28 
 net/sched/cls_rsvp.h                                 |  779 -------------------
 net/sched/cls_rsvp6.c                                |   28 
 net/sched/sch_plug.c                                 |    2 
 net/sched/sch_qfq.c                                  |   22 
 net/sctp/sm_sideeffect.c                             |    5 
 net/unix/af_unix.c                                   |    2 
 net/unix/scm.c                                       |    6 
 scripts/Makefile.ubsan                               |    1 
 security/keys/keyctl.c                               |   11 
 security/smack/smackfs.c                             |    2 
 sound/core/pcm_compat.c                              |    8 
 sound/core/seq/oss/seq_oss_midi.c                    |   35 
 sound/pci/ac97/ac97_codec.c                          |    5 
 sound/soc/codecs/da7219-aad.c                        |    2 
 sound/soc/codecs/es8316.c                            |    2 
 295 files changed, 1100 insertions(+), 1497 deletions(-)

Aaron Armstrong Skomra (1):
HID: wacom: remove the battery when the EKR is off

Abhishek Mainkar (1):
ACPICA: Add AML_NO_OPERAND_RESOLVE flag to Timer

Alan Stern (1):
USB: gadget: f_mass_storage: Fix unused variable warning

Aleksa Sarai (1):
procfs: block chmod on /proc/thread-self/comm

Alex Henrie (1):
net: ipv6/addrconf: avoid integer underflow in ipv6_create_tempaddr

Alexander Steffen (1):
tpm_tis: Resend command to recover from data transfer errors

Alexei Filippov (1):
jfs: validate max amount of blocks before allocation.

Andrew Kanner (1):
fs/jfs: prevent double-free in dbUnmount() after failed jfs_remount()

Andrey Ryabinin (1):
lib/ubsan: remove returns-nonnull-attribute checks

Andy Shevchenko (1):
iio: core: Use min() instead of min_t() to make code more robust

Arnd Bergmann (1):
ARM: pxa: remove use of symbol_get()

Artem Chernyshev (1):
fs: ocfs2: namei: check return value of ocfs2_add_entry()

Baoquan He (1):
idmaengine: make FSL_EDMA and INTEL_IDMA64 depends on HAS_IOMEM

Ben Hutchings (1):
m68k: Fix invalid .section syntax

Bjorn Helgaas (1):
Revert "PCI: Mark NVIDIA T4 GPUs to avoid bus reset"

Bogdan Togorean (1):
drm: adv7511: Fix low refresh rate register for ADV7533/5

Boris Brezillon (1):
PM / devfreq: Fix leak in devfreq_dev_release()

Chengfeng Ye (2):

      scsi: qedi: Fix potential deadlock on &qedi_percpu->p_work_lock
      scsi: fcoe: Fix potential deadlock on &fip->ctlr_lock

Christian Brauner (1):
attr: block mode changes of symlinks

Christian Göttsche (1):
security: keys: perform capable check only on privileged operations

Christoph Hellwig (3):
mmc: au1xmmc: force non-modular build and remove symbol_get usage
rtc: ds1685: use EXPORT_SYMBOL_GPL for ds1685_rtc_poweroff
modules: only allow symbol_get of EXPORT_SYMBOL_GPL modules

Christophe JAILLET (1):

      media: dvb-usb: m920x: Fix a potential memory leak in m920x_i2c_xfer()

Christophe Leroy (2):
powerpc/32s: Fix assembler warning about r0
serial: cpm_uart: Avoid suspicious locking

Chuck Lever (1):
NFSD: da_addr_body field missing in some GETDEVICEINFO replies

Colin Ian King (1):
media: go7007: Remove redundant if statement

Corinna Vinschen (1):
igb: disable virtualization features on 82580

Damien Le Moal (2):
ata: sata_gemini: Add missing MODULE_DESCRIPTION
ata: pata_ftide010: Add missing MODULE_DESCRIPTION

Dan Carpenter (4):
sctp: handle invalid error codes without calling BUG()
regmap: rbtree: Use alloc_flags for memory allocations
smackfs: Prevent underflow in smk_set_cipso() nfs/blocklayout: Use the passed in gfp flags

Daniil Dulov (2):
media: dib7000p: Fix potential division by zero
media: cx24120: Add retval check for cx24120_message_send()

Dave Jiang (3):
ntb: Drop packets when qp link is down
ntb: Clean up tx tail index on link down
ntb: Fix calculation ntb_transport_tx_free_entry()

David Christensen (1):
bnx2x: fix page fault following EEH recovery

Dmitry Antipov (3):
wifi: mwifiex: fix memory leak in mwifiex_histogram_read()
wifi: mwifiex: avoid possible NULL skb pointer dereference
wifi: mwifiex: fix fortify warning

Dmitry Baryshkov (1):
clk: qcom: gcc-mdm9615: use proper parent for pll0_vote clock

Dmitry Mastykin (1):
netlabel: fix shift wrapping bug in netlbl_catmap_setlong()

Dmytro Maluka (1):
ASoC: da7219: Flush pending AAD IRQ when suspending

Dominique Martinet (1):
9p: virtio: make sure 'offs' is initialized in zc_request

Dongliang Mu (2):
drivers: usb: smsusb: fix error handling code in smsusb_init_device
wifi: ath9k: fix printk specifier

Edgar (1):
ASoc: codecs: ES8316: Fix DMIC config

Enlin Mu (1):
pstore/ram: Check start of empty przs during init

Eric Dumazet (2):
igmp: limit igmpv3_newpack() packet size to IP_MAX_MTU
net: read sk->sk_family once in sk_mc_loop()

Fedor Pchelkin (3):
wifi: ath9k: protect WMI command response buffer replacement with a lock NFSv4/pnfs: minor fix for cleanup path in nfs4_get_device_info
autofs: fix memory leak of waitqueues in autofs_catatonic_mode

Filipe Manana (1):
btrfs: fix lockdep splat and potential deadlock after failure running delayed items

GONG, Ruiqi (1):
alx: fix OOB-read compiler warning

Gaosheng Cui (1):
audit: fix possible soft lockup in __audit_inode_child()

Gaurav Jain (1):
crypto: caam - fix unchecked return value error

Georg Ottinger (1):
ext2: fix datatype of block number in ext2_xattr_set2()

Greg Kroah-Hartman (2):
media: dvb: symbol fixup for dvb_attach()
Linux 4.14.326

Gustavo A. R. Silva (1):
ARM: OMAP2+: Fix -Warray-bounds warning in _pwrdm_state_switch()

Hangyu Hua (1):
net: ethernet: mtk_eth_soc: fix possible NULL pointer dereference in mtk_hwlro_get_fdir_all()

Hans Verkuil (2):
media: tuners: qt1010: replace BUG_ON with a regular error
media: pci: cx23885: replace BUG with error return

Helge Deller (4):
parisc: Fix /proc/cpuinfo output for lscpu
parisc: led: Fix LAN receive and transmit LEDs
parisc: led: Reduce CPU overhead for disk & lan LED computation
parisc: Drop loops_per_jiffy from per_cpu struct

Hugo Villeneuve (1):
serial: sc16is7xx: fix bug when first setting GPIO direction

Ilpo Järvinen (2):
PCI: pciehp: Use RMW accessors for changing LNKCTL
wifi: ath10k: Use RMW accessors for changing LNKCTL

Irui Wang (1):
media: mediatek: vcodec: Return NULL if no vdec_fb is found

Jamal Hadi Salim (1):
net/sched: Retire rsvp classifier

Jan Kara (1):
udf: Handle error when adding extent to a file

Jann Horn (1):
dccp: Fix out of bounds access in DCCP error handler

Jeff Layton (1):
nfsd: fix change_info in NFSv4 RENAME replies

Jiasheng Jiang (1):
rpmsg: glink: Add check for kstrdup

Jinjie Ruan (1):
net: arcnet: Do not call kfree_skb() under local_irq_disable()

Jiri Slaby (SUSE) (1):
ACPI: video: Add backlight=native DMI quirk for Lenovo Ideapad Z470

Joel Stanley (1):
powerpc/32: Include .branch_lt in data section

Konstantin Shelekhin (1):
scsi: target: iscsi: Fix buffer overflow in lio_target_nacl_info_show()

Krzysztof Kozlowski (2):
ARM: dts: samsung: s3c6410-mini6410: correct ethernet reg addresses (split)
ARM: dts: samsung: s5pv210-smdkv210: correct ethernet reg addresses (split)

Kuniyuki Iwashima (6):
netrom: Deny concurrent connect().
af_unix: Fix data-races around user->unix_inflight.
af_unix: Fix data-race around unix_tot_inflight.
af_unix: Fix data-races around sk->sk_shutdown.
af_unix: Fix data race around sk->sk_err.
kcm: Fix error handling for SOCK_DGRAM in kcm_sendmsg().

Kyle Zeng (1):
netfilter: ipset: add the missing IP_SET_HASH_WITH_NET0 macro for ip_set_hash_netportnet.c

Leon Romanovsky (1):
Revert "IB/isert: Fix incorrect release of isert connection"

Liao Chang (1):
cpufreq: powernow-k8: Use related_cpus instead of cpus in driver.exit()

Lin Ma (3):
scsi: iscsi: Add strlen() check in iscsi_if_set{_host}_param()
scsi: be2iscsi: Add length check when parsing nlattrs
scsi: qla4xxx: Add length check when parsing nlattrs

Liu Shixin via Jfs-discussion (1):

      jfs: fix invalid free of JFS_IP(ipimap)->i_imap in diUnmount

Lu Jialin (1):
cgroup:namespace: Remove unused cgroup_namespaces_init()

Ma Ke (1):
usb: gadget: fsl_qe_udc: validate endpoint index for ch9 udc

Marc Kleine-Budde (1):
can: gs_usb: gs_usb_receive_bulk_callback(): count RX overflow errors also in case of OOM

Mario Limonciello (1):
pinctrl: amd: Don't show Invalid config param errors

Mark O'Donovan (1):
crypto: lib/mpi - avoid null pointer deref in mpi_cmp_ui()

Martin Kohn (2):
USB: serial: option: add Quectel EM05G variant (0x030e)
net: usb: qmi_wwan: add Quectel EM05GV2

Matthew Wilcox (1):
reiserfs: Check the return value from __getblk()

Menglong Dong (1):
net: tcp: fix unexcepted socket die when snd_wnd is 0

Minjie Du (1):
drivers: clk: keystone: Fix parameter judgment in _of_pll_clk_init()

Nicolas Dichtel (1):
net: handle ARPHRD_PPP in dev_is_mac_header_xmit()

Nigel Croxon (1):
md/raid1: fix error: ISO C90 forbids mixed declarations

Oleksandr Natalenko (2):
scsi: qedf: Do not touch __user pointer in qedf_dbg_stop_io_on_error_cmd_read() directly
scsi: qedf: Do not touch __user pointer in qedf_dbg_fp_int_cmd_read() directly

Olga Zaborska (2):
igbvf: Change IGBVF_MIN to allow set rx/tx value between 64 and 80
igb: Change IGB_MIN to allow set rx/tx value between 64 and 80

Peng Fan (1):
amba: bus: fix refcount leak

Polaris Pi (2):
wifi: mwifiex: Fix OOB and integer underflow when rx packets
wifi: mwifiex: Fix missed return in oob checks failed path

Qu Wenruo (1):
btrfs: output extra debug info if we failed to find an inline backref

Quinn Tran (2):
scsi: qla2xxx: fix inconsistent TMF timeout
scsi: qla2xxx: Turn off noisy message log

Raag Jadav (1):
watchdog: intel-mid_wdt: add MODULE_ALIAS() to allow auto-load

Radoslaw Tyl (1):
igb: set max size RX buffer when store bad packet is enabled

Rafał Miłecki (1):
ARM: dts: BCM53573: Add cells sizes to PCIe node

Rahul Rameshbabu (1):
HID: multitouch: Correct devm device reference for hidinput input_dev name

Randy Dunlap (1):
x86/APM: drop the duplicate APM_MINOR_DEV macro

Rob Clark (1):
dma-buf/sync_file: Fix docs syntax

Ruan Jinjie (1):
of: unittest: fix null pointer dereferencing in of_unittest_find_node_by_name()

Russell Currey (1):
powerpc/iommu: Fix notifiers being shared by PCI and VIO buses

Ryusuke Konishi (2):
nilfs2: fix general protection fault in nilfs_lookup_dirty_data_buffers()
nilfs2: fix WARNING in mark_buffer_dirty due to discarded buffer reuse

Sabrina Dubroca (1):
Revert "net: macsec: preserve ingress frame ordering"

Sean Christopherson (1):
x86/virt: Drop unnecessary check on extended CPUID level in cpu_has_svm()

Shigeru Yoshida (2):
kcm: Destroy mutex in kcm_exit_net()
kcm: Fix memory leak in error path of kcm_sendmsg()

Shyam Prasad N (1):
cifs: add a warning when the in-flight count goes negative

Slark Xiao (1):
USB: serial: option: add FOXCONN T99W368/T99W373 product

Stefan Haberland (1):
s390/dasd: use correct number of retries for ERP requests

Su Hui (2):
ALSA: ac97: Fix possible error value of *rac97
fs: lockd: avoid possible wrong NULL parameter

Takashi Iwai (2):
ALSA: seq: oss: Fix racy open/close of MIDI devices
ALSA: pcm: Fix missing fixup call in compat hw_refine ioctl

Thomas Bourgoin (1):
crypto: stm32 - fix loop iterating through scatterlist for DMA

Thomas Zimmermann (5):
backlight/gpio_backlight: Compare against struct fb_info.device backlight/bd6107: Compare against struct fb_info.device backlight/lv5207lp: Compare against struct fb_info.device fbdev/ep93xx-fb: Do not assign to struct fb_info.dev drm/ast: Fix DRAM init on AST2200

Thore Sommer (1):
X.509: if signature is unsupported skip validation

Tomislav Novak (1):
hw_breakpoint: fix single-stepping when using bpf_overflow_handler

Tony Battersby (1):
scsi: core: Use 32-bit hostnum in scsi_host_lookup()

Tuo Li (1):
drm/exynos: fix a possible null-pointer dereference due to data race in exynos_drm_crtc_atomic_disable()

Vadim Fedorenko (1):
ixgbe: fix timestamp configuration code

Vladimir Zapolskiy (1):
pwm: lpc32xx: Remove handling of PWM channels

Vladislav Efanov (1):
udf: Check consistency of Space Bitmap Descriptor

Wander Lairson Costa (2):
netfilter: xt_u32: validate user space input
netfilter: xt_sctp: validate the flag_info count

Wang Ming (2):
fs: Fix error checking for d_hash_and_lookup()
wifi: ath9k: use IS_ERR() with debugfs_create_dir()

William Zhang (4):
mtd: rawnand: brcmnand: Fix crash during the panic_write
mtd: rawnand: brcmnand: Fix potential false time out warning
mtd: rawnand: brcmnand: Fix ECC level field setting for v7.2 controller
mtd: rawnand: brcmnand: Fix potential out-of-bounds access in oob write

Winston Wen (1):
fs/nls: make load_nls() take a const parameter

Wu Zongyong (1):
PCI: Mark NVIDIA T4 GPUs to avoid bus reset

Xu Yang (1):
usb: phy: mxs: fix getting wrong state with mxs_phy_is_otg_host()

Yan Zhai (1):
lwt: Check LWTUNNEL_XMIT_CONTINUE strictly

Yi Yang (1):
serial: tegra: handle clk prepare error in tegra_uart_hw_init()

Yuanjun Gong (2):
ethernet: atheros: fix return value check in atl1c_tso_csum()
Bluetooth: nokia: fix value check in nokia_bluetooth_serdev_probe()

Zhang Jianhua (1):
clk: sunxi-ng: Modify mismatched function name

Zhang Shurong (7):

      spi: tegra20-sflash: fix to check return value of platform_get_irq() in tegra_sflash_probe()
      md: raid1: fix potential OOB in raid1_remove_disk()
      media: dvb-usb-v2: af9035: Fix null-ptr-deref in af9035_i2c_master_xfer
      media: dw2102: Fix null-ptr-deref in dw2102_i2c_transfer()
      media: af9005: Fix null-ptr-deref in af9005_i2c_xfer
      media: anysee: fix null-ptr-deref in anysee_master_xfer
      media: az6007: Fix null-ptr-deref in az6007_i2c_xfer()

Zhen Lei (1):

      kobject: Add sanity check for kset->kobj.ktype in kset_register()

Zheng Wang (1):
Bluetooth: btsdio: fix use after free bug in btsdio_remove due to race condition

ruanjinjie (2):
dmaengine: ste_dma40: Add missing IRQ check in d40_probe powerpc/pseries: fix possible memory leak in ibmebus_bus_init()

valis (2):
net: sched: sch_qfq: Fix UAF in qfq_dequeue()
net/sched: cls_fw: No longer copy tcf_result on update to avoid use-after-free

author maintainer
#1 lore raw
Makefile +1 -1
index 9aa13e67a218..4a2043c6272c 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 VERSION = 4
 PATCHLEVEL = 14
-SUBLEVEL = 325
+SUBLEVEL = 326
 EXTRAVERSION =
 NAME = Petit Gorille
 
arch/arm/boot/dts/bcm53573.dtsi +3 -0
index c698a565b8ae..99cc83b911c1 100644
@@ -119,6 +119,9 @@
 
 		pcie0: pcie@2000 {
 			reg = <0x00002000 0x1000>;
+
+			#address-cells = <3>;
+			#size-cells = <2>;
 		};
 
 		usb2: usb2@4000 {
arch/arm/boot/dts/s3c6410-mini6410.dts +1 -1
index de04d8764b0f..98de4ea8b8bc 100644
@@ -61,7 +61,7 @@
 
 		ethernet@18000000 {
 			compatible = "davicom,dm9000";
-			reg = <0x18000000 0x2 0x18000004 0x2>;
+			reg = <0x18000000 0x2>, <0x18000004 0x2>;
 			interrupt-parent = <&gpn>;
 			interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
 			davicom,no-eeprom;
arch/arm/boot/dts/s5pv210-smdkv210.dts +1 -1
index 75398318ed57..4e17023684c9 100644
@@ -36,7 +36,7 @@
 
 	ethernet@18000000 {
 		compatible = "davicom,dm9000";
-		reg = <0xA8000000 0x2 0xA8000002 0x2>;
+		reg = <0xa8000000 0x2>, <0xa8000002 0x2>;
 		interrupt-parent = <&gph1>;
 		interrupts = <1 4>;
 		local-mac-address = [00 00 de ad be ef];
arch/arm/kernel/hw_breakpoint.c +4 -4
index a8783964ebde..6f5907970143 100644
@@ -631,7 +631,7 @@ int arch_validate_hwbkpt_settings(struct perf_event *bp)
 	info->address &= ~alignment_mask;
 	info->ctrl.len <<= offset;
 
-	if (is_default_overflow_handler(bp)) {
+	if (uses_default_overflow_handler(bp)) {
 		/*
 		 * Mismatch breakpoints are required for single-stepping
 		 * breakpoints.
@@ -803,7 +803,7 @@ static void watchpoint_handler(unsigned long addr, unsigned int fsr,
 		 * Otherwise, insert a temporary mismatch breakpoint so that
 		 * we can single-step over the watchpoint trigger.
 		 */
-		if (!is_default_overflow_handler(wp))
+		if (!uses_default_overflow_handler(wp))
 			continue;
 step:
 		enable_single_step(wp, instruction_pointer(regs));
@@ -816,7 +816,7 @@ static void watchpoint_handler(unsigned long addr, unsigned int fsr,
 		info->trigger = addr;
 		pr_debug("watchpoint fired: address = 0x%x\n", info->trigger);
 		perf_bp_event(wp, regs);
-		if (is_default_overflow_handler(wp))
+		if (uses_default_overflow_handler(wp))
 			enable_single_step(wp, instruction_pointer(regs));
 	}
 
@@ -891,7 +891,7 @@ static void breakpoint_handler(unsigned long unknown, struct pt_regs *regs)
 			info->trigger = addr;
 			pr_debug("breakpoint fired: address = 0x%x\n", addr);
 			perf_bp_event(bp, regs);
-			if (is_default_overflow_handler(bp))
+			if (uses_default_overflow_handler(bp))
 				enable_single_step(bp, addr);
 			goto unlock;
 		}
arch/arm/mach-omap2/powerdomain.c +1 -1
index 1e6a967cd2d5..d1b95576545c 100644
@@ -173,7 +173,7 @@ static int _pwrdm_state_switch(struct powerdomain *pwrdm, int flag)
 		break;
 	case PWRDM_STATE_PREV:
 		prev = pwrdm_read_prev_pwrst(pwrdm);
-		if (pwrdm->state != prev)
+		if (prev >= 0 && pwrdm->state != prev)
 			pwrdm->state_counter[prev]++;
 		if (prev == PWRDM_POWER_RET)
 			_update_logic_membank_counters(pwrdm);
arch/arm/mach-pxa/sharpsl_pm.c +0 -2
index 249b7bd5fbc4..3ae2eec37109 100644
@@ -224,8 +224,6 @@ void sharpsl_battery_kick(void)
 {
 	schedule_delayed_work(&sharpsl_bat, msecs_to_jiffies(125));
 }
-EXPORT_SYMBOL(sharpsl_battery_kick);
-
 
 static void sharpsl_battery_thread(struct work_struct *private_)
 {
arch/arm/mach-pxa/spitz.c +1 -13
index 67d66c702574..e9385a80cc6b 100644
@@ -13,7 +13,6 @@
  */
 
 #include <linux/kernel.h>
-#include <linux/module.h>	/* symbol_get ; symbol_put */
 #include <linux/platform_device.h>
 #include <linux/delay.h>
 #include <linux/gpio_keys.h>
@@ -517,17 +516,6 @@ static struct pxa2xx_spi_chip spitz_ads7846_chip = {
 	.gpio_cs		= SPITZ_GPIO_ADS7846_CS,
 };
 
-static void spitz_bl_kick_battery(void)
-{
-	void (*kick_batt)(void);
-
-	kick_batt = symbol_get(sharpsl_battery_kick);
-	if (kick_batt) {
-		kick_batt();
-		symbol_put(sharpsl_battery_kick);
-	}
-}
-
 static struct corgi_lcd_platform_data spitz_lcdcon_info = {
 	.init_mode		= CORGI_LCD_MODE_VGA,
 	.max_intensity		= 0x2f,
@@ -535,7 +523,7 @@ static struct corgi_lcd_platform_data spitz_lcdcon_info = {
 	.limit_mask		= 0x0b,
 	.gpio_backlight_cont	= SPITZ_GPIO_BACKLIGHT_CONT,
 	.gpio_backlight_on	= SPITZ_GPIO_BACKLIGHT_ON,
-	.kick_battery		= spitz_bl_kick_battery,
+	.kick_battery		= sharpsl_battery_kick,
 };
 
 static struct pxa2xx_spi_chip spitz_lcdcon_chip = {
arch/arm64/kernel/hw_breakpoint.c +2 -2
index 6e96cea99a4e..7f608a8d4386 100644
@@ -662,7 +662,7 @@ static int breakpoint_handler(unsigned long unused, unsigned int esr,
 		perf_bp_event(bp, regs);
 
 		/* Do we need to handle the stepping? */
-		if (is_default_overflow_handler(bp))
+		if (uses_default_overflow_handler(bp))
 			step = 1;
 unlock:
 		rcu_read_unlock();
@@ -741,7 +741,7 @@ static u64 get_distance_from_watchpoint(unsigned long addr, u64 val,
 static int watchpoint_report(struct perf_event *wp, unsigned long addr,
 			     struct pt_regs *regs)
 {
-	int step = is_default_overflow_handler(wp);
+	int step = uses_default_overflow_handler(wp);
 	struct arch_hw_breakpoint *info = counter_arch_bp(wp);
 
 	info->trigger = addr;
arch/m68k/fpsp040/skeleton.S +2 -2
index a8f41615d94a..31a9c634c81e 100644
@@ -499,12 +499,12 @@ in_ea:
 	dbf	%d0,morein
 	rts
 
-	.section .fixup,#alloc,#execinstr
+	.section .fixup,"ax"
 	.even
 1:
 	jbra	fpsp040_die
 
-	.section __ex_table,#alloc
+	.section __ex_table,"a"
 	.align	4
 
 	.long	in_ea,1b
arch/m68k/ifpsp060/os.S +2 -2
index 7a0d6e428066..89e2ec224ab6 100644
@@ -379,11 +379,11 @@ _060_real_access:
 
 
 | Execption handling for movs access to illegal memory
-	.section .fixup,#alloc,#execinstr
+	.section .fixup,"ax"
 	.even
 1:	moveq		#-1,%d1
 	rts
-.section __ex_table,#alloc
+.section __ex_table,"a"
 	.align 4
 	.long	dmrbuae,1b
 	.long	dmrwuae,1b
arch/m68k/kernel/relocate_kernel.S +2 -2
index ab0f1e7d4653..f7667079e08e 100644
@@ -26,7 +26,7 @@ ENTRY(relocate_new_kernel)
 	lea %pc@(.Lcopy),%a4
 2:	addl #0x00000000,%a4		/* virt_to_phys() */
 
-	.section ".m68k_fixup","aw"
+	.section .m68k_fixup,"aw"
 	.long M68K_FIXUP_MEMOFFSET, 2b+2
 	.previous
 
@@ -49,7 +49,7 @@ ENTRY(relocate_new_kernel)
 	lea %pc@(.Lcont040),%a4
 5:	addl #0x00000000,%a4		/* virt_to_phys() */
 
-	.section ".m68k_fixup","aw"
+	.section .m68k_fixup,"aw"
 	.long M68K_FIXUP_MEMOFFSET, 5b+2
 	.previous
 
arch/mips/alchemy/devboards/db1000.c +1 -7
index 433c4b9a9f0a..2854f959a65c 100644
@@ -26,7 +26,6 @@
 #include <linux/interrupt.h>
 #include <linux/leds.h>
 #include <linux/mmc/host.h>
-#include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/pm.h>
 #include <linux/spi/spi.h>
@@ -175,12 +174,7 @@ static struct platform_device db1x00_audio_dev = {
 
 static irqreturn_t db1100_mmc_cd(int irq, void *ptr)
 {
-	void (*mmc_cd)(struct mmc_host *, unsigned long);
-	/* link against CONFIG_MMC=m */
-	mmc_cd = symbol_get(mmc_detect_change);
-	mmc_cd(ptr, msecs_to_jiffies(500));
-	symbol_put(mmc_detect_change);
-
+	mmc_detect_change(ptr, msecs_to_jiffies(500));
 	return IRQ_HANDLED;
 }
 
arch/mips/alchemy/devboards/db1200.c +2 -17
index da7663770425..ae81e05fcb2c 100644
@@ -23,7 +23,6 @@
 #include <linux/gpio.h>
 #include <linux/i2c.h>
 #include <linux/init.h>
-#include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/io.h>
 #include <linux/leds.h>
@@ -355,14 +354,7 @@ static irqreturn_t db1200_mmc_cd(int irq, void *ptr)
 
 static irqreturn_t db1200_mmc_cdfn(int irq, void *ptr)
 {
-	void (*mmc_cd)(struct mmc_host *, unsigned long);
-
-	/* link against CONFIG_MMC=m */
-	mmc_cd = symbol_get(mmc_detect_change);
-	if (mmc_cd) {
-		mmc_cd(ptr, msecs_to_jiffies(200));
-		symbol_put(mmc_detect_change);
-	}
+	mmc_detect_change(ptr, msecs_to_jiffies(200));
 
 	msleep(100);	/* debounce */
 	if (irq == DB1200_SD0_INSERT_INT)
@@ -446,14 +438,7 @@ static irqreturn_t pb1200_mmc1_cd(int irq, void *ptr)
 
 static irqreturn_t pb1200_mmc1_cdfn(int irq, void *ptr)
 {
-	void (*mmc_cd)(struct mmc_host *, unsigned long);
-
-	/* link against CONFIG_MMC=m */
-	mmc_cd = symbol_get(mmc_detect_change);
-	if (mmc_cd) {
-		mmc_cd(ptr, msecs_to_jiffies(200));
-		symbol_put(mmc_detect_change);
-	}
+	mmc_detect_change(ptr, msecs_to_jiffies(200));
 
 	msleep(100);	/* debounce */
 	if (irq == PB1200_SD1_INSERT_INT)
arch/mips/alchemy/devboards/db1300.c +1 -9
index efb318e03e0a..0c12fbc07117 100644
@@ -17,7 +17,6 @@
 #include <linux/interrupt.h>
 #include <linux/ata_platform.h>
 #include <linux/mmc/host.h>
-#include <linux/module.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/rawnand.h>
 #include <linux/mtd/partitions.h>
@@ -457,14 +456,7 @@ static irqreturn_t db1300_mmc_cd(int irq, void *ptr)
 
 static irqreturn_t db1300_mmc_cdfn(int irq, void *ptr)
 {
-	void (*mmc_cd)(struct mmc_host *, unsigned long);
-
-	/* link against CONFIG_MMC=m.  We can only be called once MMC core has
-	 * initialized the controller, so symbol_get() should always succeed.
-	 */
-	mmc_cd = symbol_get(mmc_detect_change);
-	mmc_cd(ptr, msecs_to_jiffies(200));
-	symbol_put(mmc_detect_change);
+	mmc_detect_change(ptr, msecs_to_jiffies(200));
 
 	msleep(100);	/* debounce */
 	if (irq == DB1300_SD1_INSERT_INT)
arch/parisc/include/asm/led.h +2 -2
index 6de13d08a388..b70b9094fb7c 100644
@@ -11,8 +11,8 @@
 #define	LED1		0x02
 #define	LED0		0x01		/* bottom (or furthest left) LED */
 
-#define	LED_LAN_TX	LED0		/* for LAN transmit activity */
-#define	LED_LAN_RCV	LED1		/* for LAN receive activity */
+#define	LED_LAN_RCV	LED0		/* for LAN receive activity */
+#define	LED_LAN_TX	LED1		/* for LAN transmit activity */
 #define	LED_DISK_IO	LED2		/* for disk activity */
 #define	LED_HEARTBEAT	LED3		/* heartbeat */
 
arch/parisc/include/asm/processor.h +0 -1
index 2dbe5580a1a4..d98f4cb549b9 100644
@@ -108,7 +108,6 @@ struct cpuinfo_parisc {
 	unsigned long cpu_loc;      /* CPU location from PAT firmware */
 	unsigned int state;
 	struct parisc_device *dev;
-	unsigned long loops_per_jiffy;
 };
 
 extern struct system_cpuinfo_parisc boot_cpu_data;
arch/parisc/kernel/processor.c +12 -6
index 58ece781a176..e87bb36b3fca 100644
@@ -177,7 +177,6 @@ static int __init processor_probe(struct parisc_device *dev)
 	if (cpuid)
 		memset(p, 0, sizeof(struct cpuinfo_parisc));
 
-	p->loops_per_jiffy = loops_per_jiffy;
 	p->dev = dev;		/* Save IODC data in case we need it */
 	p->hpa = dev->hpa.start;	/* save CPU hpa */
 	p->cpuid = cpuid;	/* save CPU id */
@@ -370,10 +369,18 @@ int
 show_cpuinfo (struct seq_file *m, void *v)
 {
 	unsigned long cpu;
+	char cpu_name[60], *p;
+
+	/* strip PA path from CPU name to not confuse lscpu */
+	strlcpy(cpu_name, per_cpu(cpu_data, 0).dev->name, sizeof(cpu_name));
+	p = strrchr(cpu_name, '[');
+	if (p)
+		*(--p) = 0;
 
 	for_each_online_cpu(cpu) {
-		const struct cpuinfo_parisc *cpuinfo = &per_cpu(cpu_data, cpu);
 #ifdef CONFIG_SMP
+		const struct cpuinfo_parisc *cpuinfo = &per_cpu(cpu_data, cpu);
+
 		if (0 == cpuinfo->hpa)
 			continue;
 #endif
@@ -410,8 +417,7 @@ show_cpuinfo (struct seq_file *m, void *v)
 
 		seq_printf(m, "model\t\t: %s - %s\n",
 				 boot_cpu_data.pdc.sys_model_name,
-				 cpuinfo->dev ?
-				 cpuinfo->dev->name : "Unknown");
+				 cpu_name);
 
 		seq_printf(m, "hversion\t: 0x%08x\n"
 			        "sversion\t: 0x%08x\n",
@@ -422,8 +428,8 @@ show_cpuinfo (struct seq_file *m, void *v)
 		show_cache_info(m);
 
 		seq_printf(m, "bogomips\t: %lu.%02lu\n",
-			     cpuinfo->loops_per_jiffy / (500000 / HZ),
-			     (cpuinfo->loops_per_jiffy / (5000 / HZ)) % 100);
+			     loops_per_jiffy / (500000 / HZ),
+			     loops_per_jiffy / (5000 / HZ) % 100);
 
 		seq_printf(m, "software id\t: %ld\n\n",
 				boot_cpu_data.pdc.model.sw_id);
arch/powerpc/kernel/head_32.S +1 -1
index 29b2fed93289..1fb98efd5404 100644
@@ -986,7 +986,7 @@ start_here:
 	 */
 	lis	r5, abatron_pteptrs@h
 	ori	r5, r5, abatron_pteptrs@l
-	stw	r5, 0xf0(r0)	/* This much match your Abatron config */
+	stw	r5, 0xf0(0)	/* This much match your Abatron config */
 	lis	r6, swapper_pg_dir@h
 	ori	r6, r6, swapper_pg_dir@l
 	tophys(r5, r5)
arch/powerpc/kernel/iommu.c +14 -3
index 87af91937c8a..410fb08a2c31 100644
@@ -145,17 +145,28 @@ static int fail_iommu_bus_notify(struct notifier_block *nb,
 	return 0;
 }
 
-static struct notifier_block fail_iommu_bus_notifier = {
+/*
+ * PCI and VIO buses need separate notifier_block structs, since they're linked
+ * list nodes.  Sharing a notifier_block would mean that any notifiers later
+ * registered for PCI buses would also get called by VIO buses and vice versa.
+ */
+static struct notifier_block fail_iommu_pci_bus_notifier = {
 	.notifier_call = fail_iommu_bus_notify
 };
 
+#ifdef CONFIG_IBMVIO
+static struct notifier_block fail_iommu_vio_bus_notifier = {
+	.notifier_call = fail_iommu_bus_notify
+};
+#endif
+
 static int __init fail_iommu_setup(void)
 {
 #ifdef CONFIG_PCI
-	bus_register_notifier(&pci_bus_type, &fail_iommu_bus_notifier);
+	bus_register_notifier(&pci_bus_type, &fail_iommu_pci_bus_notifier);
 #endif
 #ifdef CONFIG_IBMVIO
-	bus_register_notifier(&vio_bus_type, &fail_iommu_bus_notifier);
+	bus_register_notifier(&vio_bus_type, &fail_iommu_vio_bus_notifier);
 #endif
 
 	return 0;
arch/powerpc/kernel/vmlinux.lds.S +1 -0
index efb9a6982561..7346875ac61d 100644
@@ -322,6 +322,7 @@ SECTIONS
 		*(.sdata2)
 		*(.got.plt) *(.got)
 		*(.plt)
+		*(.branch_lt)
 	}
 #else
 	.data : AT(ADDR(.data) - LOAD_OFFSET) {
arch/powerpc/platforms/pseries/ibmebus.c +1 -0
index 408a86044133..a3d6d064754e 100644
@@ -452,6 +452,7 @@ static int __init ibmebus_bus_init(void)
 	if (err) {
 		printk(KERN_WARNING "%s: device_register returned %i\n",
 		       __func__, err);
+		put_device(&ibmebus_bus_device);
 		bus_unregister(&ibmebus_bus_type);
 
 		return err;
arch/x86/include/asm/virtext.h +0 -6
index 4699acd602af..62810550024d 100644
@@ -89,12 +89,6 @@ static inline int cpu_has_svm(const char **msg)
 		return 0;
 	}
 
-	if (boot_cpu_data.extended_cpuid_level < SVM_CPUID_FUNC) {
-		if (msg)
-			*msg = "can't execute cpuid_8000000a";
-		return 0;
-	}
-
 	if (!boot_cpu_has(X86_FEATURE_SVM)) {
 		if (msg)
 			*msg = "svm not available";
arch/x86/kernel/apm_32.c +0 -6
index 63d3e6a6b5ef..558ac8bb8c7f 100644
@@ -246,12 +246,6 @@
 extern int (*console_blank_hook)(int);
 #endif
 
-/*
- * The apm_bios device is one of the misc char devices.
- * This is its minor number.
- */
-#define	APM_MINOR_DEV	134
-
 /*
  * Various options can be changed at boot time as follows:
  * (We allow underscores for compatibility with the modules code)
crypto/asymmetric_keys/x509_public_key.c +5 -0
index 1bd0cf71a22d..e1160a7c33bc 100644
@@ -138,6 +138,11 @@ int x509_check_for_self_signed(struct x509_certificate *cert)
 	if (strcmp(cert->pub->pkey_algo, cert->sig->pkey_algo) != 0)
 		goto out;
 
+	if (cert->unsupported_sig) {
+		ret = 0;
+		goto out;
+	}
+
 	ret = public_key_verify_signature(cert->pub, cert->sig);
 	if (ret < 0) {
 		if (ret == -ENOPKG) {
drivers/acpi/acpica/psopcode.c +1 -1
index a402ad772a1e..c561d35d441b 100644
@@ -637,7 +637,7 @@ const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES] = {
 
 /* 7E */ ACPI_OP("Timer", ARGP_TIMER_OP, ARGI_TIMER_OP, ACPI_TYPE_ANY,
 			 AML_CLASS_EXECUTE, AML_TYPE_EXEC_0A_0T_1R,
-			 AML_FLAGS_EXEC_0A_0T_1R),
+			 AML_FLAGS_EXEC_0A_0T_1R | AML_NO_OPERAND_RESOLVE),
 
 /* ACPI 5.0 opcodes */
 
drivers/acpi/video_detect.c +9 -0
index b4f16073ef43..866bc20c8239 100644
@@ -294,6 +294,15 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
 		DMI_MATCH(DMI_BOARD_NAME, "Lenovo IdeaPad S405"),
 		},
 	},
+	{
+	 /* https://bugzilla.suse.com/show_bug.cgi?id=1208724 */
+	 .callback = video_detect_force_native,
+	 /* Lenovo Ideapad Z470 */
+	 .matches = {
+		DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+		DMI_MATCH(DMI_PRODUCT_VERSION, "IdeaPad Z470"),
+		},
+	},
 	{
 	 /* https://bugzilla.redhat.com/show_bug.cgi?id=1187004 */
 	 .callback = video_detect_force_native,
drivers/amba/bus.c +1 -0
index 8ea401fc8996..e07d6a4d3f03 100644
@@ -344,6 +344,7 @@ static void amba_device_release(struct device *dev)
 {
 	struct amba_device *d = to_amba_device(dev);
 
+	of_node_put(d->dev.of_node);
 	if (d->res.parent)
 		release_resource(&d->res);
 	kfree(d);
drivers/ata/pata_ftide010.c +1 -0
index 569a4a662dcd..9da2e14a0108 100644
@@ -569,6 +569,7 @@ static struct platform_driver pata_ftide010_driver = {
 };
 module_platform_driver(pata_ftide010_driver);
 
+MODULE_DESCRIPTION("low level driver for Faraday Technology FTIDE010");
 MODULE_AUTHOR("Linus Walleij <[email protected]>");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS("platform:" DRV_NAME);
drivers/ata/sata_gemini.c +1 -0
index 46950e0267e0..64b43943f650 100644
@@ -434,6 +434,7 @@ static struct platform_driver gemini_sata_driver = {
 };
 module_platform_driver(gemini_sata_driver);
 
+MODULE_DESCRIPTION("low level driver for Cortina Systems Gemini SATA bridge");
 MODULE_AUTHOR("Linus Walleij <[email protected]>");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS("platform:" DRV_NAME);
drivers/base/regmap/regcache-rbtree.c +5 -5
index e9b7ce8c272c..7353c5527087 100644
@@ -291,7 +291,7 @@ static int regcache_rbtree_insert_to_block(struct regmap *map,
 
 	blk = krealloc(rbnode->block,
 		       blklen * map->cache_word_size,
-		       GFP_KERNEL);
+		       map->alloc_flags);
 	if (!blk)
 		return -ENOMEM;
 
@@ -300,7 +300,7 @@ static int regcache_rbtree_insert_to_block(struct regmap *map,
 	if (BITS_TO_LONGS(blklen) > BITS_TO_LONGS(rbnode->blklen)) {
 		present = krealloc(rbnode->cache_present,
 				   BITS_TO_LONGS(blklen) * sizeof(*present),
-				   GFP_KERNEL);
+				   map->alloc_flags);
 		if (!present)
 			return -ENOMEM;
 
@@ -334,7 +334,7 @@ regcache_rbtree_node_alloc(struct regmap *map, unsigned int reg)
 	const struct regmap_range *range;
 	int i;
 
-	rbnode = kzalloc(sizeof(*rbnode), GFP_KERNEL);
+	rbnode = kzalloc(sizeof(*rbnode), map->alloc_flags);
 	if (!rbnode)
 		return NULL;
 
@@ -360,13 +360,13 @@ regcache_rbtree_node_alloc(struct regmap *map, unsigned int reg)
 	}
 
 	rbnode->block = kmalloc_array(rbnode->blklen, map->cache_word_size,
-				      GFP_KERNEL);
+				      map->alloc_flags);
 	if (!rbnode->block)
 		goto err_free;
 
 	rbnode->cache_present = kcalloc(BITS_TO_LONGS(rbnode->blklen),
 					sizeof(*rbnode->cache_present),
-					GFP_KERNEL);
+					map->alloc_flags);
 	if (!rbnode->cache_present)
 		goto err_free_block;
 
drivers/bluetooth/btsdio.c +1 -0
index 20142bc77554..1325b1df4a8e 100644
@@ -356,6 +356,7 @@ static void btsdio_remove(struct sdio_func *func)
 	if (!data)
 		return;
 
+	cancel_work_sync(&data->work);
 	hdev = data->hdev;
 
 	sdio_set_drvdata(func, NULL);
drivers/bluetooth/hci_nokia.c +5 -1
index 3539fd03f47e..474866448f18 100644
@@ -746,7 +746,11 @@ static int nokia_bluetooth_serdev_probe(struct serdev_device *serdev)
 		return err;
 	}
 
-	clk_prepare_enable(sysclk);
+	err = clk_prepare_enable(sysclk);
+	if (err) {
+		dev_err(dev, "could not enable sysclk: %d", err);
+		return err;
+	}
 	btdev->sysclk_speed = clk_get_rate(sysclk);
 	clk_disable_unprepare(sysclk);
 
drivers/char/tpm/tpm_tis_core.c +11 -4
index 325581558509..9d731e265594 100644
@@ -364,10 +364,17 @@ static int tpm_tis_send_main(struct tpm_chip *chip, const u8 *buf, size_t len)
 	int rc;
 	u32 ordinal;
 	unsigned long dur;
-
-	rc = tpm_tis_send_data(chip, buf, len);
-	if (rc < 0)
-		return rc;
+	unsigned int try;
+
+	for (try = 0; try < TPM_RETRY; try++) {
+		rc = tpm_tis_send_data(chip, buf, len);
+		if (rc >= 0)
+			/* Data transfer done successfully */
+			break;
+		else if (rc != -EIO)
+			/* Data transfer failed, not recoverable */
+			return rc;
+	}
 
 	/* go and do it */
 	rc = tpm_tis_write8(priv, TPM_STS(priv->locality), TPM_STS_GO);
drivers/clk/keystone/pll.c +1 -1
index e7e840fb74ea..526694c2a6c9 100644
@@ -213,7 +213,7 @@ static void __init _of_pll_clk_init(struct device_node *node, bool pllctrl)
 	}
 
 	clk = clk_register_pll(NULL, node->name, parent_name, pll_data);
-	if (clk) {
+	if (!IS_ERR_OR_NULL(clk)) {
 		of_clk_add_provider(node, of_clk_src_simple_get, clk);
 		return;
 	}
drivers/clk/qcom/gcc-mdm9615.c +1 -1
index b99dd406e907..2fa5880027ca 100644
@@ -66,7 +66,7 @@ static struct clk_regmap pll0_vote = {
 	.enable_mask = BIT(0),
 	.hw.init = &(struct clk_init_data){
 		.name = "pll0_vote",
-		.parent_names = (const char *[]){ "pll8" },
+		.parent_names = (const char *[]){ "pll0" },
 		.num_parents = 1,
 		.ops = &clk_pll_vote_ops,
 	},
drivers/clk/sunxi-ng/ccu_mmc_timing.c +1 -1
index f9869f7353c0..9356dc157156 100644
@@ -50,7 +50,7 @@ int sunxi_ccu_set_mmc_timing_mode(struct clk *clk, bool new_mode)
 EXPORT_SYMBOL_GPL(sunxi_ccu_set_mmc_timing_mode);
 
 /**
- * sunxi_ccu_set_mmc_timing_mode: Get the current MMC clock timing mode
+ * sunxi_ccu_get_mmc_timing_mode: Get the current MMC clock timing mode
  * @clk: clock to query
  *
  * Returns 0 if the clock is in old timing mode, > 0 if it is in
drivers/cpufreq/powernow-k8.c +2 -1
index 32bb00a6fe09..3b9aa473ae8f 100644
@@ -1120,7 +1120,8 @@ static int powernowk8_cpu_exit(struct cpufreq_policy *pol)
 
 	kfree(data->powernow_table);
 	kfree(data);
-	for_each_cpu(cpu, pol->cpus)
+	/* pol->cpus will be empty here, use related_cpus instead. */
+	for_each_cpu(cpu, pol->related_cpus)
 		per_cpu(powernow_data, cpu) = NULL;
 
 	return 0;
drivers/crypto/caam/caampkc.c +3 -1
index 6f3f81bb880b..01f9053db287 100644
@@ -194,7 +194,9 @@ static int caam_rsa_count_leading_zeros(struct scatterlist *sgl,
 		if (len && *buff)
 			break;
 
-		sg_miter_next(&miter);
+		if (!sg_miter_next(&miter))
+			break;
+
 		buff = miter.addr;
 		len = miter.length;
 
drivers/crypto/stm32/stm32-hash.c +1 -1
index 4909f820e953..263f79cecc25 100644
@@ -574,9 +574,9 @@ static int stm32_hash_dma_send(struct stm32_hash_dev *hdev)
 	}
 
 	for_each_sg(rctx->sg, tsg, rctx->nents, i) {
+		sg[0] = *tsg;
 		len = sg->length;
 
-		sg[0] = *tsg;
 		if (sg_is_last(sg)) {
 			if (hdev->dma_mode == 1) {
 				len = (ALIGN(sg->length, 16) - 16);
drivers/devfreq/devfreq.c +1 -0
index b05e6a15221c..e6674448a0bc 100644
@@ -495,6 +495,7 @@ static void devfreq_dev_release(struct device *dev)
 		devfreq->profile->exit(devfreq->dev.parent);
 
 	mutex_destroy(&devfreq->lock);
+	srcu_cleanup_notifier_head(&devfreq->transition_notifier_list);
 	kfree(devfreq);
 }
 
drivers/dma/Kconfig +2 -0
index 5ea37d133f24..6abb80b09db3 100644
@@ -209,6 +209,7 @@ config FSL_DMA
 config FSL_EDMA
 	tristate "Freescale eDMA engine support"
 	depends on OF
+	depends on HAS_IOMEM
 	select DMA_ENGINE
 	select DMA_VIRTUAL_CHANNELS
 	help
@@ -254,6 +255,7 @@ config IMX_SDMA
 
 config INTEL_IDMA64
 	tristate "Intel integrated DMA 64-bit support"
+	depends on HAS_IOMEM
 	select DMA_ENGINE
 	select DMA_VIRTUAL_CHANNELS
 	help
drivers/dma/ste_dma40.c +4 -0
index ee15d4fefbad..498d9886ed9b 100644
@@ -3577,6 +3577,10 @@ static int __init d40_probe(struct platform_device *pdev)
 	spin_lock_init(&base->lcla_pool.lock);
 
 	base->irq = platform_get_irq(pdev, 0);
+	if (base->irq < 0) {
+		ret = base->irq;
+		goto destroy_cache;
+	}
 
 	ret = request_irq(base->irq, d40_handle_interrupt, 0, D40_NAME, base);
 	if (ret) {
drivers/gpu/drm/ast/ast_post.c +1 -1
index c1d1ac51d1c2..1f09cb9691f8 100644
@@ -291,7 +291,7 @@ static void ast_init_dram_reg(struct drm_device *dev)
 				;
 			} while (ast_read32(ast, 0x10100) != 0xa8);
 		} else {/* AST2100/1100 */
-			if (ast->chip == AST2100 || ast->chip == 2200)
+			if (ast->chip == AST2100 || ast->chip == AST2200)
 				dram_reg_info = ast2100_dram_table_data;
 			else
 				dram_reg_info = ast1100_dram_table_data;
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c +7 -2
index f5195d9841f8..687c68e0a59d 100644
@@ -744,8 +744,13 @@ static void adv7511_mode_set(struct adv7511 *adv7511,
 	else
 		low_refresh_rate = ADV7511_LOW_REFRESH_RATE_NONE;
 
-	regmap_update_bits(adv7511->regmap, 0xfb,
-		0x6, low_refresh_rate << 1);
+	if (adv7511->type == ADV7511)
+		regmap_update_bits(adv7511->regmap, 0xfb,
+				   0x6, low_refresh_rate << 1);
+	else
+		regmap_update_bits(adv7511->regmap, 0x4a,
+				   0xc, low_refresh_rate << 2);
+
 	regmap_update_bits(adv7511->regmap, 0x17,
 		0x60, (vsync_polarity << 6) | (hsync_polarity << 5));
 
drivers/gpu/drm/exynos/exynos_drm_crtc.c +2 -3
index 4787560bf93e..e1aa518ea0ba 100644
@@ -43,13 +43,12 @@ static void exynos_drm_crtc_atomic_disable(struct drm_crtc *crtc,
 	if (exynos_crtc->ops->disable)
 		exynos_crtc->ops->disable(exynos_crtc);
 
+	spin_lock_irq(&crtc->dev->event_lock);
 	if (crtc->state->event && !crtc->state->active) {
-		spin_lock_irq(&crtc->dev->event_lock);
 		drm_crtc_send_vblank_event(crtc, crtc->state->event);
-		spin_unlock_irq(&crtc->dev->event_lock);
-
 		crtc->state->event = NULL;
 	}
+	spin_unlock_irq(&crtc->dev->event_lock);
 }
 
 static int exynos_crtc_atomic_check(struct drm_crtc *crtc,
drivers/hid/hid-multitouch.c +3 -10
index 0fa3bd2b035e..55b1023af31f 100644
@@ -1136,7 +1136,6 @@ static void mt_post_parse(struct mt_device *td)
 static int mt_input_configured(struct hid_device *hdev, struct hid_input *hi)
 {
 	struct mt_device *td = hid_get_drvdata(hdev);
-	char *name;
 	const char *suffix = NULL;
 	struct hid_field *field = hi->report->field[0];
 	int ret;
@@ -1196,15 +1195,9 @@ static int mt_input_configured(struct hid_device *hdev, struct hid_input *hi)
 		}
 	}
 
-	if (suffix) {
-		name = devm_kzalloc(&hi->input->dev,
-				    strlen(hdev->name) + strlen(suffix) + 2,
-				    GFP_KERNEL);
-		if (name) {
-			sprintf(name, "%s %s", hdev->name, suffix);
-			hi->input->name = name;
-		}
-	}
+	if (suffix)
+		hi->input->name = devm_kasprintf(&hdev->dev, GFP_KERNEL,
+						 "%s %s", hdev->name, suffix);
 
 	return 0;
 }
drivers/hid/wacom.h +1 -0
index 9c0900c35b23..3dc4a819b175 100644
@@ -155,6 +155,7 @@ struct wacom_remote {
 		struct input_dev *input;
 		bool registered;
 		struct wacom_battery battery;
+		ktime_t active_time;
 	} remotes[WACOM_MAX_REMOTES];
 };
 
drivers/hid/wacom_sys.c +21 -4
index 28e7a4950b74..3ca50505c78c 100644
@@ -2361,6 +2361,18 @@ static void wacom_wireless_work(struct work_struct *work)
 	return;
 }
 
+static void wacom_remote_destroy_battery(struct wacom *wacom, int index)
+{
+	struct wacom_remote *remote = wacom->remote;
+
+	if (remote->remotes[index].battery.battery) {
+		devres_release_group(&wacom->hdev->dev,
+				     &remote->remotes[index].battery.bat_desc);
+		remote->remotes[index].battery.battery = NULL;
+		remote->remotes[index].active_time = 0;
+	}
+}
+
 static void wacom_remote_destroy_one(struct wacom *wacom, unsigned int index)
 {
 	struct wacom_remote *remote = wacom->remote;
@@ -2375,9 +2387,7 @@ static void wacom_remote_destroy_one(struct wacom *wacom, unsigned int index)
 			remote->remotes[i].registered = false;
 			spin_unlock_irqrestore(&remote->remote_lock, flags);
 
-			if (remote->remotes[i].battery.battery)
-				devres_release_group(&wacom->hdev->dev,
-						     &remote->remotes[i].battery.bat_desc);
+			wacom_remote_destroy_battery(wacom, i);
 
 			if (remote->remotes[i].group.name)
 				devres_release_group(&wacom->hdev->dev,
@@ -2385,7 +2395,6 @@ static void wacom_remote_destroy_one(struct wacom *wacom, unsigned int index)
 
 			remote->remotes[i].serial = 0;
 			remote->remotes[i].group.name = NULL;
-			remote->remotes[i].battery.battery = NULL;
 			wacom->led.groups[i].select = WACOM_STATUS_UNKNOWN;
 		}
 	}
@@ -2470,6 +2479,9 @@ static int wacom_remote_attach_battery(struct wacom *wacom, int index)
 	if (remote->remotes[index].battery.battery)
 		return 0;
 
+	if (!remote->remotes[index].active_time)
+		return 0;
+
 	if (wacom->led.groups[index].select == WACOM_STATUS_UNKNOWN)
 		return 0;
 
@@ -2485,6 +2497,7 @@ static void wacom_remote_work(struct work_struct *work)
 {
 	struct wacom *wacom = container_of(work, struct wacom, remote_work);
 	struct wacom_remote *remote = wacom->remote;
+	ktime_t kt = ktime_get();
 	struct wacom_remote_data data;
 	unsigned long flags;
 	unsigned int count;
@@ -2511,6 +2524,10 @@ static void wacom_remote_work(struct work_struct *work)
 		serial = data.remote[i].serial;
 		if (data.remote[i].connected) {
 
+			if (kt - remote->remotes[i].active_time > WACOM_REMOTE_BATTERY_TIMEOUT
+			    && remote->remotes[i].active_time != 0)
+				wacom_remote_destroy_battery(wacom, i);
+
 			if (remote->remotes[i].serial == serial) {
 				wacom_remote_attach_battery(wacom, i);
 				continue;
drivers/hid/wacom_wac.c +1 -0
index be30fdbc37c5..19a798eb395c 100644
@@ -1039,6 +1039,7 @@ static int wacom_remote_irq(struct wacom_wac *wacom_wac, size_t len)
 	if (index < 0 || !remote->remotes[index].registered)
 		goto out;
 
+	remote->remotes[i].active_time = ktime_get();
 	input = remote->remotes[index].input;
 
 	input_report_key(input, BTN_0, (data[9] & 0x01));
drivers/hid/wacom_wac.h +1 -0
index a5c61096fa45..899c6c7bfea4 100644
@@ -18,6 +18,7 @@
 #define WACOM_NAME_MAX		64
 #define WACOM_MAX_REMOTES	5
 #define WACOM_STATUS_UNKNOWN	255
+#define WACOM_REMOTE_BATTERY_TIMEOUT	21000000000ll
 
 /* packet length for individual models */
 #define WACOM_PKGLEN_BBFUN	 9
drivers/iio/industrialio-core.c +1 -1
index 97b7266ee0ff..12d73ebcadfa 100644
@@ -328,7 +328,7 @@ static ssize_t iio_debugfs_write_reg(struct file *file,
 	char buf[80];
 	int ret;
 
-	count = min_t(size_t, count, (sizeof(buf)-1));
+	count = min(count, sizeof(buf) - 1);
 	if (copy_from_user(buf, userbuf, count))
 		return -EFAULT;
 
drivers/infiniband/ulp/isert/ib_isert.c +2 -0
index 598e2bb005c8..0d9b53c6e265 100644
@@ -2652,6 +2652,8 @@ static void isert_wait_conn(struct iscsi_conn *conn)
 	isert_put_unsol_pending_cmds(conn);
 	isert_wait4cmds(conn);
 	isert_wait4logout(isert_conn);
+
+	queue_work(isert_release_wq, &isert_conn->release_work);
 }
 
 static void isert_free_conn(struct iscsi_conn *conn)
drivers/md/raid1.c +3 -0
index 28f78199de3b..7e37e4b2ec6a 100644
@@ -1777,6 +1777,9 @@ static int raid1_remove_disk(struct mddev *mddev, struct md_rdev *rdev)
 	int number = rdev->raid_disk;
 	struct raid1_info *p = conf->mirrors + number;
 
+	if (unlikely(number >= conf->raid_disks))
+		goto abort;
+
 	if (rdev != p->rdev)
 		p = conf->mirrors + conf->raid_disks + number;
 
drivers/media/dvb-frontends/ascot2e.c +1 -1
index 79d5d89bc95e..c9c3bfb2348a 100644
@@ -542,7 +542,7 @@ struct dvb_frontend *ascot2e_attach(struct dvb_frontend *fe,
 		priv->i2c_address, priv->i2c);
 	return fe;
 }
-EXPORT_SYMBOL(ascot2e_attach);
+EXPORT_SYMBOL_GPL(ascot2e_attach);
 
 MODULE_DESCRIPTION("Sony ASCOT2E terr/cab tuner driver");
 MODULE_AUTHOR("[email protected]");
drivers/media/dvb-frontends/atbm8830.c +1 -1
index 05850b32d6c6..ca9ae02ee436 100644
@@ -498,7 +498,7 @@ struct dvb_frontend *atbm8830_attach(const struct atbm8830_config *config,
 	return NULL;
 
 }
-EXPORT_SYMBOL(atbm8830_attach);
+EXPORT_SYMBOL_GPL(atbm8830_attach);
 
 MODULE_DESCRIPTION("AltoBeam ATBM8830/8831 GB20600 demodulator driver");
 MODULE_AUTHOR("David T. L. Wong <[email protected]>");
drivers/media/dvb-frontends/au8522_dig.c +1 -1
index 3f3635f5a06a..3d92593cf892 100644
@@ -891,7 +891,7 @@ struct dvb_frontend *au8522_attach(const struct au8522_config *config,
 	au8522_release_state(state);
 	return NULL;
 }
-EXPORT_SYMBOL(au8522_attach);
+EXPORT_SYMBOL_GPL(au8522_attach);
 
 static const struct dvb_frontend_ops au8522_ops = {
 	.delsys = { SYS_ATSC, SYS_DVBC_ANNEX_B },
drivers/media/dvb-frontends/bcm3510.c +1 -1
index 87684610f59e..96e19c586621 100644
@@ -835,7 +835,7 @@ struct dvb_frontend* bcm3510_attach(const struct bcm3510_config *config,
 	kfree(state);
 	return NULL;
 }
-EXPORT_SYMBOL(bcm3510_attach);
+EXPORT_SYMBOL_GPL(bcm3510_attach);
 
 static const struct dvb_frontend_ops bcm3510_ops = {
 	.delsys = { SYS_ATSC, SYS_DVBC_ANNEX_B },
drivers/media/dvb-frontends/cx22700.c +1 -1
index 2b629e23ceeb..28872671a20f 100644
@@ -444,4 +444,4 @@ MODULE_DESCRIPTION("Conexant CX22700 DVB-T Demodulator driver");
 MODULE_AUTHOR("Holger Waechtler");
 MODULE_LICENSE("GPL");
 
-EXPORT_SYMBOL(cx22700_attach);
+EXPORT_SYMBOL_GPL(cx22700_attach);
drivers/media/dvb-frontends/cx22702.c +1 -1
index c0e54c59cccf..8a3679769829 100644
@@ -616,7 +616,7 @@ struct dvb_frontend *cx22702_attach(const struct cx22702_config *config,
 	kfree(state);
 	return NULL;
 }
-EXPORT_SYMBOL(cx22702_attach);
+EXPORT_SYMBOL_GPL(cx22702_attach);
 
 static const struct dvb_frontend_ops cx22702_ops = {
 	.delsys = { SYS_DVBT },
drivers/media/dvb-frontends/cx24110.c +1 -1
index cf1bc99d1f32..7688e4abb1ef 100644
@@ -666,4 +666,4 @@ MODULE_DESCRIPTION("Conexant CX24110 DVB-S Demodulator driver");
 MODULE_AUTHOR("Peter Hettkamp");
 MODULE_LICENSE("GPL");
 
-EXPORT_SYMBOL(cx24110_attach);
+EXPORT_SYMBOL_GPL(cx24110_attach);
drivers/media/dvb-frontends/cx24113.c +1 -1
index 0118c2658cf7..8b72e3ea9e61 100644
@@ -602,7 +602,7 @@ struct dvb_frontend *cx24113_attach(struct dvb_frontend *fe,
 
 	return NULL;
 }
-EXPORT_SYMBOL(cx24113_attach);
+EXPORT_SYMBOL_GPL(cx24113_attach);
 
 module_param(debug, int, 0644);
 MODULE_PARM_DESC(debug, "Activates frontend debugging (default:0)");
drivers/media/dvb-frontends/cx24116.c +1 -1
index e105532bfba8..8f4a281e1a62 100644
@@ -1151,7 +1151,7 @@ struct dvb_frontend *cx24116_attach(const struct cx24116_config *config,
 error2: kfree(state);
 error1: return NULL;
 }
-EXPORT_SYMBOL(cx24116_attach);
+EXPORT_SYMBOL_GPL(cx24116_attach);
 
 /*
  * Initialise or wake up device
drivers/media/dvb-frontends/cx24120.c +4 -2
index 7f11dcc94d85..3cb36ba620d1 100644
@@ -313,7 +313,7 @@ struct dvb_frontend *cx24120_attach(const struct cx24120_config *config,
 	kfree(state);
 	return NULL;
 }
-EXPORT_SYMBOL(cx24120_attach);
+EXPORT_SYMBOL_GPL(cx24120_attach);
 
 static int cx24120_test_rom(struct cx24120_state *state)
 {
@@ -980,7 +980,9 @@ static void cx24120_set_clock_ratios(struct dvb_frontend *fe)
 	cmd.arg[8] = (clock_ratios_table[idx].rate >> 8) & 0xff;
 	cmd.arg[9] = (clock_ratios_table[idx].rate >> 0) & 0xff;
 
-	cx24120_message_send(state, &cmd);
+	ret = cx24120_message_send(state, &cmd);
+	if (ret != 0)
+		return;
 
 	/* Calculate ber window rates for stat work */
 	cx24120_calculate_ber_window(state, clock_ratios_table[idx].rate);
drivers/media/dvb-frontends/cx24123.c +1 -1
index 1d59d1d3bd82..0f03b9798a75 100644
@@ -1105,7 +1105,7 @@ struct dvb_frontend *cx24123_attach(const struct cx24123_config *config,
 
 	return NULL;
 }
-EXPORT_SYMBOL(cx24123_attach);
+EXPORT_SYMBOL_GPL(cx24123_attach);
 
 static const struct dvb_frontend_ops cx24123_ops = {
 	.delsys = { SYS_DVBS },
drivers/media/dvb-frontends/cxd2820r_core.c +1 -1
index f6ebbb47b9b2..4b74fba17a7a 100644
@@ -549,7 +549,7 @@ struct dvb_frontend *cxd2820r_attach(const struct cxd2820r_config *config,
 
 	return pdata.get_dvb_frontend(client);
 }
-EXPORT_SYMBOL(cxd2820r_attach);
+EXPORT_SYMBOL_GPL(cxd2820r_attach);
 
 static struct dvb_frontend *cxd2820r_get_dvb_frontend(struct i2c_client *client)
 {
drivers/media/dvb-frontends/cxd2841er.c +2 -2
index ccbd84fd6428..27e2f52c54cb 100644
@@ -3926,14 +3926,14 @@ struct dvb_frontend *cxd2841er_attach_s(struct cxd2841er_config *cfg,
 {
 	return cxd2841er_attach(cfg, i2c, SYS_DVBS);
 }
-EXPORT_SYMBOL(cxd2841er_attach_s);
+EXPORT_SYMBOL_GPL(cxd2841er_attach_s);
 
 struct dvb_frontend *cxd2841er_attach_t_c(struct cxd2841er_config *cfg,
 					struct i2c_adapter *i2c)
 {
 	return cxd2841er_attach(cfg, i2c, 0);
 }
-EXPORT_SYMBOL(cxd2841er_attach_t_c);
+EXPORT_SYMBOL_GPL(cxd2841er_attach_t_c);
 
 static const struct dvb_frontend_ops cxd2841er_dvbs_s2_ops = {
 	.delsys = { SYS_DVBS, SYS_DVBS2 },
drivers/media/dvb-frontends/dib0070.c +1 -1
index d7614b8b8782..9e0adbff483c 100644
@@ -767,7 +767,7 @@ struct dvb_frontend *dib0070_attach(struct dvb_frontend *fe, struct i2c_adapter
 	fe->tuner_priv = NULL;
 	return NULL;
 }
-EXPORT_SYMBOL(dib0070_attach);
+EXPORT_SYMBOL_GPL(dib0070_attach);
 
 MODULE_AUTHOR("Patrick Boettcher <[email protected]>");
 MODULE_DESCRIPTION("Driver for the DiBcom 0070 base-band RF Tuner");
drivers/media/dvb-frontends/dib0090.c +2 -2
index d9d730dfe0b1..7ea46abf9f0e 100644
@@ -2643,7 +2643,7 @@ struct dvb_frontend *dib0090_register(struct dvb_frontend *fe, struct i2c_adapte
 	return NULL;
 }
 
-EXPORT_SYMBOL(dib0090_register);
+EXPORT_SYMBOL_GPL(dib0090_register);
 
 struct dvb_frontend *dib0090_fw_register(struct dvb_frontend *fe, struct i2c_adapter *i2c, const struct dib0090_config *config)
 {
@@ -2669,7 +2669,7 @@ struct dvb_frontend *dib0090_fw_register(struct dvb_frontend *fe, struct i2c_ada
 	fe->tuner_priv = NULL;
 	return NULL;
 }
-EXPORT_SYMBOL(dib0090_fw_register);
+EXPORT_SYMBOL_GPL(dib0090_fw_register);
 
 MODULE_AUTHOR("Patrick Boettcher <[email protected]>");
 MODULE_AUTHOR("Olivier Grenie <[email protected]>");
drivers/media/dvb-frontends/dib3000mb.c +1 -1
index 068bec104e29..d4d6dd6ed19e 100644
@@ -819,4 +819,4 @@ MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL");
 
-EXPORT_SYMBOL(dib3000mb_attach);
+EXPORT_SYMBOL_GPL(dib3000mb_attach);
drivers/media/dvb-frontends/dib3000mc.c +1 -1
index 4d086a7248e9..9dcc05fa97a7 100644
@@ -938,7 +938,7 @@ struct dvb_frontend * dib3000mc_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr
 	kfree(st);
 	return NULL;
 }
-EXPORT_SYMBOL(dib3000mc_attach);
+EXPORT_SYMBOL_GPL(dib3000mc_attach);
 
 static const struct dvb_frontend_ops dib3000mc_ops = {
 	.delsys = { SYS_DVBT },
drivers/media/dvb-frontends/dib7000m.c +1 -1
index 5ce9f93a65c3..b46a9571c4b3 100644
@@ -1437,7 +1437,7 @@ struct dvb_frontend * dib7000m_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr,
 	kfree(st);
 	return NULL;
 }
-EXPORT_SYMBOL(dib7000m_attach);
+EXPORT_SYMBOL_GPL(dib7000m_attach);
 
 static const struct dvb_frontend_ops dib7000m_ops = {
 	.delsys = { SYS_DVBT },
drivers/media/dvb-frontends/dib7000p.c +2 -2
index 0fbaabe43682..e2299a91bcc8 100644
@@ -500,7 +500,7 @@ static int dib7000p_update_pll(struct dvb_frontend *fe, struct dibx000_bandwidth
 	prediv = reg_1856 & 0x3f;
 	loopdiv = (reg_1856 >> 6) & 0x3f;
 
-	if ((bw != NULL) && (bw->pll_prediv != prediv || bw->pll_ratio != loopdiv)) {
+	if (loopdiv && bw && (bw->pll_prediv != prediv || bw->pll_ratio != loopdiv)) {
 		dprintk("Updating pll (prediv: old =  %d new = %d ; loopdiv : old = %d new = %d)\n", prediv, bw->pll_prediv, loopdiv, bw->pll_ratio);
 		reg_1856 &= 0xf000;
 		reg_1857 = dib7000p_read_word(state, 1857);
@@ -2818,7 +2818,7 @@ void *dib7000p_attach(struct dib7000p_ops *ops)
 
 	return ops;
 }
-EXPORT_SYMBOL(dib7000p_attach);
+EXPORT_SYMBOL_GPL(dib7000p_attach);
 
 static const struct dvb_frontend_ops dib7000p_ops = {
 	.delsys = { SYS_DVBT },
drivers/media/dvb-frontends/dib8000.c +1 -1
index c429392ebbe6..c17bae942902 100644
@@ -4530,7 +4530,7 @@ void *dib8000_attach(struct dib8000_ops *ops)
 
 	return ops;
 }
-EXPORT_SYMBOL(dib8000_attach);
+EXPORT_SYMBOL_GPL(dib8000_attach);
 
 MODULE_AUTHOR("Olivier Grenie <[email protected], Patrick Boettcher <[email protected]>");
 MODULE_DESCRIPTION("Driver for the DiBcom 8000 ISDB-T demodulator");
drivers/media/dvb-frontends/dib9000.c +1 -1
index 1b7a4331af05..8be71123e110 100644
@@ -2547,7 +2547,7 @@ struct dvb_frontend *dib9000_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr, c
 	kfree(st);
 	return NULL;
 }
-EXPORT_SYMBOL(dib9000_attach);
+EXPORT_SYMBOL_GPL(dib9000_attach);
 
 static const struct dvb_frontend_ops dib9000_ops = {
 	.delsys = { SYS_DVBT },
drivers/media/dvb-frontends/drx39xyj/drxj.c +1 -1
index 499ccff557bf..6f057ac1becc 100644
@@ -12364,7 +12364,7 @@ struct dvb_frontend *drx39xxj_attach(struct i2c_adapter *i2c)
 
 	return NULL;
 }
-EXPORT_SYMBOL(drx39xxj_attach);
+EXPORT_SYMBOL_GPL(drx39xxj_attach);
 
 static const struct dvb_frontend_ops drx39xxj_ops = {
 	.delsys = { SYS_ATSC, SYS_DVBC_ANNEX_B },
drivers/media/dvb-frontends/drxd_hard.c +1 -1
index 7d04400b18dd..360c26e019d2 100644
@@ -2981,7 +2981,7 @@ struct dvb_frontend *drxd_attach(const struct drxd_config *config,
 	kfree(state);
 	return NULL;
 }
-EXPORT_SYMBOL(drxd_attach);
+EXPORT_SYMBOL_GPL(drxd_attach);
 
 MODULE_DESCRIPTION("DRXD driver");
 MODULE_AUTHOR("Micronas");
drivers/media/dvb-frontends/drxk_hard.c +1 -1
index 98146e74bbdf..254b05a95419 100644
@@ -6873,7 +6873,7 @@ struct dvb_frontend *drxk_attach(const struct drxk_config *config,
 	kfree(state);
 	return NULL;
 }
-EXPORT_SYMBOL(drxk_attach);
+EXPORT_SYMBOL_GPL(drxk_attach);
 
 MODULE_DESCRIPTION("DRX-K driver");
 MODULE_AUTHOR("Ralph Metzler");
drivers/media/dvb-frontends/ds3000.c +1 -1
index 0b17a45c5640..868e04adc5eb 100644
@@ -879,7 +879,7 @@ struct dvb_frontend *ds3000_attach(const struct ds3000_config *config,
 error2:
 	return NULL;
 }
-EXPORT_SYMBOL(ds3000_attach);
+EXPORT_SYMBOL_GPL(ds3000_attach);
 
 static int ds3000_set_carrier_offset(struct dvb_frontend *fe,
 					s32 carrier_offset_khz)
drivers/media/dvb-frontends/dvb-pll.c +1 -1
index 5553b89b804e..3bcb528b2718 100644
@@ -825,7 +825,7 @@ struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr,
 
 	return fe;
 }
-EXPORT_SYMBOL(dvb_pll_attach);
+EXPORT_SYMBOL_GPL(dvb_pll_attach);
 
 MODULE_DESCRIPTION("dvb pll library");
 MODULE_AUTHOR("Gerd Knorr");
drivers/media/dvb-frontends/ec100.c +1 -1
index fa2a96d5f94e..a499a0eb0f0f 100644
@@ -309,7 +309,7 @@ struct dvb_frontend *ec100_attach(const struct ec100_config *config,
 	kfree(state);
 	return NULL;
 }
-EXPORT_SYMBOL(ec100_attach);
+EXPORT_SYMBOL_GPL(ec100_attach);
 
 static const struct dvb_frontend_ops ec100_ops = {
 	.delsys = { SYS_DVBT },
drivers/media/dvb-frontends/helene.c +2 -2
index fcfe658a4328..63e137d3ecb4 100644
@@ -1007,7 +1007,7 @@ struct dvb_frontend *helene_attach_s(struct dvb_frontend *fe,
 			priv->i2c_address, priv->i2c);
 	return fe;
 }
-EXPORT_SYMBOL(helene_attach_s);
+EXPORT_SYMBOL_GPL(helene_attach_s);
 
 struct dvb_frontend *helene_attach(struct dvb_frontend *fe,
 		const struct helene_config *config,
@@ -1043,7 +1043,7 @@ struct dvb_frontend *helene_attach(struct dvb_frontend *fe,
 			priv->i2c_address, priv->i2c);
 	return fe;
 }
-EXPORT_SYMBOL(helene_attach);
+EXPORT_SYMBOL_GPL(helene_attach);
 
 MODULE_DESCRIPTION("Sony HELENE Sat/Ter tuner driver");
 MODULE_AUTHOR("Abylay Ospan <[email protected]>");
drivers/media/dvb-frontends/horus3a.c +1 -1
index 5c8b405f2ddc..be7d3277e0f6 100644
@@ -404,7 +404,7 @@ struct dvb_frontend *horus3a_attach(struct dvb_frontend *fe,
 		priv->i2c_address, priv->i2c);
 	return fe;
 }
-EXPORT_SYMBOL(horus3a_attach);
+EXPORT_SYMBOL_GPL(horus3a_attach);
 
 MODULE_DESCRIPTION("Sony HORUS3A satellite tuner driver");
 MODULE_AUTHOR("Sergey Kozlov <[email protected]>");
drivers/media/dvb-frontends/isl6405.c +1 -1
index 2fc8d3c72c11..c00933b93562 100644
@@ -155,7 +155,7 @@ struct dvb_frontend *isl6405_attach(struct dvb_frontend *fe, struct i2c_adapter
 
 	return fe;
 }
-EXPORT_SYMBOL(isl6405_attach);
+EXPORT_SYMBOL_GPL(isl6405_attach);
 
 MODULE_DESCRIPTION("Driver for lnb supply and control ic isl6405");
 MODULE_AUTHOR("Hartmut Hackmann & Oliver Endriss");
drivers/media/dvb-frontends/isl6421.c +1 -1
index 3f3487887672..534ffd1d34c0 100644
@@ -227,7 +227,7 @@ struct dvb_frontend *isl6421_attach(struct dvb_frontend *fe, struct i2c_adapter
 
 	return fe;
 }
-EXPORT_SYMBOL(isl6421_attach);
+EXPORT_SYMBOL_GPL(isl6421_attach);
 
 MODULE_DESCRIPTION("Driver for lnb supply and control ic isl6421");
 MODULE_AUTHOR("Andrew de Quincey & Oliver Endriss");
drivers/media/dvb-frontends/isl6423.c +1 -1
index dca5bebfeeb5..388f2f49fe82 100644
@@ -301,7 +301,7 @@ struct dvb_frontend *isl6423_attach(struct dvb_frontend *fe,
 	fe->sec_priv = NULL;
 	return NULL;
 }
-EXPORT_SYMBOL(isl6423_attach);
+EXPORT_SYMBOL_GPL(isl6423_attach);
 
 MODULE_DESCRIPTION("ISL6423 SEC");
 MODULE_AUTHOR("Manu Abraham");
drivers/media/dvb-frontends/itd1000.c +1 -1
index ce7c443d3eac..1903f9a5b579 100644
@@ -399,7 +399,7 @@ struct dvb_frontend *itd1000_attach(struct dvb_frontend *fe, struct i2c_adapter
 
 	return fe;
 }
-EXPORT_SYMBOL(itd1000_attach);
+EXPORT_SYMBOL_GPL(itd1000_attach);
 
 MODULE_AUTHOR("Patrick Boettcher <[email protected]>");
 MODULE_DESCRIPTION("Integrant ITD1000 driver");
drivers/media/dvb-frontends/ix2505v.c +1 -1
index 534b24fa2b95..0edcc3b35b95 100644
@@ -311,7 +311,7 @@ struct dvb_frontend *ix2505v_attach(struct dvb_frontend *fe,
 	kfree(state);
 	return NULL;
 }
-EXPORT_SYMBOL(ix2505v_attach);
+EXPORT_SYMBOL_GPL(ix2505v_attach);
 
 module_param_named(debug, ix2505v_debug, int, 0644);
 MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off).");
drivers/media/dvb-frontends/l64781.c +1 -1
index 68923c84679a..971664673fcb 100644
@@ -606,4 +606,4 @@ MODULE_DESCRIPTION("LSI L64781 DVB-T Demodulator driver");
 MODULE_AUTHOR("Holger Waechtler, Marko Kohtala");
 MODULE_LICENSE("GPL");
 
-EXPORT_SYMBOL(l64781_attach);
+EXPORT_SYMBOL_GPL(l64781_attach);
drivers/media/dvb-frontends/lg2160.c +1 -1
index 5798079add10..dd0cf5f6644a 100644
@@ -1450,7 +1450,7 @@ struct dvb_frontend *lg2160_attach(const struct lg2160_config *config,
 
 	return &state->frontend;
 }
-EXPORT_SYMBOL(lg2160_attach);
+EXPORT_SYMBOL_GPL(lg2160_attach);
 
 MODULE_DESCRIPTION("LG Electronics LG216x ATSC/MH Demodulator Driver");
 MODULE_AUTHOR("Michael Krufky <[email protected]>");
drivers/media/dvb-frontends/lgdt3305.c +1 -1
index 0af4d9104761..65e744b9f254 100644
@@ -1158,7 +1158,7 @@ struct dvb_frontend *lgdt3305_attach(const struct lgdt3305_config *config,
 	kfree(state);
 	return NULL;
 }
-EXPORT_SYMBOL(lgdt3305_attach);
+EXPORT_SYMBOL_GPL(lgdt3305_attach);
 
 static const struct dvb_frontend_ops lgdt3304_ops = {
 	.delsys = { SYS_ATSC, SYS_DVBC_ANNEX_B },
drivers/media/dvb-frontends/lgdt3306a.c +1 -1
index fbb3b2f49d2d..52fb8623d512 100644
@@ -1846,7 +1846,7 @@ struct dvb_frontend *lgdt3306a_attach(const struct lgdt3306a_config *config,
 	kfree(state);
 	return NULL;
 }
-EXPORT_SYMBOL(lgdt3306a_attach);
+EXPORT_SYMBOL_GPL(lgdt3306a_attach);
 
 #ifdef DBG_DUMP
 
drivers/media/dvb-frontends/lgs8gxx.c +1 -1
index e6bf60e1138c..d1c0cf36ce36 100644
@@ -1053,7 +1053,7 @@ struct dvb_frontend *lgs8gxx_attach(const struct lgs8gxx_config *config,
 	return NULL;
 
 }
-EXPORT_SYMBOL(lgs8gxx_attach);
+EXPORT_SYMBOL_GPL(lgs8gxx_attach);
 
 MODULE_DESCRIPTION("Legend Silicon LGS8913/LGS8GXX DMB-TH demodulator driver");
 MODULE_AUTHOR("David T. L. Wong <[email protected]>");
drivers/media/dvb-frontends/lnbh25.c +1 -1
index cb486e879fdd..b8cb301f4f2e 100644
@@ -182,7 +182,7 @@ struct dvb_frontend *lnbh25_attach(struct dvb_frontend *fe,
 		__func__, priv->i2c_address);
 	return fe;
 }
-EXPORT_SYMBOL(lnbh25_attach);
+EXPORT_SYMBOL_GPL(lnbh25_attach);
 
 MODULE_DESCRIPTION("ST LNBH25 driver");
 MODULE_AUTHOR("[email protected]");
drivers/media/dvb-frontends/lnbp21.c +2 -2
index 392d7be93774..5c5681bdc773 100644
@@ -169,7 +169,7 @@ struct dvb_frontend *lnbh24_attach(struct dvb_frontend *fe,
 	return lnbx2x_attach(fe, i2c, override_set, override_clear,
 							i2c_addr, LNBH24_TTX);
 }
-EXPORT_SYMBOL(lnbh24_attach);
+EXPORT_SYMBOL_GPL(lnbh24_attach);
 
 struct dvb_frontend *lnbp21_attach(struct dvb_frontend *fe,
 				struct i2c_adapter *i2c, u8 override_set,
@@ -178,7 +178,7 @@ struct dvb_frontend *lnbp21_attach(struct dvb_frontend *fe,
 	return lnbx2x_attach(fe, i2c, override_set, override_clear,
 							0x08, LNBP21_ISEL);
 }
-EXPORT_SYMBOL(lnbp21_attach);
+EXPORT_SYMBOL_GPL(lnbp21_attach);
 
 MODULE_DESCRIPTION("Driver for lnb supply and control ic lnbp21, lnbh24");
 MODULE_AUTHOR("Oliver Endriss, Igor M. Liplianin");
drivers/media/dvb-frontends/lnbp22.c +1 -1
index 39326a2ebab2..690de7679b1d 100644
@@ -139,7 +139,7 @@ struct dvb_frontend *lnbp22_attach(struct dvb_frontend *fe,
 
 	return fe;
 }
-EXPORT_SYMBOL(lnbp22_attach);
+EXPORT_SYMBOL_GPL(lnbp22_attach);
 
 MODULE_DESCRIPTION("Driver for lnb supply and control ic lnbp22");
 MODULE_AUTHOR("Dominik Kuhlen");
drivers/media/dvb-frontends/m88ds3103.c +1 -1
index b4bd1af34745..b92885f162ed 100644
@@ -1293,7 +1293,7 @@ struct dvb_frontend *m88ds3103_attach(const struct m88ds3103_config *cfg,
 	*tuner_i2c_adapter = pdata.get_i2c_adapter(client);
 	return pdata.get_dvb_frontend(client);
 }
-EXPORT_SYMBOL(m88ds3103_attach);
+EXPORT_SYMBOL_GPL(m88ds3103_attach);
 
 static const struct dvb_frontend_ops m88ds3103_ops = {
 	.delsys = {SYS_DVBS, SYS_DVBS2},
drivers/media/dvb-frontends/m88rs2000.c +1 -1
index ce6c21d405ee..0f4455bafd62 100644
@@ -816,7 +816,7 @@ struct dvb_frontend *m88rs2000_attach(const struct m88rs2000_config *config,
 
 	return NULL;
 }
-EXPORT_SYMBOL(m88rs2000_attach);
+EXPORT_SYMBOL_GPL(m88rs2000_attach);
 
 MODULE_DESCRIPTION("M88RS2000 DVB-S Demodulator driver");
 MODULE_AUTHOR("Malcolm Priestley [email protected]");
drivers/media/dvb-frontends/mb86a16.c +1 -1
index dfe322eccaa1..d2baf3940834 100644
@@ -1865,6 +1865,6 @@ struct dvb_frontend *mb86a16_attach(const struct mb86a16_config *config,
 	kfree(state);
 	return NULL;
 }
-EXPORT_SYMBOL(mb86a16_attach);
+EXPORT_SYMBOL_GPL(mb86a16_attach);
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Manu Abraham");
drivers/media/dvb-frontends/mb86a20s.c +1 -1
index e8ac8c3e2ec0..10bb4de8624b 100644
@@ -2106,7 +2106,7 @@ struct dvb_frontend *mb86a20s_attach(const struct mb86a20s_config *config,
 	kfree(state);
 	return NULL;
 }
-EXPORT_SYMBOL(mb86a20s_attach);
+EXPORT_SYMBOL_GPL(mb86a20s_attach);
 
 static const struct dvb_frontend_ops mb86a20s_ops = {
 	.delsys = { SYS_ISDBT },
drivers/media/dvb-frontends/mt312.c +1 -1
index 0b23cbc021b8..ff5eae92a91e 100644
@@ -840,7 +840,7 @@ struct dvb_frontend *mt312_attach(const struct mt312_config *config,
 	kfree(state);
 	return NULL;
 }
-EXPORT_SYMBOL(mt312_attach);
+EXPORT_SYMBOL_GPL(mt312_attach);
 
 module_param(debug, int, 0644);
 MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off).");
drivers/media/dvb-frontends/mt352.c +1 -1
index d5fa96f0a6cd..5fb646ff9386 100644
@@ -604,4 +604,4 @@ MODULE_DESCRIPTION("Zarlink MT352 DVB-T Demodulator driver");
 MODULE_AUTHOR("Holger Waechtler, Daniel Mack, Antonio Mancuso");
 MODULE_LICENSE("GPL");
 
-EXPORT_SYMBOL(mt352_attach);
+EXPORT_SYMBOL_GPL(mt352_attach);
drivers/media/dvb-frontends/nxt200x.c +1 -1
index bf6e5cd572c5..efa4c6f40602 100644
@@ -1242,5 +1242,5 @@ MODULE_DESCRIPTION("NXT200X (ATSC 8VSB & ITU-T J.83 AnnexB 64/256 QAM) Demodulat
 MODULE_AUTHOR("Kirk Lapray, Michael Krufky, Jean-Francois Thibert, and Taylor Jacob");
 MODULE_LICENSE("GPL");
 
-EXPORT_SYMBOL(nxt200x_attach);
+EXPORT_SYMBOL_GPL(nxt200x_attach);
 
drivers/media/dvb-frontends/nxt6000.c +1 -1
index 1ce5ea28489b..377940cf8d3b 100644
@@ -633,4 +633,4 @@ MODULE_DESCRIPTION("NxtWave NXT6000 DVB-T demodulator driver");
 MODULE_AUTHOR("Florian Schirmer");
 MODULE_LICENSE("GPL");
 
-EXPORT_SYMBOL(nxt6000_attach);
+EXPORT_SYMBOL_GPL(nxt6000_attach);
drivers/media/dvb-frontends/or51132.c +1 -1
index 5f2549c48eb0..3b647f62a4d8 100644
@@ -616,4 +616,4 @@ MODULE_AUTHOR("Kirk Lapray");
 MODULE_AUTHOR("Trent Piepho");
 MODULE_LICENSE("GPL");
 
-EXPORT_SYMBOL(or51132_attach);
+EXPORT_SYMBOL_GPL(or51132_attach);
drivers/media/dvb-frontends/or51211.c +1 -1
index d14fa9736ae5..a79a88a3de2a 100644
@@ -561,5 +561,5 @@ MODULE_DESCRIPTION("Oren OR51211 VSB [pcHDTV HD-2000] Demodulator Driver");
 MODULE_AUTHOR("Kirk Lapray");
 MODULE_LICENSE("GPL");
 
-EXPORT_SYMBOL(or51211_attach);
+EXPORT_SYMBOL_GPL(or51211_attach);
 
drivers/media/dvb-frontends/s5h1409.c +1 -1
index f370c6df0a8b..e47fe34a1fd9 100644
@@ -993,7 +993,7 @@ struct dvb_frontend *s5h1409_attach(const struct s5h1409_config *config,
 	kfree(state);
 	return NULL;
 }
-EXPORT_SYMBOL(s5h1409_attach);
+EXPORT_SYMBOL_GPL(s5h1409_attach);
 
 static const struct dvb_frontend_ops s5h1409_ops = {
 	.delsys = { SYS_ATSC, SYS_DVBC_ANNEX_B },
drivers/media/dvb-frontends/s5h1411.c +1 -1
index dd09336a135b..baacd048712d 100644
@@ -912,7 +912,7 @@ struct dvb_frontend *s5h1411_attach(const struct s5h1411_config *config,
 	kfree(state);
 	return NULL;
 }
-EXPORT_SYMBOL(s5h1411_attach);
+EXPORT_SYMBOL_GPL(s5h1411_attach);
 
 static const struct dvb_frontend_ops s5h1411_ops = {
 	.delsys = { SYS_ATSC, SYS_DVBC_ANNEX_B },
drivers/media/dvb-frontends/s5h1420.c +1 -1
index fd427a29c001..f8baac271ff2 100644
@@ -928,7 +928,7 @@ struct dvb_frontend *s5h1420_attach(const struct s5h1420_config *config,
 	kfree(state);
 	return NULL;
 }
-EXPORT_SYMBOL(s5h1420_attach);
+EXPORT_SYMBOL_GPL(s5h1420_attach);
 
 static const struct dvb_frontend_ops s5h1420_ops = {
 	.delsys = { SYS_DVBS },
drivers/media/dvb-frontends/s5h1432.c +1 -1
index 4de50fe0c638..f098abe2b158 100644
@@ -364,7 +364,7 @@ struct dvb_frontend *s5h1432_attach(const struct s5h1432_config *config,
 
 	return &state->frontend;
 }
-EXPORT_SYMBOL(s5h1432_attach);
+EXPORT_SYMBOL_GPL(s5h1432_attach);
 
 static const struct dvb_frontend_ops s5h1432_ops = {
 	.delsys = { SYS_DVBT },
drivers/media/dvb-frontends/s921.c +1 -1
index 274544a3ae0e..5cf649930982 100644
@@ -503,7 +503,7 @@ struct dvb_frontend *s921_attach(const struct s921_config *config,
 
 	return &state->frontend;
 }
-EXPORT_SYMBOL(s921_attach);
+EXPORT_SYMBOL_GPL(s921_attach);
 
 static const struct dvb_frontend_ops s921_ops = {
 	.delsys = { SYS_ISDBT },
drivers/media/dvb-frontends/si21xx.c +1 -1
index 4e8c3ac4303f..9d8f9e8ed9ba 100644
@@ -944,7 +944,7 @@ struct dvb_frontend *si21xx_attach(const struct si21xx_config *config,
 	kfree(state);
 	return NULL;
 }
-EXPORT_SYMBOL(si21xx_attach);
+EXPORT_SYMBOL_GPL(si21xx_attach);
 
 module_param(debug, int, 0644);
 MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off).");
drivers/media/dvb-frontends/sp887x.c +1 -1
index 7c511c3cd4ca..18352bd3c8c6 100644
@@ -625,4 +625,4 @@ MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off).");
 MODULE_DESCRIPTION("Spase sp887x DVB-T demodulator driver");
 MODULE_LICENSE("GPL");
 
-EXPORT_SYMBOL(sp887x_attach);
+EXPORT_SYMBOL_GPL(sp887x_attach);
drivers/media/dvb-frontends/stb0899_drv.c +1 -1
index db5dde3215f0..0631b10a082f 100644
@@ -1652,7 +1652,7 @@ struct dvb_frontend *stb0899_attach(struct stb0899_config *config, struct i2c_ad
 	kfree(state);
 	return NULL;
 }
-EXPORT_SYMBOL(stb0899_attach);
+EXPORT_SYMBOL_GPL(stb0899_attach);
 MODULE_PARM_DESC(verbose, "Set Verbosity level");
 MODULE_AUTHOR("Manu Abraham");
 MODULE_DESCRIPTION("STB0899 Multi-Std frontend");
drivers/media/dvb-frontends/stb6000.c +1 -1
index 69c03892f2da..b1c447f378c3 100644
@@ -245,7 +245,7 @@ struct dvb_frontend *stb6000_attach(struct dvb_frontend *fe, int addr,
 
 	return fe;
 }
-EXPORT_SYMBOL(stb6000_attach);
+EXPORT_SYMBOL_GPL(stb6000_attach);
 
 module_param(debug, int, 0644);
 MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off).");
drivers/media/dvb-frontends/stb6100.c +1 -1
index 75509bec66e4..ed4272bf7909 100644
@@ -570,7 +570,7 @@ static void stb6100_release(struct dvb_frontend *fe)
 	kfree(state);
 }
 
-EXPORT_SYMBOL(stb6100_attach);
+EXPORT_SYMBOL_GPL(stb6100_attach);
 MODULE_PARM_DESC(verbose, "Set Verbosity level");
 
 MODULE_AUTHOR("Manu Abraham");
drivers/media/dvb-frontends/stv0288.c +1 -1
index 65f92e51c31e..83603ebbae53 100644
@@ -610,7 +610,7 @@ struct dvb_frontend *stv0288_attach(const struct stv0288_config *config,
 
 	return NULL;
 }
-EXPORT_SYMBOL(stv0288_attach);
+EXPORT_SYMBOL_GPL(stv0288_attach);
 
 module_param(debug_legacy_dish_switch, int, 0444);
 MODULE_PARM_DESC(debug_legacy_dish_switch,
drivers/media/dvb-frontends/stv0297.c +1 -1
index db94d4d109f9..572095a8b62d 100644
@@ -722,4 +722,4 @@ MODULE_DESCRIPTION("ST STV0297 DVB-C Demodulator driver");
 MODULE_AUTHOR("Dennis Noermann and Andrew de Quincey");
 MODULE_LICENSE("GPL");
 
-EXPORT_SYMBOL(stv0297_attach);
+EXPORT_SYMBOL_GPL(stv0297_attach);
drivers/media/dvb-frontends/stv0299.c +1 -1
index b36b21a13201..d417c36dba03 100644
@@ -764,4 +764,4 @@ MODULE_DESCRIPTION("ST STV0299 DVB Demodulator driver");
 MODULE_AUTHOR("Ralph Metzler, Holger Waechtler, Peter Schildmann, Felix Domke, Andreas Oberritter, Andrew de Quincey, Kenneth Aafly");
 MODULE_LICENSE("GPL");
 
-EXPORT_SYMBOL(stv0299_attach);
+EXPORT_SYMBOL_GPL(stv0299_attach);
drivers/media/dvb-frontends/stv0367.c +3 -3
index 1a726196c126..02abe485f18f 100644
@@ -1763,7 +1763,7 @@ struct dvb_frontend *stv0367ter_attach(const struct stv0367_config *config,
 	kfree(state);
 	return NULL;
 }
-EXPORT_SYMBOL(stv0367ter_attach);
+EXPORT_SYMBOL_GPL(stv0367ter_attach);
 
 static int stv0367cab_gate_ctrl(struct dvb_frontend *fe, int enable)
 {
@@ -2936,7 +2936,7 @@ struct dvb_frontend *stv0367cab_attach(const struct stv0367_config *config,
 	kfree(state);
 	return NULL;
 }
-EXPORT_SYMBOL(stv0367cab_attach);
+EXPORT_SYMBOL_GPL(stv0367cab_attach);
 
 /*
  * Functions for operation on Digital Devices hardware
@@ -3358,7 +3358,7 @@ struct dvb_frontend *stv0367ddb_attach(const struct stv0367_config *config,
 	kfree(state);
 	return NULL;
 }
-EXPORT_SYMBOL(stv0367ddb_attach);
+EXPORT_SYMBOL_GPL(stv0367ddb_attach);
 
 MODULE_PARM_DESC(debug, "Set debug");
 MODULE_PARM_DESC(i2c_debug, "Set i2c debug");
drivers/media/dvb-frontends/stv0900_core.c +1 -1
index 0b739725e3c0..bc691d80f7f3 100644
@@ -1968,7 +1968,7 @@ struct dvb_frontend *stv0900_attach(const struct stv0900_config *config,
 	kfree(state);
 	return NULL;
 }
-EXPORT_SYMBOL(stv0900_attach);
+EXPORT_SYMBOL_GPL(stv0900_attach);
 
 MODULE_PARM_DESC(debug, "Set debug");
 
drivers/media/dvb-frontends/stv6110.c +1 -1
index e4fd9c1b0560..5a13399ec56f 100644
@@ -446,7 +446,7 @@ struct dvb_frontend *stv6110_attach(struct dvb_frontend *fe,
 
 	return fe;
 }
-EXPORT_SYMBOL(stv6110_attach);
+EXPORT_SYMBOL_GPL(stv6110_attach);
 
 module_param(debug, int, 0644);
 MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off).");
drivers/media/dvb-frontends/stv6110x.c +1 -1
index 7e8e01389c55..8c6a83dd2f9f 100644
@@ -409,7 +409,7 @@ const struct stv6110x_devctl *stv6110x_attach(struct dvb_frontend *fe,
 	printk(KERN_INFO "%s: Attaching STV6110x\n", __func__);
 	return stv6110x->devctl;
 }
-EXPORT_SYMBOL(stv6110x_attach);
+EXPORT_SYMBOL_GPL(stv6110x_attach);
 
 MODULE_AUTHOR("Manu Abraham");
 MODULE_DESCRIPTION("STV6110x Silicon tuner");
drivers/media/dvb-frontends/tda10021.c +1 -1
index 32ba8401e743..b5ce9fef5020 100644
@@ -525,4 +525,4 @@ MODULE_DESCRIPTION("Philips TDA10021 DVB-C demodulator driver");
 MODULE_AUTHOR("Ralph Metzler, Holger Waechtler, Markus Schulz");
 MODULE_LICENSE("GPL");
 
-EXPORT_SYMBOL(tda10021_attach);
+EXPORT_SYMBOL_GPL(tda10021_attach);
drivers/media/dvb-frontends/tda10023.c +1 -1
index 8028007c68eb..d7120a9cf666 100644
@@ -606,4 +606,4 @@ MODULE_DESCRIPTION("Philips TDA10023 DVB-C demodulator driver");
 MODULE_AUTHOR("Georg Acher, Hartmut Birr");
 MODULE_LICENSE("GPL");
 
-EXPORT_SYMBOL(tda10023_attach);
+EXPORT_SYMBOL_GPL(tda10023_attach);
drivers/media/dvb-frontends/tda10048.c +1 -1
index 143b39b5f6c9..a75f86ca5318 100644
@@ -1150,7 +1150,7 @@ struct dvb_frontend *tda10048_attach(const struct tda10048_config *config,
 	kfree(state);
 	return NULL;
 }
-EXPORT_SYMBOL(tda10048_attach);
+EXPORT_SYMBOL_GPL(tda10048_attach);
 
 static const struct dvb_frontend_ops tda10048_ops = {
 	.delsys = { SYS_DVBT },
drivers/media/dvb-frontends/tda1004x.c +2 -2
index e674508c349c..0e5f35e5b27c 100644
@@ -1391,5 +1391,5 @@ MODULE_DESCRIPTION("Philips TDA10045H & TDA10046H DVB-T Demodulator");
 MODULE_AUTHOR("Andrew de Quincey & Robert Schlabbach");
 MODULE_LICENSE("GPL");
 
-EXPORT_SYMBOL(tda10045_attach);
-EXPORT_SYMBOL(tda10046_attach);
+EXPORT_SYMBOL_GPL(tda10045_attach);
+EXPORT_SYMBOL_GPL(tda10046_attach);
drivers/media/dvb-frontends/tda10086.c +1 -1
index b6d16c05904d..90b731b75ea8 100644
@@ -777,4 +777,4 @@ MODULE_DESCRIPTION("Philips TDA10086 DVB-S Demodulator");
 MODULE_AUTHOR("Andrew de Quincey");
 MODULE_LICENSE("GPL");
 
-EXPORT_SYMBOL(tda10086_attach);
+EXPORT_SYMBOL_GPL(tda10086_attach);
drivers/media/dvb-frontends/tda665x.c +1 -1
index a63dec44295b..887ce34597f5 100644
@@ -239,7 +239,7 @@ struct dvb_frontend *tda665x_attach(struct dvb_frontend *fe,
 
 	return fe;
 }
-EXPORT_SYMBOL(tda665x_attach);
+EXPORT_SYMBOL_GPL(tda665x_attach);
 
 MODULE_DESCRIPTION("TDA665x driver");
 MODULE_AUTHOR("Manu Abraham");
drivers/media/dvb-frontends/tda8083.c +1 -1
index aa3200d3c352..e94924a06f73 100644
@@ -494,4 +494,4 @@ MODULE_DESCRIPTION("Philips TDA8083 DVB-S Demodulator");
 MODULE_AUTHOR("Ralph Metzler, Holger Waechtler");
 MODULE_LICENSE("GPL");
 
-EXPORT_SYMBOL(tda8083_attach);
+EXPORT_SYMBOL_GPL(tda8083_attach);
drivers/media/dvb-frontends/tda8261.c +1 -1
index 4eb294f330bc..fe54742731d9 100644
@@ -201,7 +201,7 @@ struct dvb_frontend *tda8261_attach(struct dvb_frontend *fe,
 	return NULL;
 }
 
-EXPORT_SYMBOL(tda8261_attach);
+EXPORT_SYMBOL_GPL(tda8261_attach);
 
 MODULE_AUTHOR("Manu Abraham");
 MODULE_DESCRIPTION("TDA8261 8PSK/QPSK Tuner");
drivers/media/dvb-frontends/tda826x.c +1 -1
index da427b4c2aaa..4b9550e70077 100644
@@ -177,7 +177,7 @@ struct dvb_frontend *tda826x_attach(struct dvb_frontend *fe, int addr, struct i2
 
 	return fe;
 }
-EXPORT_SYMBOL(tda826x_attach);
+EXPORT_SYMBOL_GPL(tda826x_attach);
 
 module_param(debug, int, 0644);
 MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off).");
drivers/media/dvb-frontends/ts2020.c +1 -1
index b879e1571469..d18802dccf52 100644
@@ -534,7 +534,7 @@ struct dvb_frontend *ts2020_attach(struct dvb_frontend *fe,
 
 	return fe;
 }
-EXPORT_SYMBOL(ts2020_attach);
+EXPORT_SYMBOL_GPL(ts2020_attach);
 
 /*
  * We implement own regmap locking due to legacy DVB attach which uses frontend
drivers/media/dvb-frontends/tua6100.c +1 -1
index 859fa14b319c..5541ffa4d2f3 100644
@@ -194,7 +194,7 @@ struct dvb_frontend *tua6100_attach(struct dvb_frontend *fe, int addr, struct i2
 	fe->tuner_priv = priv;
 	return fe;
 }
-EXPORT_SYMBOL(tua6100_attach);
+EXPORT_SYMBOL_GPL(tua6100_attach);
 
 MODULE_DESCRIPTION("DVB tua6100 driver");
 MODULE_AUTHOR("Andrew de Quincey");
drivers/media/dvb-frontends/ves1820.c +1 -1
index 178363704bd4..ede3859a10c6 100644
@@ -446,4 +446,4 @@ MODULE_DESCRIPTION("VLSI VES1820 DVB-C Demodulator driver");
 MODULE_AUTHOR("Ralph Metzler, Holger Waechtler");
 MODULE_LICENSE("GPL");
 
-EXPORT_SYMBOL(ves1820_attach);
+EXPORT_SYMBOL_GPL(ves1820_attach);
drivers/media/dvb-frontends/ves1x93.c +1 -1
index d0ee52f66a8e..f8064ced80b7 100644
@@ -553,4 +553,4 @@ MODULE_DESCRIPTION("VLSI VES1x93 DVB-S Demodulator driver");
 MODULE_AUTHOR("Ralph Metzler");
 MODULE_LICENSE("GPL");
 
-EXPORT_SYMBOL(ves1x93_attach);
+EXPORT_SYMBOL_GPL(ves1x93_attach);
drivers/media/dvb-frontends/zl10036.c +1 -1
index 062282739ce5..6cd4fb8bc271 100644
@@ -504,7 +504,7 @@ struct dvb_frontend *zl10036_attach(struct dvb_frontend *fe,
 	kfree(state);
 	return NULL;
 }
-EXPORT_SYMBOL(zl10036_attach);
+EXPORT_SYMBOL_GPL(zl10036_attach);
 
 module_param_named(debug, zl10036_debug, int, 0644);
 MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off).");
drivers/media/dvb-frontends/zl10039.c +1 -1
index 3208b866d1cb..49327a9f5047 100644
@@ -304,7 +304,7 @@ struct dvb_frontend *zl10039_attach(struct dvb_frontend *fe,
 	kfree(state);
 	return NULL;
 }
-EXPORT_SYMBOL(zl10039_attach);
+EXPORT_SYMBOL_GPL(zl10039_attach);
 
 module_param(debug, int, 0644);
 MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off).");
drivers/media/dvb-frontends/zl10353.c +1 -1
index 1c689f7f4ab8..8f5bb3c126ca 100644
@@ -676,4 +676,4 @@ MODULE_DESCRIPTION("Zarlink ZL10353 DVB-T demodulator driver");
 MODULE_AUTHOR("Chris Pascoe");
 MODULE_LICENSE("GPL");
 
-EXPORT_SYMBOL(zl10353_attach);
+EXPORT_SYMBOL_GPL(zl10353_attach);
drivers/media/pci/bt8xx/dst.c +1 -1
index 7166d2279465..121f269ec562 100644
@@ -1733,7 +1733,7 @@ struct dst_state *dst_attach(struct dst_state *state, struct dvb_adapter *dvb_ad
 	return state;				/*	Manu (DST is a card not a frontend)	*/
 }
 
-EXPORT_SYMBOL(dst_attach);
+EXPORT_SYMBOL_GPL(dst_attach);
 
 static const struct dvb_frontend_ops dst_dvbt_ops = {
 	.delsys = { SYS_DVBT },
drivers/media/pci/bt8xx/dst_ca.c +1 -1
index 530b3e9764ce..51ad5897a1b9 100644
@@ -680,7 +680,7 @@ struct dvb_device *dst_ca_attach(struct dst_state *dst, struct dvb_adapter *dvb_
 	return NULL;
 }
 
-EXPORT_SYMBOL(dst_ca_attach);
+EXPORT_SYMBOL_GPL(dst_ca_attach);
 
 MODULE_DESCRIPTION("DST DVB-S/T/C Combo CA driver");
 MODULE_AUTHOR("Manu Abraham");
drivers/media/pci/cx23885/cx23885-video.c +1 -1
index ecc580af0148..1c4b3224cb0f 100644
@@ -418,7 +418,7 @@ static int buffer_prepare(struct vb2_buffer *vb)
 				dev->height >> 1);
 		break;
 	default:
-		BUG();
+		return -EINVAL; /* should not happen */
 	}
 	dprintk(2, "[%p/%d] buffer_init - %dx%d %dbpp \"%s\" - dma=0x%08lx\n",
 		buf, buf->vb.vb2_buf.index,
drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c +3 -2
index bc8349bc2e80..2c0d89a46410 100644
@@ -230,10 +230,11 @@ static struct vdec_fb *vp9_rm_from_fb_use_list(struct vdec_vp9_inst
 		if (fb->base_y.va == addr) {
 			list_move_tail(&node->list,
 				       &inst->available_fb_node_list);
-			break;
+			return fb;
 		}
 	}
-	return fb;
+
+	return NULL;
 }
 
 static void vp9_add_to_fb_free_list(struct vdec_vp9_inst *inst,
drivers/media/tuners/fc0011.c +1 -1
index 145407dee3db..7a7b853c9a9b 100644
@@ -508,7 +508,7 @@ struct dvb_frontend *fc0011_attach(struct dvb_frontend *fe,
 
 	return fe;
 }
-EXPORT_SYMBOL(fc0011_attach);
+EXPORT_SYMBOL_GPL(fc0011_attach);
 
 MODULE_DESCRIPTION("Fitipower FC0011 silicon tuner driver");
 MODULE_AUTHOR("Michael Buesch <[email protected]>");
drivers/media/tuners/fc0012.c +1 -1
index 625ac6f51c39..64d0774061a5 100644
@@ -505,7 +505,7 @@ struct dvb_frontend *fc0012_attach(struct dvb_frontend *fe,
 
 	return fe;
 }
-EXPORT_SYMBOL(fc0012_attach);
+EXPORT_SYMBOL_GPL(fc0012_attach);
 
 MODULE_DESCRIPTION("Fitipower FC0012 silicon tuner driver");
 MODULE_AUTHOR("Hans-Frieder Vogt <[email protected]>");
drivers/media/tuners/fc0013.c +1 -1
index e606118d1a9b..74a6af3a1384 100644
@@ -619,7 +619,7 @@ struct dvb_frontend *fc0013_attach(struct dvb_frontend *fe,
 
 	return fe;
 }
-EXPORT_SYMBOL(fc0013_attach);
+EXPORT_SYMBOL_GPL(fc0013_attach);
 
 MODULE_DESCRIPTION("Fitipower FC0013 silicon tuner driver");
 MODULE_AUTHOR("Hans-Frieder Vogt <[email protected]>");
drivers/media/tuners/max2165.c +1 -1
index a86c08114915..e1f47463376a 100644
@@ -420,7 +420,7 @@ struct dvb_frontend *max2165_attach(struct dvb_frontend *fe,
 
 	return fe;
 }
-EXPORT_SYMBOL(max2165_attach);
+EXPORT_SYMBOL_GPL(max2165_attach);
 
 MODULE_AUTHOR("David T. L. Wong <[email protected]>");
 MODULE_DESCRIPTION("Maxim MAX2165 silicon tuner driver");
drivers/media/tuners/mc44s803.c +1 -1
index 12f545ef1243..36314805680b 100644
@@ -366,7 +366,7 @@ struct dvb_frontend *mc44s803_attach(struct dvb_frontend *fe,
 	kfree(priv);
 	return NULL;
 }
-EXPORT_SYMBOL(mc44s803_attach);
+EXPORT_SYMBOL_GPL(mc44s803_attach);
 
 MODULE_AUTHOR("Jochen Friedrich");
 MODULE_DESCRIPTION("Freescale MC44S803 silicon tuner driver");
drivers/media/tuners/mt2060.c +1 -1
index 4983eeb39f36..acc9e2d05851 100644
@@ -450,7 +450,7 @@ struct dvb_frontend * mt2060_attach(struct dvb_frontend *fe, struct i2c_adapter
 
 	return fe;
 }
-EXPORT_SYMBOL(mt2060_attach);
+EXPORT_SYMBOL_GPL(mt2060_attach);
 
 static int mt2060_probe(struct i2c_client *client,
 			const struct i2c_device_id *id)
drivers/media/tuners/mt2131.c +1 -1
index dd85d58fa8d0..4be7cf6eff93 100644
@@ -284,7 +284,7 @@ struct dvb_frontend * mt2131_attach(struct dvb_frontend *fe,
 	fe->tuner_priv = priv;
 	return fe;
 }
-EXPORT_SYMBOL(mt2131_attach);
+EXPORT_SYMBOL_GPL(mt2131_attach);
 
 MODULE_AUTHOR("Steven Toth");
 MODULE_DESCRIPTION("Microtune MT2131 silicon tuner driver");
drivers/media/tuners/mt2266.c +1 -1
index 88edcc031e3c..aa63ce6b5b50 100644
@@ -345,7 +345,7 @@ struct dvb_frontend * mt2266_attach(struct dvb_frontend *fe, struct i2c_adapter
 	mt2266_calibrate(priv);
 	return fe;
 }
-EXPORT_SYMBOL(mt2266_attach);
+EXPORT_SYMBOL_GPL(mt2266_attach);
 
 MODULE_AUTHOR("Olivier DANET");
 MODULE_DESCRIPTION("Microtune MT2266 silicon tuner driver");
drivers/media/tuners/mxl5005s.c +1 -1
index dd59c2c0e4a5..417596cdb1ff 100644
@@ -4109,7 +4109,7 @@ struct dvb_frontend *mxl5005s_attach(struct dvb_frontend *fe,
 	fe->tuner_priv = state;
 	return fe;
 }
-EXPORT_SYMBOL(mxl5005s_attach);
+EXPORT_SYMBOL_GPL(mxl5005s_attach);
 
 MODULE_DESCRIPTION("MaxLinear MXL5005S silicon tuner driver");
 MODULE_AUTHOR("Steven Toth");
drivers/media/tuners/qt1010.c +7 -6
index ee33b7cc7682..37a1db02a304 100644
@@ -351,11 +351,12 @@ static int qt1010_init(struct dvb_frontend *fe)
 			else
 				valptr = &tmpval;
 
-			BUG_ON(i >= ARRAY_SIZE(i2c_data) - 1);
-
-			err = qt1010_init_meas1(priv, i2c_data[i+1].reg,
-						i2c_data[i].reg,
-						i2c_data[i].val, valptr);
+			if (i >= ARRAY_SIZE(i2c_data) - 1)
+				err = -EIO;
+			else
+				err = qt1010_init_meas1(priv, i2c_data[i + 1].reg,
+							i2c_data[i].reg,
+							i2c_data[i].val, valptr);
 			i++;
 			break;
 		}
@@ -446,7 +447,7 @@ struct dvb_frontend * qt1010_attach(struct dvb_frontend *fe,
 	fe->tuner_priv = priv;
 	return fe;
 }
-EXPORT_SYMBOL(qt1010_attach);
+EXPORT_SYMBOL_GPL(qt1010_attach);
 
 MODULE_DESCRIPTION("Quantek QT1010 silicon tuner driver");
 MODULE_AUTHOR("Antti Palosaari <[email protected]>");
drivers/media/tuners/tda18218.c +1 -1
index c56fcf5d48e3..78078ff331a6 100644
@@ -345,7 +345,7 @@ struct dvb_frontend *tda18218_attach(struct dvb_frontend *fe,
 
 	return fe;
 }
-EXPORT_SYMBOL(tda18218_attach);
+EXPORT_SYMBOL_GPL(tda18218_attach);
 
 MODULE_DESCRIPTION("NXP TDA18218HN silicon tuner driver");
 MODULE_AUTHOR("Antti Palosaari <[email protected]>");
drivers/media/tuners/xc4000.c +1 -1
index e30948e4ff87..7130b9e21966 100644
@@ -1751,7 +1751,7 @@ struct dvb_frontend *xc4000_attach(struct dvb_frontend *fe,
 	xc4000_release(fe);
 	return NULL;
 }
-EXPORT_SYMBOL(xc4000_attach);
+EXPORT_SYMBOL_GPL(xc4000_attach);
 
 MODULE_AUTHOR("Steven Toth, Davide Ferri");
 MODULE_DESCRIPTION("Xceive xc4000 silicon tuner driver");
drivers/media/tuners/xc5000.c +1 -1
index 0e7e4fdf9e50..eddb7155c4ab 100644
@@ -1464,7 +1464,7 @@ struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe,
 	xc5000_release(fe);
 	return NULL;
 }
-EXPORT_SYMBOL(xc5000_attach);
+EXPORT_SYMBOL_GPL(xc5000_attach);
 
 MODULE_AUTHOR("Steven Toth");
 MODULE_DESCRIPTION("Xceive xc5000 silicon tuner driver");
drivers/media/usb/dvb-usb-v2/af9035.c +8 -6
index 1f6c1eefe389..8a83f27875ec 100644
@@ -284,6 +284,7 @@ static int af9035_i2c_master_xfer(struct i2c_adapter *adap,
 	struct dvb_usb_device *d = i2c_get_adapdata(adap);
 	struct state *state = d_to_priv(d);
 	int ret;
+	u32 reg;
 
 	if (mutex_lock_interruptible(&d->i2c_mutex) < 0)
 		return -EAGAIN;
@@ -336,8 +337,10 @@ static int af9035_i2c_master_xfer(struct i2c_adapter *adap,
 			ret = -EOPNOTSUPP;
 		} else if ((msg[0].addr == state->af9033_i2c_addr[0]) ||
 			   (msg[0].addr == state->af9033_i2c_addr[1])) {
+			if (msg[0].len < 3 || msg[1].len < 1)
+				return -EOPNOTSUPP;
 			/* demod access via firmware interface */
-			u32 reg = msg[0].buf[0] << 16 | msg[0].buf[1] << 8 |
+			reg = msg[0].buf[0] << 16 | msg[0].buf[1] << 8 |
 					msg[0].buf[2];
 
 			if (msg[0].addr == state->af9033_i2c_addr[1])
@@ -395,17 +398,16 @@ static int af9035_i2c_master_xfer(struct i2c_adapter *adap,
 			ret = -EOPNOTSUPP;
 		} else if ((msg[0].addr == state->af9033_i2c_addr[0]) ||
 			   (msg[0].addr == state->af9033_i2c_addr[1])) {
+			if (msg[0].len < 3)
+				return -EOPNOTSUPP;
 			/* demod access via firmware interface */
-			u32 reg = msg[0].buf[0] << 16 | msg[0].buf[1] << 8 |
+			reg = msg[0].buf[0] << 16 | msg[0].buf[1] << 8 |
 					msg[0].buf[2];
 
 			if (msg[0].addr == state->af9033_i2c_addr[1])
 				reg |= 0x100000;
 
-			ret = (msg[0].len >= 3) ? af9035_wr_regs(d, reg,
-							         &msg[0].buf[3],
-							         msg[0].len - 3)
-					        : -EOPNOTSUPP;
+			ret = af9035_wr_regs(d, reg, &msg[0].buf[3], msg[0].len - 3);
 		} else {
 			/* I2C write */
 			u8 buf[MAX_XFER_SIZE];
drivers/media/usb/dvb-usb-v2/anysee.c +1 -1
index 20ee7eea2a91..83af86505363 100644
@@ -211,7 +211,7 @@ static int anysee_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msg,
 
 	while (i < num) {
 		if (num > i + 1 && (msg[i+1].flags & I2C_M_RD)) {
-			if (msg[i].len > 2 || msg[i+1].len > 60) {
+			if (msg[i].len != 2 || msg[i + 1].len > 60) {
 				ret = -EOPNOTSUPP;
 				break;
 			}
drivers/media/usb/dvb-usb-v2/az6007.c +8 -0
index 1830badb180d..668b6091b442 100644
@@ -796,6 +796,10 @@ static int az6007_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[],
 			if (az6007_xfer_debug)
 				printk(KERN_DEBUG "az6007: I2C W addr=0x%x len=%d\n",
 				       addr, msgs[i].len);
+			if (msgs[i].len < 1) {
+				ret = -EIO;
+				goto err;
+			}
 			req = AZ6007_I2C_WR;
 			index = msgs[i].buf[0];
 			value = addr | (1 << 8);
@@ -810,6 +814,10 @@ static int az6007_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[],
 			if (az6007_xfer_debug)
 				printk(KERN_DEBUG "az6007: I2C R addr=0x%x len=%d\n",
 				       addr, msgs[i].len);
+			if (msgs[i].len < 1) {
+				ret = -EIO;
+				goto err;
+			}
 			req = AZ6007_I2C_RD;
 			index = msgs[i].buf[0];
 			value = addr;
drivers/media/usb/dvb-usb/af9005.c +5 -0
index 66990a193bc5..83971daa7250 100644
@@ -431,6 +431,10 @@ static int af9005_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[],
 		if (ret == 0)
 			ret = 2;
 	} else {
+		if (msg[0].len < 2) {
+			ret = -EOPNOTSUPP;
+			goto unlock;
+		}
 		/* write one or more registers */
 		reg = msg[0].buf[0];
 		addr = msg[0].addr;
@@ -440,6 +444,7 @@ static int af9005_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[],
 			ret = 1;
 	}
 
+unlock:
 	mutex_unlock(&d->i2c_mutex);
 	return ret;
 }
drivers/media/usb/dvb-usb/dw2102.c +24 -0
index 2c9c4432a0e6..ef2218810471 100644
@@ -133,6 +133,10 @@ static int dw2102_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
 
 	switch (num) {
 	case 2:
+		if (msg[0].len < 1) {
+			num = -EOPNOTSUPP;
+			break;
+		}
 		/* read stv0299 register */
 		value = msg[0].buf[0];/* register */
 		for (i = 0; i < msg[1].len; i++) {
@@ -144,6 +148,10 @@ static int dw2102_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
 	case 1:
 		switch (msg[0].addr) {
 		case 0x68:
+			if (msg[0].len < 2) {
+				num = -EOPNOTSUPP;
+				break;
+			}
 			/* write to stv0299 register */
 			buf6[0] = 0x2a;
 			buf6[1] = msg[0].buf[0];
@@ -153,6 +161,10 @@ static int dw2102_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
 			break;
 		case 0x60:
 			if (msg[0].flags == 0) {
+				if (msg[0].len < 4) {
+					num = -EOPNOTSUPP;
+					break;
+				}
 			/* write to tuner pll */
 				buf6[0] = 0x2c;
 				buf6[1] = 5;
@@ -164,6 +176,10 @@ static int dw2102_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
 				dw210x_op_rw(d->udev, 0xb2, 0, 0,
 						buf6, 7, DW210X_WRITE_MSG);
 			} else {
+				if (msg[0].len < 1) {
+					num = -EOPNOTSUPP;
+					break;
+				}
 			/* read from tuner */
 				dw210x_op_rw(d->udev, 0xb5, 0, 0,
 						buf6, 1, DW210X_READ_MSG);
@@ -171,12 +187,20 @@ static int dw2102_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
 			}
 			break;
 		case (DW2102_RC_QUERY):
+			if (msg[0].len < 2) {
+				num = -EOPNOTSUPP;
+				break;
+			}
 			dw210x_op_rw(d->udev, 0xb8, 0, 0,
 					buf6, 2, DW210X_READ_MSG);
 			msg[0].buf[0] = buf6[0];
 			msg[0].buf[1] = buf6[1];
 			break;
 		case (DW2102_VOLTAGE_CTRL):
+			if (msg[0].len < 1) {
+				num = -EOPNOTSUPP;
+				break;
+			}
 			buf6[0] = 0x30;
 			buf6[1] = msg[0].buf[0];
 			dw210x_op_rw(d->udev, 0xb2, 0, 0,
drivers/media/usb/dvb-usb/m920x.c +3 -2
index 8a43e2415686..2a421bd9912b 100644
@@ -283,7 +283,6 @@ static int m920x_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], int nu
 			char *read = kmalloc(1, GFP_KERNEL);
 			if (!read) {
 				ret = -ENOMEM;
-				kfree(read);
 				goto unlock;
 			}
 
@@ -294,8 +293,10 @@ static int m920x_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], int nu
 
 				if ((ret = m920x_read(d->udev, M9206_I2C, 0x0,
 						      0x20 | stop,
-						      read, 1)) != 0)
+						      read, 1)) != 0) {
+					kfree(read);
 					goto unlock;
+				}
 				msg[i].buf[j] = read[0];
 			}
 
drivers/media/usb/go7007/go7007-i2c.c +0 -2
index c084bf794b56..64f25d4e52b2 100644
@@ -173,8 +173,6 @@ static int go7007_i2c_master_xfer(struct i2c_adapter *adapter,
 		} else if (msgs[i].len == 3) {
 			if (msgs[i].flags & I2C_M_RD)
 				return -EIO;
-			if (msgs[i].len != 3)
-				return -EIO;
 			if (go7007_i2c_xfer(go, msgs[i].addr, 0,
 					(msgs[i].buf[0] << 8) | msgs[i].buf[1],
 					0x01, &msgs[i].buf[2]) < 0)
drivers/media/usb/siano/smsusb.c +11 -10
index 92a6192f9ab2..1d67b4c1a020 100644
@@ -467,12 +467,7 @@ static int smsusb_init_device(struct usb_interface *intf, int board_id)
 	rc = smscore_register_device(&params, &dev->coredev, mdev);
 	if (rc < 0) {
 		pr_err("smscore_register_device(...) failed, rc %d\n", rc);
-		smsusb_term_device(intf);
-#ifdef CONFIG_MEDIA_CONTROLLER_DVB
-		media_device_unregister(mdev);
-#endif
-		kfree(mdev);
-		return rc;
+		goto err_unregister_device;
 	}
 
 	smscore_set_board_id(dev->coredev, board_id);
@@ -489,8 +484,7 @@ static int smsusb_init_device(struct usb_interface *intf, int board_id)
 	rc = smsusb_start_streaming(dev);
 	if (rc < 0) {
 		pr_err("smsusb_start_streaming(...) failed\n");
-		smsusb_term_device(intf);
-		return rc;
+		goto err_unregister_device;
 	}
 
 	dev->state = SMSUSB_ACTIVE;
@@ -498,13 +492,20 @@ static int smsusb_init_device(struct usb_interface *intf, int board_id)
 	rc = smscore_start_device(dev->coredev);
 	if (rc < 0) {
 		pr_err("smscore_start_device(...) failed\n");
-		smsusb_term_device(intf);
-		return rc;
+		goto err_unregister_device;
 	}
 
 	pr_debug("device 0x%p created\n", dev);
 
 	return rc;
+
+err_unregister_device:
+	smsusb_term_device(intf);
+#ifdef CONFIG_MEDIA_CONTROLLER_DVB
+	media_device_unregister(mdev);
+#endif
+	kfree(mdev);
+	return rc;
 }
 
 static int smsusb_probe(struct usb_interface *intf,
drivers/mmc/host/Kconfig +3 -2
index 61c022db0e96..d318b82c679b 100644
@@ -407,11 +407,12 @@ config MMC_WBSD
 	  If unsure, say N.
 
 config MMC_AU1X
-	tristate "Alchemy AU1XX0 MMC Card Interface support"
+	bool "Alchemy AU1XX0 MMC Card Interface support"
 	depends on MIPS_ALCHEMY
+	depends on MMC=y
 	help
 	  This selects the AMD Alchemy(R) Multimedia card interface.
-	  If you have a Alchemy platform with a MMC slot, say Y or M here.
+	  If you have a Alchemy platform with a MMC slot, say Y here.
 
 	  If unsure, say N.
 
drivers/mtd/nand/brcmnand/brcmnand.c +76 -36

189 lines not on this page · raw message

drivers/net/arcnet/arcnet.c +1 -1
index 998bc7bc7d1f..0f02d2b3438f 100644
@@ -433,7 +433,7 @@ static void arcnet_reply_tasklet(unsigned long data)
 
 	ret = sock_queue_err_skb(sk, ackskb);
 	if (ret)
-		kfree_skb(ackskb);
+		dev_kfree_skb_irq(ackskb);
 
 	local_irq_enable();
 };
drivers/net/can/usb/gs_usb.c +3 -2
index a43f25de8574..893fa5580c77 100644
@@ -389,6 +389,9 @@ static void gs_usb_receive_bulk_callback(struct urb *urb)
 	}
 
 	if (hf->flags & GS_CAN_FLAG_OVERFLOW) {
+		stats->rx_over_errors++;
+		stats->rx_errors++;
+
 		skb = alloc_can_err_skb(netdev, &cf);
 		if (!skb)
 			goto resubmit_urb;
@@ -396,8 +399,6 @@ static void gs_usb_receive_bulk_callback(struct urb *urb)
 		cf->can_id |= CAN_ERR_CRTL;
 		cf->can_dlc = CAN_ERR_DLC;
 		cf->data[1] = CAN_ERR_CRTL_RX_OVERFLOW;
-		stats->rx_over_errors++;
-		stats->rx_errors++;
 		netif_rx(skb);
 	}
 
drivers/net/ethernet/atheros/alx/ethtool.c +2 -3
index 2f4eabf652e8..51e5aa2c74b3 100644
@@ -281,9 +281,8 @@ static void alx_get_ethtool_stats(struct net_device *netdev,
 	spin_lock(&alx->stats_lock);
 
 	alx_update_hw_stats(hw);
-	BUILD_BUG_ON(sizeof(hw->stats) - offsetof(struct alx_hw_stats, rx_ok) <
-		     ALX_NUM_STATS * sizeof(u64));
-	memcpy(data, &hw->stats.rx_ok, ALX_NUM_STATS * sizeof(u64));
+	BUILD_BUG_ON(sizeof(hw->stats) != ALX_NUM_STATS * sizeof(u64));
+	memcpy(data, &hw->stats, sizeof(hw->stats));
 
 	spin_unlock(&alx->stats_lock);
 }
drivers/net/ethernet/atheros/atl1c/atl1c_main.c +5 -2
index 3615c2a06fda..6f5c7c1401ce 100644
@@ -2001,8 +2001,11 @@ static int atl1c_tso_csum(struct atl1c_adapter *adapter,
 			real_len = (((unsigned char *)ip_hdr(skb) - skb->data)
 					+ ntohs(ip_hdr(skb)->tot_len));
 
-			if (real_len < skb->len)
-				pskb_trim(skb, real_len);
+			if (real_len < skb->len) {
+				err = pskb_trim(skb, real_len);
+				if (err)
+					return err;
+			}
 
 			hdr_len = (skb_transport_offset(skb) + tcp_hdrlen(skb));
 			if (unlikely(skb->len == hdr_len)) {
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +7 -2
index 7925c40c0062..cb5c3d315333 100644
@@ -14484,11 +14484,16 @@ static void bnx2x_io_resume(struct pci_dev *pdev)
 	bp->fw_seq = SHMEM_RD(bp, func_mb[BP_FW_MB_IDX(bp)].drv_mb_header) &
 							DRV_MSG_SEQ_NUMBER_MASK;
 
-	if (netif_running(dev))
-		bnx2x_nic_load(bp, LOAD_NORMAL);
+	if (netif_running(dev)) {
+		if (bnx2x_nic_load(bp, LOAD_NORMAL)) {
+			netdev_err(bp->dev, "Error during driver initialization, try unloading/reloading the driver\n");
+			goto done;
+		}
+	}
 
 	netif_device_attach(dev);
 
+done:
 	rtnl_unlock();
 }
 
drivers/net/ethernet/intel/igb/igb.h +2 -2
index 1113bf322f45..a1e924391ae5 100644
@@ -52,11 +52,11 @@ struct igb_adapter;
 /* TX/RX descriptor defines */
 #define IGB_DEFAULT_TXD		256
 #define IGB_DEFAULT_TX_WORK	128
-#define IGB_MIN_TXD		80
+#define IGB_MIN_TXD		64
 #define IGB_MAX_TXD		4096
 
 #define IGB_DEFAULT_RXD		256
-#define IGB_MIN_RXD		80
+#define IGB_MIN_RXD		64
 #define IGB_MAX_RXD		4096
 
 #define IGB_DEFAULT_ITR		3 /* dynamic */
drivers/net/ethernet/intel/igb/igb_main.c +10 -6
index d7b531eae819..d679b31c9a13 100644
@@ -3026,8 +3026,9 @@ static void igb_probe_vfs(struct igb_adapter *adapter)
 	struct pci_dev *pdev = adapter->pdev;
 	struct e1000_hw *hw = &adapter->hw;
 
-	/* Virtualization features not supported on i210 family. */
-	if ((hw->mac.type == e1000_i210) || (hw->mac.type == e1000_i211))
+	/* Virtualization features not supported on i210 and 82580 family. */
+	if ((hw->mac.type == e1000_i210) || (hw->mac.type == e1000_i211) ||
+	    (hw->mac.type == e1000_82580))
 		return;
 
 	/* Of the below we really only want the effect of getting
@@ -3856,6 +3857,10 @@ void igb_configure_rx_ring(struct igb_adapter *adapter,
 static void igb_set_rx_buffer_len(struct igb_adapter *adapter,
 				  struct igb_ring *rx_ring)
 {
+#if (PAGE_SIZE < 8192)
+	struct e1000_hw *hw = &adapter->hw;
+#endif
+
 	/* set build_skb and buffer size flags */
 	clear_ring_build_skb_enabled(rx_ring);
 	clear_ring_uses_large_buffer(rx_ring);
@@ -3866,10 +3871,9 @@ static void igb_set_rx_buffer_len(struct igb_adapter *adapter,
 	set_ring_build_skb_enabled(rx_ring);
 
 #if (PAGE_SIZE < 8192)
-	if (adapter->max_frame_size <= IGB_MAX_FRAME_BUILD_SKB)
-		return;
-
-	set_ring_uses_large_buffer(rx_ring);
+	if (adapter->max_frame_size > IGB_MAX_FRAME_BUILD_SKB ||
+	    rd32(E1000_RCTL) & E1000_RCTL_SBP)
+		set_ring_uses_large_buffer(rx_ring);
 #endif
 }
 
drivers/net/ethernet/intel/igbvf/igbvf.h +2 -2
index bf69f01f8467..f69a7787a590 100644
@@ -62,11 +62,11 @@ enum latency_range {
 /* Tx/Rx descriptor defines */
 #define IGBVF_DEFAULT_TXD	256
 #define IGBVF_MAX_TXD		4096
-#define IGBVF_MIN_TXD		80
+#define IGBVF_MIN_TXD		64
 
 #define IGBVF_DEFAULT_RXD	256
 #define IGBVF_MAX_RXD		4096
-#define IGBVF_MIN_RXD		80
+#define IGBVF_MIN_RXD		64
 
 #define IGBVF_MIN_ITR_USECS	10 /* 100000 irq/sec */
 #define IGBVF_MAX_ITR_USECS	10000 /* 100    irq/sec */
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c +15 -13
index ad51b521e693..72df6544d419 100644
@@ -868,6 +868,7 @@ static int ixgbe_ptp_set_timestamp_mode(struct ixgbe_adapter *adapter,
 	u32 tsync_tx_ctl = IXGBE_TSYNCTXCTL_ENABLED;
 	u32 tsync_rx_ctl = IXGBE_TSYNCRXCTL_ENABLED;
 	u32 tsync_rx_mtrl = PTP_EV_PORT << 16;
+	u32 aflags = adapter->flags;
 	bool is_l2 = false;
 	u32 regval;
 
@@ -888,20 +889,20 @@ static int ixgbe_ptp_set_timestamp_mode(struct ixgbe_adapter *adapter,
 	case HWTSTAMP_FILTER_NONE:
 		tsync_rx_ctl = 0;
 		tsync_rx_mtrl = 0;
-		adapter->flags &= ~(IXGBE_FLAG_RX_HWTSTAMP_ENABLED |
-				    IXGBE_FLAG_RX_HWTSTAMP_IN_REGISTER);
+		aflags &= ~(IXGBE_FLAG_RX_HWTSTAMP_ENABLED |
+			    IXGBE_FLAG_RX_HWTSTAMP_IN_REGISTER);
 		break;
 	case HWTSTAMP_FILTER_PTP_V1_L4_SYNC:
 		tsync_rx_ctl |= IXGBE_TSYNCRXCTL_TYPE_L4_V1;
 		tsync_rx_mtrl |= IXGBE_RXMTRL_V1_SYNC_MSG;
-		adapter->flags |= (IXGBE_FLAG_RX_HWTSTAMP_ENABLED |
-				   IXGBE_FLAG_RX_HWTSTAMP_IN_REGISTER);
+		aflags |= (IXGBE_FLAG_RX_HWTSTAMP_ENABLED |
+			   IXGBE_FLAG_RX_HWTSTAMP_IN_REGISTER);
 		break;
 	case HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ:
 		tsync_rx_ctl |= IXGBE_TSYNCRXCTL_TYPE_L4_V1;
 		tsync_rx_mtrl |= IXGBE_RXMTRL_V1_DELAY_REQ_MSG;
-		adapter->flags |= (IXGBE_FLAG_RX_HWTSTAMP_ENABLED |
-				   IXGBE_FLAG_RX_HWTSTAMP_IN_REGISTER);
+		aflags |= (IXGBE_FLAG_RX_HWTSTAMP_ENABLED |
+			   IXGBE_FLAG_RX_HWTSTAMP_IN_REGISTER);
 		break;
 	case HWTSTAMP_FILTER_PTP_V2_EVENT:
 	case HWTSTAMP_FILTER_PTP_V2_L2_EVENT:
@@ -915,8 +916,8 @@ static int ixgbe_ptp_set_timestamp_mode(struct ixgbe_adapter *adapter,
 		tsync_rx_ctl |= IXGBE_TSYNCRXCTL_TYPE_EVENT_V2;
 		is_l2 = true;
 		config->rx_filter = HWTSTAMP_FILTER_PTP_V2_EVENT;
-		adapter->flags |= (IXGBE_FLAG_RX_HWTSTAMP_ENABLED |
-				   IXGBE_FLAG_RX_HWTSTAMP_IN_REGISTER);
+		aflags |= (IXGBE_FLAG_RX_HWTSTAMP_ENABLED |
+			   IXGBE_FLAG_RX_HWTSTAMP_IN_REGISTER);
 		break;
 	case HWTSTAMP_FILTER_PTP_V1_L4_EVENT:
 	case HWTSTAMP_FILTER_NTP_ALL:
@@ -927,7 +928,7 @@ static int ixgbe_ptp_set_timestamp_mode(struct ixgbe_adapter *adapter,
 		if (hw->mac.type >= ixgbe_mac_X550) {
 			tsync_rx_ctl |= IXGBE_TSYNCRXCTL_TYPE_ALL;
 			config->rx_filter = HWTSTAMP_FILTER_ALL;
-			adapter->flags |= IXGBE_FLAG_RX_HWTSTAMP_ENABLED;
+			aflags |= IXGBE_FLAG_RX_HWTSTAMP_ENABLED;
 			break;
 		}
 		/* fall through */
@@ -938,8 +939,6 @@ static int ixgbe_ptp_set_timestamp_mode(struct ixgbe_adapter *adapter,
 		 * Delay_Req messages and hardware does not support
 		 * timestamping all packets => return error
 		 */
-		adapter->flags &= ~(IXGBE_FLAG_RX_HWTSTAMP_ENABLED |
-				    IXGBE_FLAG_RX_HWTSTAMP_IN_REGISTER);
 		config->rx_filter = HWTSTAMP_FILTER_NONE;
 		return -ERANGE;
 	}
@@ -971,8 +970,8 @@ static int ixgbe_ptp_set_timestamp_mode(struct ixgbe_adapter *adapter,
 			       IXGBE_TSYNCRXCTL_TYPE_ALL |
 			       IXGBE_TSYNCRXCTL_TSIP_UT_EN;
 		config->rx_filter = HWTSTAMP_FILTER_ALL;
-		adapter->flags |= IXGBE_FLAG_RX_HWTSTAMP_ENABLED;
-		adapter->flags &= ~IXGBE_FLAG_RX_HWTSTAMP_IN_REGISTER;
+		aflags |= IXGBE_FLAG_RX_HWTSTAMP_ENABLED;
+		aflags &= ~IXGBE_FLAG_RX_HWTSTAMP_IN_REGISTER;
 		is_l2 = true;
 		break;
 	default:
@@ -1005,6 +1004,9 @@ static int ixgbe_ptp_set_timestamp_mode(struct ixgbe_adapter *adapter,
 
 	IXGBE_WRITE_FLUSH(hw);
 
+	/* configure adapter flags only when HW is actually configured */
+	adapter->flags = aflags;
+
 	/* clear TX/RX time stamp registers, just to be sure */
 	ixgbe_ptp_clear_tx_timestamp(adapter);
 	IXGBE_READ_REG(hw, IXGBE_RXSTMPH);
drivers/net/ethernet/mediatek/mtk_eth_soc.c +3 -0
index fb48efa70797..ff7c267df6e4 100644
@@ -1625,6 +1625,9 @@ static int mtk_hwlro_get_fdir_all(struct net_device *dev,
 	int i;
 
 	for (i = 0; i < MTK_MAX_LRO_IP_CNT; i++) {
+		if (cnt == cmd->rule_cnt)
+			return -EMSGSIZE;
+
 		if (mac->hwlro_ip[i]) {
 			rule_locs[cnt] = i;
 			cnt++;
drivers/net/macsec.c +1 -2
index 6b10d68e3e53..577b7804ed66 100644
@@ -1311,8 +1311,7 @@ static struct crypto_aead *macsec_alloc_tfm(char *key, int key_len, int icv_len)
 	struct crypto_aead *tfm;
 	int ret;
 
-	/* Pick a sync gcm(aes) cipher to ensure order is preserved. */
-	tfm = crypto_alloc_aead("gcm(aes)", 0, CRYPTO_ALG_ASYNC);
+	tfm = crypto_alloc_aead("gcm(aes)", 0, 0);
 
 	if (IS_ERR(tfm))
 		return tfm;
drivers/net/usb/qmi_wwan.c +1 -0
index 8cdf822dfda0..880aa7f6a779 100644
@@ -1365,6 +1365,7 @@ static const struct usb_device_id products[] = {
 	{QMI_QUIRK_SET_DTR(0x2c7c, 0x0191, 4)},	/* Quectel EG91 */
 	{QMI_QUIRK_SET_DTR(0x2c7c, 0x0195, 4)},	/* Quectel EG95 */
 	{QMI_FIXED_INTF(0x2c7c, 0x0296, 4)},	/* Quectel BG96 */
+	{QMI_QUIRK_SET_DTR(0x2c7c, 0x030e, 4)},	/* Quectel EM05GV2 */
 	{QMI_QUIRK_SET_DTR(0x2cb7, 0x0104, 4)},	/* Fibocom NL678 series */
 	{QMI_FIXED_INTF(0x0489, 0xe0b4, 0)},	/* Foxconn T77W968 LTE */
 	{QMI_FIXED_INTF(0x0489, 0xe0b5, 0)},	/* Foxconn T77W968 LTE with eSIM support*/
drivers/net/wireless/ath/ath10k/pci.c +5 -4
index 07457eb9d455..27200544162c 100644
@@ -1661,8 +1661,9 @@ static int ath10k_pci_hif_start(struct ath10k *ar)
 	ath10k_pci_irq_enable(ar);
 	ath10k_pci_rx_post(ar);
 
-	pcie_capability_write_word(ar_pci->pdev, PCI_EXP_LNKCTL,
-				   ar_pci->link_ctl);
+	pcie_capability_clear_and_set_word(ar_pci->pdev, PCI_EXP_LNKCTL,
+					   PCI_EXP_LNKCTL_ASPMC,
+					   ar_pci->link_ctl & PCI_EXP_LNKCTL_ASPMC);
 
 	return 0;
 }
@@ -2516,8 +2517,8 @@ static int ath10k_pci_hif_power_up(struct ath10k *ar)
 
 	pcie_capability_read_word(ar_pci->pdev, PCI_EXP_LNKCTL,
 				  &ar_pci->link_ctl);
-	pcie_capability_write_word(ar_pci->pdev, PCI_EXP_LNKCTL,
-				   ar_pci->link_ctl & ~PCI_EXP_LNKCTL_ASPMC);
+	pcie_capability_clear_word(ar_pci->pdev, PCI_EXP_LNKCTL,
+				   PCI_EXP_LNKCTL_ASPMC);
 
 	/*
 	 * Bring the target up cleanly.
drivers/net/wireless/ath/ath9k/ahb.c +2 -2
index 2bd982c3a479..375628dc654e 100644
@@ -135,8 +135,8 @@ static int ath_ahb_probe(struct platform_device *pdev)
 
 	ah = sc->sc_ah;
 	ath9k_hw_name(ah, hw_name, sizeof(hw_name));
-	wiphy_info(hw->wiphy, "%s mem=0x%lx, irq=%d\n",
-		   hw_name, (unsigned long)mem, irq);
+	wiphy_info(hw->wiphy, "%s mem=0x%p, irq=%d\n",
+		   hw_name, mem, irq);
 
 	return 0;
 
drivers/net/wireless/ath/ath9k/htc_drv_debug.c +1 -1
index dc79afd7e151..b711b2e1ce93 100644
@@ -491,7 +491,7 @@ int ath9k_htc_init_debug(struct ath_hw *ah)
 
 	priv->debug.debugfs_phy = debugfs_create_dir(KBUILD_MODNAME,
 					     priv->hw->wiphy->debugfsdir);
-	if (!priv->debug.debugfs_phy)
+	if (IS_ERR(priv->debug.debugfs_phy))
 		return -ENOMEM;
 
 	ath9k_cmn_spectral_init_debug(&priv->spec_priv, priv->debug.debugfs_phy);
drivers/net/wireless/ath/ath9k/pci.c +2 -2
index 223606311261..7ab050cad4a2 100644
@@ -975,8 +975,8 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	}
 
 	ath9k_hw_name(sc->sc_ah, hw_name, sizeof(hw_name));
-	wiphy_info(hw->wiphy, "%s mem=0x%lx, irq=%d\n",
-		   hw_name, (unsigned long)sc->mem, pdev->irq);
+	wiphy_info(hw->wiphy, "%s mem=0x%p, irq=%d\n",
+		   hw_name, sc->mem, pdev->irq);
 
 	return 0;
 
drivers/net/wireless/ath/ath9k/wmi.c +8 -6
index 7b4e92218119..e0ecd2e86747 100644
@@ -279,7 +279,8 @@ int ath9k_wmi_connect(struct htc_target *htc, struct wmi *wmi,
 
 static int ath9k_wmi_cmd_issue(struct wmi *wmi,
 			       struct sk_buff *skb,
-			       enum wmi_cmd_id cmd, u16 len)
+			       enum wmi_cmd_id cmd, u16 len,
+			       u8 *rsp_buf, u32 rsp_len)
 {
 	struct wmi_cmd_hdr *hdr;
 	unsigned long flags;
@@ -289,6 +290,11 @@ static int ath9k_wmi_cmd_issue(struct wmi *wmi,
 	hdr->seq_no = cpu_to_be16(++wmi->tx_seq_id);
 
 	spin_lock_irqsave(&wmi->wmi_lock, flags);
+
+	/* record the rsp buffer and length */
+	wmi->cmd_rsp_buf = rsp_buf;
+	wmi->cmd_rsp_len = rsp_len;
+
 	wmi->last_seq_id = wmi->tx_seq_id;
 	spin_unlock_irqrestore(&wmi->wmi_lock, flags);
 
@@ -329,11 +335,7 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id,
 		goto out;
 	}
 
-	/* record the rsp buffer and length */
-	wmi->cmd_rsp_buf = rsp_buf;
-	wmi->cmd_rsp_len = rsp_len;
-
-	ret = ath9k_wmi_cmd_issue(wmi, skb, cmd_id, cmd_len);
+	ret = ath9k_wmi_cmd_issue(wmi, skb, cmd_id, cmd_len, rsp_buf, rsp_len);
 	if (ret)
 		goto out;
 
drivers/net/wireless/marvell/mwifiex/debugfs.c +7 -2
index 49ca84ef1a99..b843be87112c 100644
@@ -288,8 +288,11 @@ mwifiex_histogram_read(struct file *file, char __user *ubuf,
 	if (!p)
 		return -ENOMEM;
 
-	if (!priv || !priv->hist_data)
-		return -EFAULT;
+	if (!priv || !priv->hist_data) {
+		ret = -EFAULT;
+		goto free_and_exit;
+	}
+
 	phist_data = priv->hist_data;
 
 	p += sprintf(p, "\n"
@@ -344,6 +347,8 @@ mwifiex_histogram_read(struct file *file, char __user *ubuf,
 	ret = simple_read_from_buffer(ubuf, count, ppos, (char *)page,
 				      (unsigned long)p - page);
 
+free_and_exit:
+	free_page(page);
 	return ret;
 }
 
drivers/net/wireless/marvell/mwifiex/sta_rx.c +11 -1
index 00fcbda09349..f3c6daeba1b8 100644
@@ -98,6 +98,15 @@ int mwifiex_process_rx_packet(struct mwifiex_private *priv,
 	rx_pkt_len = le16_to_cpu(local_rx_pd->rx_pkt_length);
 	rx_pkt_hdr = (void *)local_rx_pd + rx_pkt_off;
 
+	if (sizeof(*rx_pkt_hdr) + rx_pkt_off > skb->len) {
+		mwifiex_dbg(priv->adapter, ERROR,
+			    "wrong rx packet offset: len=%d, rx_pkt_off=%d\n",
+			    skb->len, rx_pkt_off);
+		priv->stats.rx_dropped++;
+		dev_kfree_skb_any(skb);
+		return -1;
+	}
+
 	if ((!memcmp(&rx_pkt_hdr->rfc1042_hdr, bridge_tunnel_header,
 		     sizeof(bridge_tunnel_header))) ||
 	    (!memcmp(&rx_pkt_hdr->rfc1042_hdr, rfc1042_header,
@@ -203,7 +212,8 @@ int mwifiex_process_sta_rx_packet(struct mwifiex_private *priv,
 
 	rx_pkt_hdr = (void *)local_rx_pd + rx_pkt_offset;
 
-	if ((rx_pkt_offset + rx_pkt_length) > (u16) skb->len) {
+	if ((rx_pkt_offset + rx_pkt_length) > skb->len ||
+	    sizeof(rx_pkt_hdr->eth803_hdr) + rx_pkt_offset > skb->len) {
 		mwifiex_dbg(adapter, ERROR,
 			    "wrong rx packet: len=%d, rx_pkt_offset=%d, rx_pkt_length=%d\n",
 			    skb->len, rx_pkt_offset, rx_pkt_length);
drivers/net/wireless/marvell/mwifiex/tdls.c +6 -3
index 80d20fb6f348..a69b4983747f 100644
@@ -737,6 +737,7 @@ mwifiex_construct_tdls_action_frame(struct mwifiex_private *priv,
 	int ret;
 	u16 capab;
 	struct ieee80211_ht_cap *ht_cap;
+	unsigned int extra;
 	u8 radio, *pos;
 
 	capab = priv->curr_bss_params.bss_descriptor.cap_info_bitmap;
@@ -755,7 +756,10 @@ mwifiex_construct_tdls_action_frame(struct mwifiex_private *priv,
 
 	switch (action_code) {
 	case WLAN_PUB_ACTION_TDLS_DISCOVER_RES:
-		skb_put(skb, sizeof(mgmt->u.action.u.tdls_discover_resp) + 1);
+		/* See the layout of 'struct ieee80211_mgmt'. */
+		extra = sizeof(mgmt->u.action.u.tdls_discover_resp) +
+			sizeof(mgmt->u.action.category);
+		skb_put(skb, extra);
 		mgmt->u.action.category = WLAN_CATEGORY_PUBLIC;
 		mgmt->u.action.u.tdls_discover_resp.action_code =
 					      WLAN_PUB_ACTION_TDLS_DISCOVER_RES;
@@ -764,8 +768,7 @@ mwifiex_construct_tdls_action_frame(struct mwifiex_private *priv,
 		mgmt->u.action.u.tdls_discover_resp.capability =
 							     cpu_to_le16(capab);
 		/* move back for addr4 */
-		memmove(pos + ETH_ALEN, &mgmt->u.action.category,
-			sizeof(mgmt->u.action.u.tdls_discover_resp));
+		memmove(pos + ETH_ALEN, &mgmt->u.action, extra);
 		/* init address 4 */
 		memcpy(pos, bc_addr, ETH_ALEN);
 
drivers/net/wireless/marvell/mwifiex/uap_txrx.c +29 -1
index 1e6a62c69ac5..a887d7a9b7c0 100644
@@ -116,6 +116,16 @@ static void mwifiex_uap_queue_bridged_pkt(struct mwifiex_private *priv,
 		return;
 	}
 
+	if (sizeof(*rx_pkt_hdr) +
+	    le16_to_cpu(uap_rx_pd->rx_pkt_offset) > skb->len) {
+		mwifiex_dbg(adapter, ERROR,
+			    "wrong rx packet offset: len=%d,rx_pkt_offset=%d\n",
+			    skb->len, le16_to_cpu(uap_rx_pd->rx_pkt_offset));
+		priv->stats.rx_dropped++;
+		dev_kfree_skb_any(skb);
+		return;
+	}
+
 	if ((!memcmp(&rx_pkt_hdr->rfc1042_hdr, bridge_tunnel_header,
 		     sizeof(bridge_tunnel_header))) ||
 	    (!memcmp(&rx_pkt_hdr->rfc1042_hdr, rfc1042_header,
@@ -256,7 +266,15 @@ int mwifiex_handle_uap_rx_forward(struct mwifiex_private *priv,
 
 	if (is_multicast_ether_addr(ra)) {
 		skb_uap = skb_copy(skb, GFP_ATOMIC);
-		mwifiex_uap_queue_bridged_pkt(priv, skb_uap);
+		if (likely(skb_uap)) {
+			mwifiex_uap_queue_bridged_pkt(priv, skb_uap);
+		} else {
+			mwifiex_dbg(adapter, ERROR,
+				    "failed to copy skb for uAP\n");
+			priv->stats.rx_dropped++;
+			dev_kfree_skb_any(skb);
+			return -1;
+		}
 	} else {
 		if (mwifiex_get_sta_entry(priv, ra)) {
 			/* Requeue Intra-BSS packet */
@@ -385,6 +403,16 @@ int mwifiex_process_uap_rx_packet(struct mwifiex_private *priv,
 	rx_pkt_type = le16_to_cpu(uap_rx_pd->rx_pkt_type);
 	rx_pkt_hdr = (void *)uap_rx_pd + le16_to_cpu(uap_rx_pd->rx_pkt_offset);
 
+	if (le16_to_cpu(uap_rx_pd->rx_pkt_offset) +
+	    sizeof(rx_pkt_hdr->eth803_hdr) > skb->len) {
+		mwifiex_dbg(adapter, ERROR,
+			    "wrong rx packet for struct ethhdr: len=%d, offset=%d\n",
+			    skb->len, le16_to_cpu(uap_rx_pd->rx_pkt_offset));
+		priv->stats.rx_dropped++;
+		dev_kfree_skb_any(skb);
+		return 0;
+	}
+
 	ether_addr_copy(ta, rx_pkt_hdr->eth803_hdr.h_source);
 
 	if ((le16_to_cpu(uap_rx_pd->rx_pkt_offset) +
drivers/net/wireless/marvell/mwifiex/util.c +7 -3
index 51ccf10f4413..4fccdf01b8a0 100644
@@ -403,11 +403,15 @@ mwifiex_process_mgmt_packet(struct mwifiex_private *priv,
 	}
 
 	rx_pd = (struct rxpd *)skb->data;
+	pkt_len = le16_to_cpu(rx_pd->rx_pkt_length);
+	if (pkt_len < sizeof(struct ieee80211_hdr) + sizeof(pkt_len)) {
+		mwifiex_dbg(priv->adapter, ERROR, "invalid rx_pkt_length");
+		return -1;
+	}
 
 	skb_pull(skb, le16_to_cpu(rx_pd->rx_pkt_offset));
 	skb_pull(skb, sizeof(pkt_len));
-
-	pkt_len = le16_to_cpu(rx_pd->rx_pkt_length);
+	pkt_len -= sizeof(pkt_len);
 
 	ieee_hdr = (void *)skb->data;
 	if (ieee80211_is_mgmt(ieee_hdr->frame_control)) {
@@ -420,7 +424,7 @@ mwifiex_process_mgmt_packet(struct mwifiex_private *priv,
 		skb->data + sizeof(struct ieee80211_hdr),
 		pkt_len - sizeof(struct ieee80211_hdr));
 
-	pkt_len -= ETH_ALEN + sizeof(pkt_len);
+	pkt_len -= ETH_ALEN;
 	rx_pd->rx_pkt_length = cpu_to_le16(pkt_len);
 
 	cfg80211_rx_mgmt(&priv->wdev, priv->roc_cfg.chan.center_freq,
drivers/ntb/ntb_transport.c +15 -4
index a58ced5d6043..4e1a061fcc14 100644
@@ -741,7 +741,7 @@ static int ntb_set_mw(struct ntb_transport_ctx *nt, int num_mw,
 	return 0;
 }
 
-static void ntb_qp_link_down_reset(struct ntb_transport_qp *qp)
+static void ntb_qp_link_context_reset(struct ntb_transport_qp *qp)
 {
 	qp->link_is_up = false;
 	qp->active = false;
@@ -764,6 +764,13 @@ static void ntb_qp_link_down_reset(struct ntb_transport_qp *qp)
 	qp->tx_async = 0;
 }
 
+static void ntb_qp_link_down_reset(struct ntb_transport_qp *qp)
+{
+	ntb_qp_link_context_reset(qp);
+	if (qp->remote_rx_info)
+		qp->remote_rx_info->entry = qp->rx_max_entry - 1;
+}
+
 static void ntb_qp_link_cleanup(struct ntb_transport_qp *qp)
 {
 	struct ntb_transport_ctx *nt = qp->transport;
@@ -988,7 +995,7 @@ static int ntb_transport_init_queue(struct ntb_transport_ctx *nt,
 	qp->ndev = nt->ndev;
 	qp->client_ready = false;
 	qp->event_handler = NULL;
-	ntb_qp_link_down_reset(qp);
+	ntb_qp_link_context_reset(qp);
 
 	if (mw_num < qp_count % mw_count)
 		num_qps_mw = qp_count / mw_count + 1;
@@ -2046,9 +2053,13 @@ int ntb_transport_tx_enqueue(struct ntb_transport_qp *qp, void *cb, void *data,
 	struct ntb_queue_entry *entry;
 	int rc;
 
-	if (!qp || !qp->link_is_up || !len)
+	if (!qp || !len)
 		return -EINVAL;
 
+	/* If the qp link is down already, just ignore. */
+	if (!qp->link_is_up)
+		return 0;
+
 	entry = ntb_list_rm(&qp->ntb_tx_free_q_lock, &qp->tx_free_q);
 	if (!entry) {
 		qp->tx_err_no_buf++;
@@ -2188,7 +2199,7 @@ unsigned int ntb_transport_tx_free_entry(struct ntb_transport_qp *qp)
 	unsigned int head = qp->tx_index;
 	unsigned int tail = qp->remote_rx_info->entry;
 
-	return tail > head ? tail - head : qp->tx_max_entry + tail - head;
+	return tail >= head ? tail - head : qp->tx_max_entry + tail - head;
 }
 EXPORT_SYMBOL_GPL(ntb_transport_tx_free_entry);
 
drivers/of/unittest.c +6 -4
index 55c98f119df2..89d1011d5b32 100644
@@ -51,7 +51,7 @@ static void __init of_unittest_find_node_by_name(void)
 
 	np = of_find_node_by_path("/testcase-data");
 	name = kasprintf(GFP_KERNEL, "%pOF", np);
-	unittest(np && !strcmp("/testcase-data", name),
+	unittest(np && name && !strcmp("/testcase-data", name),
 		"find /testcase-data failed\n");
 	of_node_put(np);
 	kfree(name);
@@ -62,14 +62,14 @@ static void __init of_unittest_find_node_by_name(void)
 
 	np = of_find_node_by_path("/testcase-data/phandle-tests/consumer-a");
 	name = kasprintf(GFP_KERNEL, "%pOF", np);
-	unittest(np && !strcmp("/testcase-data/phandle-tests/consumer-a", name),
+	unittest(np && name && !strcmp("/testcase-data/phandle-tests/consumer-a", name),
 		"find /testcase-data/phandle-tests/consumer-a failed\n");
 	of_node_put(np);
 	kfree(name);
 
 	np = of_find_node_by_path("testcase-alias");
 	name = kasprintf(GFP_KERNEL, "%pOF", np);
-	unittest(np && !strcmp("/testcase-data", name),
+	unittest(np && name && !strcmp("/testcase-data", name),
 		"find testcase-alias failed\n");
 	of_node_put(np);
 	kfree(name);
@@ -80,7 +80,7 @@ static void __init of_unittest_find_node_by_name(void)
 
 	np = of_find_node_by_path("testcase-alias/phandle-tests/consumer-a");
 	name = kasprintf(GFP_KERNEL, "%pOF", np);
-	unittest(np && !strcmp("/testcase-data/phandle-tests/consumer-a", name),
+	unittest(np && name && !strcmp("/testcase-data/phandle-tests/consumer-a", name),
 		"find testcase-alias/phandle-tests/consumer-a failed\n");
 	of_node_put(np);
 	kfree(name);
@@ -966,6 +966,8 @@ static void attach_node_and_children(struct device_node *np)
 	const char *full_name;
 
 	full_name = kasprintf(GFP_KERNEL, "%pOF", np);
+	if (!full_name)
+		return;
 
 	if (!strcmp(full_name, "/__local_fixups__") ||
 	    !strcmp(full_name, "/__fixups__")) {
drivers/parisc/led.c +2 -2
index 6c25796fcfa9..acd1dbb6adfb 100644
@@ -60,8 +60,8 @@
 static int led_type __read_mostly = -1;
 static unsigned char lastleds;	/* LED state from most recent update */
 static unsigned int led_heartbeat __read_mostly = 1;
-static unsigned int led_diskio    __read_mostly = 1;
-static unsigned int led_lanrxtx   __read_mostly = 1;
+static unsigned int led_diskio    __read_mostly;
+static unsigned int led_lanrxtx   __read_mostly;
 static char lcd_text[32]          __read_mostly;
 static char lcd_text_default[32]  __read_mostly;
 static int  lcd_no_led_support    __read_mostly = 0; /* KittyHawk doesn't support LED on its LCD */
drivers/pci/hotplug/pciehp_hpc.c +3 -9
index c2dd297d4007..2ec015d1f671 100644
@@ -338,17 +338,11 @@ int pciehp_check_link_status(struct controller *ctrl)
 static int __pciehp_link_set(struct controller *ctrl, bool enable)
 {
 	struct pci_dev *pdev = ctrl_dev(ctrl);
-	u16 lnk_ctrl;
 
-	pcie_capability_read_word(pdev, PCI_EXP_LNKCTL, &lnk_ctrl);
+	pcie_capability_clear_and_set_word(pdev, PCI_EXP_LNKCTL,
+					   PCI_EXP_LNKCTL_LD,
+					   enable ? 0 : PCI_EXP_LNKCTL_LD);
 
-	if (enable)
-		lnk_ctrl &= ~PCI_EXP_LNKCTL_LD;
-	else
-		lnk_ctrl |= PCI_EXP_LNKCTL_LD;
-
-	pcie_capability_write_word(pdev, PCI_EXP_LNKCTL, lnk_ctrl);
-	ctrl_dbg(ctrl, "%s: lnk_ctrl = %x\n", __func__, lnk_ctrl);
 	return 0;
 }
 
drivers/pinctrl/pinctrl-amd.c +2 -2
index fbec8a07e942..509ba4bceefc 100644
@@ -609,7 +609,7 @@ static int amd_pinconf_get(struct pinctrl_dev *pctldev,
 		break;
 
 	default:
-		dev_err(&gpio_dev->pdev->dev, "Invalid config param %04x\n",
+		dev_dbg(&gpio_dev->pdev->dev, "Invalid config param %04x\n",
 			param);
 		return -ENOTSUPP;
 	}
@@ -662,7 +662,7 @@ static int amd_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin,
 			break;
 
 		default:
-			dev_err(&gpio_dev->pdev->dev,
+			dev_dbg(&gpio_dev->pdev->dev,
 				"Invalid config param %04x\n", param);
 			ret = -ENOTSUPP;
 		}
drivers/pwm/pwm-lpc32xx.c +8 -8
index ed8e9406b4af..b5f8b86b328a 100644
@@ -55,10 +55,10 @@ static int lpc32xx_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
 	if (duty_cycles > 255)
 		duty_cycles = 255;
 
-	val = readl(lpc32xx->base + (pwm->hwpwm << 2));
+	val = readl(lpc32xx->base);
 	val &= ~0xFFFF;
 	val |= (period_cycles << 8) | duty_cycles;
-	writel(val, lpc32xx->base + (pwm->hwpwm << 2));
+	writel(val, lpc32xx->base);
 
 	return 0;
 }
@@ -73,9 +73,9 @@ static int lpc32xx_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
 	if (ret)
 		return ret;
 
-	val = readl(lpc32xx->base + (pwm->hwpwm << 2));
+	val = readl(lpc32xx->base);
 	val |= PWM_ENABLE;
-	writel(val, lpc32xx->base + (pwm->hwpwm << 2));
+	writel(val, lpc32xx->base);
 
 	return 0;
 }
@@ -85,9 +85,9 @@ static void lpc32xx_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
 	struct lpc32xx_pwm_chip *lpc32xx = to_lpc32xx_pwm_chip(chip);
 	u32 val;
 
-	val = readl(lpc32xx->base + (pwm->hwpwm << 2));
+	val = readl(lpc32xx->base);
 	val &= ~PWM_ENABLE;
-	writel(val, lpc32xx->base + (pwm->hwpwm << 2));
+	writel(val, lpc32xx->base);
 
 	clk_disable_unprepare(lpc32xx->clk);
 }
@@ -125,9 +125,9 @@ static int lpc32xx_pwm_probe(struct platform_device *pdev)
 	lpc32xx->chip.base = -1;
 
 	/* If PWM is disabled, configure the output to the default value */
-	val = readl(lpc32xx->base + (lpc32xx->chip.pwms[0].hwpwm << 2));
+	val = readl(lpc32xx->base);
 	val &= ~PWM_PIN_LEVEL;
-	writel(val, lpc32xx->base + (lpc32xx->chip.pwms[0].hwpwm << 2));
+	writel(val, lpc32xx->base);
 
 	ret = pwmchip_add(&lpc32xx->chip);
 	if (ret < 0) {
drivers/rpmsg/qcom_glink_native.c +4 -0
index 0fb185e0620a..c1dfad298685 100644
@@ -225,6 +225,10 @@ static struct glink_channel *qcom_glink_alloc_channel(struct qcom_glink *glink,
 
 	channel->glink = glink;
 	channel->name = kstrdup(name, GFP_KERNEL);
+	if (!channel->name) {
+		kfree(channel);
+		return ERR_PTR(-ENOMEM);
+	}
 
 	init_completion(&channel->open_req);
 	init_completion(&channel->open_ack);
drivers/rtc/rtc-ds1685.c +1 -1
index ed43b4311660..3abc75103cc4 100644
@@ -2228,7 +2228,7 @@ ds1685_rtc_poweroff(struct platform_device *pdev)
 		unreachable();
 	}
 }
-EXPORT_SYMBOL(ds1685_rtc_poweroff);
+EXPORT_SYMBOL_GPL(ds1685_rtc_poweroff);
 /* ----------------------------------------------------------------------- */
 
 
drivers/s390/block/dasd_3990_erp.c +1 -1
index ee14d8e45c97..6d26343b12f2 100644
@@ -2423,7 +2423,7 @@ static struct dasd_ccw_req *dasd_3990_erp_add_erp(struct dasd_ccw_req *cqr)
 	erp->block    = cqr->block;
 	erp->magic    = cqr->magic;
 	erp->expires  = cqr->expires;
-	erp->retries  = 256;
+	erp->retries  = device->default_retries;
 	erp->buildclk = get_tod_clock();
 	erp->status = DASD_CQR_FILLED;
 
drivers/scsi/be2iscsi/be_iscsi.c +4 -0
index 43a80ce5ce6a..0e95bccac32e 100644
@@ -442,6 +442,10 @@ int beiscsi_iface_set_param(struct Scsi_Host *shost,
 	}
 
 	nla_for_each_attr(attrib, data, dt_len, rm_len) {
+		/* ignore nla_type as it is never used */
+		if (nla_len(attrib) < sizeof(*iface_param))
+			return -EINVAL;
+
 		iface_param = nla_data(attrib);
 
 		if (iface_param->param_type != ISCSI_NET_PARAM)
drivers/scsi/fcoe/fcoe_ctlr.c +12 -8
index 1c8fa41aa3ab..57826f7bb9f2 100644
@@ -330,16 +330,17 @@ static void fcoe_ctlr_announce(struct fcoe_ctlr *fip)
 {
 	struct fcoe_fcf *sel;
 	struct fcoe_fcf *fcf;
+	unsigned long flags;
 
 	mutex_lock(&fip->ctlr_mutex);
-	spin_lock_bh(&fip->ctlr_lock);
+	spin_lock_irqsave(&fip->ctlr_lock, flags);
 
 	kfree_skb(fip->flogi_req);
 	fip->flogi_req = NULL;
 	list_for_each_entry(fcf, &fip->fcfs, list)
 		fcf->flogi_sent = 0;
 
-	spin_unlock_bh(&fip->ctlr_lock);
+	spin_unlock_irqrestore(&fip->ctlr_lock, flags);
 	sel = fip->sel_fcf;
 
 	if (sel && ether_addr_equal(sel->fcf_mac, fip->dest_addr))
@@ -709,6 +710,7 @@ int fcoe_ctlr_els_send(struct fcoe_ctlr *fip, struct fc_lport *lport,
 {
 	struct fc_frame *fp;
 	struct fc_frame_header *fh;
+	unsigned long flags;
 	u16 old_xid;
 	u8 op;
 	u8 mac[ETH_ALEN];
@@ -742,11 +744,11 @@ int fcoe_ctlr_els_send(struct fcoe_ctlr *fip, struct fc_lport *lport,
 		op = FIP_DT_FLOGI;
 		if (fip->mode == FIP_MODE_VN2VN)
 			break;
-		spin_lock_bh(&fip->ctlr_lock);
+		spin_lock_irqsave(&fip->ctlr_lock, flags);
 		kfree_skb(fip->flogi_req);
 		fip->flogi_req = skb;
 		fip->flogi_req_send = 1;
-		spin_unlock_bh(&fip->ctlr_lock);
+		spin_unlock_irqrestore(&fip->ctlr_lock, flags);
 		schedule_work(&fip->timer_work);
 		return -EINPROGRESS;
 	case ELS_FDISC:
@@ -1723,10 +1725,11 @@ static int fcoe_ctlr_flogi_send_locked(struct fcoe_ctlr *fip)
 static int fcoe_ctlr_flogi_retry(struct fcoe_ctlr *fip)
 {
 	struct fcoe_fcf *fcf;
+	unsigned long flags;
 	int error;
 
 	mutex_lock(&fip->ctlr_mutex);
-	spin_lock_bh(&fip->ctlr_lock);
+	spin_lock_irqsave(&fip->ctlr_lock, flags);
 	LIBFCOE_FIP_DBG(fip, "re-sending FLOGI - reselect\n");
 	fcf = fcoe_ctlr_select(fip);
 	if (!fcf || fcf->flogi_sent) {
@@ -1737,7 +1740,7 @@ static int fcoe_ctlr_flogi_retry(struct fcoe_ctlr *fip)
 		fcoe_ctlr_solicit(fip, NULL);
 		error = fcoe_ctlr_flogi_send_locked(fip);
 	}
-	spin_unlock_bh(&fip->ctlr_lock);
+	spin_unlock_irqrestore(&fip->ctlr_lock, flags);
 	mutex_unlock(&fip->ctlr_mutex);
 	return error;
 }
@@ -1754,8 +1757,9 @@ static int fcoe_ctlr_flogi_retry(struct fcoe_ctlr *fip)
 static void fcoe_ctlr_flogi_send(struct fcoe_ctlr *fip)
 {
 	struct fcoe_fcf *fcf;
+	unsigned long flags;
 
-	spin_lock_bh(&fip->ctlr_lock);
+	spin_lock_irqsave(&fip->ctlr_lock, flags);
 	fcf = fip->sel_fcf;
 	if (!fcf || !fip->flogi_req_send)
 		goto unlock;
@@ -1782,7 +1786,7 @@ static void fcoe_ctlr_flogi_send(struct fcoe_ctlr *fip)
 	} else /* XXX */
 		LIBFCOE_FIP_DBG(fip, "No FCF selected - defer send\n");
 unlock:
-	spin_unlock_bh(&fip->ctlr_lock);
+	spin_unlock_irqrestore(&fip->ctlr_lock, flags);
 }
 
 /**
drivers/scsi/hosts.c +2 -2
index 27609b2ae544..493700ae19b4 100644
@@ -555,7 +555,7 @@ EXPORT_SYMBOL(scsi_unregister);
 static int __scsi_host_match(struct device *dev, const void *data)
 {
 	struct Scsi_Host *p;
-	const unsigned short *hostnum = data;
+	const unsigned int *hostnum = data;
 
 	p = class_to_shost(dev);
 	return p->host_no == *hostnum;
@@ -572,7 +572,7 @@ static int __scsi_host_match(struct device *dev, const void *data)
  *	that scsi_host_get() took. The put_device() below dropped
  *	the reference from class_find_device().
  **/
-struct Scsi_Host *scsi_host_lookup(unsigned short hostnum)
+struct Scsi_Host *scsi_host_lookup(unsigned int hostnum)
 {
 	struct device *cdev;
 	struct Scsi_Host *shost = NULL;
drivers/scsi/qedf/qedf_dbg.h +2 -0
index 50083cae84c3..9fa5da44971a 100644
@@ -63,6 +63,8 @@ extern uint qedf_debug;
 #define QEDF_LOG_NOTICE	0x40000000	/* Notice logs */
 #define QEDF_LOG_WARN		0x80000000	/* Warning logs */
 
+#define QEDF_DEBUGFS_LOG_LEN (2 * PAGE_SIZE)
+
 /* Debug context structure */
 struct qedf_dbg_ctx {
 	unsigned int host_no;
drivers/scsi/qedf/qedf_debugfs.c +18 -10
index 2b1ef3075e93..41fa846f0bdb 100644
@@ -11,6 +11,7 @@
 #include <linux/uaccess.h>
 #include <linux/debugfs.h>
 #include <linux/module.h>
+#include <linux/vmalloc.h>
 
 #include "qedf.h"
 #include "qedf_dbg.h"
@@ -117,7 +118,9 @@ static ssize_t
 qedf_dbg_fp_int_cmd_read(struct file *filp, char __user *buffer, size_t count,
 			 loff_t *ppos)
 {
+	ssize_t ret;
 	size_t cnt = 0;
+	char *cbuf;
 	int id;
 	struct qedf_fastpath *fp = NULL;
 	struct qedf_dbg_ctx *qedf_dbg =
@@ -127,19 +130,25 @@ qedf_dbg_fp_int_cmd_read(struct file *filp, char __user *buffer, size_t count,
 
 	QEDF_INFO(qedf_dbg, QEDF_LOG_DEBUGFS, "entered\n");
 
-	cnt = sprintf(buffer, "\nFastpath I/O completions\n\n");
+	cbuf = vmalloc(QEDF_DEBUGFS_LOG_LEN);
+	if (!cbuf)
+		return 0;
+
+	cnt += scnprintf(cbuf + cnt, QEDF_DEBUGFS_LOG_LEN - cnt, "\nFastpath I/O completions\n\n");
 
 	for (id = 0; id < qedf->num_queues; id++) {
 		fp = &(qedf->fp_array[id]);
 		if (fp->sb_id == QEDF_SB_ID_NULL)
 			continue;
-		cnt += sprintf((buffer + cnt), "#%d: %lu\n", id,
-			       fp->completions);
+		cnt += scnprintf(cbuf + cnt, QEDF_DEBUGFS_LOG_LEN - cnt,
+				 "#%d: %lu\n", id, fp->completions);
 	}
 
-	cnt = min_t(int, count, cnt - *ppos);
-	*ppos += cnt;
-	return cnt;
+	ret = simple_read_from_buffer(buffer, count, ppos, cbuf, cnt);
+
+	vfree(cbuf);
+
+	return ret;
 }
 
 static ssize_t
@@ -204,18 +213,17 @@ qedf_dbg_stop_io_on_error_cmd_read(struct file *filp, char __user *buffer,
 				   size_t count, loff_t *ppos)
 {
 	int cnt;
+	char cbuf[7];
 	struct qedf_dbg_ctx *qedf_dbg =
 				(struct qedf_dbg_ctx *)filp->private_data;
 	struct qedf_ctx *qedf = container_of(qedf_dbg,
 	    struct qedf_ctx, dbg_ctx);
 
 	QEDF_INFO(qedf_dbg, QEDF_LOG_DEBUGFS, "entered\n");
-	cnt = sprintf(buffer, "%s\n",
+	cnt = scnprintf(cbuf, sizeof(cbuf), "%s\n",
 	    qedf->stop_io_on_error ? "true" : "false");
 
-	cnt = min_t(int, count, cnt - *ppos);
-	*ppos += cnt;
-	return cnt;
+	return simple_read_from_buffer(buffer, count, ppos, cbuf, cnt);
 }
 
 static ssize_t
drivers/scsi/qedi/qedi_main.c +3 -2
index 09f57ef35990..b8b177018031 100644
@@ -1669,8 +1669,9 @@ static int qedi_cpu_offline(unsigned int cpu)
 	struct qedi_percpu_s *p = this_cpu_ptr(&qedi_percpu);
 	struct qedi_work *work, *tmp;
 	struct task_struct *thread;
+	unsigned long flags;
 
-	spin_lock_bh(&p->p_work_lock);
+	spin_lock_irqsave(&p->p_work_lock, flags);
 	thread = p->iothread;
 	p->iothread = NULL;
 
@@ -1681,7 +1682,7 @@ static int qedi_cpu_offline(unsigned int cpu)
 			kfree(work);
 	}
 
-	spin_unlock_bh(&p->p_work_lock);
+	spin_unlock_irqrestore(&p->p_work_lock, flags);
 	if (thread)
 		kthread_stop(thread);
 	return 0;
drivers/scsi/qla2xxx/qla_isr.c +0 -1
index b2056714804c..c138679e8940 100644
@@ -2622,7 +2622,6 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
 	case CS_PORT_BUSY:
 	case CS_INCOMPLETE:
 	case CS_PORT_UNAVAILABLE:
-	case CS_TIMEOUT:
 	case CS_RESET:
 
 		/*
drivers/scsi/qla2xxx/qla_nvme.c +1 -1
index c756298c0562..3944a9ebb0d9 100644
@@ -535,7 +535,7 @@ static int qla_nvme_post_cmd(struct nvme_fc_local_port *lport,
 
 	rval = qla2x00_start_nvme_mq(sp);
 	if (rval != QLA_SUCCESS) {
-		ql_log(ql_log_warn, vha, 0x212d,
+		ql_dbg(ql_dbg_io + ql_dbg_verbose, vha, 0x212d,
 		    "qla2x00_start_nvme_mq failed = %d\n", rval);
 		atomic_dec(&sp->ref_count);
 		wake_up(&sp->nvme_ls_waitq);
drivers/scsi/qla4xxx/ql4_os.c +15 -0
index 62022a66e9ee..d6e9717cb0fb 100644
@@ -942,6 +942,11 @@ static int qla4xxx_set_chap_entry(struct Scsi_Host *shost, void *data, int len)
 	memset(&chap_rec, 0, sizeof(chap_rec));
 
 	nla_for_each_attr(attr, data, len, rem) {
+		if (nla_len(attr) < sizeof(*param_info)) {
+			rc = -EINVAL;
+			goto exit_set_chap;
+		}
+
 		param_info = nla_data(attr);
 
 		switch (param_info->param) {
@@ -2727,6 +2732,11 @@ qla4xxx_iface_set_param(struct Scsi_Host *shost, void *data, uint32_t len)
 	}
 
 	nla_for_each_attr(attr, data, len, rem) {
+		if (nla_len(attr) < sizeof(*iface_param)) {
+			rval = -EINVAL;
+			goto exit_init_fw_cb;
+		}
+
 		iface_param = nla_data(attr);
 
 		if (iface_param->param_type == ISCSI_NET_PARAM) {
@@ -8102,6 +8112,11 @@ qla4xxx_sysfs_ddb_set_param(struct iscsi_bus_flash_session *fnode_sess,
 
 	memset((void *)&chap_tbl, 0, sizeof(chap_tbl));
 	nla_for_each_attr(attr, data, len, rem) {
+		if (nla_len(attr) < sizeof(*fnode_param)) {
+			rc = -EINVAL;
+			goto exit_set_param;
+		}
+
 		fnode_param = nla_data(attr);
 
 		switch (fnode_param->param) {
drivers/scsi/scsi_transport_iscsi.c +8 -0
index 26c6f1b28801..d90fdfbb69de 100644
@@ -2765,6 +2765,10 @@ iscsi_set_param(struct iscsi_transport *transport, struct iscsi_uevent *ev)
 	if (!conn || !session)
 		return -EINVAL;
 
+	/* data will be regarded as NULL-ended string, do length check */
+	if (strlen(data) > ev->u.set_param.len)
+		return -EINVAL;
+
 	switch (ev->u.set_param.param) {
 	case ISCSI_PARAM_SESS_RECOVERY_TMO:
 		sscanf(data, "%d", &value);
@@ -2917,6 +2921,10 @@ iscsi_set_host_param(struct iscsi_transport *transport,
 		return -ENODEV;
 	}
 
+	/* see similar check in iscsi_if_set_param() */
+	if (strlen(data) > ev->u.set_host_param.len)
+		return -EINVAL;
+
 	err = transport->set_host_param(shost, ev->u.set_host_param.param,
 					data, ev->u.set_host_param.len);
 	scsi_host_put(shost);
drivers/spi/spi-tegra20-sflash.c +5 -1
index 749288310c36..2989795272a1 100644
@@ -469,7 +469,11 @@ static int tegra_sflash_probe(struct platform_device *pdev)
 		goto exit_free_master;
 	}
 
-	tsd->irq = platform_get_irq(pdev, 0);
+	ret = platform_get_irq(pdev, 0);
+	if (ret < 0)
+		goto exit_free_master;
+	tsd->irq = ret;
+
 	ret = request_irq(tsd->irq, tegra_sflash_isr, 0,
 			dev_name(&pdev->dev), tsd);
 	if (ret < 0) {
drivers/target/iscsi/iscsi_target_configfs.c +27 -27

17 lines not on this page · raw message

drivers/tty/serial/cpm_uart/cpm_uart_core.c +4 -9
index 8f5a5a16cb3b..f0af8a6de0aa 100644

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

drivers/tty/serial/sc16is7xx.c +10 -1
index 590acca60134..21be0cf6a48c 100644

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

drivers/tty/serial/serial-tegra.c +5 -1
index a13d6d4674bc..05e522be9466 100644

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

drivers/usb/gadget/function/f_mass_storage.c +1 -1
index 41b5baa1f43b..6aee3cf50c74 100644

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

drivers/usb/gadget/udc/fsl_qe_udc.c +5 -1
index a3e72d690eef..c14d5870d99f 100644

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

drivers/usb/phy/phy-mxs-usb.c +2 -8
index 0e2f1a36d315..6e462a8d8309 100644

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

drivers/usb/serial/option.c +7 -0
index 22fd7293adb1..8792aca5bc27 100644

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

drivers/video/backlight/bd6107.c +1 -1
index fdb2f7e2c6b5..3eaa250f10de 100644

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

drivers/video/backlight/gpio_backlight.c +1 -1
index e470da95d806..cd7a97f11320 100644

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

drivers/video/backlight/lv5207lp.c +1 -1
index 8ab7297b118a..08aa615cb2a9 100644

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

drivers/video/fbdev/ep93xx-fb.c +0 -1
index 75f0db25d19f..e81593a93d23 100644

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

drivers/watchdog/intel-mid_wdt.c +1 -0
index 72c108a12c19..0dec3fba02b9 100644

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

fs/attr.c +18 -2
index 9d14a61d4b6f..a125db98f2ef 100644

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

fs/autofs4/waitq.c +2 -1
index 961a12dc6dc8..5863532675e3 100644

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

fs/btrfs/delayed-inode.c +16 -3
index 9f276d1dd29c..a09ad3fb04e1 100644

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

fs/btrfs/extent-tree.c +5 -0
index e59987385673..deb01e59da02 100644

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

fs/cifs/smb2ops.c +1 -0
index dec306a3b0f4..3287795c648e 100644

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

fs/ext2/xattr.c +2 -2
index bd1d68ff3a9f..437175bce22e 100644

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

fs/jfs/jfs_dmap.c +1 -0
index 464ddaf8ebd1..95e8f031c3f1 100644

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

fs/jfs/jfs_extent.c +5 -0
index 2ae7d59ab10a..c971e8a6525d 100644

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

fs/jfs/jfs_imap.c +1 -0
index f36ef68905a7..12fc01624458 100644

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

fs/lockd/mon.c +3 -0
index 9fbbd11f9ecb..4a2da67fc255 100644

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

fs/namei.c +1 -1
index a8c36363e6b1..b6de8f0a1607 100644

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

fs/nfs/blocklayout/dev.c +2 -2
index 70c4165d2d74..a16c85241262 100644

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

fs/nfs/pnfs_dev.c +1 -1
index 2961fcd7a2df..da3852ff1fb3 100644

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

fs/nfsd/blocklayoutxdr.c +9 -0
index 442543304930..2455dc8be18a 100644

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

fs/nfsd/flexfilelayoutxdr.c +9 -0
index e81d2a5cf381..bb205328e043 100644

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

fs/nfsd/nfs4proc.c +2 -2
index aec99cd4080a..48bdea57ad68 100644

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

fs/nfsd/nfs4xdr.c +11 -14
index d34ed6575e8f..997d3134beb3 100644

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

fs/nilfs2/alloc.c +2 -1
index 03b8ba933eb2..095cf8b5049a 100644

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

fs/nilfs2/inode.c +5 -2
index bc5f447d93bd..7fe5b55b6476 100644

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

fs/nilfs2/segment.c +5 -0
index f4215dbaca0d..ca4b1675c147 100644

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

fs/nls/nls_base.c +2 -2
index 52ccd34b1e79..a026dbd3593f 100644

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

fs/ocfs2/namei.c +4 -0
index 6ec15ffeb562..f36a338bf727 100644

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

fs/proc/base.c +2 -1
index 5f68454cf421..1230e732755b 100644

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

fs/pstore/ram_core.c +1 -1
index b56cf56ae926..58ac4e1a61a3 100644

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

fs/reiserfs/journal.c +3 -1
index 1a6e6343fed3..53d2e397c123 100644

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

fs/udf/balloc.c +27 -4
index f4f1a278771f..6aaca99dcc9d 100644

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

fs/udf/inode.c +27 -14

41 lines not on this page · raw message

include/linux/if_arp.h +4 -0
index a9b09c7c2ce0..c5a2e0446570 100644

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

include/linux/nls.h +1 -1
index 499e486b3722..e0bf8367b274 100644

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

include/linux/perf_event.h +19 -3
index 5efd8109ad0a..e175d5e3acd6 100644

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

include/net/lwtunnel.h +4 -1
index d747ef975cd8..0ab4647ccc24 100644

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

include/scsi/scsi_host.h +1 -1
index 9c1e4bad6581..1294b6ce9884 100644

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

include/uapi/linux/sync_file.h +1 -1
index ee2dcfb3d660..d7f7c04a6e0c 100644

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

kernel/auditsc.c +2 -0
index ffa8d64f6fef..fb474e36c971 100644

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

kernel/cgroup/namespace.c +0 -6
index b05f1dd58a62..313e66b8c662 100644

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

kernel/module.c +13 -2
index 2cd7de23cb1f..b9f582545b77 100644

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

lib/kobject.c +5 -0
index bbbb067de8ec..b908655c5812 100644

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

lib/mpi/mpi-cmp.c +6 -2
index d25e9e96c310..ceaebe181cd7 100644

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

lib/ubsan.c +0 -24
index c652b4a820cc..1e9e2ab25539 100644

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

lib/ubsan.h +0 -5
index 7e30b26497e0..f4d8d0bd4016 100644

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

net/9p/trans_virtio.c +1 -1
index c6a46e8e9eda..25f5caa57289 100644

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

net/core/sock.c +5 -4
index a7a0bc9c2a9f..5b9f51a27dc0 100644

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

net/dccp/ipv4.c +9 -4
index c021d5dde8f7..b2fc9ef7708f 100644

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

net/dccp/ipv6.c +10 -5
index 88732ab4887c..f8d8caa967b1 100644

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

net/ipv4/igmp.c +2 -1
index fd2c634eeee4..bdc232f6f27c 100644

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

net/ipv4/ip_output.c +1 -1
index c5c9dc0f41cb..c242c412dabc 100644

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

net/ipv4/tcp_timer.c +17 -1
index d70809495205..3d51a7edb311 100644

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

net/ipv6/addrconf.c +1 -1
index 893b93cc5221..288e270bd017 100644

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

net/ipv6/ip6_output.c +1 -1
index 36647d321107..c9322e6a1c0c 100644

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

net/kcm/kcmsock.c +10 -5
index fdce053f1099..e0fe70b55629 100644

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

net/netfilter/ipset/ip_set_hash_netportnet.c +1 -0
index 613e18e720a4..9290a4d7b862 100644

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

net/netfilter/xt_sctp.c +2 -0
index 2d2fa1d53ea6..05495d3f47b8 100644

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

net/netfilter/xt_u32.c +21 -0
index a95b50342dbb..58ba402bc0b0 100644

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

net/netlabel/netlabel_kapi.c +2 -1
index 15fe2120b310..14c3d640f94b 100644

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

net/netrom/af_netrom.c +5 -0
index b5a99b517207..4480d0d8394b 100644

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

net/sched/Kconfig +0 -28
index 704018c496d4..782114a230ae 100644

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

net/sched/Makefile +0 -2
index 3f3206e25156..c156c182f546 100644

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

net/sched/cls_fw.c +0 -1
index e63f9c2e37e5..7b04b315b2bd 100644

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

net/sched/cls_rsvp.c deleted +0 -28
deleted file mode 100644
index cbb5e0d600f3..000000000000

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

net/sched/cls_rsvp.h deleted +0 -779

779 lines not on this page · raw message

net/sched/cls_rsvp6.c deleted +0 -28
deleted file mode 100644
index dd08aea2aee5..000000000000

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

net/sched/sch_plug.c +1 -1
index 1c6cbab3e7b9..27a0c028ba33 100644

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

net/sched/sch_qfq.c +17 -5
index 1a1366b037fb..594c2ac319e0 100644

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

net/sctp/sm_sideeffect.c +4 -1
index 169819263c0b..87822421b99d 100644

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

net/unix/af_unix.c +1 -1
index 4def6e954e48..8d25d50f916e 100644

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

net/unix/scm.c +3 -3
index 6c10af6037e3..c4dde276fea5 100644

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

scripts/Makefile.ubsan +0 -1
index 8fd4d44fbcd1..b593b36ccff8 100644

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

security/keys/keyctl.c +8 -3
index 9394d72a77e8..9e52a3e0fc67 100644

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

security/smack/smackfs.c +1 -1
index a9c516362170..61e734baa332 100644

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

sound/core/pcm_compat.c +6 -2
index 6491afbb5fd5..6b8e64d053c1 100644

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

sound/core/seq/oss/seq_oss_midi.c +22 -13
index cc8f06638edc..7226c03f1593 100644

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

sound/pci/ac97/ac97_codec.c +2 -3
index e37eab3ddc73..5095048d5cea 100644

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

sound/soc/codecs/da7219-aad.c +2 -0
index 1d1d10dd92ae..793c8768f7c4 100644

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

sound/soc/codecs/es8316.c +1 -1
index fad918c44ec9..75a6b8b4e9c0 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.