Linux 4.9.233
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.9.233 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
------------
Documentation/ABI/testing/sysfs-bus-iio | 3 Makefile | 2 arch/arm/include/asm/percpu.h | 2 arch/arm/kernel/hw_breakpoint.c | 27 +- arch/arm/kernel/stacktrace.c | 24 ++ arch/arm/mach-at91/pm.c | 11 arch/arm/mach-socfpga/pm.c | 8 arch/arm64/boot/dts/exynos/exynos7-espresso.dts | 1 arch/arm64/boot/dts/qcom/msm8916-pins.dtsi | 10 arch/arm64/include/asm/checksum.h | 5 arch/m68k/mac/iop.c | 21 - arch/mips/include/uapi/asm/Kbuild | 3 arch/mips/kernel/topology.c | 2 arch/parisc/include/asm/cmpxchg.h | 2 arch/parisc/lib/bitops.c | 12 + arch/powerpc/include/asm/percpu.h | 4 arch/powerpc/include/uapi/asm/Kbuild | 1 arch/powerpc/kernel/vdso.c | 2 arch/powerpc/platforms/pseries/hotplug-memory.c | 2 arch/sh/boards/mach-landisk/setup.c | 3 arch/sh/kernel/entry-common.S | 6 arch/x86/kernel/i8259.c | 2 arch/x86/kernel/vmlinux.lds.S | 3 arch/x86/kvm/lapic.c | 2 arch/xtensa/kernel/perf_event.c | 2 drivers/acpi/acpica/exprep.c | 4 drivers/acpi/acpica/utdelete.c | 6 drivers/android/binder.c | 9 drivers/atm/atmtcp.c | 10 drivers/char/agp/intel-gtt.c | 4 drivers/char/random.c | 1 drivers/clk/sirf/clk-atlas6.c | 2 drivers/crypto/ccp/ccp-dev.h | 1 drivers/crypto/ccp/ccp-ops.c | 40 ++- drivers/crypto/qat/qat_common/qat_uclo.c | 9 drivers/edac/edac_device_sysfs.c | 1 drivers/edac/edac_pci_sysfs.c | 2 drivers/gpio/gpiolib-of.c | 2 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3 drivers/gpu/drm/drm_debugfs.c | 8 drivers/gpu/drm/drm_gem.c | 10 drivers/gpu/drm/drm_mipi_dsi.c | 6 drivers/gpu/drm/imx/imx-tve.c | 20 - drivers/gpu/drm/nouveau/nouveau_drm.c | 8 drivers/gpu/drm/nouveau/nouveau_fbcon.c | 1 drivers/gpu/drm/nouveau/nouveau_gem.c | 4 drivers/gpu/drm/panel/panel-simple.c | 2 drivers/gpu/drm/radeon/ci_dpm.c | 2 drivers/gpu/drm/radeon/radeon_display.c | 4 drivers/gpu/drm/radeon/radeon_drv.c | 4 drivers/gpu/drm/radeon/radeon_kms.c | 4 drivers/gpu/drm/tilcdc/tilcdc_panel.c | 6 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 8 drivers/gpu/ipu-v3/ipu-image-convert.c | 58 +---- drivers/i2c/busses/i2c-cadence.c | 9 drivers/i2c/busses/i2c-rcar.c | 7 drivers/iio/dac/ad5592r-base.c | 4 drivers/input/mouse/sentelic.c | 2 drivers/iommu/omap-iommu-debug.c | 3 drivers/leds/led-class.c | 1 drivers/leds/leds-88pm860x.c | 14 + drivers/leds/leds-da903x.c | 14 + drivers/leds/leds-lm3533.c | 12 - drivers/leds/leds-lm355x.c | 7 drivers/leds/leds-wm831x-status.c | 14 + drivers/md/bcache/bset.c | 2 drivers/md/bcache/btree.c | 2 drivers/md/bcache/journal.c | 4 drivers/md/bcache/super.c | 11 drivers/md/md-cluster.c | 1 drivers/md/raid5.c | 3 drivers/media/firewire/firedtv-fw.c | 2 drivers/media/pci/cx23885/cx23888-ir.c | 5 drivers/media/platform/exynos4-is/media-dev.c | 3 drivers/media/platform/omap3isp/isppreview.c | 4 drivers/mfd/arizona-core.c | 18 + drivers/mfd/dln2.c | 4 drivers/misc/cxl/sysfs.c | 2 drivers/mtd/mtdchar.c | 56 ++++ drivers/net/ethernet/freescale/fman/fman.c | 3 drivers/net/ethernet/freescale/fman/fman_dtsec.c | 4 drivers/net/ethernet/freescale/fman/fman_mac.h | 2 drivers/net/ethernet/freescale/fman/fman_memac.c | 3 drivers/net/ethernet/freescale/fman/fman_port.c | 9 drivers/net/ethernet/freescale/fman/fman_tgec.c | 2 drivers/net/ethernet/ibm/ibmvnic.c | 2 drivers/net/ethernet/intel/igb/igb_main.c | 9 drivers/net/ethernet/mellanox/mlx4/main.c | 2 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 drivers/net/ethernet/mellanox/mlxsw/core.c | 8 drivers/net/ethernet/qlogic/qed/qed_int.c | 3 drivers/net/ethernet/qualcomm/emac/emac.c | 17 + drivers/net/ethernet/renesas/ravb_main.c | 26 ++ drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c | 1 drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c | 3 drivers/net/ethernet/toshiba/spider_net.c | 4 drivers/net/phy/mdio-bcm-unimac.c | 2 drivers/net/usb/hso.c | 10 drivers/net/usb/lan78xx.c | 113 ++-------- drivers/net/vxlan.c | 10 drivers/net/wan/lapbether.c | 10 drivers/net/wireless/ath/ath9k/htc_hst.c | 3 drivers/net/wireless/ath/ath9k/wmi.c | 1 drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h | 2 drivers/net/wireless/intel/iwlegacy/common.c | 4 drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c | 22 + drivers/net/wireless/ti/wl1251/event.c | 2 drivers/net/xen-netfront.c | 64 +++-- drivers/nfc/s3fwrn5/core.c | 1 drivers/parisc/sba_iommu.c | 2 drivers/pci/access.c | 8 drivers/pci/hotplug/acpiphp_glue.c | 14 - drivers/pci/pcie/aspm.c | 1 drivers/pci/quirks.c | 13 + drivers/pinctrl/pinctrl-single.c | 11 drivers/platform/x86/intel-hid.c | 2 drivers/platform/x86/intel-vbtn.c | 2 drivers/power/supply/88pm860x_battery.c | 6 drivers/pwm/pwm-bcm-iproc.c | 9 drivers/s390/net/qeth_l2_main.c | 4 drivers/scsi/arm/cumana_2.c | 2 drivers/scsi/arm/eesox.c | 2 drivers/scsi/arm/powertec.c | 2 drivers/scsi/mesh.c | 8 drivers/scsi/scsi_debug.c | 6 drivers/staging/rtl8192u/r8192U_core.c | 2 drivers/usb/dwc2/platform.c | 4 drivers/usb/gadget/udc/bdc/bdc_core.c | 4 drivers/usb/gadget/udc/bdc/bdc_ep.c | 16 - drivers/usb/gadget/udc/net2280.c | 4 drivers/usb/serial/cp210x.c | 19 + drivers/usb/serial/ftdi_sio.c | 37 +-- drivers/usb/serial/iuu_phoenix.c | 14 - drivers/usb/serial/qcserial.c | 1 drivers/video/console/bitblit.c | 4 drivers/video/console/fbcon_ccw.c | 4 drivers/video/console/fbcon_cw.c | 4 drivers/video/console/fbcon_ud.c | 4 drivers/video/console/newport_con.c | 12 - drivers/video/console/vgacon.c | 4 drivers/video/fbdev/neofb.c | 1 drivers/video/fbdev/omap2/omapfb/dss/dss.c | 2 drivers/video/fbdev/pxafb.c | 4 drivers/video/fbdev/sm712fb.c | 2 drivers/watchdog/f71808e_wdt.c | 13 - drivers/xen/balloon.c | 12 - fs/9p/v9fs.c | 5 fs/btrfs/disk-io.c | 13 - fs/btrfs/extent_io.c | 2 fs/btrfs/free-space-cache.c | 4 fs/btrfs/tree-log.c | 8 fs/cifs/smb2pdu.c | 2 fs/dlm/lockspace.c | 6 fs/ext2/ialloc.c | 3 fs/ext4/inode.c | 5 fs/f2fs/dir.c | 12 - fs/minix/inode.c | 36 +++ fs/minix/itree_common.c | 8 fs/nfs/nfs4proc.c | 2 fs/nfs/nfs4xdr.c | 6 fs/ocfs2/ocfs2.h | 4 fs/ocfs2/suballoc.c | 4 fs/ocfs2/super.c | 4 fs/ufs/super.c | 2 fs/xattr.c | 84 ++++++- fs/xfs/libxfs/xfs_attr_leaf.c | 5 fs/xfs/xfs_icache.c | 58 ++++- fs/xfs/xfs_log.c | 9 fs/xfs/xfs_reflink.c | 21 + include/asm-generic/vmlinux.lds.h | 5 include/linux/intel-iommu.h | 4 include/linux/mmzone.h | 3 include/linux/prandom.h | 78 ++++++ include/linux/random.h | 63 ----- include/linux/tracepoint.h | 2 include/linux/xattr.h | 2 include/net/addrconf.h | 1 include/net/sock.h | 4 include/uapi/drm/Kbuild | 3 include/uapi/linux/Kbuild | 20 + include/uapi/linux/bcache.h | 2 include/uapi/linux/btrfs_tree.h | 2 include/uapi/linux/cifs/Kbuild | 1 include/uapi/linux/cryptouser.h | 2 include/uapi/linux/genwqe/Kbuild | 1 include/uapi/linux/pr.h | 2 include/uapi/linux/qrtr.h | 1 init/main.c | 2 kernel/cgroup.c | 2 kernel/kprobes.c | 7 kernel/time/timer.c | 8 kernel/trace/ftrace.c | 11 lib/dynamic_debug.c | 23 -- lib/random32.c | 2 mm/khugepaged.c | 22 + mm/memory_hotplug.c | 10 mm/mmap.c | 1 mm/page_alloc.c | 7 net/9p/trans_fd.c | 56 +++- net/bluetooth/6lowpan.c | 5 net/bluetooth/hci_event.c | 11 net/compat.c | 1 net/core/sock.c | 21 + net/ipv4/fib_trie.c | 2 net/ipv6/anycast.c | 17 + net/ipv6/ipv6_sockglue.c | 1 net/mac80211/cfg.c | 1 net/mac80211/mesh_pathtbl.c | 1 net/mac80211/sta_info.c | 2 net/nfc/rawsock.c | 7 net/rds/recv.c | 3 net/socket.c | 2 net/wireless/nl80211.c | 6 net/x25/x25_subr.c | 6 security/smack/smackfs.c | 19 + sound/core/seq/oss/seq_oss.c | 8 sound/pci/echoaudio/echoaudio.c | 2 sound/usb/card.h | 1 sound/usb/mixer_quirks.c | 1 sound/usb/pcm.c | 6 sound/usb/quirks-table.h | 64 +++++ sound/usb/quirks.c | 3 sound/usb/stream.c | 1 tools/lib/traceevent/event-parse.c | 1 tools/testing/selftests/powerpc/benchmarks/context_switch.c | 21 + tools/testing/selftests/powerpc/utils.c | 37 ++- 226 files changed, 1478 insertions(+), 628 deletions(-)
Adam Ford (1):
omapfb: dss: Fix max fclk divider for omap36xx
Aditya Pakki (2):
drm/radeon: Fix reference count leaks caused by pm_runtime_get_sync drm/nouveau: fix multiple instances of reference count leaks
Ahmad Fatoum (3):
watchdog: f71808e_wdt: indicate WDIOF_CARDRESET support in watchdog_info.options
watchdog: f71808e_wdt: remove use of wrong watchdog_info option
watchdog: f71808e_wdt: clear watchdog timeout occurred flag
Alexandru Ardelean (1):
iio: dac: ad5592r: fix unbalanced mutex unlocks in ad5592r_read_raw()
Alim Akhtar (1):
arm64: dts: exynos: Fix silent hang after boot on Espresso
Andrea Righi (1):
xen-netfront: fix potential deadlock in xennet_remove()
Andy Shevchenko (1):
mfd: dln2: Run event handler loop under spinlock
Anton Blanchard (1):
pseries: Fix 64 bit logical memory block panic
Arnd Bergmann (1):
leds: lm355x: avoid enum conversion warning
Ben Skeggs (1):
drm/nouveau/fbcon: fix module unload when fbcon init has failed for some reason
Bjorn Helgaas (1):
PCI: Fix pci_cfg_wait queue locking problem
Bolarinwa Olayemi Saheed (1):
iwlegacy: Check the return value of pcie_capability_read_*()
Brant Merryman (2):
USB: serial: cp210x: re-enable auto-RTS on open
USB: serial: cp210x: enable usb generic throttle/unthrottleChangSyun Peng (1):
md/raid5: Fix Force reconstruct-write io stuck in degraded raid5
Charles Keepax (1):
mfd: arizona: Ensure 32k clock is put on driver unbind and error
Chengming Zhou (1):
ftrace: Setup correct FTRACE_FL_REGS flags for module
Christoph Hellwig (1):
net/9p: validate fds in p9_fd_open
Christophe JAILLET (5):
video: pxafb: Fix the function used to balance a 'dma_alloc_coherent()' call
scsi: cumana_2: Fix different dev_id between request_irq() and free_irq()
scsi: powertec: Fix different dev_id between request_irq() and free_irq()
scsi: eesox: Fix different dev_id between request_irq() and free_irq()
net: spider_net: Fix the size used in a 'dma_free_coherent()' call
Chuhong Yuan (2):
media: omap3isp: Add missed v4l2_ctrl_handler_free() for preview_init_entities()
media: exynos4-is: Add missed check for pinctrl_lookup_state()
Colin Ian King (5):
drm/radeon: fix array out-of-bounds read and write issues
staging: rtl8192u: fix a dubious looking mask before a shift iommu/omap: Check for failure of a call to omap_iommu_dump_ctx
Input: sentelic - fix error return when fsp_reg_write fails fs/ufs: avoid potential u32 multiplication overflow
Coly Li (2):
bcache: fix super block seq numbers comparision in register_cache_set()
bcache: allocate meta data pages as compound pages
Cong Wang (1):
ipv6: fix memory leaks on IPV6_ADDRFORM path
Dan Carpenter (5):
media: firewire: Using uninitialized values in node_probe()
mwifiex: Prevent memory corruption handling keys
Smack: fix another vsscanf out of bounds
Smack: prevent underflow in smk_set_cipso() drm/vmwgfx: Fix two list_for_each loop exit tests
Darrick J. Wong (1):
xfs: fix reflink quota reservation accounting error
Dave Chinner (2):
xfs: catch inode allocation state mismatch corruption
xfs: validate cached inodes are free when allocated
Dejin Zheng (2):
video: fbdev: sm712fb: fix an issue about iounmap for a wrong address
console: newport_con: fix an issue about leak related system resources
Dinghao Liu (1):
ALSA: echoaudio: Fix potential Oops in snd_echo_resume()
Dominique Martinet (1):
9p/trans_fd: abort p9_read_work if req status changed
Drew Fustini (1):
pinctrl-single: fix pcs_parse_pinconf() return value
Emil Velikov (1):
drm/mipi: use dcs write for mipi_dsi_dcs_set_tear_scanline
Eric Biggers (4):
Smack: fix use-after-free in smk_write_relabel_self() fs/minix: check return value of sb_getblk() fs/minix: don't allow getting deleted inodes fs/minix: reject too-large maximum file size
Eric Sandeen (1):
xfs: don't call xfs_da_shrink_inode with NULL bp
Erik Ekman (1):
USB: serial: qcserial: add EM7305 QDL product ID
Erik Kaneda (1):
ACPICA: Do not increment operation_region reference counts for field units
Evgeny Novikov (2):
video: fbdev: neofb: fix memory leak in neo_scan_monitor()
usb: gadget: net2280: fix memory leak on probe error handling paths
Filipe Manana (1):
btrfs: fix memory leaks after failure to lookup checksums during inode logging
Finn Thain (3):
m68k: mac: Don't send IOP message until channel is idle
m68k: mac: Fix IOP status/control register writes
scsi: mesh: Fix panic after host or bus reset
Florinel Iordache (5):
fsl/fman: use 32-bit unsigned integer
fsl/fman: fix dereference null return value
fsl/fman: fix unreachable code
fsl/fman: check dereferencing null pointer
fsl/fman: fix eth hash table allocation
Francesco Ruggeri (1):
igb: reinit_locked() should be called with rtnl_lock
Frank van der Linden (1):
xattr: break delegations in {set,remove}xattr
Geert Uytterhoeven (2):
usb: hso: Fix debug compile warning on sparc32
sh: landisk: Add missing initialization of sh_io_port_base
Greg Kroah-Hartman (2):
mtd: properly check all write ioctls for permissions Linux 4.9.233
Grygorii Strashko (1):
ARM: percpu.h: fix build error
Hangbin Liu (1):
Revert "vxlan: fix tos value before xmit"
Harish (1):
selftests/powerpc: Fix CPU affinity for child process
Hector Martin (3):
ALSA: usb-audio: fix overeager device match for MacroSilicon MS2109
ALSA: usb-audio: add quirk for Pioneer DDJ-RB
ALSA: usb-audio: work around streaming quirk for MacroSilicon MS2109
Huacai Chen (1):
MIPS: CPU#0 is not hotpluggable
Hugh Dickins (1):
khugepaged: retract_page_tables() remember to test exit
Ido Schimmel (4):
mlxsw: core: Increase scope of RCU read-side critical section
mlxsw: core: Free EMAD transactions using kfree_rcu()
ipv4: Silence suspicious RCU usage warning
vxlan: Ensure FDB dump is performed under RCU
Jaegeuk Kim (1):
f2fs: check memory boundary by insane namelen
Jakub Kicinski (1):
mlx4: disable device on shutdown
Jann Horn (1):
binder: Prevent context manager from incrementing ref 0
Jeffrey Mitchell (1):
nfs: Fix getxattr kernel panic and memory overflow
Jiang Ying (1):
ext4: fix direct I/O read error
Jim Cromie (1):
dyndbg: fix a BUG_ON in ddebug_describe_flags
Joerg Roedel (1):
x86, vmlinux.lds: Page-align end of ..page_aligned sections
Johan Hovold (10):
net: lan78xx: add missing endpoint sanity check
net: lan78xx: fix transfer-buffer memory leak
leds: wm831x-status: fix use-after-free on unbind
leds: da903x: fix use-after-free on unbind
leds: lm3533: fix use-after-free on unbind
leds: 88pm860x: fix use-after-free on unbind
net: lan78xx: replace bogus endpoint lookup
USB: serial: iuu_phoenix: fix led-activity helpers
USB: serial: ftdi_sio: make process-packet buffer unsigned
USB: serial: ftdi_sio: clean up receive processing
Johannes Berg (1):
mac80211: fix misplaced while instead of if
John Allen (1):
crypto: ccp - Fix use of merged scatterlists
John Garry (1):
scsi: scsi_debug: Add check for sdebug_max_queue during module init
Jonathan McDowell (2):
net: ethernet: stmmac: Disable hardware multicast filter
net: stmmac: dwmac1000: provide multicast filter fallback
Josef Bacik (1):
btrfs: only search for left_info if there is no right_info in try_merge_free_space
Julian Squires (1):
cfg80211: check vendor command doit pointer before use
Julian Wiedmann (1):
s390/qeth: don't process empty bridge port events
Junxiao Bi (1):
ocfs2: change slot number type s16 to u16
Kai-Heng Feng (1):
leds: core: Flush scheduled work for system suspend
Kees Cook (1):
net/compat: Add missing sock updates for SCM_RIGHTS
Laurence Oberman (1):
qed: Disable "MFW indication via attention" SPAM every 5 minutes
Laurent Pinchart (1):
drm: panel: simple: Fix bpc for LG LB070WV8 panel
Liam Beguin (1):
parisc: add support for cmpxchg on u8 pointers
Lihong Kou (1):
Bluetooth: add a mutex lock to avoid UAF in do_enale_set
Linus Torvalds (2):
random32: remove net_rand_state from the latent entropy gcc plugin
random32: move the pseudo-random 32-bit definitions to prandom.h
Liu Yi L (1):
iommu/vt-d: Enforce PASID devTLB field mask
Lu Wei (2):
platform/x86: intel-hid: Fix return value check in check_acpi_dev() platform/x86: intel-vbtn: Fix return value check in check_acpi_dev()
Marco Felsch (1):
drm/imx: tve: fix regulator_disable error path
Marek Szyprowski (1):
usb: dwc2: Fix error path in gadget registration
Max Filippov (1):
xtensa: fix xtensa_pmu_setup prototype
Miaohe Lin (1):
net: Set fput_needed iff FDPUT_FPUT is set
Michael Ellerman (1):
powerpc: Fix circular dependency between percpu.h and mmu.h
Michael Karcher (1):
sh: Fix validation of system call number
Michael Tretter (1):
drm/debugfs: fix plain echo to connector "force" attribute
Mikulas Patocka (1):
ext2: fix missing percpu_counter_inc
Milton Miller (1):
powerpc/vdso: Fix vdso cpu truncation
Mirko Dietrich (1):
ALSA: usb-audio: Creative USB X-Fi Pro SB1095 volume knob support
Muchun Song (1):
kprobes: Fix NULL pointer dereference at kprobe_ftrace_handler
Nathan Huckleberry (1):
ARM: 8992/1: Fix unwind_frame for clang-built kernels
Navid Emamdoost (5):
crypto: ccp - Release all allocated memory if sha type is invalid
media: rc: prevent memory leak in cx23888_ir_probe
ath9k_htc: release allocated buffer if timed out
ath9k: release allocated buffer if timed out
nfc: s3fwrn5: add missing release on skb in s3fwrn5_recv_frame
Nick Desaulniers (1):
tracepoint: Mark __tracepoint_string's __used
Nicolas Dichtel (1):
uapi: includes linux/types.h before exporting files
Oscar Salvador (1):
mm: Avoid calling build_all_zonelists_init under hotplug context
Paul E. McKenney (2):
fs/btrfs: Add cond_resched() for try_release_extent_mapping() stalls mm/mmap.c: Add cond_resched() for exit_mmap() CPU stalls
Peilin Ye (5):
drm/amdgpu: Prevent kernel-infoleak in amdgpu_info_ioctl()
rds: Prevent kernel-infoleak in rds_notify_queue_get()
Bluetooth: Fix slab-out-of-bounds read in hci_extended_inquiry_result_evt()
Bluetooth: Prevent out-of-bounds read in hci_inquiry_result_evt()
Bluetooth: Prevent out-of-bounds read in hci_inquiry_result_with_rssi_evt()
Philippe Duplessis-Guindon (1):
tools lib traceevent: Fix memory leak in process_dynamic_array_len
Prasanna Kerekoppa (1):
brcmfmac: To fix Bss Info flag definition Bug
Qingyu Li (1):
net/nfc/rawsock.c: add CAP_NET_RAW check.
Qiushi Wu (2):
EDAC: Fix reference count leaks
agp/intel: Fix a memory leak on module initialisation failure
Qu Wenruo (1):
btrfs: don't allocate anonymous block device for user invisible roots
Rafael J. Wysocki (1):
PCI: hotplug: ACPI: Fix context refcounting in acpiphp_grab_context()
Raviteja Narayanam (1):
Revert "i2c: cadence: Fix the hold bit setting"
Rayagonda Kokatanur (1):
pwm: bcm-iproc: handle clk_get_rate() return
Remi Pommarel (2):
mac80211: mesh: Free ie data when leaving mesh
mac80211: mesh: Free pending skb when destroying a mpath
Rik van Riel (1):
xfs: fix missed wakeup on l_flush_wait
Robert Hancock (1):
PCI/ASPM: Disable ASPM on ASMedia ASM1083/1085 PCIe-to-PCI bridge
Robin Murphy (1):
arm64: csum: Fix handling of bad packets
Roger Pau Monne (2):
xen/balloon: fix accounting in alloc_xenballooned_pages error path xen/balloon: make the balloon wait interruptible
Roi Dayan (1):
net/mlx5e: Don't support phys switch id if not in switchdev mode
Rolf Eike Beer (1):
install several missing uapi headers
Rustam Kovhaev (1):
usb: hso: check for return value in hso_serial_common_create()
Sami Tolvanen (1):
x86/build/lto: Fix truncated .bss with -fdata-sections
Sandipan Das (1):
selftests/powerpc: Fix online CPU selection
Sasi Kumar (1):
bdc: Fix bug causing crash after multiple disconnects
Sheng Yong (1):
f2fs: check if file namelen exceeds max value
Stephan Gerhold (1):
arm64: dts: qcom: msm8916: Replace invalid bias-pull-none property
Steve Cohen (1):
drm: hold gem reference until object is no longer accessed
Steve French (1):
smb3: warn on confusing error scenario with sec=krb5
Steve Longerbeam (1):
gpu: ipu-v3: image-convert: Combine rotate/no-rotate irq handlers
Sven Schnelle (1):
parisc: mask out enable and reserved bits from sba imask
Takashi Iwai (1):
ALSA: seq: oss: Serialize ioctls
Tetsuo Handa (1):
fbdev: Detect integer underflow at "struct fbcon_ops"->clear_margins.
Thomas Falcon (1):
ibmvnic: Fix IRQ mapping disposal in error path
Thomas Gleixner (1):
x86/i8259: Use printk_deferred() to prevent deadlock
Tom Rix (2):
power: supply: check if calc_soc succeeded in pm860x_init_battery
crypto: qat - fix double free in qat_uclo_create_batch_init_list
Tomasz Duszynski (1):
iio: improve IIO_CONCENTRATION channel type description
Tomi Valkeinen (1):
drm/tilcdc: fix leak & null ref in panel_connector_get_modes
Uwe Kleine-König (1):
gpio: fix oops resulting from calling of_get_named_gpio(NULL, ...)
Wang Hai (5):
9p/trans_fd: Fix concurrency del of req_list in p9_fd_cancelled/p9_read_work
cxl: Fix kobject memleak
wl1251: fix always return 0 error
dlm: Fix kobject memleak
net: qcom/emac: add missed clk_disable_unprepare in error path of emac_clks_phase1_init
Wanpeng Li (1):
KVM: LAPIC: Prevent setting the tscdeadline timer if the lapic is hw disabled
Wei Yongjun (1):
net: phy: mdio-bcm-unimac: fix potential NULL dereference in unimac_mdio_probe()
Will Deacon (1):
ARM: 8986/1: hw_breakpoint: Don't invoke overflow handler on uaccess watchpoints
Willy Tarreau (2):
random32: update the net random state on interrupt and activity
random: fix circular include dependency on arm64 after addition of percpu.h
Wolfram Sang (1):
i2c: rcar: slave: only send STOP event when we have been addressed
Xie He (1):
drivers/net/wan/lapbether: Added needed_headroom and a skb->len check
Xin Xiong (1):
atm: fix atm_dev refcnt leaks in atmtcp_remove_persistent
Xiongfeng Wang (1):
PCI/ASPM: Add missing newline in sysfs 'policy'
Xiyu Yang (1):
net/x25: Fix x25_neigh refcnt leak when x25 disconnect
Xu Wang (1):
clk: clk-atlas6: fix return value check in atlas6_clk_init()
Yang Yingliang (1):
cgroup: add missing skcd->no_refcnt check in cgroup_sk_clone()
Yoshihiro Shimoda (1):
net: ethernet: ravb: exit if re-initialization fails in tx timeout
Yu Kuai (1):
ARM: socfpga: PM: add missing put_device() call in socfpga_setup_ocram_self_refresh()
YueHaibing (1):
net/x25: Fix null-ptr-deref in x25_disconnect
Yunhai Zhang (1):
vgacon: Fix for missing check in scrollback handling
Zhao Heming (1):
md-cluster: fix wild pointer of unlock_all_bitmaps()
Zheng Bin (1):
9p: Fix memory leak in v9fs_mount
yu kuai (1):
ARM: at91: pm: add missing put_device() call in at91_pm_sram_init()
Greg Kroah-Hartman
maintainerDocumentation/ABI/testing/sysfs-bus-iio +2 -1
@@ -1491,7 +1491,8 @@ What: /sys/bus/iio/devices/iio:deviceX/in_concentrationX_voc_raw KernelVersion: 4.3 Contact: [email protected] Description: - Raw (unscaled no offset etc.) percentage reading of a substance. + Raw (unscaled no offset etc.) reading of a substance. Units + after application of scale and offset are percents. What: /sys/bus/iio/devices/iio:deviceX/in_resistance_raw What: /sys/bus/iio/devices/iio:deviceX/in_resistanceX_raw
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 232 +SUBLEVEL = 233 EXTRAVERSION = NAME = Roaring Lionus
arch/arm/include/asm/percpu.h +2 -0
@@ -16,6 +16,8 @@#ifndef _ASM_ARM_PERCPU_H_#define _ASM_ARM_PERCPU_H_ +#include <asm/thread_info.h> +/* * Same as asm-generic/percpu.h, except that we store the per cpu offset * in the TPIDRPRW. TPIDRPRW only exists on V6K and V7
arch/arm/kernel/hw_breakpoint.c +22 -5
@@ -688,6 +688,12 @@ static void disable_single_step(struct perf_event *bp)arch_install_hw_breakpoint (bp); } +static int watchpoint_fault_on_uaccess (struct pt_regs *regs, +struct arch_hw_breakpoint *info) +{ +return !user_mode (regs) && info->ctrl.privilege ==ARM_BREAKPOINT_USER ; +} +static void watchpoint_handler (unsigned long addr,unsigned int fsr,struct pt_regs *regs) {
@@ -747,16 +753,27 @@ static void watchpoint_handler(unsigned long addr, unsigned int fsr, }pr_debug ("watchpoint fired: address = 0x%x\n" , info->trigger); + +/* +* If we triggered a user watchpoint from a uaccess routine, +* then handle the stepping ourselves since userspace really +* can't help us with this. +*/ +if (watchpoint_fault_on_uaccess (regs, info)) + goto step; +perf_bp_event (wp, regs);/* -* If no overflow handler is present, insert a temporary -* mismatch breakpoint so we can single-step over the -* watchpoint trigger. +* Defer stepping to the overflow handler if one is installed. +* Otherwise, insert a temporary mismatch breakpoint so that +* we can single-step over the watchpoint trigger. */ -if (is_default_overflow_handler (wp)) -enable_single_step (wp,instruction_pointer (regs)); +if (!is_default_overflow_handler (wp)) + goto unlock; +step: +enable_single_step (wp,instruction_pointer (regs)); unlock:rcu_read_unlock (); }
arch/arm/kernel/stacktrace.c +24 -0
@@ -19,6 +19,19 @@* A simple function epilogue looks like this: * ldm sp, {fp, sp, pc} * +* When compiled with clang, pc and sp are not pushed. A simple function +* prologue looks like this when built with clang: +* +* stmdb {..., fp, lr} +* add fp, sp, #x +* sub sp, sp, #y +* +* A simple function epilogue looks like this when built with clang: +* +* sub sp, fp, #x +* ldm {..., fp, pc} +* +* * Note that with framepointer enabled, even the leaf functions have the same * prologue and epilogue, therefore we can ignore the LR value in this case. */
@@ -31,6 +44,16 @@ int notrace unwind_frame(struct stackframe *frame) low = frame->sp; high =ALIGN (low,THREAD_SIZE ); +#ifdef CONFIG_CC_IS_CLANG +/* check current frame pointer is within bounds */ +if (fp < low +4 || fp > high -4 ) +return -EINVAL ; + + frame->sp = frame->fp; + frame->fp = *(unsigned long *)(fp); + frame->pc = frame->lr; + frame->lr = *(unsigned long *)(fp +4 ); +#else /* check current frame pointer is within bounds */ if (fp < low +12 || fp > high -4 )return -EINVAL ;
@@ -39,6 +62,7 @@ int notrace unwind_frame(struct stackframe *frame) frame->fp = *(unsigned long *)(fp -12 ); frame->sp = *(unsigned long *)(fp -8 ); frame->pc = *(unsigned long *)(fp -4 ); +#endif return 0 ; }
arch/arm/mach-at91/pm.c +8 -3
@@ -411,13 +411,13 @@ static void __init at91_pm_sram_init(void) sram_pool =gen_pool_get (&pdev->dev,NULL );if (!sram_pool) {pr_warn ("%s: sram pool unavailable!\n" , __func__); -return ; + goto out_put_device; } sram_base =gen_pool_alloc (sram_pool, at91_pm_suspend_in_sram_sz);if (!sram_base) {pr_warn ("%s: unable to alloc sram!\n" , __func__); -return ; + goto out_put_device; } sram_pbase =gen_pool_virt_to_phys (sram_pool, sram_base);
@@ -425,12 +425,17 @@ static void __init at91_pm_sram_init(void) at91_pm_suspend_in_sram_sz, false);if (!at91_suspend_sram_fn) {pr_warn ("SRAM: Could not map\n" ); -return ; + goto out_put_device; }/* Copy the pm suspend handler to SRAM */ at91_suspend_sram_fn =fncpy (at91_suspend_sram_fn, &at91_pm_suspend_in_sram, at91_pm_suspend_in_sram_sz); +return ; + +out_put_device: +put_device (&pdev->dev); +return ; }static const struct of_device_id atmel_pmc_ids[]__initconst = {
arch/arm/mach-socfpga/pm.c +5 -3
@@ -60,14 +60,14 @@ static int socfpga_setup_ocram_self_refresh(void)if (!ocram_pool) {pr_warn ("%s: ocram pool unavailable!\n" , __func__); ret = -ENODEV ; - goto put_node; + goto put_device; } ocram_base =gen_pool_alloc (ocram_pool, socfpga_sdram_self_refresh_sz);if (!ocram_base) {pr_warn ("%s: unable to alloc ocram!\n" , __func__); ret = -ENOMEM ; - goto put_node; + goto put_device; } ocram_pbase =gen_pool_virt_to_phys (ocram_pool, ocram_base);
@@ -78,7 +78,7 @@ static int socfpga_setup_ocram_self_refresh(void)if (!suspend_ocram_base) {pr_warn ("%s: __arm_ioremap_exec failed!\n" , __func__); ret = -ENOMEM ; - goto put_node; + goto put_device; }/* Copy the code that puts DDR in self refresh to ocram */
@@ -92,6 +92,8 @@ static int socfpga_setup_ocram_self_refresh(void)if (!socfpga_sdram_self_refresh_in_ocram) ret = -EFAULT ; +put_device: +put_device (&pdev->dev); put_node:of_node_put (np);
arch/arm64/boot/dts/exynos/exynos7-espresso.dts +1 -0
@@ -131,6 +131,7 @@ regulator-min-microvolt = <700000>; regulator-max-microvolt = <1150000>; regulator-enable-ramp-delay = <125>; + regulator-always-on; }; ldo8_reg: LDO8 {
arch/arm64/boot/dts/qcom/msm8916-pins.dtsi +5 -5
@@ -542,7 +542,7 @@ pins = "gpio63", "gpio64", "gpio65", "gpio66", "gpio67", "gpio68"; drive-strength = <8>; - bias-pull-none; + bias-disable; }; }; cdc_pdm_lines_sus: pdm_lines_off {
@@ -571,7 +571,7 @@ pins = "gpio113", "gpio114", "gpio115", "gpio116"; drive-strength = <8>; - bias-pull-none; + bias-disable; }; };
@@ -599,7 +599,7 @@ pinconf { pins = "gpio110"; drive-strength = <8>; - bias-pull-none; + bias-disable; }; };
@@ -625,7 +625,7 @@ pinconf { pins = "gpio116"; drive-strength = <8>; - bias-pull-none; + bias-disable; }; }; ext_mclk_tlmm_lines_sus: mclk_lines_off {
@@ -653,7 +653,7 @@ pins = "gpio112", "gpio117", "gpio118", "gpio119"; drive-strength = <8>; - bias-pull-none; + bias-disable; }; }; ext_sec_tlmm_lines_sus: tlmm_lines_off {
arch/arm64/include/asm/checksum.h +3 -2
@@ -30,16 +30,17 @@ static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl) {__uint128_t tmp;u64 sum; +int n = ihl;/* we want it signed */ tmp = *(const __uint128_t *)iph; iph +=16 ; - ihl -=4 ; + n -=4 ; tmp += ((tmp >>64 ) | (tmp <<64 )); sum = tmp >>64 ;do { sum += *(const u32 *)iph; iph +=4 ; - }while (--ihl); + }while (--n >0 ); sum += ((sum >>32 ) | (sum <<32 ));return csum_fold (sum >>32 );
arch/m68k/mac/iop.c +6 -15
@@ -173,7 +173,7 @@ static __inline__ void iop_writeb(volatile struct mac_iop *iop, __u16 addr, __u8static __inline__void iop_stop (volatile struct mac_iop *iop) { - iop->status_ctrl &= ~IOP_RUN ; + iop->status_ctrl =IOP_AUTOINC ; }static __inline__void iop_start (volatile struct mac_iop *iop)
@@ -181,14 +181,9 @@ static __inline__ void iop_start(volatile struct mac_iop *iop) iop->status_ctrl =IOP_RUN |IOP_AUTOINC ; } -static __inline__void iop_bypass (volatile struct mac_iop *iop) -{ - iop->status_ctrl |=IOP_BYPASS ; -} -static __inline__void iop_interrupt (volatile struct mac_iop *iop) { - iop->status_ctrl |=IOP_IRQ ; + iop->status_ctrl =IOP_IRQ |IOP_RUN |IOP_AUTOINC ; }static int iop_alive (volatile struct mac_iop *iop)
@@ -239,7 +234,6 @@ void __init iop_preinit(void) }else { iop_base[IOP_NUM_SCC ] = (struct mac_iop *)SCC_IOP_BASE_QUADRA ; } - iop_base[IOP_NUM_SCC ]->status_ctrl =0x87 ; iop_scc_present =1 ; }else { iop_base[IOP_NUM_SCC ] =NULL ;
@@ -251,7 +245,7 @@ void __init iop_preinit(void) }else { iop_base[IOP_NUM_ISM ] = (struct mac_iop *)ISM_IOP_BASE_QUADRA ; } - iop_base[IOP_NUM_ISM ]->status_ctrl =0 ; +iop_stop (iop_base[IOP_NUM_ISM ]); iop_ism_present =1 ; }else { iop_base[IOP_NUM_ISM ] =NULL ;
@@ -416,7 +410,8 @@ static void iop_handle_send(uint iop_num, uint chan)iop_free_msg (msg2); iop_send_queue[iop_num][chan] = msg; -if (msg)iop_do_send (msg); +if (msg &&iop_readb (iop,IOP_ADDR_SEND_STATE + chan) ==IOP_MSG_IDLE ) +iop_do_send (msg); }/*
@@ -497,16 +492,12 @@ int iop_send_message(uint iop_num, uint chan, void *privdata,if (!(q = iop_send_queue[iop_num][chan])) { iop_send_queue[iop_num][chan] = msg; +iop_do_send (msg); }else {while (q->next) q = q->next; q->next = msg; } -if (iop_readb (iop_base[iop_num], -IOP_ADDR_SEND_STATE + chan) ==IOP_MSG_IDLE ) { -iop_do_send (msg); - } -return 0 ; }
arch/mips/include/uapi/asm/Kbuild +3 -0
@@ -39,3 +39,6 @@ header-y += termbits.h header-y += termios.h header-y += types.h header-y += unistd.h +header-y += hwcap.h +header-y += reg.h +header-y += ucontext.h
arch/mips/kernel/topology.c +1 -1
@@ -19,7 +19,7 @@ static int __init topology_init(void)for_each_present_cpu (i) {struct cpu *c = &per_cpu (cpu_devices, i); - c->hotpluggable =1 ; + c->hotpluggable = !!i; ret =register_cpu (c, i);if (ret) printk(KERN_WARNING "topology_init: register_cpu %d "
arch/parisc/include/asm/cmpxchg.h +2 -0
@@ -59,6 +59,7 @@ extern void __cmpxchg_called_with_bad_pointer(void);extern unsigned long __cmpxchg_u32 (volatile unsigned int *m,unsigned int old,unsigned int new_);extern u64 __cmpxchg_u64 (volatile u64 *ptr,u64 old,u64 new_); +extern u8 __cmpxchg_u8 (volatile u8 *ptr,u8 old,u8 new_);/* don't worry...optimizer will get rid of most of this */ static inline unsigned long
@@ -70,6 +71,7 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size)#endif case 4 :return __cmpxchg_u32 ((unsigned int *)ptr, (unsigned int )old, (unsigned int )new_); +case 1 :return __cmpxchg_u8 ((u8 *)ptr, (u8 )old, (u8 )new_); }__cmpxchg_called_with_bad_pointer ();return old;
arch/parisc/lib/bitops.c +12 -0
@@ -78,3 +78,15 @@ unsigned long __cmpxchg_u32(volatile unsigned int *ptr, unsigned int old, unsign_atomic_spin_unlock_irqrestore (ptr, flags);return (unsigned long )prev; } + +u8 __cmpxchg_u8 (volatile u8 *ptr,u8 old,u8 new) +{ +unsigned long flags; +u8 prev; + +_atomic_spin_lock_irqsave (ptr, flags); +if ((prev = *ptr) == old) + *ptr = new; +_atomic_spin_unlock_irqrestore (ptr, flags); +return prev; +}
arch/powerpc/include/asm/percpu.h +2 -2
@@ -9,8 +9,6 @@#ifdef CONFIG_SMP -#include <asm/paca.h> -#define __my_cpu_offset local_paca->data_offset#endif /* CONFIG_SMP */
@@ -18,4 +16,6 @@#include <asm-generic/percpu.h> +#include <asm/paca.h> +#endif /* _ASM_POWERPC_PERCPU_H_ */
arch/powerpc/include/uapi/asm/Kbuild +1 -0
@@ -45,3 +45,4 @@ header-y += tm.h header-y += types.h header-y += ucontext.h header-y += unistd.h +header-y += perf_regs.h
arch/powerpc/kernel/vdso.c +1 -1
@@ -704,7 +704,7 @@ int vdso_getcpu_init(void) node =cpu_to_node (cpu);WARN_ON_ONCE (node >0xffff ); - val = (cpu &0xfff ) | ((node &0xffff ) <<16 ); + val = (cpu &0xffff ) | ((node &0xffff ) <<16 );mtspr (SPRN_SPRG_VDSO_WRITE , val);get_paca ()->sprg_vdso = val;
arch/powerpc/platforms/pseries/hotplug-memory.c +1 -1
@@ -29,7 +29,7 @@ static bool rtas_hp_event;unsigned long pseries_memory_block_size (void ) {struct device_node *np; -unsigned int memblock_size =MIN_MEMORY_BLOCK_SIZE ; +u64 memblock_size =MIN_MEMORY_BLOCK_SIZE ;struct resource r; np =of_find_node_by_path ("/ibm,dynamic-reconfiguration-memory" );
arch/sh/boards/mach-landisk/setup.c +3 -0
@@ -85,6 +85,9 @@ device_initcall(landisk_devices_setup);static void __init landisk_setup (char **cmdline_p) { +/* I/O port identity mapping */ +__set_io_port_base (0 ); +/* LED ON */ __raw_writeb (__raw_readb (PA_LED ) |0x03 ,PA_LED );
arch/sh/kernel/entry-common.S +3 -3
@@ -203,7 +203,7 @@ syscall_trace_entry: mov.l @(OFF_R7,r15), r7 ! arg3 mov.l @(OFF_R3,r15), r3 ! syscall_nr ! - mov.l 2f, r10 ! Number of syscalls + mov.l 6f, r10 ! Number of syscalls cmp/hs r10, r3 bf syscall_call mov #-ENOSYS, r0
@@ -357,7 +357,7 @@ ENTRY(system_call) tst r9, r8 bf syscall_trace_entry ! - mov.l 2f, r8 ! Number of syscalls + mov.l 6f, r8 ! Number of syscalls cmp/hs r8, r3 bt syscall_badsys !
@@ -396,7 +396,7 @@ syscall_exit: #if !defined(CONFIG_CPU_SH2) 1: .long TRA #endif -2: .long NR_syscalls +6: .long NR_syscalls 3: .long sys_call_table 7: .long do_syscall_trace_enter 8: .long do_syscall_trace_leave
arch/x86/kernel/i8259.c +1 -1
@@ -205,7 +205,7 @@ static void mask_and_ack_8259A(struct irq_data *data)* lets ACK and report it. [once per IRQ] */ if (!(spurious_irq_mask & irqmask)) { -printk (KERN_DEBUG +printk_deferred (KERN_DEBUG "spurious 8259A interrupt: IRQ%d.\n" , irq); spurious_irq_mask |= irqmask; }
arch/x86/kernel/vmlinux.lds.S +2 -1
@@ -329,7 +329,8 @@ SECTIONS .bss : AT(ADDR(.bss) - LOAD_OFFSET) { __bss_start = .; *(.bss..page_aligned) - *(.bss) + . = ALIGN(PAGE_SIZE); + *(BSS_MAIN) . = ALIGN(PAGE_SIZE); __bss_stop = .; }
arch/x86/kvm/lapic.c +1 -1
@@ -1756,7 +1756,7 @@ void kvm_set_lapic_tscdeadline_msr(struct kvm_vcpu *vcpu, u64 data) {struct kvm_lapic *apic = vcpu->arch.apic; -if (!lapic_in_kernel (vcpu) ||apic_lvtt_oneshot (apic) || +if (!kvm_apic_present (vcpu) ||apic_lvtt_oneshot (apic) ||apic_lvtt_period (apic))return ;
arch/xtensa/kernel/perf_event.c +1 -1
@@ -404,7 +404,7 @@ static struct pmu xtensa_pmu = { .read = xtensa_pmu_read, }; -static int xtensa_pmu_setup (int cpu) +static int xtensa_pmu_setup (unsigned int cpu) {unsigned i;
drivers/acpi/acpica/exprep.c +0 -4
@@ -507,10 +507,6 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info) (u8 )access_byte_width; } } -/* An additional reference for the container */ - -acpi_ut_add_reference (obj_desc->field.region_obj); - ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, "RegionField: BitOff %X, Off %X, Gran %X, Region %p\n", obj_desc->field.start_field_bit_offset,
drivers/acpi/acpica/utdelete.c +1 -5
@@ -591,11 +591,6 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action) next_object = object->buffer_field.buffer_obj;break ; -case ACPI_TYPE_LOCAL_REGION_FIELD : - - next_object = object->field.region_obj; -break ; -case ACPI_TYPE_LOCAL_BANK_FIELD : next_object = object->bank_field.bank_obj;
@@ -636,6 +631,7 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action) }break ; +case ACPI_TYPE_LOCAL_REGION_FIELD :case ACPI_TYPE_REGION :default :
drivers/android/binder.c +9 -0
@@ -1427,6 +1427,10 @@ static void binder_transaction(struct binder_proc *proc, return_error =BR_DEAD_REPLY ; goto err_dead_binder; } +if (WARN_ON (proc == target_proc)) { + return_error =BR_FAILED_REPLY ; + goto err_invalid_target_handle; + }if (security_binder_transaction (proc->tsk, target_proc->tsk) <0 ) { return_error =BR_FAILED_REPLY ;
@@ -1830,6 +1834,11 @@ static int binder_thread_write(struct binder_proc *proc, ptr +=sizeof (uint32_t );if (target ==0 && binder_context_mgr_node && (cmd ==BC_INCREFS || cmd ==BC_ACQUIRE )) { +if (binder_context_mgr_node->proc == proc) { +binder_user_error ("%d:%d context manager tried to acquire desc 0\n" , + proc->pid, thread->pid); +return -EINVAL ; + } ref =binder_get_ref_for_node (proc, binder_context_mgr_node);if (ref->desc != target) {
drivers/atm/atmtcp.c +8 -2
@@ -432,9 +432,15 @@ static int atmtcp_remove_persistent(int itf)return -EMEDIUMTYPE ; } dev_data =PRIV (dev); -if (!dev_data->persist)return 0 ; +if (!dev_data->persist) { +atm_dev_put (dev); +return 0 ; + } dev_data->persist =0 ; -if (PRIV (dev)->vcc)return 0 ; +if (PRIV (dev)->vcc) { +atm_dev_put (dev); +return 0 ; + }kfree (dev_data);atm_dev_put (dev);atm_dev_deregister (dev);
drivers/char/agp/intel-gtt.c +3 -1
@@ -303,8 +303,10 @@ static int intel_gtt_setup_scratch_page(void)if (intel_private.needs_dmar) { dma_addr =pci_map_page (intel_private.pcidev, page,0 ,PAGE_SIZE ,PCI_DMA_BIDIRECTIONAL ); -if (pci_dma_mapping_error (intel_private.pcidev, dma_addr)) +if (pci_dma_mapping_error (intel_private.pcidev, dma_addr)) { +__free_page (page);return -EINVAL ; + } intel_private.scratch_page_dma = dma_addr; }else
drivers/char/random.c +1 -0
@@ -1211,6 +1211,7 @@ void add_interrupt_randomness(int irq, int irq_flags)fast_mix (fast_pool);add_interrupt_bench (cycles); +this_cpu_add (net_rand_state.s1, fast_pool->pool[cycles &3 ]);if (unlikely (crng_init ==0 )) { if ((fast_pool->count >= 64) &&
drivers/clk/sirf/clk-atlas6.c +1 -1
@@ -136,7 +136,7 @@ static void __init atlas6_clk_init(struct device_node *np)for (i = pll1; i < maxclk; i++) { atlas6_clks[i] =clk_register (NULL , atlas6_clk_hw_array[i]); -BUG_ON (!atlas6_clks[i]); +BUG_ON (IS_ERR (atlas6_clks[i])); }clk_register_clkdev (atlas6_clks[cpu],NULL ,"cpu" );clk_register_clkdev (atlas6_clks[io],NULL ,"io" );
drivers/crypto/ccp/ccp-dev.h +1 -0
@@ -444,6 +444,7 @@ struct ccp_sg_workarea {int nents;struct scatterlist *dma_sg; +struct scatterlist *dma_sg_head;struct device *dma_dev;unsigned int dma_count;enum dma_data_direction dma_dir;
drivers/crypto/ccp/ccp-ops.c +28 -12
@@ -52,7 +52,7 @@ static u32 ccp_gen_jobid(struct ccp_device *ccp)static void ccp_sg_free (struct ccp_sg_workarea *wa) {if (wa->dma_count) -dma_unmap_sg (wa->dma_dev, wa->dma_sg, wa->nents, wa->dma_dir); +dma_unmap_sg (wa->dma_dev, wa->dma_sg_head, wa->nents, wa->dma_dir); wa->dma_count =0 ; }
@@ -81,6 +81,7 @@ static int ccp_init_sg_workarea(struct ccp_sg_workarea *wa, struct device *dev,return 0 ; wa->dma_sg = sg; + wa->dma_sg_head = sg; wa->dma_dev = dev; wa->dma_dir = dma_dir; wa->dma_count =dma_map_sg (dev, sg, wa->nents, dma_dir);
@@ -93,14 +94,28 @@ static int ccp_init_sg_workarea(struct ccp_sg_workarea *wa, struct device *dev,static void ccp_update_sg_workarea (struct ccp_sg_workarea *wa,unsigned int len) {unsigned int nbytes =min_t (u64, len, wa->bytes_left); +unsigned int sg_combined_len =0 ;if (!wa->sg)return ; wa->sg_used += nbytes; wa->bytes_left -= nbytes; -if (wa->sg_used == wa->sg->length) { - wa->sg =sg_next (wa->sg); +if (wa->sg_used ==sg_dma_len (wa->dma_sg)) { +/* Advance to the next DMA scatterlist entry */ + wa->dma_sg =sg_next (wa->dma_sg); + +/* In the case that the DMA mapped scatterlist has entries +* that have been merged, the non-DMA mapped scatterlist +* must be advanced multiple times for each merged entry. +* This ensures that the current non-DMA mapped entry +* corresponds to the current DMA mapped entry. +*/ +do { + sg_combined_len += wa->sg->length; + wa->sg =sg_next (wa->sg); + }while (wa->sg_used > sg_combined_len); + wa->sg_used =0 ; } }
@@ -298,7 +313,7 @@ static unsigned int ccp_queue_buf(struct ccp_data *data, unsigned int from)/* Update the structures and generate the count */ buf_count =0 ;while (sg_wa->bytes_left && (buf_count < dm_wa->length)) { - nbytes =min (sg_wa->sg->length - sg_wa->sg_used, + nbytes =min (sg_dma_len (sg_wa->dma_sg) - sg_wa->sg_used, dm_wa->length - buf_count); nbytes =min_t (u64, sg_wa->bytes_left, nbytes);
@@ -330,11 +345,11 @@ static void ccp_prepare_data(struct ccp_data *src, struct ccp_data *dst,* and destination. The resulting len values will always be <= UINT_MAX * because the dma length is an unsigned int. */ - sg_src_len =sg_dma_len (src->sg_wa.sg) - src->sg_wa.sg_used; + sg_src_len =sg_dma_len (src->sg_wa.dma_sg) - src->sg_wa.sg_used; sg_src_len =min_t (u64, src->sg_wa.bytes_left, sg_src_len);if (dst) { - sg_dst_len =sg_dma_len (dst->sg_wa.sg) - dst->sg_wa.sg_used; + sg_dst_len =sg_dma_len (dst->sg_wa.dma_sg) - dst->sg_wa.sg_used; sg_dst_len =min_t (u64, src->sg_wa.bytes_left, sg_dst_len); op_len =min (sg_src_len, sg_dst_len); }else {
@@ -364,7 +379,7 @@ static void ccp_prepare_data(struct ccp_data *src, struct ccp_data *dst,/* Enough data in the sg element, but we need to * adjust for any previously copied data */ - op->src.u.dma.address =sg_dma_address (src->sg_wa.sg); + op->src.u.dma.address =sg_dma_address (src->sg_wa.dma_sg); op->src.u.dma.offset = src->sg_wa.sg_used; op->src.u.dma.length = op_len & ~(block_size -1 );
@@ -385,7 +400,7 @@ static void ccp_prepare_data(struct ccp_data *src, struct ccp_data *dst,/* Enough room in the sg element, but we need to * adjust for any previously used area */ - op->dst.u.dma.address =sg_dma_address (dst->sg_wa.sg); + op->dst.u.dma.address =sg_dma_address (dst->sg_wa.dma_sg); op->dst.u.dma.offset = dst->sg_wa.sg_used; op->dst.u.dma.length = op->src.u.dma.length; }
@@ -1216,8 +1231,9 @@ static int ccp_run_sha_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd) digest_size);break ;default : +kfree (hmac_buf); ret = -EINVAL ; - goto e_ctx; + goto e_data; }memset (&hmac_cmd,0 ,sizeof (hmac_cmd));
@@ -1446,7 +1462,7 @@ static int ccp_run_passthru_cmd(struct ccp_cmd_queue *cmd_q, dst.sg_wa.sg_used =0 ;for (i =1 ; i <= src.sg_wa.dma_count; i++) {if (!dst.sg_wa.sg || - (dst.sg_wa.sg->length < src.sg_wa.sg->length)) { + (sg_dma_len (dst.sg_wa.sg) <sg_dma_len (src.sg_wa.sg))) { ret = -EINVAL ; goto e_dst; }
@@ -1472,8 +1488,8 @@ static int ccp_run_passthru_cmd(struct ccp_cmd_queue *cmd_q, goto e_dst; } - dst.sg_wa.sg_used += src.sg_wa.sg->length; -if (dst.sg_wa.sg_used == dst.sg_wa.sg->length) { + dst.sg_wa.sg_used +=sg_dma_len (src.sg_wa.sg); +if (dst.sg_wa.sg_used ==sg_dma_len (dst.sg_wa.sg)) { dst.sg_wa.sg =sg_next (dst.sg_wa.sg); dst.sg_wa.sg_used =0 ; }
drivers/crypto/qat/qat_common/qat_uclo.c +7 -2
@@ -332,13 +332,18 @@ static int qat_uclo_create_batch_init_list(struct icp_qat_fw_loader_handle }return 0 ; out_err: +/* Do not free the list head unless we allocated it. */ + tail_old = tail_old->next; +if (flag) { +kfree (*init_tab_base); + *init_tab_base =NULL ; + } +while (tail_old) { mem_init = tail_old->next;kfree (tail_old); tail_old = mem_init; } -if (flag) -kfree (*init_tab_base);return -ENOMEM ; }
drivers/edac/edac_device_sysfs.c +1 -0
@@ -275,6 +275,7 @@ int edac_device_register_sysfs_main_kobj(struct edac_device_ctl_info *edac_dev)/* Error exit stack */ err_kobj_reg: +kobject_put (&edac_dev->kobj);module_put (edac_dev->owner); err_out:
drivers/edac/edac_pci_sysfs.c +1 -1
@@ -386,7 +386,7 @@ static int edac_pci_main_kobj_setup(void)/* Error unwind statck */ kobject_init_and_add_fail: -kfree (edac_pci_top_main_kobj); +kobject_put (edac_pci_top_main_kobj); kzalloc_fail:module_put (THIS_MODULE );
drivers/gpio/gpiolib-of.c +1 -1
@@ -80,7 +80,7 @@ struct gpio_desc *of_get_named_gpiod_flags(struct device_node *np, &gpiospec);if (ret) {pr_debug ("%s: can't parse '%s' property of node '%s[%d]'\n" , - __func__, propname, np->full_name, index); + __func__, propname, np ? np->full_name :NULL , index);return ERR_PTR (ret); }
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +2 -1
@@ -452,8 +452,9 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_filereturn n ? -EFAULT :0 ; }case AMDGPU_INFO_DEV_INFO : { -struct drm_amdgpu_info_device dev_info = {}; +struct drm_amdgpu_info_device dev_info; +memset (&dev_info,0 ,sizeof (dev_info)); dev_info.device_id = dev->pdev->device; dev_info.chip_rev = adev->rev_id; dev_info.external_rev = adev->external_rev_id;
drivers/gpu/drm/drm_debugfs.c +4 -4
@@ -287,13 +287,13 @@ static ssize_t connector_write(struct file *file, const char __user *ubuf, buf[len] ='\0' ; -if (!strcmp (buf,"on" )) +if (sysfs_streq (buf,"on" )) connector->force =DRM_FORCE_ON ; -else if (!strcmp (buf,"digital" )) +else if (sysfs_streq (buf,"digital" )) connector->force =DRM_FORCE_ON_DIGITAL ; -else if (!strcmp (buf,"off" )) +else if (sysfs_streq (buf,"off" )) connector->force =DRM_FORCE_OFF ; -else if (!strcmp (buf,"unspecified" )) +else if (sysfs_streq (buf,"unspecified" )) connector->force =DRM_FORCE_UNSPECIFIED ;else return -EINVAL ;
drivers/gpu/drm/drm_gem.c +4 -6
@@ -694,9 +694,6 @@ drm_gem_flink_ioctl(struct drm_device *dev, void *data,* @file_priv: drm file-private structure * * Open an object using the global name, returning a handle and the size. -* -* This handle (of course) holds a reference to the object, so the object -* will not go away until the handle is deleted. */ int drm_gem_open_ioctl(struct drm_device *dev, void *data,
@@ -721,14 +718,15 @@ drm_gem_open_ioctl(struct drm_device *dev, void *data,/* drm_gem_handle_create_tail unlocks dev->object_name_lock. */ ret =drm_gem_handle_create_tail (file_priv, obj, &handle); -drm_gem_object_unreference_unlocked (obj);if (ret) -return ret; + goto err; args->handle = handle; args->size = obj->size; -return 0 ; +err: +drm_gem_object_unreference_unlocked (obj); +return ret; }/**
drivers/gpu/drm/drm_mipi_dsi.c +3 -3
@@ -1029,11 +1029,11 @@ EXPORT_SYMBOL(mipi_dsi_dcs_set_pixel_format);*/ int mipi_dsi_dcs_set_tear_scanline (struct mipi_dsi_device *dsi,u16 scanline) { -u8 payload[3 ] = {MIPI_DCS_SET_TEAR_SCANLINE , scanline >>8 , - scanline &0xff }; +u8 payload[2 ] = { scanline >>8 , scanline &0xff };ssize_t err; - err =mipi_dsi_generic_write (dsi, payload,sizeof (payload)); + err =mipi_dsi_dcs_write (dsi,MIPI_DCS_SET_TEAR_SCANLINE , payload, +sizeof (payload));if (err <0 )return err;
drivers/gpu/drm/imx/imx-tve.c +10 -10
@@ -511,6 +511,13 @@ static int imx_tve_register(struct drm_device *drm, struct imx_tve *tve)return 0 ; } +static void imx_tve_disable_regulator (void *data) +{ +struct imx_tve *tve = data; + +regulator_disable (tve->dac_reg); +} +static bool imx_tve_readable_reg (struct device *dev,unsigned int reg) {return (reg %4 ==0 ) && (reg <=0xdc );
@@ -635,6 +642,9 @@ static int imx_tve_bind(struct device *dev, struct device *master, void *data) ret =regulator_enable (tve->dac_reg);if (ret)return ret; + ret =devm_add_action_or_reset (dev, imx_tve_disable_regulator, tve); +if (ret) +return ret; } tve->clk =devm_clk_get (dev,"tve" );
@@ -681,18 +691,8 @@ static int imx_tve_bind(struct device *dev, struct device *master, void *data)return 0 ; } -static void imx_tve_unbind (struct device *dev,struct device *master, -void *data) -{ -struct imx_tve *tve =dev_get_drvdata (dev); - -if (!IS_ERR (tve->dac_reg)) -regulator_disable (tve->dac_reg); -} -static const struct component_ops imx_tve_ops = { .bind = imx_tve_bind, - .unbind = imx_tve_unbind, };static int imx_tve_probe (struct platform_device *pdev)
drivers/gpu/drm/nouveau/nouveau_drm.c +6 -2
@@ -823,8 +823,10 @@ nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv)/* need to bring up power immediately if opening device */ ret =pm_runtime_get_sync (dev->dev); -if (ret <0 && ret != -EACCES ) +if (ret <0 && ret != -EACCES ) { +pm_runtime_put_autosuspend (dev->dev);return ret; + }get_task_comm (tmpname, current);snprintf (name,sizeof (name),"%s[%d]" , tmpname,pid_nr (fpriv->pid));
@@ -912,8 +914,10 @@ nouveau_drm_ioctl(struct file *file, unsigned int cmd, unsigned long arg)long ret; ret =pm_runtime_get_sync (dev->dev); -if (ret <0 && ret != -EACCES ) +if (ret <0 && ret != -EACCES ) { +pm_runtime_put_autosuspend (dev->dev);return ret; + }switch (_IOC_NR (cmd) -DRM_COMMAND_BASE ) {case DRM_NOUVEAU_NVIF :
drivers/gpu/drm/nouveau/nouveau_fbcon.c +1 -0
@@ -584,6 +584,7 @@ nouveau_fbcon_init(struct drm_device *dev)drm_fb_helper_fini (&fbcon->helper); free:kfree (fbcon); + drm->fbcon =NULL ;return ret; }
drivers/gpu/drm/nouveau/nouveau_gem.c +3 -1
@@ -42,8 +42,10 @@ nouveau_gem_object_del(struct drm_gem_object *gem)int ret; ret =pm_runtime_get_sync (dev); -if (WARN_ON (ret <0 && ret != -EACCES )) +if (WARN_ON (ret <0 && ret != -EACCES )) { +pm_runtime_put_autosuspend (dev);return ; + }if (gem->import_attach)drm_prime_gem_destroy (gem, nvbo->bo.sg);
drivers/gpu/drm/panel/panel-simple.c +1 -1
@@ -1041,7 +1041,7 @@ static const struct drm_display_mode lg_lb070wv8_mode = {static const struct panel_desc lg_lb070wv8 = { .modes = &lg_lb070wv8_mode, .num_modes =1 , - .bpc =16 , + .bpc =8 , .size = { .width =151 , .height =91 ,
drivers/gpu/drm/radeon/ci_dpm.c +1 -1
@@ -4348,7 +4348,7 @@ static int ci_set_mc_special_registers(struct radeon_device *rdev, table->mc_reg_table_entry[k].mc_data[j] |=0x100 ; } j++; -if (j >SMU7_DISCRETE_MC_REGISTER_ARRAY_SIZE ) +if (j >=SMU7_DISCRETE_MC_REGISTER_ARRAY_SIZE )return -EINVAL ;if (!pi->mem_gddr5) {
drivers/gpu/drm/radeon/radeon_display.c +3 -1
@@ -639,8 +639,10 @@ radeon_crtc_set_config(struct drm_mode_set *set) dev = set->crtc->dev; ret =pm_runtime_get_sync (dev->dev); -if (ret <0 ) +if (ret <0 ) { +pm_runtime_put_autosuspend (dev->dev);return ret; + } ret =drm_crtc_helper_set_config (set);
drivers/gpu/drm/radeon/radeon_drv.c +3 -1
@@ -496,8 +496,10 @@ long radeon_drm_ioctl(struct file *filp,long ret; dev = file_priv->minor->dev; ret =pm_runtime_get_sync (dev->dev); -if (ret <0 ) +if (ret <0 ) { +pm_runtime_put_autosuspend (dev->dev);return ret; + } ret =drm_ioctl (filp, cmd, arg);
drivers/gpu/drm/radeon/radeon_kms.c +3 -1
@@ -634,8 +634,10 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv) file_priv->driver_priv =NULL ; r =pm_runtime_get_sync (dev->dev); -if (r <0 ) +if (r <0 ) { +pm_runtime_put_autosuspend (dev->dev);return r; + }/* new gpu have virtual address space support */ if (rdev->family >=CHIP_CAYMAN ) {
drivers/gpu/drm/tilcdc/tilcdc_panel.c +5 -1
@@ -159,12 +159,16 @@ static int panel_connector_get_modes(struct drm_connector *connector)int i;for (i =0 ; i < timings->num_timings; i++) { -struct drm_display_mode *mode =drm_mode_create (dev); +struct drm_display_mode *mode;struct videomode vm;if (videomode_from_timings (timings, &vm, i))break ; + mode =drm_mode_create (dev); +if (!mode) +break ; +drm_display_mode_from_videomode (&vm, mode); mode->type =DRM_MODE_TYPE_DRIVER ;
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +4 -4
@@ -2109,7 +2109,7 @@ int vmw_kms_fbdev_init_data(struct vmw_private *dev_priv, ++i; } -if (i != unit) { +if (&con->head == &dev_priv->dev->mode_config.connector_list) {DRM_ERROR ("Could not find initial display unit.\n" );return -EINVAL ; }
@@ -2131,13 +2131,13 @@ int vmw_kms_fbdev_init_data(struct vmw_private *dev_priv,break ; } -if (mode->type &DRM_MODE_TYPE_PREFERRED ) - *p_mode = mode; -else { +if (&mode->head == &con->modes) {WARN_ONCE (true,"Could not find initial preferred mode.\n" ); *p_mode =list_first_entry (&con->modes, struct drm_display_mode, head); + }else { + *p_mode = mode; }return 0 ;
drivers/gpu/ipu-v3/ipu-image-convert.c +20 -38
88 lines not on this page · raw message
drivers/i2c/busses/i2c-cadence.c +2 -7
@@ -382,10 +382,8 @@ static void cdns_i2c_mrecv(struct cdns_i2c *id)* Check for the message size against FIFO depth and set the * 'hold bus' bit if it is greater than FIFO depth. */ -if ((id->recv_count >CDNS_I2C_FIFO_DEPTH ) || id->bus_hold_flag) +if (id->recv_count >CDNS_I2C_FIFO_DEPTH ) ctrl_reg |=CDNS_I2C_CR_HOLD ; -else - ctrl_reg = ctrl_reg & ~CDNS_I2C_CR_HOLD ;cdns_i2c_writereg (ctrl_reg,CDNS_I2C_CR_OFFSET );
@@ -442,11 +440,8 @@ static void cdns_i2c_msend(struct cdns_i2c *id)* Check for the message size against FIFO depth and set the * 'hold bus' bit if it is greater than FIFO depth. */ -if ((id->send_count >CDNS_I2C_FIFO_DEPTH ) || id->bus_hold_flag) +if (id->send_count >CDNS_I2C_FIFO_DEPTH ) ctrl_reg |=CDNS_I2C_CR_HOLD ; -else - ctrl_reg = ctrl_reg & ~CDNS_I2C_CR_HOLD ; -cdns_i2c_writereg (ctrl_reg,CDNS_I2C_CR_OFFSET );/* Clear the interrupts in interrupt status register. */
drivers/i2c/busses/i2c-rcar.c +4 -3
@@ -527,13 +527,14 @@ static bool rcar_i2c_slave_irq(struct rcar_i2c_priv *priv)rcar_i2c_write (priv,ICSIER ,SDR |SSR |SAR ); } -rcar_i2c_write (priv,ICSSR , ~SAR &0xff ); +/* Clear SSR, too, because of old STOPs to other clients than us */ +rcar_i2c_write (priv,ICSSR , ~(SAR |SSR ) &0xff ); }/* master sent stop */ if (ssr_filtered &SSR ) {i2c_slave_event (priv->slave,I2C_SLAVE_STOP , &value); -rcar_i2c_write (priv,ICSIER ,SAR |SSR ); +rcar_i2c_write (priv,ICSIER ,SAR );rcar_i2c_write (priv,ICSSR , ~SSR &0xff ); }
@@ -762,7 +763,7 @@ static int rcar_reg_slave(struct i2c_client *slave) priv->slave = slave;rcar_i2c_write (priv,ICSAR , slave->addr);rcar_i2c_write (priv,ICSSR ,0 ); -rcar_i2c_write (priv,ICSIER ,SAR |SSR ); +rcar_i2c_write (priv,ICSIER ,SAR );rcar_i2c_write (priv,ICSCR ,SIE |SDBS );return 0 ;
drivers/iio/dac/ad5592r-base.c +2 -2
@@ -417,7 +417,7 @@ static int ad5592r_read_raw(struct iio_dev *iio_dev,s64 tmp = *val * (3767897513LL /25LL ); *val =div_s64_rem (tmp,1000000000LL , val2); - ret =IIO_VAL_INT_PLUS_MICRO ; +return IIO_VAL_INT_PLUS_MICRO ; }else {int mult;
@@ -448,7 +448,7 @@ static int ad5592r_read_raw(struct iio_dev *iio_dev, ret =IIO_VAL_INT ;break ;default : - ret = -EINVAL ; +return -EINVAL ; } unlock:
drivers/input/mouse/sentelic.c +1 -1
@@ -454,7 +454,7 @@ static ssize_t fsp_attr_set_setreg(struct psmouse *psmouse, void *data,fsp_reg_write_enable (psmouse, false); -return count; +return retval; }PSMOUSE_DEFINE_WO_ATTR (setreg,S_IWUSR ,NULL , fsp_attr_set_setreg);
drivers/iommu/omap-iommu-debug.c +3 -0
@@ -101,8 +101,11 @@ static ssize_t debug_read_regs(struct file *file, char __user *userbuf,mutex_lock (&iommu_debug_lock); bytes =omap_iommu_dump_ctx (obj, p, count); +if (bytes <0 ) + goto err; bytes =simple_read_from_buffer (userbuf, count, ppos, buf, bytes); +err:mutex_unlock (&iommu_debug_lock);kfree (buf);
drivers/leds/led-class.c +1 -0
@@ -110,6 +110,7 @@ void led_classdev_suspend(struct led_classdev *led_cdev) { led_cdev->flags |=LED_SUSPENDED ;led_set_brightness_nopm (led_cdev,0 ); +flush_work (&led_cdev->set_brightness_work); }EXPORT_SYMBOL_GPL (led_classdev_suspend);
drivers/leds/leds-88pm860x.c +13 -1
@@ -207,21 +207,33 @@ static int pm860x_led_probe(struct platform_device *pdev) data->cdev.brightness_set_blocking = pm860x_led_set;mutex_init (&data->lock); - ret =devm_led_classdev_register (chip->dev, &data->cdev); + ret =led_classdev_register (chip->dev, &data->cdev);if (ret <0 ) {dev_err (&pdev->dev,"Failed to register LED: %d\n" , ret);return ret; }pm860x_led_set (&data->cdev,0 ); + +platform_set_drvdata (pdev, data); +return 0 ; } +static int pm860x_led_remove (struct platform_device *pdev) +{ +struct pm860x_led *data =platform_get_drvdata (pdev); + +led_classdev_unregister (&data->cdev); + +return 0 ; +}static struct platform_driver pm860x_led_driver = { .driver = { .name ="88pm860x-led" , }, .probe = pm860x_led_probe, + .remove = pm860x_led_remove, };module_platform_driver (pm860x_led_driver);
drivers/leds/leds-da903x.c +13 -1
@@ -113,12 +113,23 @@ static int da903x_led_probe(struct platform_device *pdev) led->flags = pdata->flags; led->master = pdev->dev.parent; - ret =devm_led_classdev_register (led->master, &led->cdev); + ret =led_classdev_register (led->master, &led->cdev);if (ret) {dev_err (&pdev->dev,"failed to register LED %d\n" , id);return ret; } +platform_set_drvdata (pdev, led); + +return 0 ; +} + +static int da903x_led_remove (struct platform_device *pdev) +{ +struct da903x_led *led =platform_get_drvdata (pdev); + +led_classdev_unregister (&led->cdev); +return 0 ; }
@@ -127,6 +138,7 @@ static struct platform_driver da903x_led_driver = { .name = "da903x-led", }, .probe = da903x_led_probe, + .remove = da903x_led_remove, };module_platform_driver (da903x_led_driver);
drivers/leds/leds-lm3533.c +9 -3
@@ -698,7 +698,7 @@ static int lm3533_led_probe(struct platform_device *pdev)platform_set_drvdata (pdev, led); - ret =devm_led_classdev_register (pdev->dev.parent, &led->cdev); + ret =led_classdev_register (pdev->dev.parent, &led->cdev);if (ret) {dev_err (&pdev->dev,"failed to register LED %d\n" , pdev->id);return ret;
@@ -708,13 +708,18 @@ static int lm3533_led_probe(struct platform_device *pdev) ret =lm3533_led_setup (led, pdata);if (ret) -return ret; + goto err_deregister; ret =lm3533_ctrlbank_enable (&led->cb);if (ret) -return ret; + goto err_deregister;return 0 ; + +err_deregister: +led_classdev_unregister (&led->cdev); + +return ret; }static int lm3533_led_remove (struct platform_device *pdev)
@@ -724,6 +729,7 @@ static int lm3533_led_remove(struct platform_device *pdev)dev_dbg (&pdev->dev,"%s\n" , __func__);lm3533_ctrlbank_disable (&led->cb); +led_classdev_unregister (&led->cdev);return 0 ; }
drivers/leds/leds-lm355x.c +4 -3
@@ -168,18 +168,19 @@ static int lm355x_chip_init(struct lm355x_chip_data *chip)/* input and output pins configuration */ switch (chip->type) {case CHIP_LM3554 : - reg_val = pdata->pin_tx2 | pdata->ntc_pin; + reg_val = (u32 )pdata->pin_tx2 | (u32 )pdata->ntc_pin; ret =regmap_update_bits (chip->regmap,0xE0 ,0x28 , reg_val);if (ret <0 ) goto out; - reg_val = pdata->pass_mode; + reg_val = (u32 )pdata->pass_mode; ret =regmap_update_bits (chip->regmap,0xA0 ,0x04 , reg_val);if (ret <0 ) goto out;break ;case CHIP_LM3556 : - reg_val = pdata->pin_tx2 | pdata->ntc_pin | pdata->pass_mode; + reg_val = (u32 )pdata->pin_tx2 | (u32 )pdata->ntc_pin | + (u32 )pdata->pass_mode; ret =regmap_update_bits (chip->regmap,0x0A ,0xC4 , reg_val);if (ret <0 ) goto out;
drivers/leds/leds-wm831x-status.c +13 -1
@@ -283,12 +283,23 @@ static int wm831x_status_probe(struct platform_device *pdev) drvdata->cdev.blink_set = wm831x_status_blink_set; drvdata->cdev.groups = wm831x_status_groups; - ret =devm_led_classdev_register (wm831x->dev, &drvdata->cdev); + ret =led_classdev_register (wm831x->dev, &drvdata->cdev);if (ret <0 ) {dev_err (&pdev->dev,"Failed to register LED: %d\n" , ret);return ret; } +platform_set_drvdata (pdev, drvdata); + +return 0 ; +} + +static int wm831x_status_remove (struct platform_device *pdev) +{ +struct wm831x_status *drvdata =platform_get_drvdata (pdev); + +led_classdev_unregister (&drvdata->cdev); +return 0 ; }
@@ -297,6 +308,7 @@ static struct platform_driver wm831x_status_driver = { .name = "wm831x-status", }, .probe = wm831x_status_probe, + .remove = wm831x_status_remove, };module_platform_driver (wm831x_status_driver);
drivers/md/bcache/bset.c +1 -1
@@ -317,7 +317,7 @@ int bch_btree_keys_alloc(struct btree_keys *b, unsigned page_order, gfp_t gfp) b->page_order = page_order; - t->data = (void *)__get_free_pages (gfp, b->page_order); + t->data = (void *)__get_free_pages (__GFP_COMP|gfp, b->page_order);if (!t->data) goto err;
drivers/md/bcache/btree.c +1 -1
@@ -790,7 +790,7 @@ int bch_btree_cache_alloc(struct cache_set *c)mutex_init (&c->verify_lock); c->verify_ondisk = (void *) -__get_free_pages (GFP_KERNEL ,ilog2 (bucket_pages (c))); +__get_free_pages (GFP_KERNEL |__GFP_COMP,ilog2 (bucket_pages (c))); c->verify_data =mca_bucket_alloc (c, &ZERO_KEY ,GFP_KERNEL );
drivers/md/bcache/journal.c +2 -2
@@ -839,8 +839,8 @@ int bch_journal_alloc(struct cache_set *c) j->w[1 ].c = c;if (!(init_fifo (&j->pin,JOURNAL_PIN ,GFP_KERNEL )) || - !(j->w[0 ].data = (void *)__get_free_pages (GFP_KERNEL ,JSET_BITS )) || - !(j->w[1 ].data = (void *)__get_free_pages (GFP_KERNEL ,JSET_BITS ))) + !(j->w[0 ].data = (void *)__get_free_pages (GFP_KERNEL |__GFP_COMP,JSET_BITS )) || + !(j->w[1 ].data = (void *)__get_free_pages (GFP_KERNEL |__GFP_COMP,JSET_BITS )))return -ENOMEM ;return 0 ;
drivers/md/bcache/super.c +9 -2
@@ -1468,7 +1468,7 @@ void bch_cache_set_unregister(struct cache_set *c) }#define alloc_bucket_pages (gfp, c) \ - ((void *) __get_free_pages(__GFP_ZERO|gfp, ilog2(bucket_pages(c)))) + ((void *) __get_free_pages(__GFP_ZERO|__GFP_COMP|gfp, ilog2(bucket_pages(c))))struct cache_set *bch_cache_set_alloc (struct cache_sb *sb) {
@@ -1778,7 +1778,14 @@ static const char *register_cache_set(struct cache *ca) sysfs_create_link(&c->kobj, &ca->kobj, buf)) goto err; -if (ca->sb.seq > c->sb.seq) { +/* +* A special case is both ca->sb.seq and c->sb.seq are 0, +* such condition happens on a new created cache device whose +* super block is never flushed yet. In this case c->sb.version +* and other members should be updated too, otherwise we will +* have a mistaken super block version in cache set. +*/ +if (ca->sb.seq > c->sb.seq || c->sb.seq ==0 ) { c->sb.version = ca->sb.version;memcpy (c->sb.set_uuid, ca->sb.set_uuid,16 ); c->sb.flags = ca->sb.flags;
drivers/md/md-cluster.c +1 -0
@@ -1234,6 +1234,7 @@ static void unlock_all_bitmaps(struct mddev *mddev) } }kfree (cinfo->other_bitmap_lockres); + cinfo->other_bitmap_lockres =NULL ; } }
drivers/md/raid5.c +2 -1
@@ -3364,6 +3364,7 @@ static int need_this_block(struct stripe_head *sh, struct stripe_head_state *s,* is missing/faulty, then we need to read everything we can. */ if (sh->raid_conf->level !=6 && + sh->raid_conf->rmw_level !=PARITY_DISABLE_RMW && sh->sector < sh->raid_conf->mddev->recovery_cp)/* reconstruct-write isn't being forced */ return 0 ;
@@ -4498,7 +4499,7 @@ static void handle_stripe(struct stripe_head *sh)* or to load a block that is being partially written. */ if (s.to_read || s.non_overwrite - || (conf->level ==6 && s.to_write && s.failed) + || (s.to_write && s.failed) || (s.syncing && (s.uptodate + s.compute < disks)) || s.replacing || s.expanding)
drivers/media/firewire/firedtv-fw.c +2 -0
@@ -271,6 +271,8 @@ static int node_probe(struct fw_unit *unit, const struct ieee1394_device_id *id) name_len =fw_csr_string (unit->directory,CSR_MODEL , name,sizeof (name)); +if (name_len <0 ) +return name_len;for (i =ARRAY_SIZE (model_names); --i; )if (strlen (model_names[i]) <= name_len &&strncmp (name, model_names[i], name_len) ==0 )
drivers/media/pci/cx23885/cx23888-ir.c +4 -1
@@ -1179,8 +1179,11 @@ int cx23888_ir_probe(struct cx23885_dev *dev)return -ENOMEM ;spin_lock_init (&state->rx_kfifo_lock); -if (kfifo_alloc (&state->rx_kfifo,CX23888_IR_RX_KFIFO_SIZE ,GFP_KERNEL )) +if (kfifo_alloc (&state->rx_kfifo,CX23888_IR_RX_KFIFO_SIZE , +GFP_KERNEL )) { +kfree (state);return -ENOMEM ; + } state->dev = dev; sd = &state->sd;
drivers/media/platform/exynos4-is/media-dev.c +3 -0
@@ -1257,6 +1257,9 @@ static int fimc_md_get_pinctrl(struct fimc_md *fmd) pctl->state_idle =pinctrl_lookup_state (pctl->pinctrl,PINCTRL_STATE_IDLE ); +if (IS_ERR (pctl->state_idle)) +return PTR_ERR (pctl->state_idle); +return 0 ; }
drivers/media/platform/omap3isp/isppreview.c +3 -1
@@ -2290,7 +2290,7 @@ static int preview_init_entities(struct isp_prev_device *prev) me->ops = &preview_media_ops; ret =media_entity_pads_init (me,PREV_PADS_NUM , pads);if (ret <0 ) -return ret; + goto error_handler_free;preview_init_formats (sd,NULL );
@@ -2323,6 +2323,8 @@ static int preview_init_entities(struct isp_prev_device *prev)omap3isp_video_cleanup (&prev->video_in); error_video_in:media_entity_cleanup (&prev->subdev.entity); +error_handler_free: +v4l2_ctrl_handler_free (&prev->ctrls);return ret; }
drivers/mfd/arizona-core.c +18 -0
@@ -1537,6 +1537,15 @@ int arizona_dev_init(struct arizona *arizona)arizona_irq_exit (arizona); err_pm:pm_runtime_disable (arizona->dev); + +switch (arizona->pdata.clk32k_src) { +case ARIZONA_32KZ_MCLK1 : +case ARIZONA_32KZ_MCLK2 : +arizona_clk32k_disable (arizona); +break ; +default : +break ; + } err_reset:arizona_enable_reset (arizona);regulator_disable (arizona->dcvdd);
@@ -1558,6 +1567,15 @@ int arizona_dev_exit(struct arizona *arizona)regulator_disable (arizona->dcvdd);regulator_put (arizona->dcvdd); +switch (arizona->pdata.clk32k_src) { +case ARIZONA_32KZ_MCLK1 : +case ARIZONA_32KZ_MCLK2 : +arizona_clk32k_disable (arizona); +break ; +default : +break ; + } +mfd_remove_devices (arizona->dev);arizona_free_irq (arizona,ARIZONA_IRQ_UNDERCLOCKED , arizona);arizona_free_irq (arizona,ARIZONA_IRQ_OVERCLOCKED , arizona);
drivers/mfd/dln2.c +4 -0
@@ -294,7 +294,11 @@ static void dln2_rx(struct urb *urb) len = urb->actual_length -sizeof (struct dln2_header );if (handle ==DLN2_HANDLE_EVENT ) { +unsigned long flags; + +spin_lock_irqsave (&dln2->event_cb_lock, flags);dln2_run_event_callbacks (dln2, id, echo, data, len); +spin_unlock_irqrestore (&dln2->event_cb_lock, flags); }else {/* URB will be re-submitted in _dln2_transfer (free_rx_slot) */ if (dln2_transfer_complete (dln2, urb, handle, echo))
drivers/misc/cxl/sysfs.c +1 -1
@@ -598,7 +598,7 @@ static struct afu_config_record *cxl_sysfs_afu_new_cr(struct cxl_afu *afu, int c rc =kobject_init_and_add (&cr->kobj, &afu_config_record_type, &afu->dev.kobj,"cr%i" , cr->cr);if (rc) - goto err; + goto err1; rc =sysfs_create_bin_file (&cr->kobj, &cr->config_attr);if (rc)
drivers/mtd/mtdchar.c +47 -9
86 lines not on this page · raw message
drivers/net/ethernet/freescale/fman/fman.c +1 -2
@@ -1446,8 +1446,7 @@ static void enable_time_stamp(struct fman *fman) {struct fman_fpm_regs __iomem *fpm_rg = fman->fpm_regs;u16 fm_clk_freq = fman->state->fm_clk_freq; -u32 tmp, intgr, ts_freq; -u64 frac; +u32 tmp, intgr, ts_freq, frac; ts_freq = (u32)(1 << fman->state->count1_micro_bit);/* configure timestamp so that bit 8 will count 1 microsecond
drivers/net/ethernet/freescale/fman/fman_dtsec.c +2 -2
@@ -1095,7 +1095,7 @@ int dtsec_del_hash_mac_address(struct fman_mac *dtsec, enet_addr_t *eth_addr)list_for_each (pos, &dtsec->multicast_addr_hash->lsts[bucket]) { hash_entry =ETH_HASH_ENTRY_OBJ (pos); -if (hash_entry->addr == addr) { +if (hash_entry && hash_entry->addr == addr) {list_del_init (&hash_entry->node);kfree (hash_entry);break ;
@@ -1108,7 +1108,7 @@ int dtsec_del_hash_mac_address(struct fman_mac *dtsec, enet_addr_t *eth_addr)list_for_each (pos, &dtsec->unicast_addr_hash->lsts[bucket]) { hash_entry =ETH_HASH_ENTRY_OBJ (pos); -if (hash_entry->addr == addr) { +if (hash_entry && hash_entry->addr == addr) {list_del_init (&hash_entry->node);kfree (hash_entry);break ;
drivers/net/ethernet/freescale/fman/fman_mac.h +1 -1
@@ -252,7 +252,7 @@ static inline struct eth_hash_t *alloc_hash_table(u16 size)struct eth_hash_t *hash;/* Allocate address hash table */ - hash =kmalloc_array (size,sizeof (struct eth_hash_t *),GFP_KERNEL ); + hash =kmalloc (sizeof (*hash),GFP_KERNEL );if (!hash)return NULL ;
drivers/net/ethernet/freescale/fman/fman_memac.c +1 -2
@@ -851,7 +851,6 @@ int memac_set_tx_pause_frames(struct fman_mac *memac, u8 priority, tmp =ioread32be (®s->command_config); tmp &= ~CMD_CFG_PFC_MODE ; - priority =0 ;iowrite32be (tmp, ®s->command_config);
@@ -953,7 +952,7 @@ int memac_del_hash_mac_address(struct fman_mac *memac, enet_addr_t *eth_addr)list_for_each (pos, &memac->multicast_addr_hash->lsts[hash]) { hash_entry =ETH_HASH_ENTRY_OBJ (pos); -if (hash_entry->addr == addr) { +if (hash_entry && hash_entry->addr == addr) {list_del_init (&hash_entry->node);kfree (hash_entry);break ;
drivers/net/ethernet/freescale/fman/fman_port.c +8 -1
@@ -1623,6 +1623,7 @@ static int fman_port_probe(struct platform_device *of_dev)struct fman_port *port;struct fman *fman;struct device_node *fm_node, *port_node; +struct platform_device *fm_pdev;struct resource res;struct resource *dev_res;u32 val;
@@ -1647,8 +1648,14 @@ static int fman_port_probe(struct platform_device *of_dev) goto return_err; } - fman =dev_get_drvdata (&of_find_device_by_node (fm_node)->dev); + fm_pdev =of_find_device_by_node (fm_node);of_node_put (fm_node); +if (!fm_pdev) { + err = -EINVAL ; + goto return_err; + } + + fman =dev_get_drvdata (&fm_pdev->dev);if (!fman) { err = -EINVAL ; goto return_err;
drivers/net/ethernet/freescale/fman/fman_tgec.c +1 -1
@@ -585,7 +585,7 @@ int tgec_del_hash_mac_address(struct fman_mac *tgec, enet_addr_t *eth_addr)list_for_each (pos, &tgec->multicast_addr_hash->lsts[hash]) { hash_entry =ETH_HASH_ENTRY_OBJ (pos); -if (hash_entry->addr == addr) { +if (hash_entry && hash_entry->addr == addr) {list_del_init (&hash_entry->node);kfree (hash_entry);break ;
drivers/net/ethernet/ibm/ibmvnic.c +1 -1
@@ -1515,7 +1515,7 @@ static int init_sub_crq_irqs(struct ibmvnic_adapter *adapter) req_tx_irq_failed:for (j =0 ; j < i; j++) {free_irq (adapter->tx_scrq[j]->irq, adapter->tx_scrq[j]); -irq_dispose_mapping (adapter->rx_scrq[j]->irq); +irq_dispose_mapping (adapter->tx_scrq[j]->irq); }release_sub_crqs_no_irqs (adapter);return rc;
drivers/net/ethernet/intel/igb/igb_main.c +9 -0
@@ -5381,9 +5381,18 @@ static void igb_reset_task(struct work_struct *work)struct igb_adapter *adapter; adapter = container_of(work, struct igb_adapter, reset_task); +rtnl_lock (); +/* If we're already down or resetting, just bail */ +if (test_bit (__IGB_DOWN, &adapter->state) || +test_bit (__IGB_RESETTING, &adapter->state)) { +rtnl_unlock (); +return ; + } +igb_dump (adapter);netdev_err (adapter->netdev,"Reset adapter\n" );igb_reinit_locked (adapter); +rtnl_unlock (); }/**
drivers/net/ethernet/mellanox/mlx4/main.c +2 -0
@@ -4176,12 +4176,14 @@ static void mlx4_pci_resume(struct pci_dev *pdev)static void mlx4_shutdown (struct pci_dev *pdev) {struct mlx4_dev_persistent *persist =pci_get_drvdata (pdev); +struct mlx4_dev *dev = persist->dev;mlx4_info (persist->dev,"mlx4_shutdown was called\n" );mutex_lock (&persist->interface_state_mutex);if (persist->interface_state &MLX4_INTERFACE_STATE_UP )mlx4_unload_one (pdev);mutex_unlock (&persist->interface_state_mutex); +mlx4_pci_disable_device (dev); }static const struct pci_error_handlers mlx4_err_handler = {
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c +1 -1
@@ -139,7 +139,7 @@ int mlx5e_attr_get(struct net_device *dev, struct switchdev_attr *attr)struct mlx5_eswitch_rep *rep = priv->ppriv;struct mlx5_eswitch *esw = priv->mdev->priv.eswitch; -if (esw->mode ==SRIOV_NONE ) +if (esw->mode !=SRIOV_OFFLOADS )return -EOPNOTSUPP ;switch (attr->id) {
drivers/net/ethernet/mellanox/mlxsw/core.c +5 -3
@@ -1370,7 +1370,7 @@ static int mlxsw_core_reg_access_emad(struct mlxsw_core *mlxsw_core, err =mlxsw_emad_reg_access (mlxsw_core, reg, payload, type, trans, bulk_list, cb, cb_priv, tid);if (err) { -kfree (trans); +kfree_rcu (trans, rcu);return err; }return 0 ;
@@ -1584,9 +1584,10 @@ void mlxsw_core_skb_receive(struct mlxsw_core *mlxsw_core, struct sk_buff *skb,break ; } } -rcu_read_unlock (); -if (!found) +if (!found) { +rcu_read_unlock (); goto drop; + } pcpu_stats =this_cpu_ptr (mlxsw_core->pcpu_stats);u64_stats_update_begin (&pcpu_stats->syncp);
@@ -1597,6 +1598,7 @@ void mlxsw_core_skb_receive(struct mlxsw_core *mlxsw_core, struct sk_buff *skb,u64_stats_update_end (&pcpu_stats->syncp); rxl->func (skb, local_port, rxl_item->priv); +rcu_read_unlock ();return ; drop:
drivers/net/ethernet/qlogic/qed/qed_int.c +2 -1
@@ -2158,7 +2158,8 @@ static int qed_int_attentions(struct qed_hwfn *p_hwfn) index, attn_bits, attn_acks, asserted_bits, deasserted_bits, p_sb_attn_sw->known_attn); }else if (asserted_bits ==0x100 ) { -DP_INFO (p_hwfn,"MFW indication via attention\n" ); +DP_VERBOSE (p_hwfn,NETIF_MSG_INTR , +"MFW indication via attention\n" ); }else {DP_VERBOSE (p_hwfn,NETIF_MSG_INTR ,"MFW indication [deassertion]\n" );
drivers/net/ethernet/qualcomm/emac/emac.c +14 -3
@@ -477,13 +477,24 @@ static int emac_clks_phase1_init(struct platform_device *pdev, ret =clk_prepare_enable (adpt->clk[EMAC_CLK_CFG_AHB ]);if (ret) -return ret; + goto disable_clk_axi; ret =clk_set_rate (adpt->clk[EMAC_CLK_HIGH_SPEED ],19200000 );if (ret) -return ret; + goto disable_clk_cfg_ahb; + + ret =clk_prepare_enable (adpt->clk[EMAC_CLK_HIGH_SPEED ]); +if (ret) + goto disable_clk_cfg_ahb; -return clk_prepare_enable (adpt->clk[EMAC_CLK_HIGH_SPEED ]); +return 0 ; + +disable_clk_cfg_ahb: +clk_disable_unprepare (adpt->clk[EMAC_CLK_CFG_AHB ]); +disable_clk_axi: +clk_disable_unprepare (adpt->clk[EMAC_CLK_AXI ]); + +return ret; }/* Enable clocks; needs emac_clks_phase1_init to be called before */
drivers/net/ethernet/renesas/ravb_main.c +24 -2
@@ -1444,6 +1444,7 @@ static void ravb_tx_timeout_work(struct work_struct *work) struct ravb_private *priv = container_of(work, struct ravb_private, work);struct net_device *ndev = priv->ndev; +int error;netif_tx_stop_all_queues (ndev);
@@ -1452,15 +1453,36 @@ static void ravb_tx_timeout_work(struct work_struct *work)ravb_ptp_stop (ndev);/* Wait for DMA stopping */ -ravb_stop_dma (ndev); +if (ravb_stop_dma (ndev)) { +/* If ravb_stop_dma() fails, the hardware is still operating +* for TX and/or RX. So, this should not call the following +* functions because ravb_dmac_init() is possible to fail too. +* Also, this should not retry ravb_stop_dma() again and again +* here because it's possible to wait forever. So, this just +* re-enables the TX and RX and skip the following +* re-initialization procedure. +*/ +ravb_rcv_snd_enable (ndev); + goto out; + }ravb_ring_free (ndev,RAVB_BE );ravb_ring_free (ndev,RAVB_NC );/* Device init */ -ravb_dmac_init (ndev); + error =ravb_dmac_init (ndev); +if (error) { +/* If ravb_dmac_init() fails, descriptors are freed. So, this +* should return here to avoid re-enabling the TX and RX in +* ravb_emac_init(). +*/ +netdev_err (ndev,"%s: ravb_dmac_init() failed, error %d\n" , + __func__, error); +return ; + }ravb_emac_init (ndev); +out:/* Initialise PTP Clock driver */ if (priv->chip_id ==RCAR_GEN2 )ravb_ptp_init (ndev, priv->pdev);
drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c +1 -0
@@ -362,6 +362,7 @@ static int ipq806x_gmac_probe(struct platform_device *pdev) plat_dat->has_gmac = true; plat_dat->bsp_priv = gmac; plat_dat->fix_mac_speed = ipq806x_gmac_fix_mac_speed; + plat_dat->multicast_filter_bins =0 ; err =stmmac_dvr_probe (&pdev->dev, plat_dat, &stmmac_res);if (err)
drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c +3 -0
@@ -172,6 +172,9 @@ static void dwmac1000_set_filter(struct mac_device_info *hw, value =GMAC_FRAME_FILTER_PR ; }else if (dev->flags &IFF_ALLMULTI ) { value =GMAC_FRAME_FILTER_PM ;/* pass all multi */ + }else if (!netdev_mc_empty (dev) && (mcbitslog2 ==0 )) { +/* Fall back to all multicast if we've no filter */ + value =GMAC_FRAME_FILTER_PM ; }else if (!netdev_mc_empty (dev)) {struct netdev_hw_addr *ha;
drivers/net/ethernet/toshiba/spider_net.c +2 -2
@@ -296,8 +296,8 @@ spider_net_free_chain(struct spider_net_card *card, descr = descr->next; }while (descr != chain->ring); -dma_free_coherent (&card->pdev->dev, chain->num_desc, - chain->hwring, chain->dma_addr); +dma_free_coherent (&card->pdev->dev, chain->num_desc *sizeof (struct spider_net_hw_descr ), + chain->hwring, chain->dma_addr); }/**
drivers/net/phy/mdio-bcm-unimac.c +2 -0
@@ -177,6 +177,8 @@ static int unimac_mdio_probe(struct platform_device *pdev)return -ENOMEM ; r =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); +if (!r) +return -EINVAL ;/* Just ioremap, as this MDIO block is usually integrated into an * Ethernet MAC controller register range
drivers/net/usb/hso.c +7 -3
@@ -1404,8 +1404,9 @@ static void hso_serial_set_termios(struct tty_struct *tty, struct ktermios *old)unsigned long flags;if (old) -hso_dbg (0x16 ,"Termios called with: cflags new[%d] - old[%d]\n" , - tty->termios.c_cflag, old->c_cflag); +hso_dbg (0x16 ,"Termios called with: cflags new[%u] - old[%u]\n" , + (unsigned int )tty->termios.c_cflag, + (unsigned int )old->c_cflag);/* the actual setup */ spin_lock_irqsave (&serial->serial_lock, flags);
@@ -2273,12 +2274,14 @@ static int hso_serial_common_create(struct hso_serial *serial, int num_urbs, minor =get_free_serial_index ();if (minor <0 ) - goto exit; + goto exit2;/* register our minor number */ serial->parent->dev =tty_port_register_device_attr (&serial->port, tty_drv, minor, &serial->parent->interface->dev, serial->parent, hso_serial_dev_groups); +if (IS_ERR (serial->parent->dev)) + goto exit2; dev = serial->parent->dev;/* fill in specific data for later use */
@@ -2324,6 +2327,7 @@ static int hso_serial_common_create(struct hso_serial *serial, int num_urbs,return 0 ; exit:hso_serial_tty_unregister (serial); +exit2:hso_serial_common_free (serial);return -1 ; }
drivers/net/usb/lan78xx.c +31 -82
155 lines not on this page · raw message
drivers/net/vxlan.c +7 -3
@@ -889,6 +889,7 @@ static int vxlan_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb,for (h =0 ; h <FDB_HASH_SIZE ; ++h) {struct vxlan_fdb *f; +rcu_read_lock ();hlist_for_each_entry_rcu (f, &vxlan->fdb_head[h], hlist) {struct vxlan_rdst *rd;
@@ -901,12 +902,15 @@ static int vxlan_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb, cb->nlh->nlmsg_seq,RTM_NEWNEIGH , NLM_F_MULTI, rd); -if (err <0 ) +if (err <0 ) { +rcu_read_unlock (); goto out; + } skip: *idx +=1 ; } } +rcu_read_unlock (); } out:return err;
@@ -2106,7 +2110,7 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,else if (info->key.tun_flags &TUNNEL_DONT_FRAGMENT ) df =htons (IP_DF ); - tos =ip_tunnel_ecn_encap (RT_TOS (tos), old_iph, skb); + tos =ip_tunnel_ecn_encap (tos, old_iph, skb); ttl = ttl ? :ip4_dst_hoplimit (&rt->dst); err =vxlan_build_skb (skb, &rt->dst,sizeof (struct iphdr ), vni, md, flags, udp_sum);
@@ -2165,7 +2169,7 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,if (!info) udp_sum = !(flags &VXLAN_F_UDP_ZERO_CSUM6_TX ); - tos =ip_tunnel_ecn_encap (RT_TOS (tos), old_iph, skb); + tos =ip_tunnel_ecn_encap (tos, old_iph, skb); ttl = ttl ? :ip6_dst_hoplimit (ndst);skb_scrub_packet (skb, xnet); err = vxlan_build_skb(skb, ndst, sizeof(struct ipv6hdr),
drivers/net/wan/lapbether.c +9 -1
@@ -160,6 +160,12 @@ static netdev_tx_t lapbeth_xmit(struct sk_buff *skb,if (!netif_running (dev)) goto drop; +/* There should be a pseudo header of 1 byte added by upper layers. +* Check to make sure it is there before reading it. +*/ +if (skb->len <1 ) + goto drop; +switch (skb->data[0 ]) {case X25_IFACE_DATA :break ;
@@ -308,6 +314,7 @@ static void lapbeth_setup(struct net_device *dev) dev->netdev_ops = &lapbeth_netdev_ops; dev->destructor = free_netdev; dev->type =ARPHRD_X25 ; + dev->hard_header_len =0 ; dev->mtu =1000 ; dev->addr_len =0 ; }
@@ -334,7 +341,8 @@ static int lapbeth_new_device(struct net_device *dev)* then this driver prepends a length field of 2 bytes, * then the underlying Ethernet device prepends its own header. */ - ndev->hard_header_len =-1 +3 +2 + dev->hard_header_len; + ndev->needed_headroom =-1 +3 +2 + dev->hard_header_len + + dev->needed_headroom; lapbeth =netdev_priv (ndev); lapbeth->axdev = ndev;
drivers/net/wireless/ath/ath9k/htc_hst.c +3 -0
@@ -175,6 +175,7 @@ static int htc_config_pipe_credits(struct htc_target *target) time_left =wait_for_completion_timeout (&target->cmd_wait,HZ );if (!time_left) {dev_err (target->dev,"HTC credit config timeout\n" ); +kfree_skb (skb);return -ETIMEDOUT ; }
@@ -211,6 +212,7 @@ static int htc_setup_complete(struct htc_target *target) time_left =wait_for_completion_timeout (&target->cmd_wait,HZ );if (!time_left) {dev_err (target->dev,"HTC start timeout\n" ); +kfree_skb (skb);return -ETIMEDOUT ; }
@@ -284,6 +286,7 @@ int htc_connect_service(struct htc_target *target,if (!time_left) {dev_err (target->dev,"Service connection timeout for: %d\n" , service_connreq->service_id); +kfree_skb (skb);return -ETIMEDOUT ; }
drivers/net/wireless/ath/ath9k/wmi.c +1 -0
@@ -340,6 +340,7 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id,ath_dbg (common,WMI ,"Timeout waiting for WMI command: %s\n" ,wmi_cmd_to_name (cmd_id));mutex_unlock (&wmi->op_mutex); +kfree_skb (skb);return -ETIMEDOUT ; }
drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h +1 -1
@@ -30,7 +30,7 @@#define BRCMF_ARP_OL_PEER_AUTO_REPLY 0x00000008#define BRCMF_BSS_INFO_VERSION 109/* curr ver of brcmf_bss_info_le struct */ -#define BRCMF_BSS_RSSI_ON_CHANNEL 0x0002 +#define BRCMF_BSS_RSSI_ON_CHANNEL 0x0004#define BRCMF_STA_WME 0x00000002/* WMM association */ #define BRCMF_STA_AUTHE 0x00000008/* Authenticated */
drivers/net/wireless/intel/iwlegacy/common.c +2 -2
@@ -4302,8 +4302,8 @@ il_apm_init(struct il_priv *il)* power savings, even without L1. */ if (il->cfg->set_l0s) { -pcie_capability_read_word (il->pci_dev,PCI_EXP_LNKCTL , &lctl); -if (lctl &PCI_EXP_LNKCTL_ASPM_L1 ) { + ret =pcie_capability_read_word (il->pci_dev,PCI_EXP_LNKCTL , &lctl); +if (!ret && (lctl &PCI_EXP_LNKCTL_ASPM_L1 )) {/* L1-ASPM enabled; disable(!) L0S */ il_set_bit (il,CSR_GIO_REG ,CSR_GIO_REG_VAL_L0S_ENABLED );
drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c +15 -7
@@ -586,6 +586,11 @@ static int mwifiex_ret_802_11_key_material_v1(struct mwifiex_private *priv, {struct host_cmd_ds_802_11_key_material *key = &resp->params.key_material; +int len; + + len =le16_to_cpu (key->key_param_set.key_len); +if (len >sizeof (key->key_param_set.key)) +return -EINVAL ;if (le16_to_cpu (key->action) == HostCmd_ACT_GEN_SET) {if ((le16_to_cpu (key->key_param_set.key_info) &KEY_MCAST )) {
@@ -599,9 +604,8 @@ static int mwifiex_ret_802_11_key_material_v1(struct mwifiex_private *priv,memset (priv->aes_key.key_param_set.key,0 ,sizeof (key->key_param_set.key)); - priv->aes_key.key_param_set.key_len = key->key_param_set.key_len; -memcpy (priv->aes_key.key_param_set.key, key->key_param_set.key, -le16_to_cpu (priv->aes_key.key_param_set.key_len)); + priv->aes_key.key_param_set.key_len =cpu_to_le16 (len); +memcpy (priv->aes_key.key_param_set.key, key->key_param_set.key, len);return 0 ; }
@@ -616,9 +620,14 @@ static int mwifiex_ret_802_11_key_material_v2(struct mwifiex_private *priv, struct host_cmd_ds_command *resp) {struct host_cmd_ds_802_11_key_material_v2 *key_v2; -__le16 len; +int len; key_v2 = &resp->params.key_material_v2; + + len =le16_to_cpu (key_v2->key_param_set.key_params.aes.key_len); +if (len >WLAN_KEY_LEN_CCMP ) +return -EINVAL ; +if (le16_to_cpu (key_v2->action) == HostCmd_ACT_GEN_SET) {if ((le16_to_cpu (key_v2->key_param_set.key_info) &KEY_MCAST )) {mwifiex_dbg (priv->adapter,INFO ,"info: key: GTK is set\n" );
@@ -634,10 +643,9 @@ static int mwifiex_ret_802_11_key_material_v2(struct mwifiex_private *priv,memset (priv->aes_key_v2.key_param_set.key_params.aes.key,0 ,WLAN_KEY_LEN_CCMP ); priv->aes_key_v2.key_param_set.key_params.aes.key_len = - key_v2->key_param_set.key_params.aes.key_len; - len = priv->aes_key_v2.key_param_set.key_params.aes.key_len; +cpu_to_le16 (len);memcpy (priv->aes_key_v2.key_param_set.key_params.aes.key, - key_v2->key_param_set.key_params.aes.key,le16_to_cpu (len)); + key_v2->key_param_set.key_params.aes.key, len);return 0 ; }
drivers/net/wireless/ti/wl1251/event.c +1 -1
@@ -84,7 +84,7 @@ static int wl1251_event_ps_report(struct wl1251 *wl,break ; } -return 0 ; +return ret; }static void wl1251_event_mbox_dump (struct event_mailbox *mbox)
drivers/net/xen-netfront.c +42 -22
88 lines not on this page · raw message
drivers/nfc/s3fwrn5/core.c +1 -0
@@ -209,6 +209,7 @@ int s3fwrn5_recv_frame(struct nci_dev *ndev, struct sk_buff *skb,case S3FWRN5_MODE_FW :return s3fwrn5_fw_recv_frame (ndev, skb);default : +kfree_skb (skb);return -ENODEV ; } }
drivers/parisc/sba_iommu.c +1 -1
@@ -1283,7 +1283,7 @@ sba_ioc_init_pluto(struct parisc_device *sba, struct ioc *ioc, int ioc_num)** (one that doesn't overlap memory or LMMIO space) in the ** IBASE and IMASK registers. */ - ioc->ibase =READ_REG (ioc->ioc_hpa +IOC_IBASE ); + ioc->ibase =READ_REG (ioc->ioc_hpa +IOC_IBASE ) & ~0x1fffffULL ; iova_space_size = ~(READ_REG (ioc->ioc_hpa +IOC_IMASK ) &0xFFFFFFFFUL ) +1 ;if ((ioc->ibase <0xfed00000UL ) && ((ioc->ibase + iova_space_size) >0xfee00000UL )) {
drivers/pci/access.c +2 -6
@@ -185,17 +185,13 @@ EXPORT_SYMBOL(pci_bus_set_ops);static DECLARE_WAIT_QUEUE_HEAD (pci_cfg_wait); static noinline void pci_wait_cfg(struct pci_dev *dev) + __must_hold(&pci_lock) { -DECLARE_WAITQUEUE (wait, current); - -__add_wait_queue (&pci_cfg_wait, &wait);do { -set_current_state (TASK_UNINTERRUPTIBLE );raw_spin_unlock_irq (&pci_lock); -schedule (); +wait_event (pci_cfg_wait, !dev->block_cfg_access);raw_spin_lock_irq (&pci_lock); }while (dev->block_cfg_access); -__remove_wait_queue (&pci_cfg_wait, &wait); }/* Returns 0 on success, negative values indicate error. */
drivers/pci/hotplug/acpiphp_glue.c +11 -3
@@ -136,13 +136,21 @@ static struct acpiphp_context *acpiphp_grab_context(struct acpi_device *adev)struct acpiphp_context *context;acpi_lock_hp_context (); + context =acpiphp_get_context (adev); -if (!context || context->func.parent->is_going_away) { -acpi_unlock_hp_context (); -return NULL ; +if (!context) + goto unlock; + +if (context->func.parent->is_going_away) { +acpiphp_put_context (context); + context =NULL ; + goto unlock; } +get_bridge (context->func.parent);acpiphp_put_context (context); + +unlock:acpi_unlock_hp_context ();return context; }
drivers/pci/pcie/aspm.c +1 -0
@@ -832,6 +832,7 @@ static int pcie_aspm_get_policy(char *buffer, struct kernel_param *kp) cnt +=sprintf (buffer + cnt,"[%s] " , policy_str[i]); else cnt += sprintf(buffer + cnt, "%s ", policy_str[i]); + cnt +=sprintf (buffer + cnt,"\n" );return cnt; }
drivers/pci/quirks.c +13 -0
@@ -2046,6 +2046,19 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x10f1, quirk_disable_aspm_l0s);DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x10f4 , quirk_disable_aspm_l0s);DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x1508 , quirk_disable_aspm_l0s); +static void quirk_disable_aspm_l0s_l1 (struct pci_dev *dev) +{ +pci_info (dev,"Disabling ASPM L0s/L1\n" ); +pci_disable_link_state (dev,PCIE_LINK_STATE_L0S |PCIE_LINK_STATE_L1 ); +} + +/* +* ASM1083/1085 PCIe-PCI bridge devices cause AER timeout errors on the +* upstream PCIe root port when ASPM is enabled. At least L0s mode is affected; +* disable both L0s and L1 for now to be safe. +*/ +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_ASMEDIA ,0x1080 , quirk_disable_aspm_l0s_l1); +/* * Some Pericom PCIe-to-PCI bridges in reverse mode need the PCIe Retrain * Link bit cleared after starting the link retrain process to allow this
drivers/pinctrl/pinctrl-single.c +7 -4
@@ -1078,7 +1078,7 @@ static int pcs_parse_pinconf(struct pcs_device *pcs, struct device_node *np,/* If pinconf isn't supported, don't parse properties in below. */ if (!PCS_HAS_PINCONF ) -return 0 ; +return -ENOTSUPP ;/* cacluate how much properties are supported in current node */ for (i =0 ; i <ARRAY_SIZE (prop2); i++) {
@@ -1090,7 +1090,7 @@ static int pcs_parse_pinconf(struct pcs_device *pcs, struct device_node *np, nconfs++; }if (!nconfs) -return 0 ; +return -ENOTSUPP ; func->conf = devm_kzalloc(pcs->dev, sizeof(struct pcs_conf_vals) * nconfs,
@@ -1203,9 +1203,12 @@ static int pcs_parse_one_pinctrl_entry(struct pcs_device *pcs,if (PCS_HAS_PINCONF ) { res =pcs_parse_pinconf (pcs, np, function, map); -if (res) +if (res ==0 ) + *num_maps =2 ; +else if (res == -ENOTSUPP ) + *num_maps =1 ; +else goto free_pingroups; - *num_maps =2 ; }else { *num_maps =1 ; }
drivers/platform/x86/intel-hid.c +1 -1
@@ -264,7 +264,7 @@ check_acpi_dev(acpi_handle handle, u32 lvl, void *context, void **rv)return AE_OK ;if (acpi_match_device_ids (dev, ids) ==0 ) -if (acpi_create_platform_device (dev,NULL )) +if (!IS_ERR_OR_NULL (acpi_create_platform_device (dev,NULL )))dev_info (&dev->dev,"intel-hid: created platform device\n" );
drivers/platform/x86/intel-vbtn.c +1 -1
@@ -168,7 +168,7 @@ check_acpi_dev(acpi_handle handle, u32 lvl, void *context, void **rv)return AE_OK ;if (acpi_match_device_ids (dev, ids) ==0 ) -if (acpi_create_platform_device (dev,NULL )) +if (!IS_ERR_OR_NULL (acpi_create_platform_device (dev,NULL )))dev_info (&dev->dev,"intel-vbtn: created platform device\n" );
drivers/power/supply/88pm860x_battery.c +4 -2
@@ -436,7 +436,7 @@ static void pm860x_init_battery(struct pm860x_battery_info *info)int ret;int data;int bat_remove; -int soc; +int soc =0 ;/* measure enable on GPADC1 */ data =MEAS1_GP1 ;
@@ -499,7 +499,9 @@ static void pm860x_init_battery(struct pm860x_battery_info *info) }mutex_unlock (&info->lock); -calc_soc (info,OCV_MODE_ACTIVE , &soc); + ret =calc_soc (info,OCV_MODE_ACTIVE , &soc); +if (ret <0 ) + goto out; data =pm860x_reg_read (info->i2c,PM8607_POWER_UP_LOG ); bat_remove = data &BAT_WU_LOG ;
drivers/pwm/pwm-bcm-iproc.c +7 -2
@@ -85,8 +85,6 @@ static void iproc_pwmc_get_state(struct pwm_chip *chip, struct pwm_device *pwm,u64 tmp, multi, rate;u32 value, prescale; - rate =clk_get_rate (ip->clk); - value =readl (ip->base +IPROC_PWM_CTRL_OFFSET );if (value &BIT (IPROC_PWM_CTRL_EN_SHIFT (pwm->hwpwm)))
@@ -99,6 +97,13 @@ static void iproc_pwmc_get_state(struct pwm_chip *chip, struct pwm_device *pwm,else state->polarity =PWM_POLARITY_INVERSED ; + rate =clk_get_rate (ip->clk); +if (rate ==0 ) { + state->period =0 ; + state->duty_cycle =0 ; +return ; + } + value =readl (ip->base +IPROC_PWM_PRESCALE_OFFSET ); prescale = value >>IPROC_PWM_PRESCALE_SHIFT (pwm->hwpwm); prescale &=IPROC_PWM_PRESCALE_MAX ;
drivers/s390/net/qeth_l2_main.c +4 -0
@@ -1675,6 +1675,10 @@ static void qeth_bridge_state_change(struct qeth_card *card,int extrasize;QETH_CARD_TEXT (card,2 ,"brstchng" ); +if (qports->num_entries ==0 ) { +QETH_CARD_TEXT (card,2 ,"BPempty" ); +return ; + }if (qports->entry_length !=sizeof (struct qeth_sbp_port_entry )) {QETH_CARD_TEXT_ (card,2 ,"BPsz%04x" , qports->entry_length);return ;
drivers/scsi/arm/cumana_2.c +1 -1
@@ -454,7 +454,7 @@ static int cumanascsi2_probe(struct expansion_card *ec,if (info->info.scsi.dma !=NO_DMA )free_dma (info->info.scsi.dma); -free_irq (ec->irq, host); +free_irq (ec->irq, info); out_release:fas216_release (host);
drivers/scsi/arm/eesox.c +1 -1
@@ -575,7 +575,7 @@ static int eesoxscsi_probe(struct expansion_card *ec, const struct ecard_id *id)if (info->info.scsi.dma !=NO_DMA )free_dma (info->info.scsi.dma); -free_irq (ec->irq, host); +free_irq (ec->irq, info); out_remove:fas216_remove (host);
drivers/scsi/arm/powertec.c +1 -1
@@ -382,7 +382,7 @@ static int powertecscsi_probe(struct expansion_card *ec,if (info->info.scsi.dma !=NO_DMA )free_dma (info->info.scsi.dma); -free_irq (ec->irq, host); +free_irq (ec->irq, info); out_release:fas216_release (host);
drivers/scsi/mesh.c +7 -1
@@ -1044,6 +1044,8 @@ static void handle_error(struct mesh_state *ms)while ((in_8 (&mr->bus_status1) &BS1_RST ) !=0 )udelay (1 );printk ("done\n" ); +if (ms->dma_started) +halt_dma (ms);handle_reset (ms);/* request_q is empty, no point in mesh_start() */ return ;
@@ -1356,7 +1358,8 @@ static void halt_dma(struct mesh_state *ms) ms->conn_tgt, ms->data_ptr,scsi_bufflen (cmd), ms->tgts[ms->conn_tgt].data_goes_out); } -scsi_dma_unmap (cmd); +if (cmd) +scsi_dma_unmap (cmd); ms->dma_started =0 ; }
@@ -1711,6 +1714,9 @@ static int mesh_host_reset(struct scsi_cmnd *cmd)spin_lock_irqsave (ms->host->host_lock, flags); +if (ms->dma_started) +halt_dma (ms); +/* Reset the controller & dbdma channel */ out_le32 (&md->control, (RUN |PAUSE |FLUSH |WAKE ) <<16 );/* stop dma */ out_8 (&mr->exception,0xff );/* clear all exception bits */
drivers/scsi/scsi_debug.c +6 -0
@@ -4986,6 +4986,12 @@ static int __init scsi_debug_init(void)pr_err ("submit_queues must be 1 or more\n" );return -EINVAL ; } + +if ((sdebug_max_queue >SDEBUG_CANQUEUE ) || (sdebug_max_queue <1 )) { +pr_err ("max_queue must be in range [1, %d]\n" ,SDEBUG_CANQUEUE ); +return -EINVAL ; + } + sdebug_q_arr =kcalloc (submit_queues,sizeof (struct sdebug_queue ),GFP_KERNEL );if (sdebug_q_arr ==NULL )
drivers/staging/rtl8192u/r8192U_core.c +1 -1
@@ -2522,7 +2522,7 @@ static int rtl8192_read_eeprom_info(struct net_device *dev) ret =eprom_read (dev, (EEPROM_TxPwIndex_CCK >>1 ));if (ret <0 )return ret; - priv->EEPROMTxPowerLevelCCK = ((u16 )ret &0xff ) >>8 ; + priv->EEPROMTxPowerLevelCCK = ((u16 )ret &0xff00 ) >>8 ; }else priv->EEPROMTxPowerLevelCCK =0x10 ;RT_TRACE (COMP_EPROM ,"CCK Tx Power Levl: 0x%02x\n" , priv->EEPROMTxPowerLevelCCK);
drivers/usb/dwc2/platform.c +3 -1
@@ -668,6 +668,7 @@ static int dwc2_driver_probe(struct platform_device *dev)if (hsotg->gadget_enabled) { retval =usb_add_gadget_udc (hsotg->dev, &hsotg->gadget);if (retval) { + hsotg->gadget.udc =NULL ;dwc2_hsotg_remove (hsotg); goto error; }
@@ -676,7 +677,8 @@ static int dwc2_driver_probe(struct platform_device *dev)return 0 ; error: -dwc2_lowlevel_hw_disable (hsotg); +if (hsotg->dr_mode !=USB_DR_MODE_PERIPHERAL ) +dwc2_lowlevel_hw_disable (hsotg);return retval; }
drivers/usb/gadget/udc/bdc/bdc_core.c +4 -0
@@ -286,6 +286,7 @@ static void bdc_mem_init(struct bdc *bdc, bool reinit)* in that case reinit is passed as 1 */ if (reinit) { +int i;/* Enable interrupts */ temp =bdc_readl (bdc->regs,BDC_BDCSC ); temp |=BDC_GIE ;
@@ -295,6 +296,9 @@ static void bdc_mem_init(struct bdc *bdc, bool reinit)/* Initialize SRR to 0 */ memset (bdc->srr.sr_bds,0 ,NUM_SR_ENTRIES *sizeof (struct bdc_bd )); +/* clear ep flags to avoid post disconnect stops/deconfigs */ +for (i =1 ; i < bdc->num_eps; ++i) + bdc->bdc_ep_array[i]->flags =0 ; }else {/* One time initiaization only */ /* Enable status report function pointers */
drivers/usb/gadget/udc/bdc/bdc_ep.c +10 -6
@@ -621,7 +621,6 @@ int bdc_ep_enable(struct bdc_ep *ep) }bdc_dbg_bd_list (bdc, ep);/* only for ep0: config ep is called for ep0 from connect event */ - ep->flags |=BDC_EP_ENABLED ;if (ep->ep_num ==1 )return ret;
@@ -765,10 +764,13 @@ static int ep_dequeue(struct bdc_ep *ep, struct bdc_req *req) __func__, ep->name, start_bdi, end_bdi);dev_dbg (bdc->dev,"ep_dequeue ep=%p ep->desc=%p\n" , ep, (void *)ep->usb_ep.desc); -/* Stop the ep to see where the HW is ? */ - ret =bdc_stop_ep (bdc, ep->ep_num); -/* if there is an issue with stopping ep, then no need to go further */ -if (ret) +/* if still connected, stop the ep to see where the HW is ? */ +if (!(bdc_readl (bdc->regs,BDC_USPC ) &BDC_PST_MASK )) { + ret =bdc_stop_ep (bdc, ep->ep_num); +/* if there is an issue, then no need to go further */ +if (ret) +return 0 ; + }else return 0 ;/*
@@ -1917,7 +1919,9 @@ static int bdc_gadget_ep_disable(struct usb_ep *_ep) __func__, ep->name, ep->flags);if (!(ep->flags &BDC_EP_ENABLED )) { -dev_warn (bdc->dev,"%s is already disabled\n" , ep->name); +if (bdc->gadget.speed !=USB_SPEED_UNKNOWN ) +dev_warn (bdc->dev,"%s is already disabled\n" , + ep->name);return 0 ; }spin_lock_irqsave (&bdc->lock, flags);
drivers/usb/gadget/udc/net2280.c +3 -1
@@ -3785,8 +3785,10 @@ static int net2280_probe(struct pci_dev *pdev, const struct pci_device_id *id)return 0 ; done: -if (dev) +if (dev) {net2280_remove (pdev); +kfree (dev); + }return retval; }
drivers/usb/serial/cp210x.c +19 -0
@@ -255,6 +255,8 @@ static struct usb_serial_driver cp210x_device = { .break_ctl = cp210x_break_ctl, .set_termios = cp210x_set_termios, .tx_empty = cp210x_tx_empty, + .throttle = usb_serial_generic_throttle, + .unthrottle = usb_serial_generic_unthrottle, .tiocmget = cp210x_tiocmget, .tiocmset = cp210x_tiocmset, .port_probe = cp210x_port_probe,
@@ -765,6 +767,7 @@ static void cp210x_get_termios_port(struct usb_serial_port *port,u32 baud;u16 bits;u32 ctl_hs; +u32 flow_repl;cp210x_read_u32_reg (port,CP210X_GET_BAUDRATE , &baud);
@@ -865,6 +868,22 @@ static void cp210x_get_termios_port(struct usb_serial_port *port, ctl_hs =le32_to_cpu (flow_ctl.ulControlHandshake);if (ctl_hs &CP210X_SERIAL_CTS_HANDSHAKE ) {dev_dbg (dev,"%s - flow control = CRTSCTS\n" , __func__); +/* +* When the port is closed, the CP210x hardware disables +* auto-RTS and RTS is deasserted but it leaves auto-CTS when +* in hardware flow control mode. When re-opening the port, if +* auto-CTS is enabled on the cp210x, then auto-RTS must be +* re-enabled in the driver. +*/ + flow_repl =le32_to_cpu (flow_ctl.ulFlowReplace); + flow_repl &= ~CP210X_SERIAL_RTS_MASK ; + flow_repl |=CP210X_SERIAL_RTS_SHIFT (CP210X_SERIAL_RTS_FLOW_CTL ); + flow_ctl.ulFlowReplace =cpu_to_le32 (flow_repl); +cp210x_write_reg_block (port, +CP210X_SET_FLOW , + &flow_ctl, +sizeof (flow_ctl)); + cflag |=CRTSCTS ; }else {dev_dbg (dev,"%s - flow control = NONE\n" , __func__);
drivers/usb/serial/ftdi_sio.c +18 -19
@@ -2051,12 +2051,11 @@ static int ftdi_prepare_write_buffer(struct usb_serial_port *port,#define FTDI_RS_ERR_MASK (FTDI_RS_BI | FTDI_RS_PE | FTDI_RS_FE | FTDI_RS_OE)static int ftdi_process_packet (struct usb_serial_port *port, -struct ftdi_private *priv,char *packet,int len) +struct ftdi_private *priv,unsigned char *buf,int len) { +unsigned char status;int i; -char status;char flag; -char *ch;if (len <2 ) {dev_dbg (&port->dev,"malformed packet\n" );
@@ -2066,7 +2065,7 @@ static int ftdi_process_packet(struct usb_serial_port *port,/* Compare new line status to the old one, signal if different/ N.B. packet may be processed more than once, but differences are only processed once. */ - status = packet[0 ] &FTDI_STATUS_B0_MASK ; + status = buf[0 ] &FTDI_STATUS_B0_MASK ;if (status != priv->prev_status) {char diff_status = status ^ priv->prev_status;
@@ -2092,13 +2091,12 @@ static int ftdi_process_packet(struct usb_serial_port *port, }/* save if the transmitter is empty or not */ -if (packet[1 ] &FTDI_RS_TEMT ) +if (buf[1 ] &FTDI_RS_TEMT ) priv->transmit_empty =1 ;else priv->transmit_empty =0 ; - len -=2 ; -if (!len) +if (len ==2 )return 0 ;/* status only */ /*
@@ -2106,40 +2104,41 @@ static int ftdi_process_packet(struct usb_serial_port *port,* data payload to avoid over-reporting. */ flag =TTY_NORMAL ; -if (packet[1 ] &FTDI_RS_ERR_MASK ) { +if (buf[1 ] &FTDI_RS_ERR_MASK ) {/* Break takes precedence over parity, which takes precedence * over framing errors */ -if (packet[1 ] &FTDI_RS_BI ) { +if (buf[1 ] &FTDI_RS_BI ) { flag =TTY_BREAK ; port->icount.brk++;usb_serial_handle_break (port); - }else if (packet[1 ] &FTDI_RS_PE ) { + }else if (buf[1 ] &FTDI_RS_PE ) { flag =TTY_PARITY ; port->icount.parity++; - }else if (packet[1 ] &FTDI_RS_FE ) { + }else if (buf[1 ] &FTDI_RS_FE ) { flag =TTY_FRAME ; port->icount.frame++; }/* Overrun is special, not associated with a char */ -if (packet[1 ] &FTDI_RS_OE ) { +if (buf[1 ] &FTDI_RS_OE ) { port->icount.overrun++;tty_insert_flip_char (&port->port,0 ,TTY_OVERRUN ); } } - port->icount.rx += len; - ch = packet +2 ; + port->icount.rx += len -2 ;if (port->port.console && port->sysrq) { -for (i =0 ; i < len; i++, ch++) { -if (!usb_serial_handle_sysrq_char (port, *ch)) -tty_insert_flip_char (&port->port, *ch, flag); +for (i =2 ; i < len; i++) { +if (usb_serial_handle_sysrq_char (port, buf[i])) +continue ; +tty_insert_flip_char (&port->port, buf[i], flag); } }else { -tty_insert_flip_string_fixed_flag (&port->port, ch, flag, len); +tty_insert_flip_string_fixed_flag (&port->port, buf +2 , flag, + len -2 ); } -return len; +return len -2 ; }static void ftdi_process_read_urb (struct urb *urb)
drivers/usb/serial/iuu_phoenix.c +8 -6
@@ -369,10 +369,11 @@ static void iuu_led_activity_on(struct urb *urb)struct usb_serial_port *port = urb->context;int result;char *buf_ptr = port->write_urb->transfer_buffer; - *buf_ptr++ =IUU_SET_LED ; +if (xmas) { -get_random_bytes (buf_ptr,6 ); - *(buf_ptr+7 ) =1 ; + buf_ptr[0 ] =IUU_SET_LED ; +get_random_bytes (buf_ptr +1 ,6 ); + buf_ptr[7 ] =1 ; }else {iuu_rgbf_fill_buffer (buf_ptr,255 ,255 ,0 ,0 ,0 ,0 ,255 ); }
@@ -390,13 +391,14 @@ static void iuu_led_activity_off(struct urb *urb)struct usb_serial_port *port = urb->context;int result;char *buf_ptr = port->write_urb->transfer_buffer; +if (xmas) {iuu_rxcmd (urb);return ; - }else { - *buf_ptr++ =IUU_SET_LED ; -iuu_rgbf_fill_buffer (buf_ptr,0 ,0 ,255 ,255 ,0 ,0 ,255 ); } + +iuu_rgbf_fill_buffer (buf_ptr,0 ,0 ,255 ,255 ,0 ,0 ,255 ); + usb_fill_bulk_urb(port->write_urb, port->serial->dev, usb_sndbulkpipe(port->serial->dev, port->bulk_out_endpointAddress),
drivers/usb/serial/qcserial.c +1 -0
@@ -159,6 +159,7 @@ static const struct usb_device_id id_table[] = { {DEVICE_SWI(0x1199, 0x9056)}, /* Sierra Wireless Modem */ {DEVICE_SWI(0x1199, 0x9060)}, /* Sierra Wireless Modem */ {DEVICE_SWI(0x1199, 0x9061)}, /* Sierra Wireless Modem */ + {DEVICE_SWI(0x1199, 0x9062)}, /* Sierra Wireless EM7305 QDL */ {DEVICE_SWI(0x1199, 0x9063)}, /* Sierra Wireless EM7305 */ {DEVICE_SWI(0x1199, 0x9070)}, /* Sierra Wireless MC74xx */ {DEVICE_SWI(0x1199, 0x9071)}, /* Sierra Wireless MC74xx */
drivers/video/console/bitblit.c +2 -2
@@ -216,7 +216,7 @@ static void bit_clear_margins(struct vc_data *vc, struct fb_info *info, region.color =0 ; region.rop =ROP_COPY ; -if (rw && !bottom_only) { +if ((int ) rw >0 && !bottom_only) { region.dx = info->var.xoffset + rs; region.dy =0 ; region.width = rw;
@@ -224,7 +224,7 @@ static void bit_clear_margins(struct vc_data *vc, struct fb_info *info, info->fbops->fb_fillrect (info, ®ion); } -if (bh) { +if ((int ) bh >0 ) { region.dx = info->var.xoffset; region.dy = info->var.yoffset + bs; region.width = rs;
drivers/video/console/fbcon_ccw.c +2 -2
@@ -201,7 +201,7 @@ static void ccw_clear_margins(struct vc_data *vc, struct fb_info *info, region.color =0 ; region.rop =ROP_COPY ; -if (rw && !bottom_only) { +if ((int ) rw >0 && !bottom_only) { region.dx =0 ; region.dy = info->var.yoffset; region.height = rw;
@@ -209,7 +209,7 @@ static void ccw_clear_margins(struct vc_data *vc, struct fb_info *info, info->fbops->fb_fillrect (info, ®ion); } -if (bh) { +if ((int ) bh >0 ) { region.dx = info->var.xoffset + bs; region.dy =0 ; region.height = info->var.yres_virtual;
drivers/video/console/fbcon_cw.c +2 -2
@@ -184,7 +184,7 @@ static void cw_clear_margins(struct vc_data *vc, struct fb_info *info, region.color =0 ; region.rop =ROP_COPY ; -if (rw && !bottom_only) { +if ((int ) rw >0 && !bottom_only) { region.dx =0 ; region.dy = info->var.yoffset + rs; region.height = rw;
@@ -192,7 +192,7 @@ static void cw_clear_margins(struct vc_data *vc, struct fb_info *info, info->fbops->fb_fillrect (info, ®ion); } -if (bh) { +if ((int ) bh >0 ) { region.dx = info->var.xoffset; region.dy = info->var.yoffset; region.height = info->var.yres;
drivers/video/console/fbcon_ud.c +2 -2
@@ -231,7 +231,7 @@ static void ud_clear_margins(struct vc_data *vc, struct fb_info *info, region.color =0 ; region.rop =ROP_COPY ; -if (rw && !bottom_only) { +if ((int ) rw >0 && !bottom_only) { region.dy =0 ; region.dx = info->var.xoffset; region.width = rw;
@@ -239,7 +239,7 @@ static void ud_clear_margins(struct vc_data *vc, struct fb_info *info, info->fbops->fb_fillrect (info, ®ion); } -if (bh) { +if ((int ) bh >0 ) { region.dy = info->var.yoffset; region.dx = info->var.xoffset; region.height = bh;
drivers/video/console/newport_con.c +10 -2
@@ -31,6 +31,8 @@#include <linux/linux_logo.h> #include <linux/font.h> +#define NEWPORT_LEN 0x10000 +#define FONT_DATA ((unsigned char *)font_vga_8x16.data)/* borrowed from fbcon.c */
@@ -42,6 +44,7 @@static unsigned char *font_data[MAX_NR_CONSOLES ];static struct newport_regs *npregs; +static unsigned long newport_addr;static int logo_active;static int topscan;
@@ -701,7 +704,6 @@ const struct consw newport_con = {static int newport_probe (struct gio_device *dev,const struct gio_device_id *id) { -unsigned long newport_addr;int err;if (!dev->resource.start)
@@ -711,7 +713,7 @@ static int newport_probe(struct gio_device *dev,return -EBUSY ;/* we only support one Newport as console */ newport_addr = dev->resource.start +0xF0000 ; -if (!request_mem_region (newport_addr,0x10000 ,"Newport" )) +if (!request_mem_region (newport_addr,NEWPORT_LEN ,"Newport" ))return -ENODEV ; npregs = (struct newport_regs *)/* ioremap cannot fail */
@@ -719,6 +721,11 @@ static int newport_probe(struct gio_device *dev,console_lock (); err =do_take_over_console (&newport_con,0 ,MAX_NR_CONSOLES -1 ,1 );console_unlock (); + +if (err) { +iounmap ((void *)npregs); +release_mem_region (newport_addr,NEWPORT_LEN ); + }return err; }
@@ -726,6 +733,7 @@ static void newport_remove(struct gio_device *dev) {give_up_console (&newport_con);iounmap ((void *)npregs); +release_mem_region (newport_addr,NEWPORT_LEN ); }static struct gio_device_id newport_ids[] = {
drivers/video/console/vgacon.c +4 -0
@@ -219,6 +219,10 @@ static void vgacon_scrollback_update(struct vc_data *c, int t, int count) p = (void *) (c->vc_origin + t * c->vc_size_row);while (count--) { +if ((vgacon_scrollback_tail + c->vc_size_row) > + vgacon_scrollback_size) + vgacon_scrollback_tail =0 ; +scr_memcpyw (vgacon_scrollback + vgacon_scrollback_tail, p, c->vc_size_row); vgacon_scrollback_cnt++;
drivers/video/fbdev/neofb.c +1 -0
@@ -1820,6 +1820,7 @@ static int neo_scan_monitor(struct fb_info *info)#else printk (KERN_ERR "neofb: Only 640x480, 800x600/480 and 1024x768 panels are currently supported\n" ); +kfree (info->monspecs.modedb);return -1 ;#endif default :
drivers/video/fbdev/omap2/omapfb/dss/dss.c +1 -1
@@ -843,7 +843,7 @@ static const struct dss_features omap34xx_dss_feats = { };static const struct dss_features omap3630_dss_feats = { - .fck_div_max =32 , + .fck_div_max =31 , .dss_fck_multiplier =1 , .parent_clk_name ="dpll4_ck" , .dpi_select_source = &dss_dpi_select_source_omap2_omap3,
drivers/video/fbdev/pxafb.c +2 -2
@@ -2447,8 +2447,8 @@ static int pxafb_remove(struct platform_device *dev)free_pages_exact (fbi->video_mem, fbi->video_mem_size); -dma_free_wc (&dev->dev, fbi->dma_buff_size, fbi->dma_buff, - fbi->dma_buff_phys); +dma_free_coherent (&dev->dev, fbi->dma_buff_size, fbi->dma_buff, + fbi->dma_buff_phys);iounmap (fbi->mmio_base);
drivers/video/fbdev/sm712fb.c +2 -0
@@ -1428,6 +1428,8 @@ static int smtc_map_smem(struct smtcfb_info *sfb,static void smtc_unmap_smem (struct smtcfb_info *sfb) {if (sfb && sfb->fb->screen_base) { +if (sfb->chip_id ==0x720 ) + sfb->fb->screen_base -=0x00200000 ;iounmap (sfb->fb->screen_base); sfb->fb->screen_base =NULL ; }
drivers/watchdog/f71808e_wdt.c +10 -3
@@ -688,9 +688,9 @@ static int __init watchdog_init(int sioaddr)* into the module have been registered yet. */ watchdog.sioaddr = sioaddr; - watchdog.ident.options =WDIOC_SETTIMEOUT - |WDIOF_MAGICCLOSE - |WDIOF_KEEPALIVEPING ; + watchdog.ident.options =WDIOF_MAGICCLOSE + |WDIOF_KEEPALIVEPING + |WDIOF_CARDRESET ; snprintf(watchdog.ident.identity, sizeof(watchdog.ident.identity), "%s watchdog",
@@ -704,6 +704,13 @@ static int __init watchdog_init(int sioaddr) wdt_conf =superio_inb (sioaddr,F71808FG_REG_WDT_CONF ); watchdog.caused_reboot = wdt_conf &BIT (F71808FG_FLAG_WDTMOUT_STS ); +/* +* We don't want WDTMOUT_STS to stick around till regular reboot. +* Write 1 to the bit to clear it to zero. +*/ +superio_outb (sioaddr,F71808FG_REG_WDT_CONF , + wdt_conf |BIT (F71808FG_FLAG_WDTMOUT_STS )); +superio_exit (sioaddr); err =watchdog_set_timeout (timeout);
drivers/xen/balloon.c +10 -2
@@ -634,11 +634,13 @@ static int add_ballooned_pages(int nr_pages)if (xen_hotplug_unpopulated) { st =reserve_additional_memory ();if (st !=BP_ECANCELED ) { +int rc; +mutex_unlock (&balloon_mutex); -wait_event (balloon_wq, + rc =wait_event_interruptible (balloon_wq, !list_empty (&ballooned_pages));mutex_lock (&balloon_mutex); -return 0 ; +return rc ? -ENOMEM :0 ; } }
@@ -694,6 +696,12 @@ int alloc_xenballooned_pages(int nr_pages, struct page **pages) out_undo:mutex_unlock (&balloon_mutex);free_xenballooned_pages (pgno, pages); +/* +* NB: free_xenballooned_pages will only subtract pgno pages, but since +* target_unpopulated is incremented with nr_pages at the start we need +* to remove the remaining ones also, or accounting will be screwed. +*/ + balloon_stats.target_unpopulated -= nr_pages - pgno;return ret; }EXPORT_SYMBOL (alloc_xenballooned_pages);
fs/9p/v9fs.c +2 -3
@@ -457,10 +457,9 @@ void v9fs_session_close(struct v9fs_session_info *v9ses) }#ifdef CONFIG_9P_FSCACHE -if (v9ses->fscache) { +if (v9ses->fscache)v9fs_cache_session_put_cookie (v9ses); -kfree (v9ses->cachetag); - } +kfree (v9ses->cachetag);#endif kfree (v9ses->uname);kfree (v9ses->aname);
fs/btrfs/disk-io.c +10 -3
@@ -1527,9 +1527,16 @@ int btrfs_init_fs_root(struct btrfs_root *root)spin_lock_init (&root->ino_cache_lock);init_waitqueue_head (&root->ino_cache_wait); - ret =get_anon_bdev (&root->anon_dev); -if (ret) - goto fail; +/* +* Don't assign anonymous block device to roots that are not exposed to +* userspace, the id pool is limited to 1M +*/ +if (is_fstree (root->root_key.objectid) && +btrfs_root_refs (&root->root_item) >0 ) { + ret =get_anon_bdev (&root->anon_dev); +if (ret) + goto fail; + }mutex_lock (&root->objectid_mutex); ret = btrfs_find_highest_objectid(root,
fs/btrfs/extent_io.c +2 -0
@@ -4340,6 +4340,8 @@ int try_release_extent_mapping(struct extent_map_tree *map,/* once for us */ free_extent_map (em); + +cond_resched ();/* Allow large-extent preemption. */ } }return try_release_extent_state (map, tree, page, mask);
fs/btrfs/free-space-cache.c +2 -2
@@ -2152,7 +2152,7 @@ static int insert_into_bitmap(struct btrfs_free_space_ctl *ctl,static bool try_merge_free_space (struct btrfs_free_space_ctl *ctl,struct btrfs_free_space *info,bool update_stat) { -struct btrfs_free_space *left_info; +struct btrfs_free_space *left_info =NULL ;struct btrfs_free_space *right_info;bool merged = false;u64 offset = info->offset;
@@ -2167,7 +2167,7 @@ static bool try_merge_free_space(struct btrfs_free_space_ctl *ctl,if (right_info &&rb_prev (&right_info->offset_index)) left_info =rb_entry (rb_prev (&right_info->offset_index), struct btrfs_free_space, offset_index); -else +else if (!right_info) left_info =tree_search_offset (ctl, offset -1 ,0 ,0 );if (right_info && !right_info->bitmap) {
fs/btrfs/tree-log.c +2 -6
@@ -3755,11 +3755,8 @@ static noinline int copy_items(struct btrfs_trans_handle *trans, log->fs_info->csum_root, ds + cs, ds + cs + cl -1 , &ordered_sums, 0); -if (ret) { -btrfs_release_path (dst_path); -kfree (ins_data); -return ret; - } +if (ret) +break ; } } }
@@ -3772,7 +3769,6 @@ static noinline int copy_items(struct btrfs_trans_handle *trans,* we have to do this after the loop above to avoid changing the
Lines of this file are not shown. View the raw message.
fs/xattr.c +77 -7
84 lines not on this page · raw message
fs/xfs/xfs_icache.c +51 -7
58 lines not on this page · raw message
include/linux/prandom.h new file +78 -0
78 lines not on this page · raw message
include/linux/random.h +4 -59
63 lines not on this page · raw message
include/uapi/linux/cifs/Kbuild new file +1 -0
Lines of this file are not shown. View the raw message.
include/uapi/linux/genwqe/Kbuild new file +1 -0
Lines of this file are not shown. View the raw message.
net/9p/trans_fd.c +41 -15
56 lines not on this page · raw message
sound/usb/quirks-table.h +63 -1
64 lines not on this page · raw message
tools/testing/selftests/powerpc/benchmarks/context_switch.c +16 -5
Lines of this file are not shown. View the raw message.
tools/testing/selftests/powerpc/utils.c +25 -12
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.