Linux 4.9.276
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.9.276 kernel.
All users of the 4.9 kernel series must upgrade.
The updated 4.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.9.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/boot/dts/am335x-cm-t335.dts | 2 arch/arm/boot/dts/exynos5422-odroidxu4.dts | 2 arch/arm/boot/dts/exynos54xx-odroidxu-leds.dtsi | 4 arch/arm/boot/dts/r8a7779-marzen.dts | 2 arch/arm/boot/dts/r8a7779.dtsi | 1 arch/arm/boot/dts/sama5d4.dtsi | 2 arch/arm/probes/kprobes/test-thumb.c | 10 - arch/hexagon/kernel/vmlinux.lds.S | 7 - arch/ia64/kernel/mca_drv.c | 2 arch/mips/boot/compressed/Makefile | 4 arch/mips/boot/compressed/decompress.c | 2 arch/mips/include/asm/hugetlb.h | 8 + arch/mips/include/asm/pgalloc.h | 10 + arch/mips/vdso/vdso.h | 2 arch/powerpc/boot/devtree.c | 59 +++++----- arch/powerpc/boot/ns16550.c | 9 + arch/powerpc/include/asm/barrier.h | 2 arch/powerpc/include/asm/ps3.h | 2 arch/powerpc/platforms/ps3/mm.c | 12 ++ arch/s390/Kconfig | 2 arch/s390/kernel/setup.c | 2 arch/um/drivers/chan_user.c | 3 arch/um/drivers/slip_user.c | 3 arch/x86/include/asm/fpu/internal.h | 19 ++- arch/x86/kernel/fpu/regset.c | 2 arch/x86/kvm/cpuid.c | 8 + arch/x86/kvm/x86.c | 2 crypto/shash.c | 18 ++- drivers/acpi/Makefile | 5 drivers/acpi/acpi_amba.c | 1 drivers/acpi/bus.c | 1 drivers/acpi/device_sysfs.c | 2 drivers/acpi/processor_idle.c | 40 ++++++ drivers/ata/ahci_sunxi.c | 2 drivers/ata/pata_ep93xx.c | 2 drivers/ata/pata_octeon_cf.c | 5 drivers/ata/pata_rb532_cf.c | 6 - drivers/ata/sata_highbank.c | 6 - drivers/atm/iphase.c | 2 drivers/atm/nicstar.c | 26 ++-- drivers/block/virtio_blk.c | 2 drivers/bluetooth/btusb.c | 5 drivers/char/ipmi/ipmi_watchdog.c | 22 ++- drivers/char/pcmcia/cm4000_cs.c | 4 drivers/char/virtio_console.c | 4 drivers/clk/tegra/clk-pll.c | 6 - drivers/crypto/ixp4xx_crypto.c | 2 drivers/crypto/nx/nx-842-pseries.c | 9 + drivers/crypto/qat/qat_common/qat_hal.c | 6 - drivers/crypto/qat/qat_common/qat_uclo.c | 1 drivers/crypto/ux500/hash/hash_core.c | 1 drivers/extcon/extcon-max8997.c | 1 drivers/extcon/extcon-sm5502.c | 1 drivers/firmware/qemu_fw_cfg.c | 8 - drivers/gpio/gpio-zynq.c | 5 drivers/gpu/drm/qxl/qxl_dumb.c | 2 drivers/gpu/drm/virtio/virtgpu_kms.c | 1 drivers/hwmon/max31722.c | 9 - drivers/hwmon/max31790.c | 2 drivers/i2c/i2c-core.c | 3 drivers/iio/accel/bma180.c | 10 + drivers/iio/accel/bma220_spi.c | 10 + drivers/iio/accel/kxcjk-1013.c | 24 ++-- drivers/iio/accel/stk8312.c | 12 +- drivers/iio/accel/stk8ba50.c | 17 +- drivers/iio/adc/ti-ads1015.c | 12 +- drivers/iio/adc/vf610_adc.c | 10 + drivers/iio/gyro/bmg160_core.c | 10 + drivers/iio/humidity/am2315.c | 16 +- drivers/iio/imu/adis_buffer.c | 3 drivers/iio/light/isl29125.c | 10 + drivers/iio/light/ltr501.c | 15 +- drivers/iio/light/tcs3414.c | 10 + drivers/iio/proximity/pulsedlight-lidar-lite-v2.c | 10 + drivers/infiniband/core/cma.c | 3 drivers/infiniband/hw/cxgb4/qp.c | 1 drivers/infiniband/sw/rxe/rxe_mr.c | 2 drivers/infiniband/sw/rxe/rxe_net.c | 10 + drivers/input/joydev.c | 2 drivers/input/keyboard/hil_kbd.c | 1 drivers/input/touchscreen/usbtouchscreen.c | 8 - drivers/ipack/carriers/tpci200.c | 5 drivers/isdn/hardware/mISDN/hfcpci.c | 2 drivers/leds/leds-ktd2692.c | 27 +++- drivers/md/persistent-data/dm-btree-remove.c | 3 drivers/md/persistent-data/dm-space-map-disk.c | 9 + drivers/md/persistent-data/dm-space-map-metadata.c | 9 + drivers/media/common/siano/smscoreapi.c | 22 +-- drivers/media/common/siano/smscoreapi.h | 4 drivers/media/common/siano/smsdvb-main.c | 4 drivers/media/dvb-core/dvb_net.c | 25 +++- drivers/media/i2c/s5c73m3/s5c73m3-core.c | 6 - drivers/media/i2c/s5c73m3/s5c73m3.h | 2 drivers/media/i2c/s5k4ecgx.c | 10 - drivers/media/i2c/s5k5baf.c | 6 - drivers/media/i2c/s5k6aa.c | 10 - drivers/media/i2c/tc358743.c | 1 drivers/media/pci/bt8xx/bt878.c | 3 drivers/media/pci/cobalt/cobalt-driver.c | 1 drivers/media/pci/cobalt/cobalt-driver.h | 7 + drivers/media/platform/s5p-g2d/g2d.c | 3 drivers/media/platform/sti/hva/hva-hw.c | 3 drivers/media/usb/cpia2/cpia2.h | 1 drivers/media/usb/cpia2/cpia2_core.c | 12 ++ drivers/media/usb/cpia2/cpia2_usb.c | 13 +- drivers/media/usb/dvb-usb/cxusb.c | 2 drivers/media/usb/dvb-usb/dtv5100.c | 7 - drivers/media/usb/gspca/sq905.c | 2 drivers/media/usb/gspca/sunplus.c | 8 + drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 4 drivers/media/usb/uvc/uvc_video.c | 27 ++++ drivers/media/usb/zr364xx/zr364xx.c | 1 drivers/media/v4l2-core/v4l2-fh.c | 1 drivers/memory/fsl_ifc.c | 8 - drivers/mfd/da9052-i2c.c | 1 drivers/mfd/stmpe-i2c.c | 2 drivers/misc/ibmasm/module.c | 5 drivers/mmc/core/core.c | 7 - drivers/mmc/host/sdhci.c | 4 drivers/mmc/host/sdhci.h | 1 drivers/mmc/host/usdhi6rol0.c | 1 drivers/mmc/host/via-sdmmc.c | 3 drivers/mmc/host/vub300.c | 2 drivers/net/can/usb/ems_usb.c | 3 drivers/net/ethernet/aeroflex/greth.c | 3 drivers/net/ethernet/ezchip/nps_enet.c | 4 drivers/net/ethernet/ibm/ehea/ehea_main.c | 9 - drivers/net/ethernet/intel/e100.c | 12 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 2 drivers/net/ethernet/micrel/ks8842.c | 4 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 29 ++-- drivers/net/ethernet/sfc/ef10_sriov.c | 25 ++-- drivers/net/fjes/fjes_main.c | 4 drivers/net/vxlan.c | 2 drivers/net/wireless/ath/ath10k/mac.c | 1 drivers/net/wireless/ath/ath9k/main.c | 5 drivers/net/wireless/ath/carl9170/Kconfig | 8 - drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c | 8 + drivers/net/wireless/st/cw1200/cw1200_sdio.c | 1 drivers/net/wireless/ti/wl1251/cmd.c | 9 + drivers/net/wireless/ti/wl12xx/main.c | 7 + drivers/of/fdt.c | 8 - drivers/of/of_reserved_mem.c | 8 - drivers/pci/pci-label.c | 2 drivers/phy/phy-dm816x-usb.c | 17 ++ drivers/pinctrl/pinctrl-amd.c | 1 drivers/platform/x86/toshiba_acpi.c | 1 drivers/power/reset/gpio-poweroff.c | 1 drivers/power/supply/Kconfig | 3 drivers/power/supply/ab8500_btemp.c | 1 drivers/power/supply/ab8500_charger.c | 19 +++ drivers/power/supply/ab8500_fg.c | 1 drivers/power/supply/charger-manager.c | 1 drivers/power/supply/rt5033_battery.c | 7 + drivers/pwm/pwm-spear.c | 4 drivers/pwm/pwm-tegra.c | 13 -- drivers/regulator/da9052-regulator.c | 3 drivers/reset/core.c | 5 drivers/rtc/rtc-proc.c | 4 drivers/s390/char/sclp_vt220.c | 4 drivers/s390/cio/chp.c | 3 drivers/s390/cio/chsc.c | 2 drivers/scsi/FlashPoint.c | 32 ++--- drivers/scsi/be2iscsi/be_main.c | 1 drivers/scsi/hosts.c | 1 drivers/scsi/libiscsi.c | 7 - drivers/scsi/lpfc/lpfc_els.c | 9 + drivers/scsi/mpt3sas/mpt3sas_scsih.c | 4 drivers/scsi/scsi_lib.c | 1 drivers/scsi/scsi_transport_iscsi.c | 12 ++ drivers/spi/spi-loopback-test.c | 2 drivers/spi/spi-omap-100k.c | 2 drivers/spi/spi-sun6i.c | 6 - drivers/spi/spi-topcliff-pch.c | 4 drivers/ssb/sdio.c | 1 drivers/staging/gdm724x/gdm_lte.c | 20 ++- drivers/staging/media/s5p-cec/s5p_cec.c | 2 drivers/tty/nozomi.c | 9 + drivers/tty/serial/8250/serial_cs.c | 13 +- drivers/tty/serial/fsl_lpuart.c | 3 drivers/tty/serial/sh-sci.c | 8 + drivers/usb/class/cdc-acm.c | 5 drivers/usb/gadget/function/f_eem.c | 43 ++++++- drivers/usb/gadget/function/f_hid.c | 2 drivers/usb/gadget/legacy/hid.c | 4 drivers/video/backlight/lm3630a_bl.c | 12 +- drivers/watchdog/aspeed_wdt.c | 2 drivers/watchdog/lpc18xx_wdt.c | 2 drivers/watchdog/sbc60xxwdt.c | 2 drivers/watchdog/sc520_wdt.c | 2 drivers/watchdog/w83877f_wdt.c | 2 fs/btrfs/Kconfig | 2 fs/btrfs/delayed-inode.c | 8 + fs/btrfs/transaction.c | 6 - fs/ceph/addr.c | 10 - fs/configfs/file.c | 10 - fs/crypto/fname.c | 8 - fs/dlm/config.c | 9 + fs/dlm/lowcomms.c | 2 fs/ext4/extents.c | 3 fs/ext4/extents_status.c | 4 fs/ext4/ialloc.c | 11 - fs/fs-writeback.c | 34 +---- fs/fuse/dev.c | 11 + fs/jfs/inode.c | 3 fs/jfs/jfs_logmgr.c | 1 fs/nfs/nfs3proc.c | 4 fs/ntfs/inode.c | 2 fs/ocfs2/filecheck.c | 6 - fs/ocfs2/stackglue.c | 8 - fs/orangefs/super.c | 2 fs/reiserfs/journal.c | 14 ++ fs/seq_file.c | 3 fs/ubifs/dir.c | 7 + fs/udf/namei.c | 4 include/crypto/internal/hash.h | 8 - include/linux/mfd/abx500/ux500_chargalg.h | 2 include/linux/prandom.h | 2 include/scsi/scsi_transport_iscsi.h | 2 kernel/trace/trace_events_hist.c | 6 - lib/decompress_unlz4.c | 8 + lib/iov_iter.c | 2 lib/seq_buf.c | 8 + mm/huge_memory.c | 2 net/bluetooth/hci_core.c | 16 +- net/bluetooth/mgmt.c | 6 + net/can/bcm.c | 7 + net/can/gw.c | 3 net/core/dev.c | 11 + net/ipv6/output_core.c | 28 ---- net/mac80211/rx.c | 2 net/netfilter/nft_exthdr.c | 3 net/netlabel/netlabel_mgmt.c | 19 +-- net/sched/cls_tcindex.c | 2 net/sctp/input.c | 2 net/sunrpc/sched.c | 12 +- net/wireless/wext-spy.c | 14 +- net/xfrm/xfrm_user.c | 28 ++-- security/selinux/avc.c | 13 +- security/smack/smackfs.c | 2 sound/firewire/Kconfig | 5 sound/firewire/bebob/bebob.c | 5 sound/firewire/oxfw/oxfw.c | 2 sound/isa/cmi8330.c | 2 sound/isa/sb/sb16_csp.c | 8 + sound/pci/hda/hda_tegra.c | 3 sound/ppc/powermac.c | 6 - sound/soc/soc-core.c | 2 sound/soc/tegra/tegra_alc5632.c | 1 sound/soc/tegra/tegra_max98090.c | 1 sound/soc/tegra/tegra_rt5640.c | 1 sound/soc/tegra/tegra_rt5677.c | 1 sound/soc/tegra/tegra_sgtl5000.c | 1 sound/soc/tegra/tegra_wm8753.c | 1 sound/soc/tegra/tegra_wm8903.c | 1 sound/soc/tegra/tegra_wm9712.c | 1 sound/soc/tegra/trimslice.c | 1 sound/usb/format.c | 2 tools/testing/selftests/powerpc/pmu/ebb/no_handler_test.c | 2 tools/testing/selftests/x86/protection_keys.c | 3 261 files changed, 1148 insertions(+), 603 deletions(-)
Al Cooper (1):
mmc: sdhci: Fix warning message when accessing RPMB in HS400 mode
Al Viro (1):
iov_iter_fault_in_readable() should do nothing in xarray case
Alexander Aring (2):
fs: dlm: cancel work sync othercon
fs: dlm: fix memory leak when fenced
Alexander Larkin (1):
Input: joydev - prevent use of not validated data in JSIOCSBTNMAP ioctl
Andy Shevchenko (2):
net: pch_gbe: Propagate error from devm_gpio_request_one()
net: pch_gbe: Use proper accessors to BE data in pch_ptp_match()
Anirudh Rayabharam (2):
ext4: fix kernel infoleak via ext4_extent_header
media: pvrusb2: fix warning in pvr2_i2c_core_done
Ard Biesheuvel (1):
crypto: shash - avoid comparing pointers to exported functions under CFI
Arnd Bergmann (2):
ia64: mca_drv: fix incorrect array size calculation
mips: always link byteswap helpers into decompressor
Arturo Giusti (1):
udf: Fix NULL pointer dereference in udf_symlink function
Aswath Govindraju (1):
ARM: dts: am335x: align ti,pindir-d0-out-d1-in property with dt-shema
Athira Rajeev (1):
selftests/powerpc: Fix "no_handler" EBB selftest
Axel Lin (1):
regulator: da9052: Ensure enough delay time for .set_voltage_time_sel
Benjamin Drung (1):
media: uvcvideo: Fix pixel format change for Elgato Cam Link 4K
Benjamin Herrenschmidt (1):
powerpc/boot: Fixup device-tree on little endian
Bibo Mao (1):
hugetlb: clear huge pte during flush function on mips platform
Bixuan Cui (2):
crypto: nx - add missing MODULE_DEVICE_TABLE
power: reset: gpio-poweroff: add missing MODULE_DEVICE_TABLE
Christophe JAILLET (7):
brcmsmac: mac80211_if: Fix a resource leak in an error handling path
tty: nozomi: Fix a resource leak in an error handling function
tty: nozomi: Fix the error handling path of 'nozomi_card_init()'
phy: ti: dm816x: Fix the error handling path in 'dm816x_usb_phy_probe()
leds: ktd2692: Fix an error handling path
tty: serial: 8250: serial_cs: Fix a memory leak in error handling path
scsi: be2iscsi: Fix an error handling path in beiscsi_dev_probe()
Christophe Leroy (1):
btrfs: disable build on platforms having page size 256K
Chung-Chiang Cheng (1):
configfs: fix memleak in configfs_release_bin_file
Colin Ian King (1):
drm: qxl: ensure surf.data is ininitialized
Corentin Labbe (1):
crypto: ixp4xx - dma_unmap the correct address
Daehwan Jung (1):
ALSA: usb-audio: fix rate on Ozone Z90 USB headset
Dan Carpenter (4):
ocfs2: fix snprintf() checking
staging: gdm724x: check for buffer overflow in gdm_lte_multi_sdu_pkt()
staging: gdm724x: check for overflow in gdm_lte_netif_rx()
rtc: fix snprintf() checking in is_rtc_hctosys()
Dave Hansen (1):
selftests/vm/pkeys: fix alloc_random_pkey() to make it really, really random
David Sterba (1):
btrfs: clear defrag status of a root if starting transaction fails
Davis Mosenkovs (1):
mac80211: fix memory corruption in EAPOL handling
Desmond Cheong Zhi Xi (1):
ntfs: fix validity check for file name attribute
Dillon Min (1):
media: s5p-g2d: Fix a memory leak on ctx->fh.m2m_ctx
Dimitri John Ledkov (1):
lib/decompress_unlz4.c: correctly handle zero-padding around initrds.
Dinghao Liu (1):
i40e: Fix error handling in i40e_vsi_open
Dmitry Osipenko (2):
clk: tegra: Ensure that PLLU configuration is applied properly
ASoC: tegra: Set driver_name=tegra for all machine drivers
Dmitry Torokhov (1):
i2c: core: Disable client irq on reboot/shutdown
Eric Biggers (1):
fscrypt: don't ignore minor_hash when hash is 0
Eric Dumazet (1):
vxlan: add missing rcu_read_lock() in neigh_reduce()
Eric Sandeen (1):
seq_file: disallow extremely large seq buffer allocations
Evgeny Novikov (1):
media: st-hva: Fix potential NULL pointer dereferences
Gao Xiang (1):
nfs: fix acl memory leak of posix_acl_create()
Geert Uytterhoeven (2):
of: Fix truncation of memory sizes on 32-bit platforms
ARM: dts: r8a7779, marzen: Fix DU clock names
Geoff Levand (1):
powerpc/ps3: Add dma_mask to ps3_dma_region
Gerd Rausch (1):
RDMA/cma: Fix rdma_resolve_route() memory leak
Greg Kroah-Hartman (1):
Linux 4.9.276
Guenter Roeck (2):
hwmon: (max31722) Remove non-standard ACPI device IDs
hwmon: (max31790) Fix fan speed reporting for fan7..12
Gustavo A. R. Silva (2):
media: siano: Fix out-of-bounds warnings in smscore_load_firmware_family2()
wireless: wext-spy: Fix out-of-bounds warning
Hanjun Guo (1):
ACPI: bus: Call kobject_put() in acpi_init() error path
Hannu Hartikainen (1):
USB: cdc-acm: blacklist Heimann USB Appset device
Hans Verkuil (1):
media: cobalt: fix race condition in setting HPD
Herbert Xu (1):
crypto: nx - Fix RCU warning in nx842_OF_upd_status
Hou Tao (1):
dm btree remove: assign new_root only when removal succeeds
Huang Pei (1):
MIPS: add PMD table accounting into MIPS'pmd_alloc_one
Jack Xu (2):
crypto: qat - check return code of qat_hal_rd_rel_reg()
crypto: qat - remove unused macro in FW loader
James Smart (1):
scsi: lpfc: Fix "Unexpected timeout" error in direct attach topology
Jay Fang (2):
spi: spi-loopback-test: Fix 'tx_buf' might be 'rx_buf'
spi: spi-topcliff-pch: Fix potential double free in pch_spi_process_messages()
Jeff Layton (1):
ceph: remove bogus checks and WARN_ONs from ceph_set_page_dirty
Jesse Brandeburg (1):
e100: handle eeprom as little endian
Jiajun Cao (1):
ALSA: hda: Add IRQ check for platform_get_irq()
Jiapeng Chong (3):
platform/x86: toshiba_acpi: Fix missing error code in toshiba_acpi_setup_keyboard() RDMA/cxgb4: Fix missing error code in create_qp()
fs/jfs: Fix missing error code in lmLogInit()
Joe Thornber (1):
dm space maps: don't reset space map allocation cursor when committing
Johan Hovold (5):
Input: usbtouchscreen - fix control-request directions
mmc: vub3000: fix control-request direction
media: dtv5100: fix control-request directions
media: gspca/sq905: fix control-request direction
media: gspca/sunplus: fix zero-length control requests
Jonathan Cameron (12):
iio: accel: bma180: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
iio: accel: bma220: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
iio: accel: kxcjk-1013: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
iio: accel: stk8312: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
iio: accel: stk8ba50: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
iio: adc: ti-ads1015: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
iio: adc: vf610: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
iio: gyro: bmg160: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
iio: humidity: am2315: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
iio: prox: pulsed-light: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
iio: light: isl29125: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
iio: light: tcs3414: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
Josef Bacik (1):
btrfs: abort transaction if we fail to update the delayed inode
Kai-Heng Feng (1):
Bluetooth: Shutdown controller after workqueues are flushed or cancelled
Kamal Heib (1):
RDMA/rxe: Fix failure during driver load
Krzysztof Kozlowski (4):
ARM: dts: exynos: fix PWM LED max brightness on Odroid XU/XU3
ARM: dts: exynos: fix PWM LED max brightness on Odroid XU4
memory: fsl_ifc: fix leak of IO mapping on probe failure
memory: fsl_ifc: fix leak of private memory on probe failure
Krzysztof Wilczyński (2):
ACPI: sysfs: Fix a buffer overrun problem with description_show() PCI/sysfs: Fix dsm_label_utf16s_to_utf8s() buffer overrun
Lai Jiangshan (1):
KVM: X86: Disable hardware breakpoints unconditionally before kvm_x86->run()
Lee Gibson (1):
wl1251: Fix possible buffer overflow in wl1251_cmd_scan
Liguang Zhang (1):
ACPI: AMBA: Fix resource name in /proc/iomem
Linus Walleij (2):
power: supply: ab8500: Fix an old bug
power: supply: ab8500: Avoid NULL pointers
Linyu Yuan (1):
usb: gadget: eem: fix echo command packet response issue
Liu Shixin (1):
netlabel: Fix memory leak in netlbl_mgmt_add_common
Ludovic Desroches (1):
ARM: dts: at91: sama5d4: fix pinctrl muxing
Luiz Augusto von Dentz (1):
Bluetooth: mgmt: Fix slab-out-of-bounds in tlv_data_is_valid
Lv Yunlong (3):
media: v4l2-core: Avoid the dangling pointer in v4l2_fh_release ipack/carriers/tpci200: Fix a double free in tpci200_pci_probe misc/libmasm/module: Fix two use after free in ibmasm_init_one
Marc Kleine-Budde (1):
iio: ltr501: mark register holding upper 8 bits of ALS_DATA{0,1} and PS_DATA as volatile, too
Marcelo Ricardo Leitner (1):
sctp: add size validation when walking chunks
Marek Szyprowski (1):
extcon: max8997: Add missing modalias string
Mario Limonciello (1):
ACPI: processor idle: Fix up C-state latency if not ordered
Martin Fäcknitz (1):
MIPS: vdso: Invalid GIC access through VDSO
Mauro Carvalho Chehab (3):
media: dvb_net: avoid speculation from net slot
media: siano: fix device register error path
media: s5p_cec: decrement usage count if disabled
Maximilian Luz (1):
pinctrl/amd: Add device HID for new AMD GPIO controller
Miaohe Lin (1):
mm/huge_memory.c: don't discard hugepage if other processes are mapping it
Michael Buesch (1):
ssb: sdio: Don't overwrite const buffer if block_write fails
Mike Christie (1):
scsi: iscsi: Add iscsi_cls_conn refcount helpers
Mike Marshall (1):
orangefs: fix orangefs df output.
Miklos Szeredi (2):
fuse: check connected before queueing on fpq->io
fuse: reject internal errno
Minchan Kim (1):
selinux: use __GFP_NOWARN with GFP_NOWAIT in the AVC
Mirko Vogt (1):
spi: spi-sun6i: Fix chipselect/clock bug
Muchun Song (1):
writeback: fix obtain a reference to a freeing memcg css
Nathan Chancellor (3):
powerpc/barrier: Avoid collision with clang's __lwsync macro
qemu_fw_cfg: Make fw_cfg_rev_attr a proper kobj_attribute
hexagon: use common DISCARDS macro
Nick Desaulniers (1):
ARM: 9087/1: kprobes: test-thumb: fix for LLVM_IAS=1
Nuno Sa (1):
iio: adis_buffer: do not return ints in irq handlers
Oliver Hartkopp (1):
can: gw: synchronize rcu operations before removing gw job entry
Oliver Lang (2):
iio: ltr501: ltr559: fix initialization of LTR501_ALS_CONTR
iio: ltr501: ltr501_read_ps(): add missing endianness conversion
Ondrej Zary (2):
serial_cs: Add Option International GSM-Ready 56K/ISDN modem
serial_cs: remove wrong GLOBETROTTER.cis entry
Pablo Neira Ayuso (1):
netfilter: nft_exthdr: check for IPv6 packet before further processing
Pali Rohár (1):
ath9k: Fix kernel NULL pointer dereference during ath_reset_internal()
Pan Dong (1):
ext4: fix avefreec in find_group_orlov
Pavel Skripkin (10):
media: dvb-usb: fix wrong definition
net: can: ems_usb: fix use-after-free in ems_usb_disconnect()
media: cpia2: fix memory leak in cpia2_usb_probe
net: ethernet: aeroflex: fix UAF in greth_of_remove
net: ethernet: ezchip: fix UAF in nps_enet_remove
net: ethernet: ezchip: fix error handling
net: sched: fix warning in tcindex_alloc_perfect_hash
reiserfs: add check for invalid 1st journal block
media: zr364xx: fix memory leak in zr364xx_start_readpipe
jfs: fix GPF in diFree
Petr Pavlu (1):
ipmi/watchdog: Stop watchdog timer when the current action is 'none'
Philipp Zabel (1):
reset: bail if try_module_get() fails
Quat Le (1):
scsi: core: Retry I/O for Notify (Enable Spinup) Required error
Randy Dunlap (5):
media: I2C: change 'RST' to "RSET" to fix multiple build errors
wireless: carl9170: fix LEDS build errors & warnings
scsi: FlashPoint: Rename si_flags field
s390: appldata depends on PROC_SYSCTL
mips: disable branch profiling in boot/decompress.o
Richard Fitzgerald (2):
random32: Fix implicit truncation warning in prandom_seed_state()
ACPI: tables: Add custom DSDT file as makefile prerequisite
Ruslan Bilovol (1):
usb: gadget: f_hid: fix endianness issue with descriptors
Sean Christopherson (1):
KVM: x86: Use guest MAXPHYADDR from CPUID.0x8000_0008 iff TDP is enabled
Sebastian Andrzej Siewior (1):
net: Treat __napi_schedule_irqoff() as __napi_schedule() on PREEMPT_RT
Sergey Shtylyov (4):
sata_highbank: fix deferred probing
pata_rb532_cf: fix deferred probing
pata_octeon_cf: avoid WARN_ON() in ata_host_activate()
pata_ep93xx: fix deferred probing
Sherry Sun (1):
tty: serial: fsl_lpuart: fix the potential risk of division or modulo by zero
Srinivas Neeli (1):
gpio: zynq: Check return value of pm_runtime_get_sync
Steffen Klassert (1):
xfrm: Fix error reporting in xfrm_state_construct.
Stephan Gerhold (2):
extcon: sm5502: Drop invalid register write in sm5502_reg_data
power: supply: rt5033_battery: Fix device tree enumeration
Steven Rostedt (VMware) (1):
tracing: Do not reference char * as a string in histograms
Takashi Iwai (1):
ALSA: sb: Fix potential double-free of CSP mixer elements
Takashi Sakamoto (2):
Revert "ALSA: bebob/oxfw: fix Kconfig entry for Mackie d.2 Pro"
ALSA: bebob: add support for ToneWeal FW66
Tao Ren (1):
watchdog: aspeed: fix hardware timeout calculation
Tetsuo Handa (1):
smackfs: restrict bytes count in smk_set_cipso()
Thadeu Lima de Souza Cascardo (1):
can: bcm: delay release of struct bcm_op after synchronize_rcu()
Thomas Gleixner (2):
x86/fpu: Return proper error codes from user access functions x86/fpu: Limit xstate copy size in xstateregs_set()
Tian Tao (1):
spi: omap-100k: Fix the length judgment problem
Tim Jiang (1):
Bluetooth: btusb: fix bt fiwmare downloading failure issue for qca btsoc.
Timo Sigurdsson (1):
ata: ahci_sunxi: Disable DIPM
Tony Lindgren (1):
wlcore/wl12xx: Fix wl12xx get_mac error if device is in ELP
Tyrel Datwyler (1):
scsi: core: Fix bad pointer dereference when ehandler kthread is invalid
Uwe Kleine-König (3):
backlight: lm3630a: Fix return code of .update_status() callback
pwm: spear: Don't modify HW state in .remove callback
pwm: tegra: Don't modify HW state in .remove callback
Valentin Vidic (1):
s390/sclp_vt220: fix console name to match device
Vineeth Vijayan (1):
s390/cio: dont call css_wait_for_slow_path() inside a lock
Willy Tarreau (1):
ipv6: use prandom_u32() for ID generation
Wolfram Sang (1):
mmc: core: clear flags before allowing to retune
Xiao Yang (1):
RDMA/rxe: Don't overwrite errno from ib_umem_get()
Xie Yongji (3):
drm/virtio: Fix double free on probe failure
virtio-blk: Fix memory leak among suspend/resume procedure
virtio_console: Assure used length from device is limited
Yang Li (1):
ath10k: Fix an error code in ath10k_add_interface()
Yang Yingliang (4):
net: micrel: check return value after calling platform_get_resource()
fjes: check return value after calling platform_get_resource()
ALSA: ppc: fix error return code in snd_pmac_probe()
usb: gadget: hid: fix error return code in hid_bind()
Yoshihiro Shimoda (1):
serial: sh-sci: Stop dmaengine transfer in sci_stop_tx()
Yu Kuai (1):
char: pcmcia: error out if 'num_bytes_read' is greater than 4 in set_protocol()
Yu Liu (1):
Bluetooth: Fix the HCI to MGMT status conversion table
Yun Zhou (2):
seq_buf: Make trace_seq_putmem_hex() support data longer than 8
seq_buf: Fix overflow in seq_buf_putmem_hex()
Zhang Xiaoxu (2):
SUNRPC: Fix the batch tasks count wraparound.
SUNRPC: Should wake up the privileged task firstly.
Zhang Yi (2):
ext4: correct the cache_nr in tracepoint ext4_es_shrink_exit
ext4: remove check for zero nr_to_scan in ext4_es_scan()
Zhen Lei (10):
crypto: ux500 - Fix error return code in hash_hw_final()
media: tc358743: Fix error return code in tc358743_probe_of()
mmc: usdhi6rol0: fix error return code in usdhi6_probe()
ehea: fix error return code in ehea_restart_qps()
Input: hil_kbd - fix error return code in hil_dev_connect()
scsi: mpt3sas: Fix error return value in _scsih_expander_add()
ASoC: soc-core: Fix the error return code in snd_soc_of_parse_audio_routing()
um: fix error return code in slip_open()
um: fix error return code in winch_tramp()
ALSA: isa: Fix error return code in snd_cmi8330_probe()
Zheyu Ma (4):
media: bt8xx: Fix a missing check bug in bt878_probe
mmc: via-sdmmc: add a check against NULL pointer dereference
atm: nicstar: use 'dma_free_coherent' instead of 'kfree'
atm: nicstar: register the interrupt handler in the right place
Zhihao Cheng (1):
ubifs: Set/Clear I_LINKABLE under i_lock for whiteout inode
Zou Wei (10):
atm: iphase: fix possible use-after-free in ia_module_exit()
mISDN: fix possible use-after-free in HFC_cleanup()
atm: nicstar: Fix possible use-after-free in nicstar_cleanup()
cw1200: add missing MODULE_DEVICE_TABLE
mfd: da9052/stmpe: Add and modify MODULE_DEVICE_TABLE
watchdog: Fix possible use-after-free in wdt_startup()
watchdog: sc520_wdt: Fix possible use-after-free in wdt_turnoff()
watchdog: Fix possible use-after-free by calling del_timer_sync()
power: supply: charger-manager: add missing MODULE_DEVICE_TABLE
power: supply: ab8500: add missing MODULE_DEVICE_TABLE
zhangyi (F) (1):
block_dump: remove block_dump feature in mark_inode_dirty()
Íñigo Huguet (2):
sfc: avoid double pci_remove of VFs
sfc: error code if SRIOV cannot be disabled
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 275 +SUBLEVEL = 276 EXTRAVERSION = NAME = Roaring Lionus
arch/arm/boot/dts/am335x-cm-t335.dts +1 -1
@@ -552,7 +552,7 @@ status = "okay"; status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&spi0_pins>; - ti,pindir-d0-out-d1-in = <1>; + ti,pindir-d0-out-d1-in; /* WLS1271 WiFi */ wlcore: wlcore@1 { compatible = "ti,wl1271";
arch/arm/boot/dts/exynos5422-odroidxu4.dts +1 -1
@@ -26,7 +26,7 @@ label = "blue:heartbeat"; pwms = <&pwm 2 2000000 0>; pwm-names = "pwm2"; - max_brightness = <255>; + max-brightness = <255>; linux,default-trigger = "heartbeat"; }; };
arch/arm/boot/dts/exynos54xx-odroidxu-leds.dtsi +2 -2
@@ -25,7 +25,7 @@ * Green LED is much brighter than the others * so limit its max brightness */ - max_brightness = <127>; + max-brightness = <127>; linux,default-trigger = "mmc0"; };
@@ -33,7 +33,7 @@ label = "blue:heartbeat"; pwms = <&pwm 2 2000000 0>; pwm-names = "pwm2"; - max_brightness = <255>; + max-brightness = <255>; linux,default-trigger = "heartbeat"; }; };
arch/arm/boot/dts/r8a7779-marzen.dts +1 -1
@@ -136,7 +136,7 @@ status = "okay"; clocks = <&mstp1_clks R8A7779_CLK_DU>, <&x3_clk>; - clock-names = "du", "dclkin.0"; + clock-names = "du.0", "dclkin.0"; ports { port@0 {
arch/arm/boot/dts/r8a7779.dtsi +1 -0
@@ -431,6 +431,7 @@ reg = <0 0xfff80000 0 0x40000>; interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; clocks = <&mstp1_clks R8A7779_CLK_DU>; + clock-names = "du.0"; power-domains = <&sysc R8A7779_PD_ALWAYS_ON>; status = "disabled";
arch/arm/boot/dts/sama5d4.dtsi +1 -1
@@ -1371,7 +1371,7 @@ 0xffffffff 0x3ffcfe7c 0x1c010101 /* pioA */ 0x7fffffff 0xfffccc3a 0x3f00cc3a /* pioB */ 0xffffffff 0x3ff83fff 0xff00ffff /* pioC */ - 0x0003ff00 0x8002a800 0x00000000 /* pioD */ + 0xb003ff00 0x8002a800 0x00000000 /* pioD */ 0xffffffff 0x7fffffff 0x76fff1bf /* pioE */ >;
arch/arm/probes/kprobes/test-thumb.c +5 -5
@@ -444,21 +444,21 @@ void kprobe_thumb32_test_cases(void) "3: mvn r0, r0 \n\t" "2: nop \n\t") - TEST_RX("tbh [pc, r",7, (9f-(1f+4))>>1,"]", + TEST_RX("tbh [pc, r",7, (9f-(1f+4))>>1,", lsl #1]", "9: \n\t" ".short (2f-1b-4)>>1 \n\t" ".short (3f-1b-4)>>1 \n\t" "3: mvn r0, r0 \n\t" "2: nop \n\t") - TEST_RX("tbh [pc, r",12, ((9f-(1f+4))>>1)+1,"]", + TEST_RX("tbh [pc, r",12, ((9f-(1f+4))>>1)+1,", lsl #1]", "9: \n\t" ".short (2f-1b-4)>>1 \n\t" ".short (3f-1b-4)>>1 \n\t" "3: mvn r0, r0 \n\t" "2: nop \n\t") -TEST_RRX ("tbh [r" ,1 ,9f ,", r" ,14 ,1 ,"]" , +TEST_RRX ("tbh [r" ,1 ,9f ,", r" ,14 ,1 ,", lsl #1]" ,"9: \n\t" ".short (2f-1b-4)>>1 \n\t" ".short (3f-1b-4)>>1 \n\t"
@@ -471,10 +471,10 @@ void kprobe_thumb32_test_cases(void) TEST_UNSUPPORTED("strexb r0, r1, [r2]") TEST_UNSUPPORTED("strexh r0, r1, [r2]") - TEST_UNSUPPORTED("strexd r0, r1, [r2]") + TEST_UNSUPPORTED("strexd r0, r1, r2, [r2]") TEST_UNSUPPORTED("ldrexb r0, [r1]") TEST_UNSUPPORTED("ldrexh r0, [r1]") - TEST_UNSUPPORTED("ldrexd r0, [r1]") + TEST_UNSUPPORTED("ldrexd r0, r1, [r1]")TEST_GROUP ("Data-processing (shifted register) and (modified immediate)" )
arch/hexagon/kernel/vmlinux.lds.S +1 -6
@@ -71,13 +71,8 @@ SECTIONS _end = .; - /DISCARD/ : { - EXIT_TEXT - EXIT_DATA - EXIT_CALL - } - STABS_DEBUG DWARF_DEBUG + DISCARDS }
arch/ia64/kernel/mca_drv.c +1 -1
@@ -343,7 +343,7 @@ init_record_index_pools(void)/* - 2 - */ sect_min_size = sal_log_sect_min_sizes[0 ]; -for (i =1 ; i <sizeof sal_log_sect_min_sizes/sizeof (size_t ); i++) +for (i =1 ; i <ARRAY_SIZE (sal_log_sect_min_sizes); i++)if (sect_min_size > sal_log_sect_min_sizes[i]) sect_min_size = sal_log_sect_min_sizes[i];
arch/mips/boot/compressed/Makefile +2 -2
@@ -33,7 +33,7 @@ KBUILD_AFLAGS := $(LINUXINCLUDE) $(KBUILD_AFLAGS) -D__ASSEMBLY__ \ KCOV_INSTRUMENT := n # decompressor objects (linked with vmlinuz) -vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o +vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o $(obj)/bswapsi.o ifdef CONFIG_DEBUG_ZBOOT vmlinuzobjs-$(CONFIG_DEBUG_ZBOOT) += $(obj)/dbg.o
@@ -47,7 +47,7 @@ extra-y += uart-ath79.c $(obj)/uart-ath79.c: $(srctree)/arch/mips/ath79/early_printk.c $(call cmd,shipped) -vmlinuzobjs-$(CONFIG_KERNEL_XZ) += $(obj)/ashldi3.o $(obj)/bswapsi.o +vmlinuzobjs-$(CONFIG_KERNEL_XZ) += $(obj)/ashldi3.o extra-y += ashldi3.c bswapsi.c $(obj)/ashldi3.o $(obj)/bswapsi.o: KBUILD_CFLAGS += -I$(srctree)/arch/mips/lib
arch/mips/boot/compressed/decompress.c +2 -0
@@ -11,6 +11,8 @@* option) any later version. */ +#define DISABLE_BRANCH_PROFILING +#include <linux/types.h> #include <linux/kernel.h> #include <linux/string.h>
arch/mips/include/asm/hugetlb.h +7 -1
@@ -67,7 +67,13 @@ static inline pte_t huge_ptep_get_and_clear(struct mm_struct *mm,static inline void huge_ptep_clear_flush (struct vm_area_struct *vma,unsigned long addr,pte_t *ptep) { -flush_tlb_page (vma, addr &huge_page_mask (hstate_vma (vma))); +/* +* clear the huge pte entry firstly, so that the other smp threads will +* not get old pte entry after finishing flush_tlb_page and before +* setting new huge pte entry +*/ +huge_ptep_get_and_clear (vma->vm_mm, addr, ptep); +flush_tlb_page (vma, addr); }static inline int huge_pte_none (pte_t pte)
arch/mips/include/asm/pgalloc.h +7 -3
@@ -107,11 +107,15 @@ do { \static inline pmd_t *pmd_alloc_one (struct mm_struct *mm,unsigned long address) { -pmd_t *pmd; +pmd_t *pmd =NULL ; +struct page *pg; - pmd = (pmd_t *)__get_free_pages (GFP_KERNEL ,PMD_ORDER ); -if (pmd) + pg =alloc_pages (GFP_KERNEL | __GFP_ACCOUNT,PMD_ORDER ); +if (pg) { +pgtable_pmd_page_ctor (pg); + pmd = (pmd_t *)page_address (pg);pmd_init ((unsigned long )pmd, (unsigned long )invalid_pte_table); + }return pmd; }
arch/mips/vdso/vdso.h +1 -1
@@ -81,7 +81,7 @@ static inline const union mips_vdso_data *get_vdso_data(void)static inline void __iomem *get_gic (const union mips_vdso_data *data) { -return (void __iomem *)data -PAGE_SIZE ; +return (void __iomem *)((unsigned long )data &PAGE_MASK ) -PAGE_SIZE ; }#endif /* CONFIG_CLKSRC_MIPS_GIC */
arch/powerpc/boot/devtree.c +34 -25
165 lines not on this page · raw message
arch/powerpc/boot/ns16550.c +7 -2
@@ -14,6 +14,7 @@#include "stdio.h" #include "io.h" #include "ops.h" +#include "of.h" #define UART_DLL 0/* Out: Divisor Latch Low */ #define UART_DLM 1/* Out: Divisor Latch High */
@@ -57,16 +58,20 @@ int ns16550_console_init(void *devp, struct serial_console_data *scdp)int n;u32 reg_offset; -if (dt_get_virtual_reg (devp, (void **)®_base,1 ) <1 ) +if (dt_get_virtual_reg (devp, (void **)®_base,1 ) <1 ) { +printf ("virt reg parse fail...\r\n" );return -1 ; + } n =getprop (devp,"reg-offset" , ®_offset,sizeof (reg_offset));if (n ==sizeof (reg_offset)) - reg_base += reg_offset; + reg_base +=be32_to_cpu (reg_offset); n =getprop (devp,"reg-shift" , ®_shift,sizeof (reg_shift));if (n !=sizeof (reg_shift)) reg_shift =0 ; +else + reg_shift =be32_to_cpu (reg_shift); scdp->open = ns16550_open; scdp->putc = ns16550_putc;
arch/powerpc/include/asm/barrier.h +2 -0
@@ -41,6 +41,8 @@# define SMPWMB eieio#endif +/* clang defines this macro for a builtin, which will not work with runtime patching */ +#undef __lwsync#define __lwsync () __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory")#define dma_rmb () __lwsync()#define dma_wmb () __asm__ __volatile__ (stringify_in_c(SMPWMB) : : :"memory")
arch/powerpc/include/asm/ps3.h +2 -0
@@ -83,6 +83,7 @@ struct ps3_dma_region_ops;* @bus_addr: The 'translated' bus address of the region. * @len: The length in bytes of the region. * @offset: The offset from the start of memory of the region. +* @dma_mask: Device dma_mask. * @ioid: The IOID of the device who owns this region * @chunk_list: Opaque variable used by the ioc page manager. * @region_ops: struct ps3_dma_region_ops - dma region operations
@@ -97,6 +98,7 @@ struct ps3_dma_region {enum ps3_dma_region_type region_type;unsigned long len;unsigned long offset; +u64 dma_mask;/* driver variables (set by ps3_dma_region_create) */ unsigned long bus_addr;
arch/powerpc/platforms/ps3/mm.c +12 -0
@@ -18,6 +18,7 @@* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <linux/dma-mapping.h> #include <linux/kernel.h> #include <linux/export.h> #include <linux/memblock.h>
@@ -1132,6 +1133,7 @@ int ps3_dma_region_init(struct ps3_system_bus_device *dev, enum ps3_dma_region_type region_type, void *addr, unsigned long len) { unsigned long lpar_addr; +int result; lpar_addr = addr ?ps3_mm_phys_to_lpar (__pa (addr)) :0 ;
@@ -1143,6 +1145,16 @@ int ps3_dma_region_init(struct ps3_system_bus_device *dev, r->offset -= map.r1.offset; r->len = len ? len :_ALIGN_UP (map.total,1 << r->page_size); + dev->core.dma_mask = &r->dma_mask; + + result =dma_set_mask_and_coherent (&dev->core,DMA_BIT_MASK (32 )); + +if (result <0 ) { +dev_err (&dev->core,"%s:%d: dma_set_mask_and_coherent failed: %d\n" , + __func__, __LINE__, result); +return result; + } +switch (dev->dev_type) {case PS3_DEVICE_TYPE_SB : r->region_ops = (USE_DYNAMIC_DMA )
arch/s390/Kconfig +1 -1
@@ -833,7 +833,7 @@ config CMM_IUCV config APPLDATA_BASE def_bool n prompt "Linux - VM Monitor Stream, base infrastructure" - depends on PROC_FS + depends on PROC_SYSCTL help This provides a kernel interface for creating and updating z/VM APPLDATA monitor records. The monitor records are updated at certain time
arch/s390/kernel/setup.c +1 -1
@@ -137,7 +137,7 @@ static void __init set_preferred_console(void)else if (CONSOLE_IS_3270 )add_preferred_console ("tty3270" ,0 ,NULL );else if (CONSOLE_IS_VT220 ) -add_preferred_console ("ttyS" ,1 ,NULL ); +add_preferred_console ("ttysclp" ,0 ,NULL );else if (CONSOLE_IS_HVC )add_preferred_console ("hvc" ,0 ,NULL ); }
arch/um/drivers/chan_user.c +2 -1
@@ -256,7 +256,8 @@ static int winch_tramp(int fd, struct tty_port *port, int *fd_out, goto out_close; } -if (os_set_fd_block (*fd_out,0 )) { + err =os_set_fd_block (*fd_out,0 ); +if (err) {printk (UM_KERN_ERR "winch_tramp: failed to set thread_fd " "non-blocking.\n" ); goto out_close;
arch/um/drivers/slip_user.c +2 -1
@@ -145,7 +145,8 @@ static int slip_open(void *data) } sfd = err; -if (set_up_tty (sfd)) + err =set_up_tty (sfd); +if (err) goto out_close2; pri->slave = sfd;
arch/x86/include/asm/fpu/internal.h +12 -7
@@ -94,6 +94,7 @@ static inline void fpstate_init_fxstate(struct fxregs_state *fx) }extern void fpstate_sanitize_xstate (struct fpu *fpu); +/* Returns 0 or the negated trap number, which results in -EFAULT for #PF */ #define user_insn(insn, output, input...) \ ({ \ int err; \
@@ -101,14 +102,14 @@ extern void fpstate_sanitize_xstate(struct fpu *fpu);might_fault (); \ \ asm volatile(ASM_STAC "\n" \ - "1:" #insn "\n\t" \ + "1: " #insn "\n" \ "2: " ASM_CLAC "\n" \ ".section .fixup,\"ax\"\n" \ - "3: movl $-1,%[err]\n" \ + "3: negl %%eax\n" \ " jmp 2b\n" \ ".previous\n" \ - _ASM_EXTABLE(1b, 3b) \ - : [err] "=r" (err), output \ + _ASM_EXTABLE_FAULT(1b, 3b) \ + : [err] "=a" (err), output \ : "0"(0), input); \ err; \ })
@@ -227,16 +228,20 @@ static inline void copy_fxregs_to_kernel(struct fpu *fpu)#define XRSTOR ".byte " REX_PREFIX "0x0f,0xae,0x2f"#define XRSTORS ".byte " REX_PREFIX "0x0f,0xc7,0x1f" +/* +* After this @err contains 0 on success or the negated trap number when +* the operation raises an exception. For faults this results in -EFAULT. +*/ #define XSTATE_OP (op, st, lmask, hmask, err) \ asm volatile("1:" op "\n\t" \ "xor %[err], %[err]\n" \ "2:\n\t" \ ".pushsection .fixup,\"ax\"\n\t" \ - "3: movl $-2,%[err]\n\t" \ + "3: negl %%eax\n\t" \ "jmp 2b\n\t" \ ".popsection\n\t" \ - _ASM_EXTABLE(1b, 3b) \ - : [err] "=r" (err) \ + _ASM_EXTABLE_FAULT(1b, 3b) \ + : [err] "=a" (err) \ : "D" (st), "m" (*st), "a" (lmask), "d" (hmask) \ : "memory")
arch/x86/kernel/fpu/regset.c +1 -1
@@ -123,7 +123,7 @@ int xstateregs_set(struct task_struct *target, const struct user_regset *regset,/* * A whole standard-format XSAVE buffer is needed: */ -if ((pos !=0 ) || (count < fpu_user_xstate_size)) +if (pos !=0 || count != fpu_user_xstate_size)return -EFAULT ; xsave = &fpu->state.xsave;
arch/x86/kvm/cpuid.c +7 -1
@@ -633,8 +633,14 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,unsigned virt_as =max ((entry->eax >>8 ) &0xff ,48U );unsigned phys_as = entry->eax &0xff ; -if (!g_phys_as) +/* +* Use bare metal's MAXPHADDR if the CPU doesn't report guest +* MAXPHYADDR separately, or if TDP (NPT) is disabled, as the +* guest version "applies only to guests using nested paging". +*/ +if (!g_phys_as || !tdp_enabled) g_phys_as = phys_as; + entry->eax = g_phys_as | (virt_as <<8 ); entry->edx =0 ;/*
arch/x86/kvm/x86.c +2 -0
@@ -7044,6 +7044,8 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)set_debugreg (vcpu->arch.eff_db[3 ],3 );set_debugreg (vcpu->arch.dr6,6 ); vcpu->arch.switch_db_regs &= ~KVM_DEBUGREG_RELOAD ; + }else if (unlikely (hw_breakpoint_active ())) { +set_debugreg (0 ,7 ); } kvm_x86_ops->run (vcpu);
crypto/shash.c +15 -3
@@ -24,12 +24,24 @@static const struct crypto_type crypto_shash_type; -int shash_no_setkey (struct crypto_shash *tfm,const u8 *key, -unsigned int keylen) +static int shash_no_setkey (struct crypto_shash *tfm,const u8 *key, +unsigned int keylen) {return -ENOSYS ; } -EXPORT_SYMBOL_GPL (shash_no_setkey); + +/* +* Check whether an shash algorithm has a setkey function. +* +* For CFI compatibility, this must not be an inline function. This is because +* when CFI is enabled, modules won't get the same address for shash_no_setkey +* (if it were exported, which inlining would require) as the core kernel will. +*/ +bool crypto_shash_alg_has_setkey (struct shash_alg *alg) +{ +return alg->setkey != shash_no_setkey; +} +EXPORT_SYMBOL_GPL (crypto_shash_alg_has_setkey);static int shash_setkey_unaligned (struct crypto_shash *tfm,const u8 *key,unsigned int keylen)
drivers/acpi/Makefile +5 -0
@@ -7,6 +7,11 @@ ccflags-$(CONFIG_ACPI_DEBUG) += -DACPI_DEBUG_OUTPUT # # ACPI Boot-Time Table Parsing # +ifeq ($(CONFIG_ACPI_CUSTOM_DSDT),y) +tables.o: $(src)/../../include/$(subst $\",,$(CONFIG_ACPI_CUSTOM_DSDT_FILE)) ; + +endif + obj-$(CONFIG_ACPI) += tables.o obj-$(CONFIG_X86) += blacklist.o
drivers/acpi/acpi_amba.c +1 -0
@@ -70,6 +70,7 @@ static int amba_handler_attach(struct acpi_device *adev,case IORESOURCE_MEM :if (!address_found) { dev->res = *rentry->res; + dev->res.name =dev_name (&dev->dev); address_found = true; }break ;
drivers/acpi/bus.c +1 -0
@@ -1184,6 +1184,7 @@ static int __init acpi_init(void)init_acpi_device_notify (); result =acpi_bus_init ();if (result) { +kobject_put (acpi_kobj);disable_acpi ();return result; }
drivers/acpi/device_sysfs.c +1 -1
@@ -452,7 +452,7 @@ static ssize_t description_show(struct device *dev, (wchar_t *)acpi_dev->pnp.str_obj->buffer.pointer, acpi_dev->pnp.str_obj->buffer.length,UTF16_LITTLE_ENDIAN , buf, - PAGE_SIZE); + PAGE_SIZE - 1); buf[result++] ='\n' ;
drivers/acpi/processor_idle.c +40 -0
@@ -29,6 +29,7 @@#include <linux/acpi.h> #include <linux/dmi.h> #include <linux/sched.h> /* need_resched() */ +#include <linux/sort.h> #include <linux/tick.h> #include <linux/cpuidle.h> #include <linux/cpu.h>
@@ -538,10 +539,37 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr,return ; } +static int acpi_cst_latency_cmp (const void *a,const void *b) +{ +const struct acpi_processor_cx *x = a, *y = b; + +if (!(x->valid && y->valid)) +return 0 ; +if (x->latency > y->latency) +return 1 ; +if (x->latency < y->latency) +return -1 ; +return 0 ; +} +static void acpi_cst_latency_swap (void *a,void *b,int n) +{ +struct acpi_processor_cx *x = a, *y = b; +u32 tmp; + +if (!(x->valid && y->valid)) +return ; + tmp = x->latency; + x->latency = y->latency; + y->latency = tmp; +} +static int acpi_processor_power_verify (struct acpi_processor *pr) {unsigned int i;unsigned int working =0 ; +unsigned int last_latency =0 ; +unsigned int last_type =0 ; +bool buggy_latency = false; pr->power.timer_broadcast_on_state =INT_MAX ;
@@ -565,12 +593,24 @@ static int acpi_processor_power_verify(struct acpi_processor *pr) }if (!cx->valid)continue ; +if (cx->type >= last_type && cx->latency < last_latency) + buggy_latency = true; + last_latency = cx->latency; + last_type = cx->type;lapic_timer_check_state (i, pr, cx);tsc_check_state (cx->type); working++; } +if (buggy_latency) { +pr_notice ("FW issue: working around C-state latencies out of order\n" ); +sort (&pr->power.states[1 ], max_cstate, +sizeof (struct acpi_processor_cx ), + acpi_cst_latency_cmp, + acpi_cst_latency_swap); + } +lapic_timer_propagate_broadcast (pr);return (working);
drivers/ata/ahci_sunxi.c +1 -1
@@ -165,7 +165,7 @@ static void ahci_sunxi_start_engine(struct ata_port *ap) }static const struct ata_port_info ahci_sunxi_port_info = { - .flags =AHCI_FLAG_COMMON |ATA_FLAG_NCQ , + .flags =AHCI_FLAG_COMMON |ATA_FLAG_NCQ |ATA_FLAG_NO_DIPM , .pio_mask =ATA_PIO4 , .udma_mask =ATA_UDMA6 , .port_ops = &ahci_platform_ops,
drivers/ata/pata_ep93xx.c +1 -1
@@ -927,7 +927,7 @@ static int ep93xx_pata_probe(struct platform_device *pdev)/* INT[3] (IRQ_EP93XX_EXT3) line connected as pull down */ irq =platform_get_irq (pdev,0 );if (irq <0 ) { - err = -ENXIO ; + err = irq; goto err_rel_gpio; }
drivers/ata/pata_octeon_cf.c +3 -2
@@ -908,10 +908,11 @@ static int octeon_cf_probe(struct platform_device *pdev)return -EINVAL ; } - irq_handler = octeon_cf_interrupt; i =platform_get_irq (dma_dev,0 ); -if (i >0 ) +if (i >0 ) { irq = i; + irq_handler = octeon_cf_interrupt; + } }of_node_put (dma_node); }
drivers/ata/pata_rb532_cf.c +4 -2
@@ -120,10 +120,12 @@ static int rb532_pata_driver_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <=0 ) { +if (irq <0 ) {dev_err (&pdev->dev,"no IRQ resource found\n" ); -return -ENOENT ; +return irq; } +if (!irq) +return -EINVAL ; pdata =dev_get_platdata (&pdev->dev);if (!pdata) {
drivers/ata/sata_highbank.c +4 -2
@@ -483,10 +483,12 @@ static int ahci_highbank_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (irq <=0 ) { +if (irq <0 ) {dev_err (dev,"no irq\n" ); -return -EINVAL ; +return irq; } +if (!irq) +return -EINVAL ; hpriv =devm_kzalloc (dev,sizeof (*hpriv),GFP_KERNEL );if (!hpriv) {
drivers/atm/iphase.c +1 -1
@@ -3301,7 +3301,7 @@ static void __exit ia_module_exit(void) {pci_unregister_driver (&ia_driver); -del_timer (&ia_timer); +del_timer_sync (&ia_timer); }module_init (ia_module_init);
drivers/atm/nicstar.c +14 -12
@@ -298,7 +298,7 @@ static void __exit nicstar_cleanup(void) {XPRINTK ("nicstar: nicstar_cleanup() called.\n" ); -del_timer (&ns_timer); +del_timer_sync (&ns_timer);pci_unregister_driver (&nicstar_driver);
@@ -526,6 +526,15 @@ static int ns_init_card(int i, struct pci_dev *pcidev)/* Set the VPI/VCI MSb mask to zero so we can receive OAM cells */ writel (0x00000000 , card->membase +VPM ); + card->intcnt =0 ; +if (request_irq + (pcidev->irq, &ns_irq_handler,IRQF_SHARED ,"nicstar" , card) !=0 ) { +pr_err ("nicstar%d: can't allocate IRQ %d.\n" , i, pcidev->irq); + error =9 ; +ns_init_card_error (card, error); +return error; + } +/* Initialize TSQ */ card->tsq.org = dma_alloc_coherent(&card->pcidev->dev, NS_TSQSIZE + NS_TSQ_ALIGNMENT,
@@ -752,15 +761,6 @@ static int ns_init_card(int i, struct pci_dev *pcidev) card->efbie =1 ; - card->intcnt =0 ; -if (request_irq - (pcidev->irq, &ns_irq_handler,IRQF_SHARED ,"nicstar" , card) !=0 ) { -printk ("nicstar%d: can't allocate IRQ %d.\n" , i, pcidev->irq); - error =9 ; -ns_init_card_error (card, error); -return error; - } -/* Register device */ card->atmdev =atm_dev_register ("nicstar" , &card->pcidev->dev, &atm_ops,-1 ,NULL );
@@ -838,10 +838,12 @@ static void ns_init_card_error(ns_dev *card, int error)dev_kfree_skb_any (hb); }if (error >=12 ) { -kfree (card->rsq.org); +dma_free_coherent (&card->pcidev->dev,NS_RSQSIZE +NS_RSQ_ALIGNMENT , + card->rsq.org, card->rsq.dma); }if (error >=11 ) { -kfree (card->tsq.org); +dma_free_coherent (&card->pcidev->dev,NS_TSQSIZE +NS_TSQ_ALIGNMENT , + card->tsq.org, card->tsq.dma); }if (error >=10 ) {free_irq (card->pcidev->irq, card);
drivers/block/virtio_blk.c +2 -0
@@ -800,6 +800,8 @@ static int virtblk_freeze(struct virtio_device *vdev)blk_mq_stop_hw_queues (vblk->disk->queue); vdev->config->del_vqs (vdev); +kfree (vblk->vqs); +return 0 ; }
drivers/bluetooth/btusb.c +5 -0
@@ -2508,6 +2508,11 @@ static int btusb_setup_qca_download_fw(struct hci_dev *hdev, sent += size; count -= size; +/* ep2 need time to switch from function acl to function dfu, +* so we add 20ms delay here. +*/ +msleep (20 ); +while (count) { size =min_t (size_t, count,QCA_DFU_PACKET_LEN );
drivers/char/ipmi/ipmi_watchdog.c +12 -10
@@ -393,16 +393,18 @@ static int i_ipmi_set_timeout(struct ipmi_smi_msg *smi_msg, data[0 ] =0 ;WDOG_SET_TIMER_USE (data[0 ],WDOG_TIMER_USE_SMS_OS ); -if ((ipmi_version_major >1 ) - || ((ipmi_version_major ==1 ) && (ipmi_version_minor >=5 ))) { -/* This is an IPMI 1.5-only feature. */ - data[0 ] |=WDOG_DONT_STOP_ON_SET ; - }else if (ipmi_watchdog_state !=WDOG_TIMEOUT_NONE ) { -/* -* In ipmi 1.0, setting the timer stops the watchdog, we -* need to start it back up again. -*/ - hbnow =1 ; +if (ipmi_watchdog_state !=WDOG_TIMEOUT_NONE ) { +if ((ipmi_version_major >1 ) || + ((ipmi_version_major ==1 ) && (ipmi_version_minor >=5 ))) { +/* This is an IPMI 1.5-only feature. */ + data[0 ] |=WDOG_DONT_STOP_ON_SET ; + }else { +/* +* In ipmi 1.0, setting the timer stops the watchdog, we +* need to start it back up again. +*/ + hbnow =1 ; + } } data[1 ] =0 ;
drivers/char/pcmcia/cm4000_cs.c +4 -0
@@ -544,6 +544,10 @@ static int set_protocol(struct cm4000_dev *dev, struct ptsreq *ptsreq)io_read_num_rec_bytes (iobase, &num_bytes_read);if (num_bytes_read >=4 ) {DEBUGP (2 , dev,"NumRecBytes = %i\n" , num_bytes_read); +if (num_bytes_read >4 ) { + rc = -EIO ; + goto exit_setprotocol; + }break ; }mdelay (10 );
drivers/char/virtio_console.c +2 -2
@@ -492,7 +492,7 @@ static struct port_buffer *get_inbuf(struct port *port) buf =virtqueue_get_buf (port->in_vq, &len);if (buf) { - buf->len = len; + buf->len =min_t (size_t, len, buf->size); buf->offset =0 ; port->stats.bytes_received += len; }
@@ -1758,7 +1758,7 @@ static void control_work_handler(struct work_struct *work)while ((buf =virtqueue_get_buf (vq, &len))) {spin_unlock (&portdev->c_ivq_lock); - buf->len = len; + buf->len =min_t (size_t, len, buf->size); buf->offset =0 ;handle_control_message (vq->vdev, portdev, buf);
drivers/clk/tegra/clk-pll.c +4 -2
@@ -1085,7 +1085,8 @@ static int clk_pllu_enable(struct clk_hw *hw)if (pll->lock)spin_lock_irqsave (pll->lock, flags); -_clk_pll_enable (hw); +if (!clk_pll_is_enabled (hw)) +_clk_pll_enable (hw); ret =clk_pll_wait_for_lock (pll);if (ret <0 )
@@ -1702,7 +1703,8 @@ static int clk_pllu_tegra114_enable(struct clk_hw *hw)if (pll->lock)spin_lock_irqsave (pll->lock, flags); -_clk_pll_enable (hw); +if (!clk_pll_is_enabled (hw)) +_clk_pll_enable (hw); ret =clk_pll_wait_for_lock (pll);if (ret <0 )
drivers/crypto/ixp4xx_crypto.c +1 -1
@@ -334,7 +334,7 @@ static void free_buf_chain(struct device *dev, struct buffer_desc *buf,u32 phys) buf1 = buf->next; phys1 = buf->phys_next; -dma_unmap_single (dev, buf->phys_next, buf->buf_len, buf->dir); +dma_unmap_single (dev, buf->phys_addr, buf->buf_len, buf->dir);dma_pool_free (buffer_pool, buf, phys); buf = buf1; phys = phys1;
drivers/crypto/nx/nx-842-pseries.c +6 -3
@@ -553,13 +553,15 @@ static int nx842_OF_set_defaults(struct nx842_devdata *devdata)* The status field indicates if the device is enabled when the status * is 'okay'. Otherwise the device driver will be disabled. * -* @prop - struct property point containing the maxsyncop for the update +* @devdata: struct nx842_devdata to use for dev_info +* @prop: struct property point containing the maxsyncop for the update * * Returns: * 0 - Device is available * -ENODEV - Device is not available */ -static int nx842_OF_upd_status (struct property *prop) +static int nx842_OF_upd_status (struct nx842_devdata *devdata, +struct property *prop) {const char *status = (const char *)prop->value;
@@ -773,7 +775,7 @@ static int nx842_OF_upd(struct property *new_prop) goto out;/* Perform property updates */ - ret =nx842_OF_upd_status (status); + ret =nx842_OF_upd_status (new_devdata, status);if (ret) goto error_out;
@@ -1086,6 +1088,7 @@ static struct vio_device_id nx842_vio_driver_ids[] = { {"ibm,compression-v1", "ibm,compression"}, {"", ""}, }; +MODULE_DEVICE_TABLE (vio, nx842_vio_driver_ids);static struct vio_driver nx842_vio_driver = { .name = KBUILD_MODNAME,
drivers/crypto/qat/qat_common/qat_hal.c +5 -1
@@ -1255,7 +1255,11 @@ static int qat_hal_put_rel_wr_xfer(struct icp_qat_fw_loader_handle *handle,pr_err ("QAT: bad xfrAddr=0x%x\n" , xfr_addr);return -EINVAL ; } -qat_hal_rd_rel_reg (handle, ae, ctx,ICP_GPB_REL , gprnum, &gprval); + status =qat_hal_rd_rel_reg (handle, ae, ctx,ICP_GPB_REL , gprnum, &gprval); +if (status) { +pr_err ("QAT: failed to read register" ); +return status; + } gpr_addr =qat_hal_get_reg_addr (ICP_GPB_REL , gprnum); data16low =0xffff & data; data16hi =0xffff & (data >>0x10 );
drivers/crypto/qat/qat_common/qat_uclo.c +0 -1
@@ -385,7 +385,6 @@ static int qat_uclo_init_umem_seg(struct icp_qat_fw_loader_handle *handle,return 0 ; } -#define ICP_DH895XCC_PESRAM_BAR_SIZE 0x80000static int qat_uclo_init_ae_memory (struct icp_qat_fw_loader_handle *handle,struct icp_qat_uof_initmem *init_mem) {
drivers/crypto/ux500/hash/hash_core.c +1 -0
@@ -1006,6 +1006,7 @@ static int hash_hw_final(struct ahash_request *req) goto out; } }else if (req->nbytes ==0 && ctx->keylen >0 ) { + ret = -EPERM ;dev_err (device_data->dev,"%s: Empty message with keylength > 0, NOT supported\n" , __func__); goto out;
drivers/extcon/extcon-max8997.c +1 -0
@@ -783,3 +783,4 @@ module_platform_driver(max8997_muic_driver);MODULE_DESCRIPTION ("Maxim MAX8997 Extcon driver" );MODULE_AUTHOR ("Donggeun Kim <[email protected]>" );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS ("platform:max8997-muic" );
drivers/extcon/extcon-sm5502.c +0 -1
@@ -92,7 +92,6 @@ static struct reg_data sm5502_reg_data[] = { | SM5502_REG_INTM2_MHL_MASK, .invert = true, }, - { } };/* List of detectable cables */
drivers/firmware/qemu_fw_cfg.c +3 -5
@@ -192,15 +192,13 @@ static int fw_cfg_do_platform_probe(struct platform_device *pdev)/* fw_cfg revision attribute, in /sys/firmware/qemu_fw_cfg top-level dir. */ static u32 fw_cfg_rev; -static ssize_t fw_cfg_showrev (struct kobject *k,struct attribute *a,char *buf) +static ssize_t fw_cfg_showrev (struct kobject *k,struct kobj_attribute *a, +char *buf) {return sprintf (buf,"%u\n" , fw_cfg_rev); } -static const struct { -struct attribute attr; -ssize_t (*show)(struct kobject *k,struct attribute *a,char *buf); -} fw_cfg_rev_attr = { +static const struct kobj_attribute fw_cfg_rev_attr = { .attr = { .name ="rev" , .mode =S_IRUSR }, .show = fw_cfg_showrev, };
drivers/gpio/gpio-zynq.c +4 -1
@@ -778,8 +778,11 @@ static int zynq_gpio_probe(struct platform_device *pdev)static int zynq_gpio_remove (struct platform_device *pdev) {struct zynq_gpio *gpio =platform_get_drvdata (pdev); +int ret; -pm_runtime_get_sync (&pdev->dev); + ret =pm_runtime_get_sync (&pdev->dev); +if (ret <0 ) +dev_warn (&pdev->dev,"pm_runtime_get_sync() Failed\n" );gpiochip_remove (&gpio->chip);clk_disable_unprepare (gpio->clk);device_set_wakeup_capable (&pdev->dev,0 );
drivers/gpu/drm/qxl/qxl_dumb.c +2 -0
@@ -57,6 +57,8 @@ int qxl_mode_dumb_create(struct drm_file *file_priv, surf.height = args->height; surf.stride = pitch; surf.format = format; + surf.data =0 ; + r = qxl_gem_object_create_with_handle(qdev, file_priv, QXL_GEM_DOMAIN_VRAM, args->size, &surf, &qobj,
drivers/gpu/drm/virtio/virtgpu_kms.c +1 -0
@@ -234,6 +234,7 @@ int virtio_gpu_driver_load(struct drm_device *dev, unsigned long flags) err_vbufs: vgdev->vdev->config->del_vqs (vgdev->vdev); err_vqs: + dev->dev_private =NULL ;kfree (vgdev);return ret; }
drivers/hwmon/max31722.c +0 -9
@@ -9,7 +9,6 @@* directory of this archive for more details. */ -#include <linux/acpi.h> #include <linux/hwmon.h> #include <linux/hwmon-sysfs.h> #include <linux/kernel.h>
@@ -138,20 +137,12 @@ static const struct spi_device_id max31722_spi_id[] = { {"max31723", 0}, {} }; - -static const struct acpi_device_id __maybe_unused max31722_acpi_id[] = { - {"MAX31722" ,0 }, - {"MAX31723" ,0 }, - {} -}; -MODULE_DEVICE_TABLE (spi, max31722_spi_id);static struct spi_driver max31722_driver = { .driver = { .name ="max31722" , .pm = &max31722_pm_ops, - .acpi_match_table =ACPI_PTR (max31722_acpi_id), }, .probe = max31722_probe, .remove = max31722_remove,
drivers/hwmon/max31790.c +1 -1
@@ -179,7 +179,7 @@ static int max31790_read_fan(struct device *dev, u32 attr, int channel,switch (attr) {case hwmon_fan_input: - sr =get_tach_period (data->fan_dynamics[channel]); + sr =get_tach_period (data->fan_dynamics[channel %NR_CHANNEL ]); rpm =RPM_FROM_REG (data->tach[channel], sr); *val = rpm;return 0 ;
drivers/i2c/i2c-core.c +3 -0
@@ -42,6 +42,7 @@#include <linux/i2c.h> #include <linux/idr.h> #include <linux/init.h> +#include <linux/interrupt.h> #include <linux/irqflags.h> #include <linux/jump_label.h> #include <linux/kernel.h>
@@ -1003,6 +1004,8 @@ static void i2c_device_shutdown(struct device *dev) driver =to_i2c_driver (dev->driver);if (driver->shutdown) driver->shutdown (client); +else if (client->irq >0 ) +disable_irq (client->irq); }static void i2c_client_dev_release (struct device *dev)
drivers/iio/accel/bma180.c +7 -3
@@ -120,7 +120,11 @@ struct bma180_data {int scale;int bw;bool pmode; -u8 buff[16 ];/* 3x 16-bit + 8-bit + padding + timestamp */ +/* Ensure timestamp is naturally aligned */ +struct { +s16 chan[4 ]; +s64 timestamp__aligned(8) ; + } scan; };enum bma180_chan {
@@ -667,12 +671,12 @@ static irqreturn_t bma180_trigger_handler(int irq, void *p)mutex_unlock (&data->mutex); goto err; } - ((s16 *)data->buff)[i++] = ret; + data->scan.chan[i++] = ret; }mutex_unlock (&data->mutex); -iio_push_to_buffers_with_timestamp (indio_dev, data->buff, time_ns); +iio_push_to_buffers_with_timestamp (indio_dev, &data->scan, time_ns); err:iio_trigger_notify_done (indio_dev->trig);
drivers/iio/accel/bma220_spi.c +7 -3
@@ -76,7 +76,11 @@ static const int bma220_scale_table[][4] = {struct bma220_data {struct spi_device *spi_device;struct mutex lock; -s8 buffer[16 ];/* 3x8-bit channels + 5x8 padding + 8x8 timestamp */ +struct { +s8 chans[3 ]; +/* Ensure timestamp is naturally aligned. */ +s64 timestamp__aligned(8) ; + } scan;u8 tx_buf[2 ]____cacheline_aligned ; };
@@ -107,12 +111,12 @@ static irqreturn_t bma220_trigger_handler(int irq, void *p)mutex_lock (&data->lock); data->tx_buf[0 ] =BMA220_REG_ACCEL_X |BMA220_READ_MASK ; - ret =spi_write_then_read (spi, data->tx_buf,1 , data->buffer, + ret =spi_write_then_read (spi, data->tx_buf,1 , &data->scan.chans,ARRAY_SIZE (bma220_channels) -1 );if (ret <0 ) goto err; -iio_push_to_buffers_with_timestamp (indio_dev, data->buffer, +iio_push_to_buffers_with_timestamp (indio_dev, &data->scan, pf->timestamp); err:mutex_unlock (&data->lock);
drivers/iio/accel/kxcjk-1013.c +14 -10
@@ -96,12 +96,23 @@ enum kx_acpi_type { ACPI_SMO8500, }; +enum kxcjk1013_axis { +AXIS_X , +AXIS_Y , +AXIS_Z , +AXIS_MAX +}; +struct kxcjk1013_data {struct i2c_client *client;struct iio_trigger *dready_trig;struct iio_trigger *motion_trig;struct mutex mutex; -s16 buffer[8 ]; +/* Ensure timestamp naturally aligned */ +struct { +s16 chans[AXIS_MAX ]; +s64 timestamp__aligned(8) ; + } scan;u8 odr_bits;u8 range;int wake_thres;
@@ -115,13 +126,6 @@ struct kxcjk1013_data {enum kx_acpi_type acpi_type; }; -enum kxcjk1013_axis { -AXIS_X , -AXIS_Y , -AXIS_Z , -AXIS_MAX , -}; -enum kxcjk1013_mode {STANDBY ,OPERATION ,
@@ -971,12 +975,12 @@ static irqreturn_t kxcjk1013_trigger_handler(int irq, void *p) ret =i2c_smbus_read_i2c_block_data_or_emulated (data->client,KXCJK1013_REG_XOUT_L ,AXIS_MAX *2 , - (u8 *)data->buffer); + (u8 *)data->scan.chans);mutex_unlock (&data->mutex);if (ret <0 ) goto err; -iio_push_to_buffers_with_timestamp (indio_dev, data->buffer, +iio_push_to_buffers_with_timestamp (indio_dev, &data->scan, data->timestamp); err:iio_trigger_notify_done (indio_dev->trig);
drivers/iio/accel/stk8312.c +8 -4
@@ -106,7 +106,11 @@ struct stk8312_data {u8 mode;struct iio_trigger *dready_trig;bool dready_trigger_on; -s8 buffer[16 ];/* 3x8-bit channels + 5x8 padding + 64-bit timestamp */ +/* Ensure timestamp is naturally aligned */ +struct { +s8 chans[3 ]; +s64 timestamp__aligned(8) ; + } scan; }; static IIO_CONST_ATTR(in_accel_scale_available, STK8312_SCALE_AVAIL);
@@ -443,7 +447,7 @@ static irqreturn_t stk8312_trigger_handler(int irq, void *p) ret =i2c_smbus_read_i2c_block_data (data->client,STK8312_REG_XOUT ,STK8312_ALL_CHANNEL_SIZE , - data->buffer); + data->scan.chans);if (ret <STK8312_ALL_CHANNEL_SIZE ) {dev_err (&data->client->dev,"register read failed\n" );mutex_unlock (&data->lock);
@@ -457,12 +461,12 @@ static irqreturn_t stk8312_trigger_handler(int irq, void *p)mutex_unlock (&data->lock); goto err; } - data->buffer[i++] = ret; + data->scan.chans[i++] = ret; } }mutex_unlock (&data->lock); -iio_push_to_buffers_with_timestamp (indio_dev, data->buffer, +iio_push_to_buffers_with_timestamp (indio_dev, &data->scan, pf->timestamp); err:iio_trigger_notify_done (indio_dev->trig);
drivers/iio/accel/stk8ba50.c +8 -9
@@ -94,12 +94,11 @@ struct stk8ba50_data {u8 sample_rate_idx;struct iio_trigger *dready_trig;bool dready_trigger_on; -/* -* 3 x 16-bit channels (10-bit data, 6-bit padding) + -* 1 x 16 padding + -* 4 x 16 64-bit timestamp -*/ -s16 buffer[8 ]; +/* Ensure timestamp is naturally aligned */ +struct { +s16 chans[3 ]; +s64 timetamp__aligned(8) ; + } scan; };#define STK8BA50_ACCEL_CHANNEL (index, reg, axis) { \
@@ -329,7 +328,7 @@ static irqreturn_t stk8ba50_trigger_handler(int irq, void *p) ret =i2c_smbus_read_i2c_block_data (data->client,STK8BA50_REG_XOUT ,STK8BA50_ALL_CHANNEL_SIZE , - (u8 *)data->buffer); + (u8 *)data->scan.chans);if (ret <STK8BA50_ALL_CHANNEL_SIZE ) {dev_err (&data->client->dev,"register read failed\n" ); goto err;
@@ -342,10 +341,10 @@ static irqreturn_t stk8ba50_trigger_handler(int irq, void *p)if (ret <0 ) goto err; - data->buffer[i++] = ret; + data->scan.chans[i++] = ret; } } -iio_push_to_buffers_with_timestamp (indio_dev, data->buffer, +iio_push_to_buffers_with_timestamp (indio_dev, &data->scan, pf->timestamp); err:mutex_unlock (&data->lock);
drivers/iio/adc/ti-ads1015.c +8 -4
@@ -292,10 +292,14 @@ static irqreturn_t ads1015_trigger_handler(int irq, void *p)struct iio_poll_func *pf = p;struct iio_dev *indio_dev = pf->indio_dev;struct ads1015_data *data =iio_priv (indio_dev); -s16 buf[8 ];/* 1x s16 ADC val + 3x s16 padding + 4x s16 timestamp */ +/* Ensure natural alignment of timestamp */ +struct { +s16 chan; +s64 timestamp__aligned(8) ; + } scan;int chan, ret, res; -memset (buf,0 ,sizeof (buf)); +memset (&scan,0 ,sizeof (scan));mutex_lock (&data->lock); chan = find_first_bit(indio_dev->active_scan_mask,
@@ -306,10 +310,10 @@ static irqreturn_t ads1015_trigger_handler(int irq, void *p) goto err; } - buf[0 ] = res; + scan.chan = res;mutex_unlock (&data->lock); -iio_push_to_buffers_with_timestamp (indio_dev, buf, +iio_push_to_buffers_with_timestamp (indio_dev, &scan,iio_get_time_ns (indio_dev)); err:
drivers/iio/adc/vf610_adc.c +7 -3
@@ -180,7 +180,11 @@ struct vf610_adc {u32 sample_freq_avail[5 ];struct completion completion; -u16 buffer[8 ]; +/* Ensure the timestamp is naturally aligned */ +struct { +u16 chan; +s64 timestamp__aligned(8) ; + } scan; };static const u32 vf610_hw_avgs[] = {1 ,4 ,8 ,16 ,32 };
@@ -592,9 +596,9 @@ static irqreturn_t vf610_adc_isr(int irq, void *dev_id)if (coco &VF610_ADC_HS_COCO0 ) { info->value =vf610_adc_read_data (info);if (iio_buffer_enabled (indio_dev)) { - info->buffer[0 ] = info->value; + info->scan.chan = info->value;iio_push_to_buffers_with_timestamp (indio_dev, - info->buffer, + &info->scan,iio_get_time_ns (indio_dev));iio_trigger_notify_done (indio_dev->trig); }else
drivers/iio/gyro/bmg160_core.c +7 -3
@@ -104,7 +104,11 @@ struct bmg160_data {struct iio_trigger *dready_trig;struct iio_trigger *motion_trig;struct mutex mutex; -s16 buffer[8 ]; +/* Ensure naturally aligned timestamp */ +struct { +s16 chans[3 ]; +s64 timestamp__aligned(8) ; + } scan;u32 dps_range;int ev_enable_state;int slope_thres;
@@ -874,12 +878,12 @@ static irqreturn_t bmg160_trigger_handler(int irq, void *p)mutex_lock (&data->mutex); ret =regmap_bulk_read (data->regmap,BMG160_REG_XOUT_L , - data->buffer,AXIS_MAX *2 ); + data->scan.chans,AXIS_MAX *2 );mutex_unlock (&data->mutex);if (ret <0 ) goto err; -iio_push_to_buffers_with_timestamp (indio_dev, data->buffer, +iio_push_to_buffers_with_timestamp (indio_dev, &data->scan, pf->timestamp); err:iio_trigger_notify_done (indio_dev->trig);
drivers/iio/humidity/am2315.c +10 -6
@@ -36,7 +36,11 @@struct am2315_data {struct i2c_client *client;struct mutex lock; -s16 buffer[8 ];/* 2x16-bit channels + 2x16 padding + 4x16 timestamp */ +/* Ensure timestamp is naturally aligned */ +struct { +s16 chans[2 ]; +s64 timestamp__aligned(8) ; + } scan; };struct am2315_sensor_data {
@@ -170,20 +174,20 @@ static irqreturn_t am2315_trigger_handler(int irq, void *p)mutex_lock (&data->lock);if (*(indio_dev->active_scan_mask) ==AM2315_ALL_CHANNEL_MASK ) { - data->buffer[0 ] = sensor_data.hum_data; - data->buffer[1 ] = sensor_data.temp_data; + data->scan.chans[0 ] = sensor_data.hum_data; + data->scan.chans[1 ] = sensor_data.temp_data; }else { i =0 ;for_each_set_bit (bit, indio_dev->active_scan_mask, indio_dev->masklength) { - data->buffer[i] = (bit ? sensor_data.temp_data : - sensor_data.hum_data); + data->scan.chans[i] = (bit ? sensor_data.temp_data : + sensor_data.hum_data); i++; } }mutex_unlock (&data->lock); -iio_push_to_buffers_with_timestamp (indio_dev, data->buffer, +iio_push_to_buffers_with_timestamp (indio_dev, &data->scan, pf->timestamp); err:iio_trigger_notify_done (indio_dev->trig);
drivers/iio/imu/adis_buffer.c +0 -3
@@ -83,9 +83,6 @@ static irqreturn_t adis_trigger_handler(int irq, void *p)struct adis *adis =iio_device_get_drvdata (indio_dev);int ret; -if (!adis->buffer) -return -ENOMEM ; -if (adis->data->has_paging) {mutex_lock (&adis->txrx_lock);if (adis->current_page !=0 ) {
drivers/iio/light/isl29125.c +7 -3
@@ -54,7 +54,11 @@struct isl29125_data {struct i2c_client *client;u8 conf1; -u16 buffer[8 ];/* 3x 16-bit, padding, 8 bytes timestamp */ +/* Ensure timestamp is naturally aligned */ +struct { +u16 chans[3 ]; +s64 timestamp__aligned(8) ; + } scan; };#define ISL29125_CHANNEL (_color, _si) { \
@@ -187,10 +191,10 @@ static irqreturn_t isl29125_trigger_handler(int irq, void *p)if (ret <0 ) goto done; - data->buffer[j++] = ret; + data->scan.chans[j++] = ret; } -iio_push_to_buffers_with_timestamp (indio_dev, data->buffer, +iio_push_to_buffers_with_timestamp (indio_dev, &data->scan,iio_get_time_ns (indio_dev)); done:
drivers/iio/light/ltr501.c +11 -4
@@ -35,9 +35,12 @@#define LTR501_PART_ID 0x86#define LTR501_MANUFAC_ID 0x87#define LTR501_ALS_DATA1 0x88/* 16-bit, little endian */ +#define LTR501_ALS_DATA1_UPPER 0x89/* upper 8 bits of LTR501_ALS_DATA1 */ #define LTR501_ALS_DATA0 0x8a/* 16-bit, little endian */ +#define LTR501_ALS_DATA0_UPPER 0x8b/* upper 8 bits of LTR501_ALS_DATA0 */ #define LTR501_ALS_PS_STATUS 0x8c#define LTR501_PS_DATA 0x8d/* 16-bit, little endian */ +#define LTR501_PS_DATA_UPPER 0x8e/* upper 8 bits of LTR501_PS_DATA */ #define LTR501_INTR 0x8f/* output mode, polarity, mode */ #define LTR501_PS_THRESH_UP 0x90/* 11 bit, ps upper threshold */ #define LTR501_PS_THRESH_LOW 0x92/* 11 bit, ps lower threshold */
@@ -408,18 +411,19 @@ static int ltr501_read_als(struct ltr501_data *data, __le16 buf[2])static int ltr501_read_ps (struct ltr501_data *data) { -int ret, status; +__le16 status; +int ret; ret =ltr501_drdy (data,LTR501_STATUS_PS_RDY );if (ret <0 )return ret; ret =regmap_bulk_read (data->regmap,LTR501_PS_DATA , - &status,2 ); + &status,sizeof (status));if (ret <0 )return ret; -return status; +return le16_to_cpu (status); } static int ltr501_read_intr_prst(struct ltr501_data *data,
@@ -1180,7 +1184,7 @@ static struct ltr501_chip_info ltr501_chip_info_tbl[] = { .als_gain_tbl_size = ARRAY_SIZE(ltr559_als_gain_tbl), .ps_gain = ltr559_ps_gain_tbl, .ps_gain_tbl_size = ARRAY_SIZE(ltr559_ps_gain_tbl), - .als_mode_active = BIT(1), + .als_mode_active = BIT(0), .als_gain_mask = BIT(2) | BIT(3) | BIT(4), .als_gain_shift = 2, .info = <r501_info,
@@ -1329,9 +1333,12 @@ static bool ltr501_is_volatile_reg(struct device *dev, unsigned int reg) {switch (reg) {case LTR501_ALS_DATA1 : +case LTR501_ALS_DATA1_UPPER :case LTR501_ALS_DATA0 : +case LTR501_ALS_DATA0_UPPER :case LTR501_ALS_PS_STATUS :case LTR501_PS_DATA : +case LTR501_PS_DATA_UPPER :return true;default :return false;
drivers/iio/light/tcs3414.c +7 -3
@@ -56,7 +56,11 @@ struct tcs3414_data {u8 control;u8 gain;u8 timing; -u16 buffer[8 ];/* 4x 16-bit + 8 bytes timestamp */ +/* Ensure timestamp is naturally aligned */ +struct { +u16 chans[4 ]; +s64 timestamp__aligned(8) ; + } scan; };#define TCS3414_CHANNEL (_color, _si, _addr) { \
@@ -212,10 +216,10 @@ static irqreturn_t tcs3414_trigger_handler(int irq, void *p)if (ret <0 ) goto done; - data->buffer[j++] = ret; + data->scan.chans[j++] = ret; } -iio_push_to_buffers_with_timestamp (indio_dev, data->buffer, +iio_push_to_buffers_with_timestamp (indio_dev, &data->scan,iio_get_time_ns (indio_dev)); done:
drivers/iio/proximity/pulsedlight-lidar-lite-v2.c +7 -3
@@ -51,7 +51,11 @@ struct lidar_data {int (*xfer)(struct lidar_data *data,u8 reg,u8 *val,int len);int i2c_enabled; -u16 buffer[8 ];/* 2 byte distance + 8 byte timestamp */ +/* Ensure timestamp is naturally aligned */ +struct { +u16 chan; +s64 timestamp__aligned(8) ; + } scan; };static const struct iio_chan_spec lidar_channels[] = {
@@ -236,9 +240,9 @@ static irqreturn_t lidar_trigger_handler(int irq, void *private)struct lidar_data *data =iio_priv (indio_dev);int ret; - ret =lidar_get_measurement (data, data->buffer); + ret =lidar_get_measurement (data, &data->scan.chan);if (!ret) { -iio_push_to_buffers_with_timestamp (indio_dev, data->buffer, +iio_push_to_buffers_with_timestamp (indio_dev, &data->scan,iio_get_time_ns (indio_dev)); }else if (ret != -EINVAL ) {dev_err (&data->client->dev,"cannot read LIDAR measurement" );
drivers/infiniband/core/cma.c +2 -1
@@ -2370,7 +2370,8 @@ static int cma_resolve_ib_route(struct rdma_id_private *id_priv, int timeout_ms) work->new_state =RDMA_CM_ROUTE_RESOLVED ; work->event.event =RDMA_CM_EVENT_ROUTE_RESOLVED ; - route->path_rec =kmalloc (sizeof *route->path_rec,GFP_KERNEL ); +if (!route->path_rec) + route->path_rec =kmalloc (sizeof *route->path_rec,GFP_KERNEL );if (!route->path_rec) { ret = -ENOMEM ; goto err1;
drivers/infiniband/hw/cxgb4/qp.c +1 -0
@@ -277,6 +277,7 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq,if (user && (!wq->sq.bar2_pa || !wq->rq.bar2_pa)) {pr_warn (MOD "%s: sqid %u or rqid %u not in BAR2 range.\n" ,pci_name (rdev->lldi.pdev), wq->sq.qid, wq->rq.qid); + ret = -EINVAL ; goto free_dma; }
drivers/infiniband/sw/rxe/rxe_mr.c +1 -1
@@ -175,7 +175,7 @@ int rxe_mem_init_user(struct rxe_dev *rxe, struct rxe_pd *pd, u64 start,if (IS_ERR (umem)) {pr_warn ("err %d from rxe_umem_get\n" , (int )PTR_ERR (umem)); - err = -EINVAL ; + err =PTR_ERR (umem); goto err1; }
drivers/infiniband/sw/rxe/rxe_net.c +7 -3
@@ -259,10 +259,8 @@ static struct socket *rxe_setup_udp_tunnel(struct net *net, __be16 port,/* Create UDP socket */ err =udp_sock_create (net, &udp_cfg, &sock); -if (err <0 ) { -pr_err ("failed to create udp socket. err = %d\n" , err); +if (err <0 )return ERR_PTR (err); - } tnl_cfg.encap_type =1 ; tnl_cfg.encap_rcv = rxe_udp_encap_recv;
@@ -665,6 +663,12 @@ int rxe_net_ipv6_init(void) recv_sockets.sk6 =rxe_setup_udp_tunnel (&init_net,htons (ROCE_V2_UDP_DPORT ), true); +if (PTR_ERR (recv_sockets.sk6) == -EAFNOSUPPORT ) { + recv_sockets.sk6 =NULL ; +pr_warn ("IPv6 is not supported, can not create a UDPv6 socket\n" ); +return 0 ; + } +if (IS_ERR (recv_sockets.sk6)) { recv_sockets.sk6 =NULL ;pr_err ("Failed to create IPv6 UDP tunnel\n" );
drivers/input/joydev.c +1 -1
@@ -492,7 +492,7 @@ static int joydev_handle_JSIOCSBTNMAP(struct joydev *joydev,memcpy (joydev->keypam, keypam, len);for (i =0 ; i < joydev->nkey; i++) - joydev->keymap[keypam[i] -BTN_MISC ] = i; + joydev->keymap[joydev->keypam[i] -BTN_MISC ] = i; out:kfree (keypam);
drivers/input/keyboard/hil_kbd.c +1 -0
@@ -512,6 +512,7 @@ static int hil_dev_connect(struct serio *serio, struct serio_driver *drv) HIL_IDD_NUM_AXES_PER_SET(*idd)) { printk(KERN_INFO PREFIX "combo devices are not supported.\n"); + error = -EINVAL ; goto bail1; }
drivers/input/touchscreen/usbtouchscreen.c +4 -4
@@ -266,7 +266,7 @@ static int e2i_init(struct usbtouch_usb *usbtouch)int ret;struct usb_device *udev =interface_to_usbdev (usbtouch->interface); - ret =usb_control_msg (udev,usb_rcvctrlpipe (udev,0 ), + ret =usb_control_msg (udev,usb_sndctrlpipe (udev,0 ),0x01 ,0x02 ,0x0000 ,0x0081 ,NULL ,0 ,USB_CTRL_SET_TIMEOUT );
@@ -462,7 +462,7 @@ static int mtouch_init(struct usbtouch_usb *usbtouch)int ret, i;struct usb_device *udev =interface_to_usbdev (usbtouch->interface); - ret =usb_control_msg (udev,usb_rcvctrlpipe (udev,0 ), + ret =usb_control_msg (udev,usb_sndctrlpipe (udev,0 ),MTOUCHUSB_RESET ,USB_DIR_OUT |USB_TYPE_VENDOR |USB_RECIP_DEVICE ,1 ,0 ,NULL ,0 ,USB_CTRL_SET_TIMEOUT );
@@ -474,7 +474,7 @@ static int mtouch_init(struct usbtouch_usb *usbtouch)msleep (150 );for (i =0 ; i <3 ; i++) { - ret =usb_control_msg (udev,usb_rcvctrlpipe (udev,0 ), + ret =usb_control_msg (udev,usb_sndctrlpipe (udev,0 ),MTOUCHUSB_ASYNC_REPORT ,USB_DIR_OUT |USB_TYPE_VENDOR |USB_RECIP_DEVICE ,1 ,1 ,NULL ,0 ,USB_CTRL_SET_TIMEOUT );
@@ -645,7 +645,7 @@ static int dmc_tsc10_init(struct usbtouch_usb *usbtouch) }/* start sending data */ - ret =usb_control_msg (dev,usb_rcvctrlpipe (dev,0 ), + ret =usb_control_msg (dev,usb_sndctrlpipe (dev,0 ),TSC10_CMD_DATA1 ,USB_DIR_OUT |USB_TYPE_VENDOR |USB_RECIP_DEVICE ,0 ,0 ,NULL ,0 ,USB_CTRL_SET_TIMEOUT );
drivers/ipack/carriers/tpci200.c +4 -1
@@ -591,8 +591,11 @@ static int tpci200_pci_probe(struct pci_dev *pdev, out_err_bus_register:tpci200_uninstall (tpci200); +/* tpci200->info->cfg_regs is unmapped in tpci200_uninstall */ + tpci200->info->cfg_regs =NULL ; out_err_install: -iounmap (tpci200->info->cfg_regs); +if (tpci200->info->cfg_regs) +iounmap (tpci200->info->cfg_regs); out_err_ioremap:pci_release_region (pdev,TPCI200_CFG_MEM_BAR ); out_err_pci_request:
drivers/isdn/hardware/mISDN/hfcpci.c +1 -1
@@ -2352,7 +2352,7 @@ static void __exitHFC_cleanup (void) {if (timer_pending (&hfc_tl)) -del_timer (&hfc_tl); +del_timer_sync (&hfc_tl);pci_unregister_driver (&hfc_driver); }
drivers/leds/leds-ktd2692.c +18 -9
@@ -259,6 +259,17 @@ static void ktd2692_setup(struct ktd2692_context *led) | KTD2692_REG_FLASH_CURRENT_BASE); } +static void regulator_disable_action (void *_data) +{ +struct device *dev = _data; +struct ktd2692_context *led =dev_get_drvdata (dev); +int ret; + + ret =regulator_disable (led->regulator); +if (ret) +dev_err (dev,"Failed to disable supply: %d\n" , ret); +} +static int ktd2692_parse_dt (struct ktd2692_context *led,struct device *dev,struct ktd2692_led_config_data *cfg) {
@@ -289,8 +300,14 @@ static int ktd2692_parse_dt(struct ktd2692_context *led, struct device *dev,if (led->regulator) { ret =regulator_enable (led->regulator); -if (ret) +if (ret) {dev_err (dev,"Failed to enable supply: %d\n" , ret); + }else { + ret =devm_add_action_or_reset (dev, + regulator_disable_action, dev); +if (ret) +return ret; + } } child_node =of_get_next_available_child (np,NULL );
@@ -380,17 +397,9 @@ static int ktd2692_probe(struct platform_device *pdev)static int ktd2692_remove (struct platform_device *pdev) {struct ktd2692_context *led =platform_get_drvdata (pdev); -int ret;led_classdev_flash_unregister (&led->fled_cdev); -if (led->regulator) { - ret =regulator_disable (led->regulator); -if (ret) -dev_err (&pdev->dev, -"Failed to disable supply: %d\n" , ret); - } -mutex_destroy (&led->lock);return 0 ;
drivers/md/persistent-data/dm-btree-remove.c +2 -1
@@ -549,7 +549,8 @@ int dm_btree_remove(struct dm_btree_info *info, dm_block_t root,delete_at (n, index); } - *new_root =shadow_root (&spine); +if (!r) + *new_root =shadow_root (&spine);exit_shadow_spine (&spine);return r;
drivers/md/persistent-data/dm-space-map-disk.c +8 -1
@@ -171,6 +171,14 @@ static int sm_disk_new_block(struct dm_space_map *sm, dm_block_t *b)* Any block we allocate has to be free in both the old and current ll. */ r =sm_ll_find_common_free_block (&smd->old_ll, &smd->ll, smd->begin, smd->ll.nr_blocks, b); +if (r == -ENOSPC ) { +/* +* There's no free block between smd->begin and the end of the metadata device. +* We search before smd->begin in case something has been freed. +*/ + r =sm_ll_find_common_free_block (&smd->old_ll, &smd->ll,0 , smd->begin, b); + } +if (r)return r;
@@ -199,7 +207,6 @@ static int sm_disk_commit(struct dm_space_map *sm)return r;memcpy (&smd->old_ll, &smd->ll,sizeof (smd->old_ll)); - smd->begin =0 ; smd->nr_allocated_this_transaction =0 ; r =sm_disk_get_nr_free (sm, &nr_free);
drivers/md/persistent-data/dm-space-map-metadata.c +8 -1
@@ -451,6 +451,14 @@ static int sm_metadata_new_block_(struct dm_space_map *sm, dm_block_t *b)* Any block we allocate has to be free in both the old and current ll. */ r =sm_ll_find_common_free_block (&smm->old_ll, &smm->ll, smm->begin, smm->ll.nr_blocks, b); +if (r == -ENOSPC ) { +/* +* There's no free block between smm->begin and the end of the metadata device. +* We search before smm->begin in case something has been freed. +*/ + r =sm_ll_find_common_free_block (&smm->old_ll, &smm->ll,0 , smm->begin, b); + } +if (r)return r;
@@ -502,7 +510,6 @@ static int sm_metadata_commit(struct dm_space_map *sm)return r;memcpy (&smm->old_ll, &smm->ll,sizeof (smm->old_ll)); - smm->begin =0 ; smm->allocated_this_transaction =0 ;return 0 ;
drivers/media/common/siano/smscoreapi.c +9 -13
@@ -914,7 +914,7 @@ static int smscore_load_firmware_family2(struct smscore_device_t *coredev, void *buffer, size_t size) {struct sms_firmware *firmware = (struct sms_firmware *) buffer; -struct sms_msg_data4 *msg; +struct sms_msg_data5 *msg;u32 mem_address, calc_checksum =0 ;u32 i, *ptr;u8 *payload = firmware->payload;
@@ -995,24 +995,20 @@ static int smscore_load_firmware_family2(struct smscore_device_t *coredev, goto exit_fw_download;if (coredev->mode ==DEVICE_MODE_NONE ) { -struct sms_msg_data *trigger_msg = - (struct sms_msg_data *) msg; -pr_debug ("sending MSG_SMS_SWDOWNLOAD_TRIGGER_REQ\n" );SMS_INIT_MSG (&msg->x_msg_header,MSG_SMS_SWDOWNLOAD_TRIGGER_REQ , -sizeof (struct sms_msg_hdr ) + -sizeof (u32) *5 ); +sizeof (*msg)); - trigger_msg->msg_data[0 ] = firmware->start_address; + msg->msg_data[0 ] = firmware->start_address;/* Entry point */ - trigger_msg->msg_data[1 ] =6 ;/* Priority */ - trigger_msg->msg_data[2 ] =0x200 ;/* Stack size */ - trigger_msg->msg_data[3 ] =0 ;/* Parameter */ - trigger_msg->msg_data[4 ] =4 ;/* Task ID */ + msg->msg_data[1 ] =6 ;/* Priority */ + msg->msg_data[2 ] =0x200 ;/* Stack size */ + msg->msg_data[3 ] =0 ;/* Parameter */ + msg->msg_data[4 ] =4 ;/* Task ID */ - rc =smscore_sendrequest_and_wait (coredev, trigger_msg, - trigger_msg->x_msg_header.msg_length, + rc =smscore_sendrequest_and_wait (coredev, msg, + msg->x_msg_header.msg_length, &coredev->trigger_done); }else { SMS_INIT_MSG(&msg->x_msg_header, MSG_SW_RELOAD_EXEC_REQ,
drivers/media/common/siano/smscoreapi.h +2 -2
@@ -636,9 +636,9 @@ struct sms_msg_data2 {u32 msg_data[2 ]; }; -struct sms_msg_data4 { +struct sms_msg_data5 {struct sms_msg_hdr x_msg_header; -u32 msg_data[4 ]; +u32 msg_data[5 ]; };struct sms_data_download {
drivers/media/common/siano/smsdvb-main.c +4 -0
@@ -1187,6 +1187,10 @@ static int smsdvb_hotplug(struct smscore_device_t *coredev,return 0 ; media_graph_error: +mutex_lock (&g_smsdvb_clientslock); +list_del (&client->entry); +mutex_unlock (&g_smsdvb_clientslock); +smsdvb_debugfs_release (client); client_error:
drivers/media/dvb-core/dvb_net.c +19 -6
@@ -57,6 +57,7 @@#include <linux/module.h> #include <linux/kernel.h> #include <linux/netdevice.h> +#include <linux/nospec.h> #include <linux/etherdevice.h> #include <linux/dvb/net.h> #include <linux/uio.h>
@@ -1350,14 +1351,20 @@ static int dvb_net_do_ioctl(struct file *file,struct net_device *netdev;struct dvb_net_priv *priv_data;struct dvb_net_if *dvbnetif = parg; +int if_num = dvbnetif->if_num; -if (dvbnetif->if_num >=DVB_NET_DEVICES_MAX || - !dvbnet->state[dvbnetif->if_num]) { +if (if_num >=DVB_NET_DEVICES_MAX ) { ret = -EINVAL ; goto ioctl_error; } + if_num =array_index_nospec (if_num,DVB_NET_DEVICES_MAX ); - netdev = dvbnet->device[dvbnetif->if_num]; +if (!dvbnet->state[if_num]) { + ret = -EINVAL ; + goto ioctl_error; + } + + netdev = dvbnet->device[if_num]; priv_data =netdev_priv (netdev); dvbnetif->pid=priv_data->pid;
@@ -1410,14 +1417,20 @@ static int dvb_net_do_ioctl(struct file *file,struct net_device *netdev;struct dvb_net_priv *priv_data;struct __dvb_net_if_old *dvbnetif = parg; +int if_num = dvbnetif->if_num; + +if (if_num >=DVB_NET_DEVICES_MAX ) { + ret = -EINVAL ; + goto ioctl_error; + } + if_num =array_index_nospec (if_num,DVB_NET_DEVICES_MAX ); -if (dvbnetif->if_num >=DVB_NET_DEVICES_MAX || - !dvbnet->state[dvbnetif->if_num]) { +if (!dvbnet->state[if_num]) { ret = -EINVAL ; goto ioctl_error; } - netdev = dvbnet->device[dvbnetif->if_num]; + netdev = dvbnet->device[if_num]; priv_data =netdev_priv (netdev); dvbnetif->pid=priv_data->pid;
drivers/media/i2c/s5c73m3/s5c73m3-core.c +3 -3
@@ -1393,7 +1393,7 @@ static int __s5c73m3_power_on(struct s5c73m3 *state)s5c73m3_gpio_deassert (state,STBY );usleep_range (100 ,200 ); -s5c73m3_gpio_deassert (state,RST ); +s5c73m3_gpio_deassert (state,RSET );usleep_range (50 ,100 );return 0 ;
@@ -1408,7 +1408,7 @@ static int __s5c73m3_power_off(struct s5c73m3 *state) {int i, ret; -if (s5c73m3_gpio_assert (state,RST )) +if (s5c73m3_gpio_assert (state,RSET ))usleep_range (10 ,50 );if (s5c73m3_gpio_assert (state,STBY ))
@@ -1613,7 +1613,7 @@ static int s5c73m3_get_platform_data(struct s5c73m3 *state) state->mclk_frequency = pdata->mclk_frequency; state->gpio[STBY ] = pdata->gpio_stby; - state->gpio[RST ] = pdata->gpio_reset; + state->gpio[RSET ] = pdata->gpio_reset;return 0 ; }
drivers/media/i2c/s5c73m3/s5c73m3.h +1 -1
@@ -361,7 +361,7 @@ struct s5c73m3_ctrls {enum s5c73m3_gpio_id {STBY , -RST , +RSET ,GPIO_NUM , };
drivers/media/i2c/s5k4ecgx.c +5 -5
@@ -177,7 +177,7 @@ static const char * const s5k4ecgx_supply_names[] = {enum s5k4ecgx_gpio_id {STBY , -RST , +RSET ,GPIO_NUM , };
@@ -482,7 +482,7 @@ static int __s5k4ecgx_power_on(struct s5k4ecgx *priv)if (s5k4ecgx_gpio_set_value (priv,STBY , priv->gpio[STBY ].level))usleep_range (30 ,50 ); -if (s5k4ecgx_gpio_set_value (priv,RST , priv->gpio[RST ].level)) +if (s5k4ecgx_gpio_set_value (priv,RSET , priv->gpio[RSET ].level))usleep_range (30 ,50 );return 0 ;
@@ -490,7 +490,7 @@ static int __s5k4ecgx_power_on(struct s5k4ecgx *priv)static int __s5k4ecgx_power_off (struct s5k4ecgx *priv) { -if (s5k4ecgx_gpio_set_value (priv,RST , !priv->gpio[RST ].level)) +if (s5k4ecgx_gpio_set_value (priv,RSET , !priv->gpio[RSET ].level))usleep_range (30 ,50 );if (s5k4ecgx_gpio_set_value (priv,STBY , !priv->gpio[STBY ].level))
@@ -878,7 +878,7 @@ static int s5k4ecgx_config_gpios(struct s5k4ecgx *priv,int ret; priv->gpio[STBY ].gpio = -EINVAL ; - priv->gpio[RST ].gpio = -EINVAL ; + priv->gpio[RSET ].gpio = -EINVAL ; ret =s5k4ecgx_config_gpio (gpio->gpio, gpio->level,"S5K4ECGX_STBY" );
@@ -897,7 +897,7 @@ static int s5k4ecgx_config_gpios(struct s5k4ecgx *priv,s5k4ecgx_free_gpios (priv);return ret; } - priv->gpio[RST ] = *gpio; + priv->gpio[RSET ] = *gpio;if (gpio_is_valid (gpio->gpio))gpio_set_value (gpio->gpio,0 );
drivers/media/i2c/s5k5baf.c +3 -3
@@ -238,7 +238,7 @@ struct s5k5baf_gpio {enum s5k5baf_gpio_id {STBY , -RST , +RSET ,NUM_GPIOS , };
@@ -973,7 +973,7 @@ static int s5k5baf_power_on(struct s5k5baf *state)s5k5baf_gpio_deassert (state,STBY );usleep_range (50 ,100 ); -s5k5baf_gpio_deassert (state,RST ); +s5k5baf_gpio_deassert (state,RSET );return 0 ; err_reg_dis:
@@ -991,7 +991,7 @@ static int s5k5baf_power_off(struct s5k5baf *state) state->apply_cfg =0 ; state->apply_crop =0 ; -s5k5baf_gpio_assert (state,RST ); +s5k5baf_gpio_assert (state,RSET );s5k5baf_gpio_assert (state,STBY );if (!IS_ERR (state->clock))
drivers/media/i2c/s5k6aa.c +5 -5
@@ -181,7 +181,7 @@ static const char * const s5k6aa_supply_names[] = {enum s5k6aa_gpio_id {STBY , -RST , +RSET ,GPIO_NUM , };
@@ -845,7 +845,7 @@ static int __s5k6aa_power_on(struct s5k6aa *s5k6aa) ret = s5k6aa->s_power (1 );usleep_range (4000 ,4000 ); -if (s5k6aa_gpio_deassert (s5k6aa,RST )) +if (s5k6aa_gpio_deassert (s5k6aa,RSET ))msleep (20 );return ret;
@@ -855,7 +855,7 @@ static int __s5k6aa_power_off(struct s5k6aa *s5k6aa) {int ret; -if (s5k6aa_gpio_assert (s5k6aa,RST )) +if (s5k6aa_gpio_assert (s5k6aa,RSET ))usleep_range (100 ,150 );if (s5k6aa->s_power) {
@@ -1514,7 +1514,7 @@ static int s5k6aa_configure_gpios(struct s5k6aa *s5k6aa,int ret; s5k6aa->gpio[STBY ].gpio = -EINVAL ; - s5k6aa->gpio[RST ].gpio = -EINVAL ; + s5k6aa->gpio[RSET ].gpio = -EINVAL ; gpio = &pdata->gpio_stby;if (gpio_is_valid (gpio->gpio)) {
@@ -1537,7 +1537,7 @@ static int s5k6aa_configure_gpios(struct s5k6aa *s5k6aa,if (ret <0 )return ret; - s5k6aa->gpio[RST ] = *gpio; + s5k6aa->gpio[RSET ] = *gpio; }return 0 ;
drivers/media/i2c/tc358743.c +1 -0
@@ -1763,6 +1763,7 @@ static int tc358743_probe_of(struct tc358743_state *state) bps_pr_lane =2 * endpoint->link_frequencies[0 ];if (bps_pr_lane <62500000U || bps_pr_lane >1000000000U ) {dev_err (dev,"unsupported bps per lane: %u bps\n" , bps_pr_lane); + ret = -EINVAL ; goto disable_clk; }
drivers/media/pci/bt8xx/bt878.c +3 -0
@@ -494,6 +494,9 @@ static int bt878_probe(struct pci_dev *dev, const struct pci_device_id *pci_id)btwrite (0 ,BT878_AINT_MASK ); bt878_num++; +if (!bt->tasklet.func) +tasklet_disable (&bt->tasklet); +return 0 ; fail2:
drivers/media/pci/cobalt/cobalt-driver.c +1 -0
@@ -689,6 +689,7 @@ static int cobalt_probe(struct pci_dev *pci_dev,return -ENOMEM ; cobalt->pci_dev = pci_dev; cobalt->instance = i; +mutex_init (&cobalt->pci_lock); retval =v4l2_device_register (&pci_dev->dev, &cobalt->v4l2_dev);if (retval) {
drivers/media/pci/cobalt/cobalt-driver.h +6 -1
@@ -262,6 +262,8 @@ struct cobalt {int instance;struct pci_dev *pci_dev;struct v4l2_device v4l2_dev; +/* serialize PCI access in cobalt_s_bit_sysctrl() */ +struct mutex pci_lock;void __iomem *bar0, *bar1;
@@ -333,10 +335,13 @@ static inline u32 cobalt_g_sysctrl(struct cobalt *cobalt)static inline void cobalt_s_bit_sysctrl (struct cobalt *cobalt,int bit,int val) { -u32 ctrl =cobalt_read_bar1 (cobalt,COBALT_SYS_CTRL_BASE ); +u32 ctrl; +mutex_lock (&cobalt->pci_lock); + ctrl =cobalt_read_bar1 (cobalt,COBALT_SYS_CTRL_BASE );cobalt_write_bar1 (cobalt,COBALT_SYS_CTRL_BASE , (ctrl & ~(1UL << bit)) | (val << bit)); +mutex_unlock (&cobalt->pci_lock); }static inline u32 cobalt_g_sysstat (struct cobalt *cobalt)
drivers/media/platform/s5p-g2d/g2d.c +3 -0
@@ -283,6 +283,9 @@ static int g2d_release(struct file *file)struct g2d_dev *dev =video_drvdata (file);struct g2d_ctx *ctx =fh2ctx (file->private_data); +mutex_lock (&dev->mutex); +v4l2_m2m_ctx_release (ctx->fh.m2m_ctx); +mutex_unlock (&dev->mutex);v4l2_ctrl_handler_free (&ctx->ctrl_handler);v4l2_fh_del (&ctx->fh);v4l2_fh_exit (&ctx->fh);
drivers/media/platform/sti/hva/hva-hw.c +1 -2
@@ -127,8 +127,7 @@ static irqreturn_t hva_hw_its_irq_thread(int irq, void *arg) ctx_id = (hva->sts_reg &0xFF00 ) >>8 ;if (ctx_id >=HVA_MAX_INSTANCES ) {dev_err (dev,"%s %s: bad context identifier: %d\n" , - ctx->name, __func__, ctx_id); - ctx->hw_err = true; +HVA_PREFIX , __func__, ctx_id); goto out; }
drivers/media/usb/cpia2/cpia2.h +1 -0
@@ -442,6 +442,7 @@ int cpia2_send_command(struct camera_data *cam, struct cpia2_command *cmd);int cpia2_do_command (struct camera_data *cam,unsigned int command,unsigned char direction,unsigned char param); +void cpia2_deinit_camera_struct (struct camera_data *cam,struct usb_interface *intf);struct camera_data *cpia2_init_camera_struct (struct usb_interface *intf);int cpia2_init_camera (struct camera_data *cam);int cpia2_allocate_buffers (struct camera_data *cam);
drivers/media/usb/cpia2/cpia2_core.c +12 -0
@@ -2158,6 +2158,18 @@ static void reset_camera_struct(struct camera_data *cam) cam->height = cam->params.roi.height; } +/****************************************************************************** +* +* cpia2_init_camera_struct +* +* Deinitialize camera struct +*****************************************************************************/ +void cpia2_deinit_camera_struct (struct camera_data *cam,struct usb_interface *intf) +{ +v4l2_device_unregister (&cam->v4l2_dev); +kfree (cam); +} +/****************************************************************************** * * cpia2_init_camera_struct
drivers/media/usb/cpia2/cpia2_usb.c +7 -6
@@ -860,15 +860,13 @@ static int cpia2_usb_probe(struct usb_interface *intf, ret =set_alternate (cam,USBIF_CMDONLY );if (ret <0 ) {ERR ("%s: usb_set_interface error (ret = %d)\n" , __func__, ret); -kfree (cam); -return ret; + goto alt_err; }if ((ret =cpia2_init_camera (cam)) <0 ) {ERR ("%s: failed to initialize cpia2 camera (ret = %d)\n" , __func__, ret); -kfree (cam); -return ret; + goto alt_err; } LOG(" CPiA Version: %d.%02d (%d.%d)\n", cam->params.version.firmware_revision_hi,
@@ -888,11 +886,14 @@ static int cpia2_usb_probe(struct usb_interface *intf, ret =cpia2_register_camera (cam);if (ret <0 ) {ERR ("%s: Failed to register cpia2 camera (ret = %d)\n" , __func__, ret); -kfree (cam); -return ret; + goto alt_err; }return 0 ; + +alt_err: +cpia2_deinit_camera_struct (cam, intf); +return ret; }/******************************************************************************
drivers/media/usb/dvb-usb/cxusb.c +1 -1
@@ -1791,7 +1791,7 @@ static struct dvb_usb_device_properties cxusb_bluebird_lgz201_properties = { .size_of_priv = sizeof(struct cxusb_state), - .num_adapters = 2, + .num_adapters = 1, .adapter = { { .num_frontends = 1,
drivers/media/usb/dvb-usb/dtv5100.c +5 -2
@@ -39,6 +39,7 @@ static int dtv5100_i2c_msg(struct dvb_usb_device *d, u8 addr, u8 *wbuf, u16 wlen, u8 *rbuf, u16 rlen) { struct dtv5100_state *st = d->priv; +unsigned int pipe;u8 request;u8 type;u16 value;
@@ -47,6 +48,7 @@ static int dtv5100_i2c_msg(struct dvb_usb_device *d, u8 addr,switch (wlen) {case 1 :/* write { reg }, read { value } */ + pipe =usb_rcvctrlpipe (d->udev,0 ); request = (addr ==DTV5100_DEMOD_ADDR ?DTV5100_DEMOD_READ :DTV5100_TUNER_READ ); type =USB_TYPE_VENDOR |USB_DIR_IN ;
@@ -54,6 +56,7 @@ static int dtv5100_i2c_msg(struct dvb_usb_device *d, u8 addr,break ;case 2 :/* write { reg, value } */ + pipe =usb_sndctrlpipe (d->udev,0 ); request = (addr ==DTV5100_DEMOD_ADDR ?DTV5100_DEMOD_WRITE :DTV5100_TUNER_WRITE ); type =USB_TYPE_VENDOR |USB_DIR_OUT ;
@@ -67,7 +70,7 @@ static int dtv5100_i2c_msg(struct dvb_usb_device *d, u8 addr,memcpy (st->data, rbuf, rlen);msleep (1 );/* avoid I2C errors */ -return usb_control_msg (d->udev,usb_rcvctrlpipe (d->udev,0 ), request, +return usb_control_msg (d->udev, pipe, request, type, value, index, st->data, rlen,DTV5100_USB_TIMEOUT ); }
@@ -154,7 +157,7 @@ static int dtv5100_probe(struct usb_interface *intf,/* initialize non qt1010/zl10353 part? */ for (i =0 ; dtv5100_init[i].request; i++) { - ret = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), + ret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), dtv5100_init[i].request, USB_TYPE_VENDOR | USB_DIR_OUT, dtv5100_init[i].value,
drivers/media/usb/gspca/sq905.c +1 -1
@@ -130,7 +130,7 @@ static int sq905_command(struct gspca_dev *gspca_dev, u16 index) } ret = usb_control_msg(gspca_dev->dev, - usb_sndctrlpipe(gspca_dev->dev, 0), + usb_rcvctrlpipe(gspca_dev->dev, 0), USB_REQ_SYNCH_FRAME, /* request */ USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, SQ905_PING, 0, gspca_dev->usb_buf, 1,
drivers/media/usb/gspca/sunplus.c +6 -2
@@ -255,6 +255,10 @@ static void reg_r(struct gspca_dev *gspca_dev,PERR ("reg_r: buffer overflow\n" );return ; } +if (len ==0 ) { +PERR ("reg_r: zero-length read\n" ); +return ; + }if (gspca_dev->usb_err <0 )return ; ret = usb_control_msg(gspca_dev->dev,
@@ -263,7 +267,7 @@ static void reg_r(struct gspca_dev *gspca_dev,USB_DIR_IN |USB_TYPE_VENDOR |USB_RECIP_DEVICE ,0 ,/* value */ index, - len ? gspca_dev->usb_buf :NULL , len, + gspca_dev->usb_buf, len, 500);if (ret <0 ) {pr_err ("reg_r err %d\n" , ret);
@@ -739,7 +743,7 @@ static int sd_start(struct gspca_dev *gspca_dev)case MegaImageVI:reg_w_riv (gspca_dev,0xf0 ,0 ,0 );spca504B_WaitCmdStatus (gspca_dev); -reg_r (gspca_dev,0xf0 ,4 ,0 ); +reg_w_riv (gspca_dev,0xf0 ,4 ,0 );spca504B_WaitCmdStatus (gspca_dev);break ;default :
drivers/media/usb/pvrusb2/pvrusb2-hdw.c +2 -2
@@ -2722,9 +2722,8 @@ void pvr2_hdw_destroy(struct pvr2_hdw *hdw)pvr2_stream_destroy (hdw->vid_stream); hdw->vid_stream =NULL ; } -pvr2_i2c_core_done (hdw);v4l2_device_unregister (&hdw->v4l2_dev); -pvr2_hdw_remove_usb_stuff (hdw); +pvr2_hdw_disconnect (hdw);mutex_lock (&pvr2_unit_mtx); do { if ((hdw->unit_number >= 0) &&
@@ -2751,6 +2750,7 @@ void pvr2_hdw_disconnect(struct pvr2_hdw *hdw) {pvr2_trace (PVR2_TRACE_INIT ,"pvr2_hdw_disconnect(hdw=%p)" ,hdw);LOCK_TAKE (hdw->big_lock); +pvr2_i2c_core_done (hdw);LOCK_TAKE (hdw->ctl_lock);pvr2_hdw_remove_usb_stuff (hdw);LOCK_GIVE (hdw->ctl_lock);
drivers/media/usb/uvc/uvc_video.c +27 -0
@@ -89,10 +89,37 @@ int uvc_query_ctrl(struct uvc_device *dev, __u8 query, __u8 unit,static void uvc_fixup_video_ctrl (struct uvc_streaming *stream,struct uvc_streaming_control *ctrl) { +static const struct usb_device_id elgato_cam_link_4k = { +USB_DEVICE (0x0fd9 ,0x0066 ) + };struct uvc_format *format =NULL ;struct uvc_frame *frame =NULL ;unsigned int i; +/* +* The response of the Elgato Cam Link 4K is incorrect: The second byte +* contains bFormatIndex (instead of being the second byte of bmHint). +* The first byte is always zero. The third byte is always 1. +* +* The UVC 1.5 class specification defines the first five bits in the +* bmHint bitfield. The remaining bits are reserved and should be zero. +* Therefore a valid bmHint will be less than 32. +* +* Latest Elgato Cam Link 4K firmware as of 2021-03-23 needs this fix. +* MCU: 20.02.19, FPGA: 67 +*/ +if (usb_match_one_id (stream->dev->intf, &elgato_cam_link_4k) && + ctrl->bmHint >255 ) { +u8 corrected_format_index = ctrl->bmHint >>8 ; + +/* uvc_dbg(stream->dev, VIDEO, +"Correct USB video probe response from {bmHint: 0x%04x, bFormatIndex: %u} to {bmHint: 0x%04x, bFormatIndex: %u}\n", +ctrl->bmHint, ctrl->bFormatIndex, +1, corrected_format_index); */ + ctrl->bmHint =1 ; + ctrl->bFormatIndex = corrected_format_index; + } +for (i =0 ; i < stream->nformats; ++i) {if (stream->format[i].index == ctrl->bFormatIndex) { format = &stream->format[i];
drivers/media/usb/zr364xx/zr364xx.c +1 -0
@@ -1066,6 +1066,7 @@ static int zr364xx_start_readpipe(struct zr364xx_camera *cam)DBG ("submitting URB %p\n" , pipe_info->stream_urb); retval =usb_submit_urb (pipe_info->stream_urb,GFP_KERNEL );if (retval) { +usb_free_urb (pipe_info->stream_urb); printk(KERN_ERR KBUILD_MODNAME ": start read pipe failed\n");return retval; }
drivers/media/v4l2-core/v4l2-fh.c +1 -0
@@ -109,6 +109,7 @@ int v4l2_fh_release(struct file *filp)v4l2_fh_del (fh);v4l2_fh_exit (fh);kfree (fh); + filp->private_data =NULL ; }return 0 ; }
drivers/memory/fsl_ifc.c +4 -4
@@ -109,7 +109,6 @@ static int fsl_ifc_ctrl_remove(struct platform_device *dev)iounmap (ctrl->gregs);dev_set_drvdata (&dev->dev,NULL ); -kfree (ctrl);return 0 ; }
@@ -221,7 +220,8 @@ static int fsl_ifc_ctrl_probe(struct platform_device *dev)dev_info (&dev->dev,"Freescale Integrated Flash Controller\n" ); - fsl_ifc_ctrl_dev =kzalloc (sizeof (*fsl_ifc_ctrl_dev),GFP_KERNEL ); + fsl_ifc_ctrl_dev =devm_kzalloc (&dev->dev,sizeof (*fsl_ifc_ctrl_dev), +GFP_KERNEL );if (!fsl_ifc_ctrl_dev)return -ENOMEM ;
@@ -231,8 +231,7 @@ static int fsl_ifc_ctrl_probe(struct platform_device *dev) fsl_ifc_ctrl_dev->gregs =of_iomap (dev->dev.of_node,0 );if (!fsl_ifc_ctrl_dev->gregs) {dev_err (&dev->dev,"failed to get memory region\n" ); - ret = -ENODEV ; - goto err; +return -ENODEV ; }if (of_property_read_bool (dev->dev.of_node,"little-endian" )) {
@@ -308,6 +307,7 @@ static int fsl_ifc_ctrl_probe(struct platform_device *dev)free_irq (fsl_ifc_ctrl_dev->irq, fsl_ifc_ctrl_dev);irq_dispose_mapping (fsl_ifc_ctrl_dev->irq); err: +iounmap (fsl_ifc_ctrl_dev->gregs);return ret; }
drivers/mfd/da9052-i2c.c +1 -0
@@ -118,6 +118,7 @@ static const struct i2c_device_id da9052_i2c_id[] = { {"da9053-bc", DA9053_BC}, {} }; +MODULE_DEVICE_TABLE (i2c, da9052_i2c_id);#ifdef CONFIG_OF static const struct of_device_id dialog_dt_ids[] = {
drivers/mfd/stmpe-i2c.c +1 -1
@@ -109,7 +109,7 @@ static const struct i2c_device_id stmpe_i2c_id[] = { { "stmpe2403", STMPE2403 }, { } }; -MODULE_DEVICE_TABLE(i2c, stmpe_id); +MODULE_DEVICE_TABLE(i2c, stmpe_i2c_id); static struct i2c_driver stmpe_i2c_driver = { .driver = {
drivers/misc/ibmasm/module.c +3 -2
@@ -123,7 +123,7 @@ static int ibmasm_init_one(struct pci_dev *pdev, const struct pci_device_id *id) result =ibmasm_init_remote_input_dev (sp);if (result) {dev_err (sp->dev,"Failed to initialize remote queue\n" ); - goto error_send_message; + goto error_init_remote; } result =ibmasm_send_driver_vpd (sp);
@@ -143,8 +143,9 @@ static int ibmasm_init_one(struct pci_dev *pdev, const struct pci_device_id *id)return 0 ; error_send_message: -disable_sp_interrupts (sp->base_address);ibmasm_free_remote_input_dev (sp); +error_init_remote: +disable_sp_interrupts (sp->base_address);free_irq (sp->irq, (void *)sp); error_request_irq:iounmap (sp->base_address);
drivers/mmc/core/core.c +5 -2
@@ -1171,11 +1171,14 @@ int mmc_execute_tuning(struct mmc_card *card) err = host->ops->execute_tuning (host, opcode); -if (err) +if (err) {pr_err ("%s: tuning execution failed: %d\n" ,mmc_hostname (host), err); -else + }else { + host->retune_now =0 ; + host->need_retune =0 ;mmc_retune_enable (host); + }return err; }
drivers/mmc/host/sdhci.c +4 -0
@@ -1219,6 +1219,10 @@ static u16 sdhci_get_preset_value(struct sdhci_host *host)u16 preset =0 ;switch (host->timing) { +case MMC_TIMING_MMC_HS : +case MMC_TIMING_SD_HS : + preset =sdhci_readw (host,SDHCI_PRESET_FOR_HIGH_SPEED ); +break ;case MMC_TIMING_UHS_SDR12 : preset =sdhci_readw (host,SDHCI_PRESET_FOR_SDR12 );break ;
drivers/mmc/host/sdhci.h +1 -0
@@ -237,6 +237,7 @@/* 60-FB reserved */ +#define SDHCI_PRESET_FOR_HIGH_SPEED 0x64#define SDHCI_PRESET_FOR_SDR12 0x66#define SDHCI_PRESET_FOR_SDR25 0x68#define SDHCI_PRESET_FOR_SDR50 0x6A
drivers/mmc/host/usdhi6rol0.c +1 -0
@@ -1809,6 +1809,7 @@ static int usdhi6_probe(struct platform_device *pdev) version =usdhi6_read (host,USDHI6_VERSION );if ((version &0xfff ) !=0xa0d ) { + ret = -EPERM ;dev_err (dev,"Version not recognized %x\n" , version); goto e_clk_off; }
drivers/mmc/host/via-sdmmc.c +3 -0
@@ -859,6 +859,9 @@ static void via_sdc_data_isr(struct via_crdr_mmc_host *host, u16 intmask) {BUG_ON (intmask ==0 ); +if (!host->data) +return ; +if (intmask &VIA_CRDR_SDSTS_DT ) host->data->error = -ETIMEDOUT ;else if (intmask & (VIA_CRDR_SDSTS_RC |VIA_CRDR_SDSTS_WC ))
drivers/mmc/host/vub300.c +1 -1
@@ -2292,7 +2292,7 @@ static int vub300_probe(struct usb_interface *interface,if (retval <0 ) goto error5; retval = -usb_control_msg (vub300->udev,usb_rcvctrlpipe (vub300->udev,0 ), +usb_control_msg (vub300->udev,usb_sndctrlpipe (vub300->udev,0 ),SET_ROM_WAIT_STATES ,USB_DIR_OUT |USB_TYPE_VENDOR |USB_RECIP_DEVICE , firmware_rom_wait_states,0x0000 ,NULL ,0 ,HZ );
drivers/net/can/usb/ems_usb.c +2 -1
@@ -1064,7 +1064,6 @@ static void ems_usb_disconnect(struct usb_interface *intf)if (dev) {unregister_netdev (dev->netdev); -free_candev (dev->netdev);unlink_all_urbs (dev);
@@ -1072,6 +1071,8 @@ static void ems_usb_disconnect(struct usb_interface *intf)kfree (dev->intr_in_buffer);kfree (dev->tx_msg_buffer); + +free_candev (dev->netdev); } }
drivers/net/ethernet/aeroflex/greth.c +2 -1
@@ -1554,10 +1554,11 @@ static int greth_of_remove(struct platform_device *of_dev)mdiobus_unregister (greth->mdio);unregister_netdev (ndev); -free_netdev (ndev);of_iounmap (&of_dev->resource[0 ], greth->regs,resource_size (&of_dev->resource[0 ])); +free_netdev (ndev); +return 0 ; }
drivers/net/ethernet/ezchip/nps_enet.c +2 -2
@@ -624,7 +624,7 @@ static s32 nps_enet_probe(struct platform_device *pdev)/* Get IRQ number */ priv->irq =platform_get_irq (pdev,0 ); -if (!priv->irq) { +if (priv->irq <0 ) {dev_err (dev,"failed to retrieve <irq Rx-Tx> value from device tree\n" ); err = -ENODEV ; goto out_netdev;
@@ -659,8 +659,8 @@ static s32 nps_enet_remove(struct platform_device *pdev)struct nps_enet_priv *priv =netdev_priv (ndev);unregister_netdev (ndev); -free_netdev (ndev);netif_napi_del (&priv->napi); +free_netdev (ndev);return 0 ; }
drivers/net/ethernet/ibm/ehea/ehea_main.c +5 -4
@@ -2656,10 +2656,8 @@ static int ehea_restart_qps(struct net_device *dev)u16 dummy16 =0 ; cb0 = (void *)get_zeroed_page (GFP_KERNEL ); -if (!cb0) { - ret = -ENOMEM ; - goto out; - } +if (!cb0) +return -ENOMEM ;for (i =0 ; i < (port->num_def_qps); i++) {struct ehea_port_res *pr = &port->port_res[i];
@@ -2679,6 +2677,7 @@ static int ehea_restart_qps(struct net_device *dev) cb0);if (hret !=H_SUCCESS ) {netdev_err (dev,"query_ehea_qp failed (1)\n" ); + ret = -EFAULT ; goto out; }
@@ -2691,6 +2690,7 @@ static int ehea_restart_qps(struct net_device *dev) &dummy64, &dummy16, &dummy16);if (hret !=H_SUCCESS ) {netdev_err (dev,"modify_ehea_qp failed (1)\n" ); + ret = -EFAULT ; goto out; }
@@ -2699,6 +2699,7 @@ static int ehea_restart_qps(struct net_device *dev) cb0);if (hret !=H_SUCCESS ) {netdev_err (dev,"query_ehea_qp failed (2)\n" ); + ret = -EFAULT ; goto out; }
drivers/net/ethernet/intel/e100.c +6 -6
@@ -1423,7 +1423,7 @@ static int e100_phy_check_without_mii(struct nic *nic)u8 phy_type;int without_mii; - phy_type = (nic->eeprom[eeprom_phy_iface] >>8 ) &0x0f ; + phy_type = (le16_to_cpu (nic->eeprom[eeprom_phy_iface]) >>8 ) &0x0f ;switch (phy_type) {case NoSuchPhy:/* Non-MII PHY; UNTESTED! */
@@ -1543,7 +1543,7 @@ static int e100_phy_init(struct nic *nic)mdio_write (netdev, nic->mii.phy_id,MII_BMCR , bmcr); }else if ((nic->mac >= mac_82550_D102) || ((nic->flags & ich) && (mdio_read (netdev, nic->mii.phy_id,MII_TPISTATUS ) &0x8000 ) && - (nic->eeprom[eeprom_cnfg_mdix] & eeprom_mdix_enabled))) { + (le16_to_cpu (nic->eeprom[eeprom_cnfg_mdix]) & eeprom_mdix_enabled))) {/* enable/disable MDI/MDI-X auto-switching. */ mdio_write (netdev, nic->mii.phy_id,MII_NCONFIG , nic->mii.force_media ?0 :NCONFIG_AUTO_SWITCH );
@@ -2298,9 +2298,9 @@ static int e100_asf(struct nic *nic) {/* ASF can be enabled from eeprom */ return (nic->pdev->device >=0x1050 ) && (nic->pdev->device <=0x1057 ) && - (nic->eeprom[eeprom_config_asf] & eeprom_asf) && - !(nic->eeprom[eeprom_config_asf] & eeprom_gcl) && - ((nic->eeprom[eeprom_smbus_addr] &0xFF ) !=0xFE ); + (le16_to_cpu (nic->eeprom[eeprom_config_asf]) & eeprom_asf) && + !(le16_to_cpu (nic->eeprom[eeprom_config_asf]) & eeprom_gcl) && + ((le16_to_cpu (nic->eeprom[eeprom_smbus_addr]) &0xFF ) !=0xFE ); }static int e100_up (struct nic *nic)
@@ -2952,7 +2952,7 @@ static int e100_probe(struct pci_dev *pdev, const struct pci_device_id *ent)/* Wol magic packet can be enabled from eeprom */ if ((nic->mac >= mac_82558_D101_A4) && - (nic->eeprom[eeprom_id] & eeprom_id_wol)) { + (le16_to_cpu (nic->eeprom[eeprom_id]) & eeprom_id_wol)) { nic->flags |= wol_magic;device_set_wakeup_enable (&pdev->dev, true); }
drivers/net/ethernet/intel/i40e/i40e_main.c +2 -0
@@ -5478,6 +5478,8 @@ int i40e_vsi_open(struct i40e_vsi *vsi)dev_driver_string (&pf->pdev->dev), dev_name(&pf->pdev->dev)); err =i40e_vsi_request_irq (vsi, int_name); +if (err) + goto err_setup_rx; }else { err = -EINVAL ;
drivers/net/ethernet/micrel/ks8842.c +4 -0
@@ -1150,6 +1150,10 @@ static int ks8842_probe(struct platform_device *pdev)unsigned i; iomem =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); +if (!iomem) { +dev_err (&pdev->dev,"Invalid resource\n" ); +return -EINVAL ; + }if (!request_mem_region (iomem->start,resource_size (iomem),DRV_NAME )) goto err_mem_region;
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +13 -16
@@ -124,7 +124,7 @@ static int pch_ptp_match(struct sk_buff *skb, u16 uid_hi, u32 uid_lo, u16 seqid) {u8 *data = skb->data;unsigned int offset; -u16 *hi, *id; +u16 hi, id;u32 lo;if (ptp_classify_raw (skb) ==PTP_CLASS_NONE )
@@ -135,14 +135,11 @@ static int pch_ptp_match(struct sk_buff *skb, u16 uid_hi, u32 uid_lo, u16 seqid)if (skb->len < offset +OFF_PTP_SEQUENCE_ID +sizeof (seqid))return 0 ; - hi = (u16 *)(data + offset +OFF_PTP_SOURCE_UUID ); - id = (u16 *)(data + offset +OFF_PTP_SEQUENCE_ID ); + hi =get_unaligned_be16 (data + offset +OFF_PTP_SOURCE_UUID +0 ); + lo =get_unaligned_be32 (data + offset +OFF_PTP_SOURCE_UUID +2 ); + id =get_unaligned_be16 (data + offset +OFF_PTP_SEQUENCE_ID ); -memcpy (&lo, &hi[1 ],sizeof (lo)); - -return (uid_hi == *hi && - uid_lo == lo && - seqid == *id); +return (uid_hi == hi && uid_lo == lo && seqid == id); } static void
@@ -152,7 +149,6 @@ pch_rx_timestamp(struct pch_gbe_adapter *adapter, struct sk_buff *skb)struct pci_dev *pdev;u64 ns;u32 hi, lo, val; -u16 uid, seq;if (!adapter->hwts_rx_en)return ;
@@ -168,10 +164,7 @@ pch_rx_timestamp(struct pch_gbe_adapter *adapter, struct sk_buff *skb) lo =pch_src_uuid_lo_read (pdev); hi =pch_src_uuid_hi_read (pdev); - uid = hi &0xffff ; - seq = (hi >>16 ) &0xffff ; - -if (!pch_ptp_match (skb,htons (uid),htonl (lo),htons (seq))) +if (!pch_ptp_match (skb, hi, lo, hi >>16 )) goto out; ns =pch_rx_snap_read (pdev);
@@ -2617,9 +2610,13 @@ static int pch_gbe_probe(struct pci_dev *pdev, adapter->pdev = pdev; adapter->hw.back = adapter; adapter->hw.reg =pcim_iomap_table (pdev)[PCH_GBE_PCI_BAR ]; + adapter->pdata = (struct pch_gbe_privdata *)pci_id->driver_data; -if (adapter->pdata && adapter->pdata->platform_init) - adapter->pdata->platform_init (pdev); +if (adapter->pdata && adapter->pdata->platform_init) { + ret = adapter->pdata->platform_init (pdev); +if (ret) + goto err_free_netdev; + } adapter->ptp_pdev =pci_get_bus_and_slot (adapter->pdev->bus->number,PCI_DEVFN (12 ,4 ));
@@ -2709,7 +2706,7 @@ static int pch_gbe_probe(struct pci_dev *pdev,*/ static int pch_gbe_minnow_platform_init (struct pci_dev *pdev) { -unsigned long flags =GPIOF_DIR_OUT |GPIOF_INIT_HIGH |GPIOF_EXPORT ; +unsigned long flags =GPIOF_OUT_INIT_HIGH ;unsigned gpio =MINNOW_PHY_RESET_GPIO ;int ret;
drivers/net/ethernet/sfc/ef10_sriov.c +12 -13
@@ -405,12 +405,17 @@ static int efx_ef10_pci_sriov_enable(struct efx_nic *efx, int num_vfs)return rc; } +/* Disable SRIOV and remove VFs +* If some VFs are attached to a guest (using Xen, only) nothing is +* done if force=false, and vports are freed if force=true (for the non +* attachedc ones, only) but SRIOV is not disabled and VFs are not +* removed in either case. +*/ static int efx_ef10_pci_sriov_disable (struct efx_nic *efx,bool force) {struct pci_dev *dev = efx->pci_dev; -unsigned int vfs_assigned =0 ; - - vfs_assigned =pci_vfs_assigned (dev); +unsigned int vfs_assigned =pci_vfs_assigned (dev); +int rc =0 ;if (vfs_assigned && !force) { netif_info(efx, drv, efx->net_dev, "VFs are assigned to guests; "
@@ -420,10 +425,12 @@ static int efx_ef10_pci_sriov_disable(struct efx_nic *efx, bool force)if (!vfs_assigned)pci_disable_sriov (dev); +else + rc = -EBUSY ;efx_ef10_sriov_free_vf_vswitching (efx); efx->vf_count =0 ; -return 0 ; +return rc; }int efx_ef10_sriov_configure (struct efx_nic *efx,int num_vfs)
@@ -442,7 +449,6 @@ int efx_ef10_sriov_init(struct efx_nic *efx)void efx_ef10_sriov_fini (struct efx_nic *efx) {struct efx_ef10_nic_data *nic_data = efx->nic_data; -unsigned int i;int rc;if (!nic_data->vf) {
@@ -452,14 +458,7 @@ void efx_ef10_sriov_fini(struct efx_nic *efx)return ; } -/* Remove any VFs in the host */ -for (i =0 ; i < efx->vf_count; ++i) { -struct efx_nic *vf_efx = nic_data->vf[i].efx; - -if (vf_efx) - vf_efx->pci_dev->driver->remove (vf_efx->pci_dev); - } - +/* Disable SRIOV and remove any VFs in the host */ rc =efx_ef10_pci_sriov_disable (efx, true);if (rc) netif_dbg(efx, drv, efx->net_dev,
drivers/net/fjes/fjes_main.c +4 -0
@@ -1212,6 +1212,10 @@ static int fjes_probe(struct platform_device *plat_dev) adapter->interrupt_watch_enable = false; res =platform_get_resource (plat_dev,IORESOURCE_MEM ,0 ); +if (!res) { + err = -EINVAL ; + goto err_free_control_wq; + } hw->hw_res.start = res->start; hw->hw_res.size =resource_size (res); hw->hw_res.irq =platform_get_irq (plat_dev,0 );
drivers/net/vxlan.c +2 -0
@@ -1594,6 +1594,7 @@ static int neigh_reduce(struct net_device *dev, struct sk_buff *skb)struct neighbour *n;struct inet6_dev *in6_dev; +rcu_read_lock (); in6_dev =__in6_dev_get (dev);if (!in6_dev) goto out;
@@ -1650,6 +1651,7 @@ static int neigh_reduce(struct net_device *dev, struct sk_buff *skb) } out: +rcu_read_unlock ();consume_skb (skb);return NETDEV_TX_OK ; }
drivers/net/wireless/ath/ath10k/mac.c +1 -0
@@ -4947,6 +4947,7 @@ static int ath10k_add_interface(struct ieee80211_hw *hw,if (arvif->nohwcrypt && !test_bit (ATH10K_FLAG_RAW_MODE , &ar->dev_flags)) { + ret = -EINVAL ;ath10k_warn (ar,"cryptmode module param needed for sw crypto\n" ); goto err; }
drivers/net/wireless/ath/ath9k/main.c +5 -0
@@ -302,6 +302,11 @@ static int ath_reset_internal(struct ath_softc *sc, struct ath9k_channel *hchan) hchan = ah->curchan; } +if (!hchan) { + fastcc = false; + hchan =ath9k_cmn_get_channel (sc->hw, ah, &sc->cur_chan->chandef); + } +if (!ath_prepare_reset (sc)) fastcc = false;
drivers/net/wireless/ath/carl9170/Kconfig +3 -5
@@ -15,13 +15,11 @@ config CARL9170 config CARL9170_LEDS bool "SoftLED Support" - depends on CARL9170 - select MAC80211_LEDS - select LEDS_CLASS - select NEW_LEDS default y + depends on CARL9170 + depends on MAC80211_LEDS help - This option is necessary, if you want your device' LEDs to blink + This option is necessary, if you want your device's LEDs to blink. Say Y, unless you need the LEDs for firmware debugging.
drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c +7 -1
@@ -1221,6 +1221,7 @@ static int brcms_bcma_probe(struct bcma_device *pdev) {struct brcms_info *wl;struct ieee80211_hw *hw; +int ret; dev_info(&pdev->dev, "mfg %x core %x rev %d class %d irq %d\n", pdev->id.manuf, pdev->id.id, pdev->id.rev, pdev->id.class,
@@ -1245,11 +1246,16 @@ static int brcms_bcma_probe(struct bcma_device *pdev) wl =brcms_attach (pdev);if (!wl) {pr_err ("%s: brcms_attach failed!\n" , __func__); -return -ENODEV ; + ret = -ENODEV ; + goto err_free_ieee80211; }brcms_led_register (wl);return 0 ; + +err_free_ieee80211: +ieee80211_free_hw (hw); +return ret; }static int brcms_suspend (struct bcma_device *pdev)
drivers/net/wireless/st/cw1200/cw1200_sdio.c +1 -0
@@ -62,6 +62,7 @@ static const struct sdio_device_id cw1200_sdio_ids[] = { { SDIO_DEVICE(SDIO_VENDOR_ID_STE, SDIO_DEVICE_ID_STE_CW1200) }, { /* end: all zeroes */ }, }; +MODULE_DEVICE_TABLE (sdio, cw1200_sdio_ids);/* hwbus_ops implemetation */
drivers/net/wireless/ti/wl1251/cmd.c +6 -3
@@ -465,9 +465,12 @@ int wl1251_cmd_scan(struct wl1251 *wl, u8 *ssid, size_t ssid_len, cmd->channels[i].channel = channels[i]->hw_value; } - cmd->params.ssid_len = ssid_len; -if (ssid) -memcpy (cmd->params.ssid, ssid, ssid_len); +if (ssid) { +int len =clamp_val (ssid_len,0 ,IEEE80211_MAX_SSID_LEN ); + + cmd->params.ssid_len = len; +memcpy (cmd->params.ssid, ssid, len); + } ret =wl1251_cmd_send (wl,CMD_SCAN , cmd,sizeof (*cmd));if (ret <0 ) {
drivers/net/wireless/ti/wl12xx/main.c +7 -0
@@ -1516,6 +1516,13 @@ static int wl12xx_get_fuse_mac(struct wl1271 *wl)u32 mac1, mac2;int ret; +/* Device may be in ELP from the bootloader or kexec */ + ret =wlcore_write32 (wl,WL12XX_WELP_ARM_COMMAND ,WELP_ARM_COMMAND_VAL ); +if (ret <0 ) + goto out; + +usleep_range (500000 ,700000 ); + ret =wlcore_set_partition (wl, &wl->ptable[PART_DRPW ]);if (ret <0 ) goto out;
drivers/of/fdt.c +4 -4
@@ -605,11 +605,11 @@ static int __init __reserved_mem_reserve_reg(unsigned long node,if (size &&early_init_dt_reserve_memory_arch (base, size, nomap) ==0 ) -pr_debug ("Reserved memory: reserved region for node '%s': base %pa, size %ld MiB\n" , - uname, &base, (unsigned long )size /SZ_1M ); +pr_debug ("Reserved memory: reserved region for node '%s': base %pa, size %lu MiB\n" , + uname, &base, (unsigned long )(size /SZ_1M ));else -pr_info ("Reserved memory: failed to reserve memory for node '%s': base %pa, size %ld MiB\n" , - uname, &base, (unsigned long )size /SZ_1M ); +pr_info ("Reserved memory: failed to reserve memory for node '%s': base %pa, size %lu MiB\n" , + uname, &base, (unsigned long )(size /SZ_1M )); len -= t_len;if (first) {
drivers/of/of_reserved_mem.c +4 -4
@@ -158,9 +158,9 @@ static int __init __reserved_mem_alloc_size(unsigned long node, ret =early_init_dt_alloc_reserved_memory_arch (size, align, start, end, nomap, &base);if (ret ==0 ) { -pr_debug ("allocated memory for '%s' node: base %pa, size %ld MiB\n" , +pr_debug ("allocated memory for '%s' node: base %pa, size %lu MiB\n" , uname, &base, - (unsigned long )size /SZ_1M ); + (unsigned long )(size /SZ_1M ));break ; } len -= t_len;
@@ -170,8 +170,8 @@ static int __init __reserved_mem_alloc_size(unsigned long node, ret =early_init_dt_alloc_reserved_memory_arch (size, align,0 ,0 , nomap, &base);if (ret ==0 ) -pr_debug ("allocated memory for '%s' node: base %pa, size %ld MiB\n" , - uname, &base, (unsigned long )size /SZ_1M ); +pr_debug ("allocated memory for '%s' node: base %pa, size %lu MiB\n" , + uname, &base, (unsigned long )(size /SZ_1M )); }if (base ==0 ) {
drivers/pci/pci-label.c +1 -1
@@ -157,7 +157,7 @@ static void dsm_label_utf16s_to_utf8s(union acpi_object *obj, char *buf) len =utf16s_to_utf8s ((const wchar_t *)obj->buffer.pointer, obj->buffer.length,UTF16_LITTLE_ENDIAN , - buf,PAGE_SIZE ); + buf,PAGE_SIZE -1 ); buf[len] ='\n' ; }
drivers/phy/phy-dm816x-usb.c +13 -4
@@ -246,19 +246,28 @@ static int dm816x_usb_phy_probe(struct platform_device *pdev)pm_runtime_enable (phy->dev); generic_phy =devm_phy_create (phy->dev,NULL , &ops); -if (IS_ERR (generic_phy)) -return PTR_ERR (generic_phy); +if (IS_ERR (generic_phy)) { + error =PTR_ERR (generic_phy); + goto clk_unprepare; + }phy_set_drvdata (generic_phy, phy); phy_provider =devm_of_phy_provider_register (phy->dev, of_phy_simple_xlate); -if (IS_ERR (phy_provider)) -return PTR_ERR (phy_provider); +if (IS_ERR (phy_provider)) { + error =PTR_ERR (phy_provider); + goto clk_unprepare; + }usb_add_phy_dev (&phy->phy);return 0 ; + +clk_unprepare: +pm_runtime_disable (phy->dev); +clk_unprepare (phy->refclk); +return error; }static int dm816x_usb_phy_remove (struct platform_device *pdev)
drivers/pinctrl/pinctrl-amd.c +1 -0
@@ -896,6 +896,7 @@ static int amd_gpio_remove(struct platform_device *pdev)static const struct acpi_device_id amd_gpio_acpi_match[] = { {"AMD0030" ,0 }, {"AMDI0030" ,0 }, + {"AMDI0031" ,0 }, { }, };MODULE_DEVICE_TABLE (acpi, amd_gpio_acpi_match);
drivers/platform/x86/toshiba_acpi.c +1 -0
@@ -2866,6 +2866,7 @@ static int toshiba_acpi_setup_keyboard(struct toshiba_acpi_dev *dev)if (!dev->info_supported && !dev->system_event_supported) {pr_warn ("No hotkey query interface found\n" ); + error = -EINVAL ; goto err_remove_filter; }
drivers/power/reset/gpio-poweroff.c +1 -0
@@ -84,6 +84,7 @@ static const struct of_device_id of_gpio_poweroff_match[] = { { .compatible = "gpio-poweroff", }, {}, }; +MODULE_DEVICE_TABLE (of, of_gpio_poweroff_match);static struct platform_driver gpio_poweroff_driver = { .probe = gpio_poweroff_probe,
drivers/power/supply/Kconfig +2 -1
@@ -490,7 +490,8 @@ config BATTERY_GOLDFISH config BATTERY_RT5033 tristate "RT5033 fuel gauge support" - depends on MFD_RT5033 + depends on I2C + select REGMAP_I2C help This adds support for battery fuel gauge in Richtek RT5033 PMIC. The fuelgauge calculates and determines the battery state of charge
drivers/power/supply/ab8500_btemp.c +1 -0
@@ -1181,6 +1181,7 @@ static const struct of_device_id ab8500_btemp_match[] = { { .compatible = "stericsson,ab8500-btemp", }, { }, }; +MODULE_DEVICE_TABLE (of, ab8500_btemp_match);static struct platform_driver ab8500_btemp_driver = { .probe = ab8500_btemp_probe,
drivers/power/supply/ab8500_charger.c +18 -1
@@ -409,6 +409,14 @@ static void ab8500_enable_disable_sw_fallback(struct ab8500_charger *di,static void ab8500_power_supply_changed (struct ab8500_charger *di,struct power_supply *psy) { +/* +* This happens if we get notifications or interrupts and +* the platform has been configured not to support one or +* other type of charging. +*/ +if (!psy) +return ; +if (di->autopower_cfg) { if (!di->usb.charger_connected && !di->ac.charger_connected &&
@@ -435,7 +443,15 @@ static void ab8500_charger_set_usb_connected(struct ab8500_charger *di,if (!connected) di->flags.vbus_drop_end = false; -sysfs_notify (&di->usb_chg.psy->dev.kobj,NULL ,"present" ); +/* +* Sometimes the platform is configured not to support +* USB charging and no psy has been created, but we still +* will get these notifications. +*/ +if (di->usb_chg.psy) { +sysfs_notify (&di->usb_chg.psy->dev.kobj,NULL , +"present" ); + }if (connected) {mutex_lock (&di->charger_attached_mutex);
@@ -3736,6 +3752,7 @@ static const struct of_device_id ab8500_charger_match[] = { { .compatible = "stericsson,ab8500-charger", }, { }, }; +MODULE_DEVICE_TABLE (of, ab8500_charger_match);static struct platform_driver ab8500_charger_driver = { .probe = ab8500_charger_probe,
drivers/power/supply/ab8500_fg.c +1 -0
@@ -3229,6 +3229,7 @@ static const struct of_device_id ab8500_fg_match[] = { { .compatible = "stericsson,ab8500-fg", }, { }, }; +MODULE_DEVICE_TABLE (of, ab8500_fg_match);static struct platform_driver ab8500_fg_driver = { .probe = ab8500_fg_probe,
drivers/power/supply/charger-manager.c +1 -0
@@ -1489,6 +1489,7 @@ static const struct of_device_id charger_manager_match[] = { }, {}, }; +MODULE_DEVICE_TABLE (of, charger_manager_match);static struct charger_desc *of_cm_parse_desc (struct device *dev) {
drivers/power/supply/rt5033_battery.c +7 -0
@@ -167,9 +167,16 @@ static const struct i2c_device_id rt5033_battery_id[] = { };MODULE_DEVICE_TABLE (i2c, rt5033_battery_id); +static const struct of_device_id rt5033_battery_of_match[] = { + { .compatible ="richtek,rt5033-battery" , }, + { } +}; +MODULE_DEVICE_TABLE (of, rt5033_battery_of_match); +static struct i2c_driver rt5033_battery_driver = { .driver = { .name ="rt5033-battery" , + .of_match_table = rt5033_battery_of_match, }, .probe = rt5033_battery_probe, .remove = rt5033_battery_remove,
drivers/pwm/pwm-spear.c +0 -4
@@ -231,10 +231,6 @@ static int spear_pwm_probe(struct platform_device *pdev)static int spear_pwm_remove (struct platform_device *pdev) {struct spear_pwm_chip *pc =platform_get_drvdata (pdev); -int i; - -for (i =0 ; i <NUM_PWM ; i++) -pwm_disable (&pc->chip.pwms[i]);/* clk was prepared in probe, hence unprepare it here */ clk_unprepare (pc->clk);
drivers/pwm/pwm-tegra.c +0 -13
@@ -228,7 +228,6 @@ static int tegra_pwm_probe(struct platform_device *pdev)static int tegra_pwm_remove (struct platform_device *pdev) {struct tegra_pwm_chip *pc =platform_get_drvdata (pdev); -unsigned int i;int err;if (WARN_ON (!pc))
@@ -238,18 +237,6 @@ static int tegra_pwm_remove(struct platform_device *pdev)if (err <0 )return err; -for (i =0 ; i < pc->chip.npwm; i++) { -struct pwm_device *pwm = &pc->chip.pwms[i]; - -if (!pwm_is_enabled (pwm)) -if (clk_prepare_enable (pc->clk) <0 ) -continue ; - -pwm_writel (pc, i,0 ); - -clk_disable_unprepare (pc->clk); - } -reset_control_assert (pc->rst);clk_disable_unprepare (pc->clk);
drivers/regulator/da9052-regulator.c +2 -1
@@ -258,7 +258,8 @@ static int da9052_regulator_set_voltage_time_sel(struct regulator_dev *rdev,case DA9052_ID_BUCK3 :case DA9052_ID_LDO2 :case DA9052_ID_LDO3 : - ret = (new_sel - old_sel) * info->step_uV /6250 ; + ret =DIV_ROUND_UP (abs (new_sel - old_sel) * info->step_uV, +6250 );break ; }
drivers/reset/core.c +4 -1
@@ -263,7 +263,10 @@ static struct reset_control *__reset_control_get_internal(if (!rstc)return ERR_PTR (-ENOMEM ); -try_module_get (rcdev->owner); +if (!try_module_get (rcdev->owner)) { +kfree (rstc); +return ERR_PTR (-ENODEV ); + } rstc->rcdev = rcdev;list_add (&rstc->list, &rcdev->reset_control_head);
drivers/rtc/rtc-proc.c +2 -2
@@ -26,8 +26,8 @@ static bool is_rtc_hctosys(struct rtc_device *rtc)int size;char name[NAME_SIZE ]; - size =scnprintf (name,NAME_SIZE ,"rtc%d" , rtc->id); -if (size >NAME_SIZE ) + size =snprintf (name,NAME_SIZE ,"rtc%d" , rtc->id); +if (size >=NAME_SIZE )return false;return !strncmp (name,CONFIG_RTC_HCTOSYS_DEVICE ,NAME_SIZE );
drivers/s390/char/sclp_vt220.c +2 -2
@@ -34,8 +34,8 @@#define SCLP_VT220_MINOR 65#define SCLP_VT220_DRIVER_NAME "sclp_vt220"#define SCLP_VT220_DEVICE_NAME "ttysclp" -#define SCLP_VT220_CONSOLE_NAME "ttyS" -#define SCLP_VT220_CONSOLE_INDEX 1/* console=ttyS1 */ +#define SCLP_VT220_CONSOLE_NAME "ttysclp" +#define SCLP_VT220_CONSOLE_INDEX 0/* console=ttysclp0 */ /* Representation of a single write request */ struct sclp_vt220_request {
drivers/s390/cio/chp.c +3 -0
@@ -254,6 +254,9 @@ static ssize_t chp_status_write(struct device *dev,if (!num_args)return count; +/* Wait until previous actions have settled. */ +css_wait_for_slow_path (); +if (!strncasecmp (cmd,"on" ,2 ) || !strcmp (cmd,"1" )) {mutex_lock (&cp->lock); error =s390_vary_chpid (cp->chpid,1 );
drivers/s390/cio/chsc.c +0 -2
@@ -769,8 +769,6 @@ int chsc_chp_vary(struct chp_id chpid, int on) {struct channel_path *chp =chpid_to_chp (chpid); -/* Wait until previous actions have settled. */ -css_wait_for_slow_path ();/* * Redo PathVerification on the devices the chpid connects to */
drivers/scsi/FlashPoint.c +16 -16
@@ -40,7 +40,7 @@ struct sccb_mgr_info {u16 si_per_targ_ultra_nego;u16 si_per_targ_no_disc;u16 si_per_targ_wide_nego; -u16 si_flags; +u16 si_mflags;unsigned char si_card_family;unsigned char si_bustype;unsigned char si_card_model[3 ];
@@ -1070,22 +1070,22 @@ static int FlashPoint_ProbeHostAdapter(struct sccb_mgr_info *pCardInfo) ScamFlg = (unsigned char )FPT_utilEERead (ioport,SCAM_CONFIG /2 ); - pCardInfo->si_flags =0x0000 ; + pCardInfo->si_mflags =0x0000 ;if (i &0x01 ) - pCardInfo->si_flags |=SCSI_PARITY_ENA ; + pCardInfo->si_mflags |=SCSI_PARITY_ENA ;if (!(i &0x02 )) - pCardInfo->si_flags |=SOFT_RESET ; + pCardInfo->si_mflags |=SOFT_RESET ;if (i &0x10 ) - pCardInfo->si_flags |=EXTENDED_TRANSLATION ; + pCardInfo->si_mflags |=EXTENDED_TRANSLATION ;if (ScamFlg &SCAM_ENABLED ) - pCardInfo->si_flags |=FLAG_SCAM_ENABLED ; + pCardInfo->si_mflags |=FLAG_SCAM_ENABLED ;if (ScamFlg &SCAM_LEVEL2 )
Lines of this file are not shown. View the raw message.
drivers/staging/media/s5p-cec/s5p_cec.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/usb/gadget/function/f_eem.c +39 -4
43 lines not on this page · raw message
include/linux/mfd/abx500/ux500_chargalg.h +1 -1
Lines of this file are not shown. View the raw message.
tools/testing/selftests/powerpc/pmu/ebb/no_handler_test.c +0 -2
Lines of this file are not shown. View the raw message.
tools/testing/selftests/x86/protection_keys.c +2 -1
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.