Linux 4.4.284
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.4.284 kernel.
All users of the 4.4 kernel series must upgrade.
The updated 4.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.4.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/devicetree/bindings/mtd/gpmc-nand.txt | 2 Makefile | 2 arch/arc/Kconfig | 2 arch/arc/mm/cache.c | 2 arch/arm/boot/compressed/Makefile | 2 arch/arm/boot/dts/tegra20-tamonten.dtsi | 14 +- arch/arm/kernel/Makefile | 6 + arch/arm/kernel/return_address.c | 4 arch/arm64/boot/dts/exynos/exynos7.dtsi | 2 arch/m68k/emu/nfeth.c | 4 arch/openrisc/kernel/entry.S | 2 arch/parisc/kernel/signal.c | 6 + arch/powerpc/boot/crt0.S | 3 arch/powerpc/kernel/module_64.c | 2 arch/s390/kernel/dis.c | 2 arch/s390/kernel/jump_label.c | 2 arch/s390/net/bpf_jit_comp.c | 9 + arch/x86/kernel/reboot.c | 3 arch/x86/kvm/x86.c | 4 arch/x86/mm/init_64.c | 6 - arch/x86/xen/p2m.c | 4 arch/xtensa/Kconfig | 2 arch/xtensa/platforms/iss/console.c | 17 ++- certs/Makefile | 8 + drivers/ata/libata-core.c | 6 + drivers/base/power/wakeirq.c | 12 ++ drivers/bcma/main.c | 6 - drivers/block/Kconfig | 4 drivers/block/cryptoloop.c | 2 drivers/clk/mvebu/kirkwood.c | 1 drivers/crypto/mxs-dcp.c | 81 +++++++++-------- drivers/crypto/omap-sham.c | 2 drivers/crypto/qat/qat_common/adf_init.c | 5 - drivers/crypto/qat/qat_common/adf_pf2vf_msg.c | 2 drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | 2 drivers/gpu/drm/msm/dsi/dsi.c | 6 - drivers/i2c/busses/i2c-highlander.c | 2 drivers/i2c/busses/i2c-iop3xx.c | 6 - drivers/i2c/busses/i2c-mt65xx.c | 2 drivers/i2c/busses/i2c-s3c2410.c | 2 drivers/iio/dac/ad5624r_spi.c | 18 +++ drivers/media/i2c/tc358743.c | 2 drivers/media/rc/rc-loopback.c | 2 drivers/media/usb/dvb-usb/nova-t-usb2.c | 6 - drivers/media/usb/dvb-usb/vp702x.c | 12 +- drivers/media/usb/go7007/go7007-driver.c | 26 ----- drivers/media/usb/stkwebcam/stk-webcam.c | 6 - drivers/media/usb/uvc/uvc_v4l2.c | 34 ++++--- drivers/misc/vmw_vmci/vmci_queue_pair.c | 6 - drivers/mmc/host/dw_mmc.c | 1 drivers/mmc/host/moxart-mmc.c | 1 drivers/mmc/host/rtsx_pci_sdmmc.c | 36 ++++--- drivers/mtd/nand/cafe_nand.c | 4 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 2 drivers/net/ethernet/chelsio/cxgb/cxgb2.c | 1 drivers/net/ethernet/qlogic/qede/qede_main.c | 2 drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c | 1 drivers/net/ethernet/rdc/r6040.c | 9 + drivers/net/ethernet/renesas/sh_eth.c | 1 drivers/net/ethernet/xilinx/ll_temac_main.c | 4 drivers/net/phy/dp83640_reg.h | 2 drivers/net/wireless/ath/ath.h | 3 drivers/net/wireless/ath/ath5k/mac80211-ops.c | 2 drivers/net/wireless/ath/ath6kl/wmi.c | 4 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 3 drivers/net/wireless/ath/ath9k/htc_drv_main.c | 2 drivers/net/wireless/ath/ath9k/hw.h | 1 drivers/net/wireless/ath/ath9k/main.c | 95 +++++++++++++++++++- drivers/net/wireless/ath/key.c | 41 +++++--- drivers/parport/ieee1284_ops.c | 2 drivers/pci/msi.c | 3 drivers/pci/pci.c | 15 +-- drivers/pci/quirks.c | 13 +- drivers/pci/syscall.c | 4 drivers/pinctrl/pinctrl-single.c | 1 drivers/platform/chrome/cros_ec_proto.c | 9 + drivers/power/max17042_battery.c | 8 + drivers/rtc/rtc-tps65910.c | 2 drivers/tty/hvc/hvsi.c | 19 +++- drivers/tty/serial/8250/8250_pci.c | 2 drivers/tty/serial/8250/8250_port.c | 3 drivers/tty/serial/jsm/jsm_neo.c | 2 drivers/tty/serial/jsm/jsm_tty.c | 3 drivers/tty/tty_io.c | 4 drivers/usb/gadget/function/u_ether.c | 5 - drivers/usb/gadget/udc/at91_udc.c | 4 drivers/usb/gadget/udc/mv_u3d_core.c | 19 ++-- drivers/usb/host/ehci-orion.c | 8 + drivers/usb/host/fotg210-hcd.c | 5 - drivers/usb/host/fotg210.h | 5 - drivers/usb/host/ohci-tmio.c | 3 drivers/usb/host/xhci.c | 24 ++--- drivers/usb/phy/phy-fsl-usb.c | 2 drivers/usb/phy/phy-isp1301.c | 2 drivers/usb/phy/phy-tahvo.c | 4 drivers/usb/phy/phy-twl6030-usb.c | 5 + drivers/usb/serial/mos7720.c | 4 drivers/video/fbdev/asiliantfb.c | 3 drivers/video/fbdev/core/fbmem.c | 7 + drivers/video/fbdev/kyro/fbdev.c | 8 + drivers/video/fbdev/riva/fbdev.c | 3 fs/btrfs/inode.c | 2 fs/cifs/cifs_unicode.c | 9 - fs/cifs/sess.c | 2 fs/ext4/inline.c | 6 + fs/gfs2/lock_dlm.c | 5 + fs/udf/misc.c | 13 ++ include/linux/pci.h | 5 - include/linux/power/max17042_battery.h | 2 include/linux/skbuff.h | 2 include/uapi/linux/serial_reg.h | 1 lib/test_bpf.c | 13 ++ mm/kmemleak.c | 2 mm/page_alloc.c | 8 - net/bluetooth/cmtp/cmtp.h | 2 net/bluetooth/hci_core.c | 14 ++ net/bluetooth/hci_event.c | 15 +++ net/bluetooth/sco.c | 11 +- net/caif/chnl_net.c | 19 ---- net/dccp/minisocks.c | 2 net/ipv4/icmp.c | 23 ++++ net/ipv4/igmp.c | 2 net/ipv4/ip_output.c | 5 - net/ipv4/route.c | 46 ++++++--- net/ipv4/tcp_ipv4.c | 5 - net/l2tp/l2tp_core.c | 4 net/netlabel/netlabel_cipso_v4.c | 12 +- net/netlink/af_netlink.c | 4 net/sunrpc/auth_gss/svcauth_gss.c | 2 net/tipc/socket.c | 2 net/unix/af_unix.c | 2 security/smack/smack_access.c | 17 +-- sound/core/pcm_lib.c | 2 133 files changed, 698 insertions(+), 340 deletions(-)
Adrian Bunk (1):
bnx2x: Fix enabling network interfaces without VFs
Andreas Obergschwandtner (1):
ARM: tegra: tamonten: Fix UART pad setting
Andrew Morton (1):
mm/kmemleak.c: make cond_resched() rate-limiting more efficient
Andy Shevchenko (1):
PCI: Sync __pci_register_driver() stub for CONFIG_PCI=n
Ben Dooks (1):
ARM: 8918/2: only build return_address() if needed
Bob Peterson (1):
gfs2: Don't call dlm after protocol is unmounted
Christoph Hellwig (1):
cryptoloop: add a deprecation warning
Christophe JAILLET (2):
drm/msm/dsi: Fix some reference counted resource leaks
mtd: rawnand: cafe: Fix a resource leak in the error handling path of 'cafe_nand_probe()'
Colin Ian King (2):
Bluetooth: increase BTNAMSIZ to 21 chars to fix potential buffer overflow
parport: remove non-zero check on count
Damien Le Moal (1):
libata: fix ata_host_start()
Dan Carpenter (2):
Bluetooth: sco: prevent information leak in sco_conn_defer_accept()
ath6kl: wmi: fix an error code in ath6kl_wmi_sync_point()
David Heidelberg (1):
ARM: 9105/1: atags_to_fdt: don't warn about stack size
Desmond Cheong Zhi Xi (2):
Bluetooth: fix repeated calls to sco_sock_kill
Bluetooth: skip invalid hci_sync_conn_complete_evt
Ding Hui (1):
cifs: fix wrong release in sess_alloc_buffer() failed path
Dinghao Liu (1):
qlcnic: Remove redundant unlock in qlcnic_pinit_from_rom
Dmitry Osipenko (1):
rtc: tps65910: Correct driver module alias
Dongliang Mu (2):
media: dvb-usb: fix uninit-value in dvb_usb_adapter_dvb_init
media: dvb-usb: fix uninit-value in vp702x_read_mac_addr
Eric Dumazet (3):
ipv4: make exception cache less predictible
net-caif: avoid user-triggerable WARN_ON(1) net/af_unix: fix a data-race in unix_dgram_poll
Esben Haabendal (1):
net: ll_temac: Remove left-over debug message
Evgeny Novikov (1):
usb: ehci-orion: Handle errors of clk_prepare_enable() in probe
Fangrui Song (1):
powerpc/boot: Delete unneeded .globl _zimage_start
Florian Fainelli (1):
r6040: Restore MDIO clock frequency after MAC reset
Giovanni Cabiddu (1):
crypto: qat - do not ignore errors from enable_vf2pf_comms()
Greg Kroah-Hartman (2):
serial: 8250_pci: make setup_port() parameters explicitly unsigned Linux 4.4.284
Grygorii Strashko (1):
PM / wakeirq: Enable dedicated wakeirq for suspend
Gustavo A. R. Silva (1):
ipv4: ip_output.c: Fix out-of-bounds warning in ip_copy_addrs()
Hans de Goede (1):
libata: add ATA_HORKAGE_NO_NCQ_TRIM for Samsung 860 and 870 SSDs
Heiko Carstens (1):
s390/jump_label: print real address in a case of a jump label bug
Hoang Le (1):
tipc: increase timeout in tipc_sk_enqueue()
Ilya Leoshkevich (1):
s390/bpf: Fix 64-bit subtraction of the -0x80000000 constant
J. Bruce Fields (1):
rpc: fix gss_svc_init cleanup on failure
Javier Martinez Canillas (1):
usb: phy: isp1301: Fix build warning when CONFIG_OF is disabled
Jiri Slaby (2):
xtensa: ISS: don't panic in rs_init
hvsi: don't panic on tty_register_driver failure
Johan Almbladh (2):
bpf/tests: Fix copy-and-paste error in double word test bpf/tests: Do not PASS tests without actually testing the result
Jonathan Cameron (1):
iio: dac: ad5624r: Fix incorrect handling of an optional regulator.
Jouni Malinen (5):
ath: Use safer key clearing with key cache entries
ath9k: Clear key cache explicitly on disabling hardware
ath: Export ath_hw_keysetmac()
ath: Modify ath_key_delete() to not need full key entry
ath9k: Postpone key cache entry deletion for TXQ frames reference it
Juergen Gross (1):
xen: fix setting of max_pfn in shared_info
Kai-Heng Feng (1):
Bluetooth: Move shutdown callback before flushing tx and rx queue
Kelly Devilliv (1):
usb: host: fotg210: fix the actual_length of an iso packet
Krzysztof Kozlowski (2):
arm64: dts: exynos: correct GIC CPU interfaces address range on Exynos7
power: supply: max17042: handle fails of reading status register
Krzysztof Wilczyński (1):
PCI: Return ~0 data on pciconfig_read() CAP_SYS_ADMIN failure
Len Baker (1):
CIFS: Fix a potencially linear read overflow
Lin, Zhenpeng (1):
dccp: don't duplicate ccid when cloning dccp sock
Linus Walleij (1):
clk: kirkwood: Fix a clocking boot regression
Liu Jian (1):
igmp: Add ip_mc_list lock in ip_check_mc_rcu
Maciej W. Rozycki (1):
serial: 8250: Define RX trigger levels for OxSemi 950 devices
Maciej Żenczykowski (1):
usb: gadget: u_ether: fix a potential null pointer dereference
Marco Chiappero (1):
crypto: qat - fix reuse of completion variable
Marek Behún (2):
PCI: Call Max Payload Size-related fixup quirks early
PCI: Restrict ASMedia ASM1062 SATA Max Payload Size Supported
Marek Marczykowski-Górecki (1):
PCI/MSI: Skip masking MSI-X on Xen PV
Martin KaFai Lau (1):
tcp: seq_file: Avoid skipping sk during tcp_seek_last_pos
Mathias Nyman (1):
Revert "USB: xhci: fix U1/U2 handling for hardware with XHCI_INTEL_HOST quirk set"
Mathieu Desnoyers (1):
ipv4/icmp: l3mdev: Perform icmp error route lookup on source device routing table (v2)
Mauro Carvalho Chehab (1):
media: uvc: don't do DMA on stack
Michael Ellerman (1):
powerpc/module64: Fix comment in R_PPC64_ENTRY handling
Mike Rapoport (1):
x86/mm: Fix kern_addr_valid() to cope with existing but not present entries
Mikulas Patocka (1):
parisc: fix crash with signals and alloca
Miquel Raynal (1):
dt-bindings: mtd: gpmc: Fix the ECC bytes vs. OOB bytes equation
Muchun Song (1):
mm/page_alloc: speed up the iteration of max_order
Nadezda Lutovinova (1):
usb: gadget: mv_u3d: request_irq() after initializing UDC
Nguyen Dinh Phi (1):
tty: Fix data race between tiocsti() and flush_to_ldisc()
Patryk Duda (1):
platform/chrome: cros_ec_proto: Send command again when timeout occurs
Paul Gortmaker (1):
x86/reboot: Limit Dell Optiplex 990 quirk to early BIOS versions
Pavel Skripkin (5):
media: stkwebcam: fix memory leak in stk_camera_probe
m68k: emu: Fix invalid free in nfeth_cleanup()
media: go7007: remove redundant initialization
net: cipso: fix warnings in netlbl_cipsov4_add_std
Bluetooth: add timeout sanity check to hci_inquiry
Philipp Zabel (1):
tc358743: fix register i2c_rd/wr function fix
Qu Wenruo (1):
Revert "btrfs: compression: don't try to compress if we don't have enough pages"
Rafael J. Wysocki (2):
PCI: PM: Enable PME if it can be signaled from D3cold
PCI: Use pci_update_current_state() in pci_enable_device_flags()
Randy Dunlap (4):
xtensa: fix kconfig unmet dependency warning for HAVE_FUTEX_CMPXCHG
openrisc: don't printk() unconditionally
ptp: dp83640: don't define PAGE0
ARC: export clear_user_page() for modules
Sean Anderson (2):
crypto: mxs-dcp - Check for DMA mapping errors
crypto: mxs-dcp - Use sg_mapping_iter to copy data
Sean Young (1):
media: rc-loopback: return number of emitters rather than error
Sebastian Krzyszkowiak (1):
power: supply: max17042_battery: fix typo in MAx17042_TOFF
Sergey Shtylyov (9):
i2c: highlander: add IRQ check
usb: gadget: udc: at91: add IRQ check
usb: phy: fsl-usb: add IRQ check
usb: phy: twl6030: add IRQ checks
usb: host: ohci-tmio: add IRQ check
usb: phy: tahvo: add IRQ check
i2c: iop3xx: fix deferred probing
i2c: s3c2410: fix IRQ check
i2c: mt65xx: fix IRQ check
Shai Malin (1):
qede: Fix memset corruption
Stefan Berger (1):
certs: Trigger creation of RSA module signing key if it's not an RSA key
Stian Skjelstad (1):
udf_get_extendedattr() had no boundary checks.
Tetsuo Handa (1):
fbmem: don't allow too huge resolutions
Theodore Ts'o (1):
ext4: fix race writing to an inline_data file while its xattrs are changing
Thomas Hebb (1):
mmc: rtsx_pci: Fix long reads when clock is prescaled
Tianjia Zhang (1):
Smack: Fix wrong semantics in smk_access_entry()
Tom Rix (1):
USB: serial: mos7720: improve OOM-handling in read_mos_reg()
Tony Lindgren (3):
crypto: omap-sham - clear dma flags only after omap_sham_update_dma_stop()
mmc: dw_mmc: Fix issue with uninitialized dma_slave_config
mmc: moxart: Fix issue with uninitialized dma_slave_config
Tuo Li (1):
gpu: drm: amd: amdgpu: amdgpu_i2c: fix possible uninitialized-variable access in amdgpu_i2c_router_select_ddc_port()
Vasily Gorbik (1):
s390/disassembler: correct disassembly lines alignment
Vineet Gupta (1):
ARC: fix allnoconfig build warning
Wang Hai (1):
VMCI: fix NULL pointer dereference when unmapping queue pair
Xiyu Yang (1):
net/l2tp: Fix reference count leak in l2tp_udp_recv_core
Yajun Deng (1):
netlink: Deal with ESRCH error in nlmsg_notify()
Yang Li (1):
ethtool: Fix an error code in cxgb2.c
Yoshihiro Shimoda (1):
net: renesas: sh_eth: Fix freeing wrong tx descriptor
Zekun Shen (1):
ath9k: fix OOB read ar9300_eeprom_restore_internal
Zelin Deng (1):
KVM: x86: Update vCPU's hv_clock before back to guest when tsc_offset is adjusted
Zenghui Yu (1):
bcma: Fix memory leak for internally-handled cores
Zhen Lei (1):
pinctrl: single: Fix error return code in pcs_parse_bits_in_pinctrl_entry()
Zheyu Ma (5):
video: fbdev: kyro: fix a DoS bug by restricting user input
tty: serial: jsm: hold port lock when reporting modem line changes
video: fbdev: asiliantfb: Error out if 'pixclock' equals zero
video: fbdev: kyro: Error out if 'pixclock' equals zero
video: fbdev: riva: Error out if 'pixclock' equals zero
Zubin Mithra (1):
ALSA: pcm: fix divide error in snd_pcm_lib_ioctl
王贇 (1):
net: fix NULL pointer reference in cipso_v4_doi_free
Greg Kroah-Hartman
maintainerDocumentation/devicetree/bindings/mtd/gpmc-nand.txt +1 -1
@@ -112,7 +112,7 @@ on various other factors also like; so the device should have enough free bytes available its OOB/Spare area to accommodate ECC for entire page. In general following expression helps in determining if given device can accommodate ECC syndrome: - "2 + (PAGESIZE / 512) * ECC_BYTES" >= OOBSIZE" + "2 + (PAGESIZE / 512) * ECC_BYTES" <= OOBSIZE" where OOBSIZE number of bytes in OOB/spare area PAGESIZE number of bytes in main-area of device page
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 283 +SUBLEVEL = 284 EXTRAVERSION = NAME = Blurry Fish Butt
arch/arc/Kconfig +1 -1
@@ -23,7 +23,7 @@ config ARC select GENERIC_SMP_IDLE_THREAD select HAVE_ARCH_KGDB select HAVE_ARCH_TRACEHOOK - select HAVE_FUTEX_CMPXCHG + select HAVE_FUTEX_CMPXCHG if FUTEX select HAVE_IOREMAP_PROT select HAVE_KPROBES select HAVE_KRETPROBES
arch/arc/mm/cache.c +1 -1
@@ -904,7 +904,7 @@ void clear_user_page(void *to, unsigned long u_vaddr, struct page *page)clear_page (to);clear_bit (PG_dc_clean, &page->flags); } - +EXPORT_SYMBOL (clear_user_page);/********************************************************************** * Explicit Cache flush request from user space via syscall
arch/arm/boot/compressed/Makefile +2 -0
@@ -86,6 +86,8 @@ $(addprefix $(obj)/,$(libfdt_objs) atags_to_fdt.o): \ $(addprefix $(obj)/,$(libfdt_hdrs)) ifeq ($(CONFIG_ARM_ATAG_DTB_COMPAT),y) +CFLAGS_REMOVE_atags_to_fdt.o += -Wframe-larger-than=${CONFIG_FRAME_WARN} +CFLAGS_atags_to_fdt.o += -Wframe-larger-than=1280 OBJS += $(libfdt_objs) atags_to_fdt.o endif
arch/arm/boot/dts/tegra20-tamonten.dtsi +7 -7
@@ -180,8 +180,9 @@ nvidia,pins = "ata", "atb", "atc", "atd", "ate", "cdev1", "cdev2", "dap1", "dtb", "gma", "gmb", "gmc", "gmd", "gme", "gpu7", - "gpv", "i2cp", "pta", "rm", "slxa", - "slxk", "spia", "spib", "uac"; + "gpv", "i2cp", "irrx", "irtx", "pta", + "rm", "slxa", "slxk", "spia", "spib", + "uac"; nvidia,pull = <TEGRA_PIN_PULL_NONE>; nvidia,tristate = <TEGRA_PIN_DISABLE>; };
@@ -206,7 +207,7 @@ conf_ddc { nvidia,pins = "ddc", "dta", "dtd", "kbca", "kbcb", "kbcc", "kbcd", "kbce", "kbcf", - "sdc"; + "sdc", "uad", "uca"; nvidia,pull = <TEGRA_PIN_PULL_UP>; nvidia,tristate = <TEGRA_PIN_DISABLE>; };
@@ -216,10 +217,9 @@ "lvp0", "owc", "sdb"; nvidia,tristate = <TEGRA_PIN_ENABLE>; }; - conf_irrx { - nvidia,pins = "irrx", "irtx", "sdd", "spic", - "spie", "spih", "uaa", "uab", "uad", - "uca", "ucb"; + conf_sdd { + nvidia,pins = "sdd", "spic", "spie", "spih", + "uaa", "uab", "ucb"; nvidia,pull = <TEGRA_PIN_PULL_UP>; nvidia,tristate = <TEGRA_PIN_ENABLE>; };
arch/arm/kernel/Makefile +5 -1
@@ -16,10 +16,14 @@ CFLAGS_REMOVE_return_address.o = -pg # Object file lists. obj-y := elf.o entry-common.o irq.o opcodes.o \ - process.o ptrace.o reboot.o return_address.o \ + process.o ptrace.o reboot.o \ setup.o signal.o sigreturn_codes.o \ stacktrace.o sys_arm.o time.o traps.o +ifneq ($(CONFIG_ARM_UNWIND),y) +obj-$(CONFIG_FRAME_POINTER) += return_address.o +endif + obj-$(CONFIG_ATAGS) += atags_parse.o obj-$(CONFIG_ATAGS_PROC) += atags_proc.o obj-$(CONFIG_DEPRECATED_PARAM_STRUCT) += atags_compat.o
arch/arm/kernel/return_address.c +0 -4
@@ -10,8 +10,6 @@*/ #include <linux/export.h> #include <linux/ftrace.h> - -#if defined(CONFIG_FRAME_POINTER ) && !defined(CONFIG_ARM_UNWIND )#include <linux/sched.h> #include <asm/stacktrace.h>
@@ -56,6 +54,4 @@ void *return_address(unsigned int level)return NULL ; } -#endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) */ -EXPORT_SYMBOL_GPL (return_address);
arch/arm64/boot/dts/exynos/exynos7.dtsi +1 -1
@@ -90,7 +90,7 @@ #address-cells = <0>; interrupt-controller; reg = <0x11001000 0x1000>, - <0x11002000 0x1000>, + <0x11002000 0x2000>, <0x11004000 0x2000>, <0x11006000 0x2000>; };
arch/m68k/emu/nfeth.c +2 -2
@@ -260,8 +260,8 @@ static void __exit nfeth_cleanup(void)for (i =0 ; i <MAX_UNIT ; i++) {if (nfeth_dev[i]) { -unregister_netdev (nfeth_dev[0 ]); -free_netdev (nfeth_dev[0 ]); +unregister_netdev (nfeth_dev[i]); +free_netdev (nfeth_dev[i]); } }free_irq (nfEtherIRQ, nfeth_interrupt);
arch/openrisc/kernel/entry.S +2 -0
@@ -491,6 +491,7 @@ EXCEPTION_ENTRY(_external_irq_handler) l.bnf 1f // ext irq enabled, all ok. l.nop +#ifdef CONFIG_PRINTK l.addi r1,r1,-0x8 l.movhi r3,hi(42f) l.ori r3,r3,lo(42f)
@@ -504,6 +505,7 @@ EXCEPTION_ENTRY(_external_irq_handler) .string "\n\rESR interrupt bug: in _external_irq_handler (ESR %x)\n\r" .align 4 .previous +#endif l.ori r4,r4,SPR_SR_IEE // fix the bug // l.sw PT_SR(r1),r4
arch/parisc/kernel/signal.c +6 -0
@@ -239,6 +239,12 @@ setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs,#endif usp = (regs->gr[30 ] & ~(0x01UL )); +#ifdef CONFIG_64BIT +if (is_compat_task ()) { +/* The gcc alloca implementation leaves garbage in the upper 32 bits of sp */ + usp = (compat_uint_t )usp; + } +#endif /*FIXME: frame_size parameter is unused, remove it. */ frame =get_sigframe (&ksig->ka, usp,sizeof (*frame));
arch/powerpc/boot/crt0.S +0 -3
@@ -49,9 +49,6 @@ p_end: .long _end p_pstack: .long _platform_stack_top #endif - .globl _zimage_start - /* Clang appears to require the .weak directive to be after the symbol - * is defined. See https://bugs.llvm.org/show_bug.cgi?id=38921 */ .weak _zimage_start _zimage_start: .globl _zimage_start_lib
arch/powerpc/kernel/module_64.c +1 -1
@@ -662,7 +662,7 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,/* * If found, replace it with: * addis r2, r12, (.TOC.-func)@ha -* addi r2, r12, (.TOC.-func)@l +* addi r2, r2, (.TOC.-func)@l */ ((uint32_t *)location)[0 ] =0x3c4c0000 +PPC_HA (value); ((uint32_t *)location)[1 ] =0x38420000 +PPC_LO (value);
arch/s390/kernel/dis.c +1 -1
@@ -2025,7 +2025,7 @@ void show_code(struct pt_regs *regs) start += opsize;printk (buffer); ptr = buffer; - ptr +=sprintf (ptr,"\n\t " ); + ptr +=sprintf (ptr,"\n " ); hops++; }printk ("\n" );
arch/s390/kernel/jump_label.c +1 -1
@@ -43,7 +43,7 @@ static void jump_label_bug(struct jump_entry *entry, struct insn *expected,unsigned char *ipe = (unsigned char *)expected;unsigned char *ipn = (unsigned char *)new; -pr_emerg ("Jump label code mismatch at %pS [%p]\n" , ipc, ipc); +pr_emerg ("Jump label code mismatch at %pS [%px]\n" , ipc, ipc);pr_emerg ("Found: %6ph\n" , ipc);pr_emerg ("Expected: %6ph\n" , ipe);pr_emerg ("New: %6ph\n" , ipn);
arch/s390/net/bpf_jit_comp.c +7 -2
@@ -630,8 +630,13 @@ static noinline int bpf_jit_insn(struct bpf_jit *jit, struct bpf_prog *fp, int icase BPF_ALU64 |BPF_SUB |BPF_K :/* dst = dst - imm */ if (!imm)break ; -/* agfi %dst,-imm */ -EMIT6_IMM (0xc2080000 , dst_reg, -imm); +if (imm ==-0x80000000 ) { +/* algfi %dst,0x80000000 */ +EMIT6_IMM (0xc20a0000 , dst_reg,0x80000000 ); + }else { +/* agfi %dst,-imm */ +EMIT6_IMM (0xc2080000 , dst_reg, -imm); + }break ;/* * BPF_MUL
arch/x86/kernel/reboot.c +2 -1
@@ -337,10 +337,11 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = { }, {/* Handle problems with rebooting on the OptiPlex 990. */ .callback = set_pci_reboot, - .ident = "Dell OptiPlex 990", + .ident = "Dell OptiPlex 990 BIOS A0x", .matches = {DMI_MATCH (DMI_SYS_VENDOR ,"Dell Inc." ),DMI_MATCH (DMI_PRODUCT_NAME ,"OptiPlex 990" ), + DMI_MATCH(DMI_BIOS_VERSION, "A0"), }, }, { /* Handle problems with rebooting on Dell 300's */
arch/x86/kvm/x86.c +4 -0
@@ -2172,6 +2172,10 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)if (!msr_info->host_initiated) {s64 adj = data - vcpu->arch.ia32_tsc_adjust_msr;adjust_tsc_offset_guest (vcpu, adj); +/* Before back to guest, tsc_timestamp must be adjusted +* as well, otherwise guest's percpu pvclock time could jump. +*/ +kvm_make_request (KVM_REQ_CLOCK_UPDATE , vcpu); } vcpu->arch.ia32_tsc_adjust_msr = data; }
arch/x86/mm/init_64.c +3 -3
@@ -1182,21 +1182,21 @@ int kern_addr_valid(unsigned long addr)return 0 ; pud =pud_offset (pgd, addr); -if (pud_none (*pud)) +if (!pud_present (*pud))return 0 ;if (pud_large (*pud))return pfn_valid (pud_pfn (*pud)); pmd =pmd_offset (pud, addr); -if (pmd_none (*pmd)) +if (!pmd_present (*pmd))return 0 ;if (pmd_large (*pmd))return pfn_valid (pmd_pfn (*pmd)); pte =pte_offset_kernel (pmd, addr); -if (pte_none (*pte)) +if (!pte_present (*pte))return 0 ;return pfn_valid (pte_pfn (*pte));
arch/x86/xen/p2m.c +2 -2
@@ -623,8 +623,8 @@ int xen_alloc_p2m_entry(unsigned long pfn) }/* Expanded the p2m? */ -if (pfn > xen_p2m_last_pfn) { - xen_p2m_last_pfn = pfn; +if (pfn >= xen_p2m_last_pfn) { + xen_p2m_last_pfn =ALIGN (pfn +1 ,P2M_PER_PAGE ); HYPERVISOR_shared_info->arch.max_pfn = xen_p2m_last_pfn; }
arch/xtensa/Kconfig +1 -1
@@ -17,7 +17,7 @@ config XTENSA select HAVE_DMA_API_DEBUG select HAVE_DMA_ATTRS select HAVE_FUNCTION_TRACER - select HAVE_FUTEX_CMPXCHG if !MMU + select HAVE_FUTEX_CMPXCHG if !MMU && FUTEX select HAVE_IRQ_TIME_ACCOUNTING select HAVE_OPROFILE select HAVE_PERF_EVENTS
arch/xtensa/platforms/iss/console.c +14 -3
@@ -186,9 +186,13 @@ static const struct tty_operations serial_ops = {int __init rs_init (void ) { -tty_port_init (&serial_port); +int ret; serial_driver =alloc_tty_driver (SERIAL_MAX_NUM_LINES ); +if (!serial_driver) +return -ENOMEM ; + +tty_port_init (&serial_port);printk ("%s %s\n" , serial_name, serial_version);
@@ -208,8 +212,15 @@ int __init rs_init(void)tty_set_operations (serial_driver, &serial_ops);tty_port_link_device (&serial_port, serial_driver,0 ); -if (tty_register_driver (serial_driver)) -panic ("Couldn't register serial driver\n" ); + ret =tty_register_driver (serial_driver); +if (ret) { +pr_err ("Couldn't register serial driver\n" ); +tty_driver_kref_put (serial_driver); +tty_port_destroy (&serial_port); + +return ret; + } +return 0 ; }
certs/Makefile +8 -0
@@ -39,11 +39,19 @@ endif redirect_openssl = 2>&1 quiet_redirect_openssl = 2>&1 silent_redirect_openssl = 2>/dev/null +openssl_available = $(shell openssl help 2>/dev/null && echo yes) # We do it this way rather than having a boolean option for enabling an # external private key, because 'make randconfig' might enable such a # boolean option and we unfortunately can't make it depend on !RANDCONFIG. ifeq ($(CONFIG_MODULE_SIG_KEY),"certs/signing_key.pem") + +ifeq ($(openssl_available),yes) +X509TEXT=$(shell openssl x509 -in "certs/signing_key.pem" -text 2>/dev/null) + +$(if $(findstring rsaEncryption,$(X509TEXT)),,$(shell rm -f "certs/signing_key.pem")) +endif + $(obj)/signing_key.pem: $(obj)/x509.genkey @$(kecho) "###" @$(kecho) "### Now generating an X.509 key pair to be used for signing modules."
drivers/ata/libata-core.c +5 -1
@@ -4269,6 +4269,10 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { ATA_HORKAGE_ZERO_AFTER_TRIM, }, {"Samsung SSD 850*" ,NULL ,ATA_HORKAGE_NO_NCQ_TRIM | ATA_HORKAGE_ZERO_AFTER_TRIM, }, + { "Samsung SSD 860*", NULL, ATA_HORKAGE_NO_NCQ_TRIM | + ATA_HORKAGE_ZERO_AFTER_TRIM, }, + { "Samsung SSD 870*", NULL, ATA_HORKAGE_NO_NCQ_TRIM | + ATA_HORKAGE_ZERO_AFTER_TRIM, }, { "FCCT*M500*", NULL, ATA_HORKAGE_NO_NCQ_TRIM | ATA_HORKAGE_ZERO_AFTER_TRIM, },
@@ -6026,7 +6030,7 @@ int ata_host_start(struct ata_host *host) have_stop =1 ; } -if (host->ops->host_stop) +if (host->ops && host->ops->host_stop) have_stop =1 ;if (have_stop) {
drivers/base/power/wakeirq.c +10 -2
@@ -319,8 +319,12 @@ void dev_pm_arm_wake_irq(struct wake_irq *wirq)if (!wirq)return ; -if (device_may_wakeup (wirq->dev)) +if (device_may_wakeup (wirq->dev)) { +if (wirq->status &WAKE_IRQ_DEDICATED_ALLOCATED ) +enable_irq (wirq->irq); +enable_irq_wake (wirq->irq); + } }/**
@@ -335,6 +339,10 @@ void dev_pm_disarm_wake_irq(struct wake_irq *wirq)if (!wirq)return ; -if (device_may_wakeup (wirq->dev)) +if (device_may_wakeup (wirq->dev)) {disable_irq_wake (wirq->irq); + +if (wirq->status &WAKE_IRQ_DEDICATED_ALLOCATED ) +disable_irq_nosync (wirq->irq); + } }
drivers/bcma/main.c +3 -3
@@ -246,6 +246,7 @@ EXPORT_SYMBOL(bcma_core_irq);void bcma_prepare_core (struct bcma_bus *bus,struct bcma_device *core) { +device_initialize (&core->dev); core->dev.release = bcma_release_core_dev; core->dev.bus = &bcma_bus_type;dev_set_name (&core->dev,"bcma%d:%d" , bus->num, core->core_index);
@@ -309,11 +310,10 @@ static void bcma_register_core(struct bcma_bus *bus, struct bcma_device *core) {int err; - err =device_register (&core->dev); + err =device_add (&core->dev);if (err) {bcma_err (bus,"Could not register dev for core 0x%03X\n" , core->id.id); -put_device (&core->dev);return ; } core->dev_registered = true;
@@ -404,7 +404,7 @@ void bcma_unregister_cores(struct bcma_bus *bus)/* Now noone uses internally-handled cores, we can free them */ list_for_each_entry_safe (core, tmp, &bus->cores, list) {list_del (&core->list); -kfree (core); +put_device (&core->dev); } }
drivers/block/Kconfig +2 -2
@@ -267,7 +267,7 @@ config BLK_DEV_LOOP_MIN_COUNT dynamically allocated with the /dev/loop-control interface. config BLK_DEV_CRYPTOLOOP - tristate "Cryptoloop Support" + tristate "Cryptoloop Support (DEPRECATED)" select CRYPTO select CRYPTO_CBC depends on BLK_DEV_LOOP
@@ -279,7 +279,7 @@ config BLK_DEV_CRYPTOLOOP WARNING: This device is not safe for journaled file systems like ext3 or Reiserfs. Please use the Device Mapper crypto module instead, which can be configured to be on-disk compatible with the - cryptoloop device. + cryptoloop device. cryptoloop support will be removed in Linux 5.16. source "drivers/block/drbd/Kconfig"
drivers/block/cryptoloop.c +2 -0
@@ -201,6 +201,8 @@ init_cryptoloop(void)if (rc)printk (KERN_ERR "cryptoloop: loop_register_transfer failed\n" ); +else +pr_warn ("the cryptoloop driver has been deprecated and will be removed in in Linux 5.16\n" );return rc; }
drivers/clk/mvebu/kirkwood.c +1 -0
@@ -254,6 +254,7 @@ static const char *powersave_parents[] = {static const struct clk_muxing_soc_desc kirkwood_mux_desc[]__initconst = { {"powersave" , powersave_parents,ARRAY_SIZE (powersave_parents),11 ,1 ,0 }, + { } };#define to_clk_mux (_hw) container_of(_hw, struct clk_mux, hw)
drivers/crypto/mxs-dcp.c +44 -37
161 lines not on this page · raw message
drivers/crypto/omap-sham.c +1 -1
@@ -1630,7 +1630,7 @@ static void omap_sham_done_task(unsigned long data) goto finish; } }else if (test_bit (FLAGS_DMA_READY , &dd->flags)) { -if (test_and_clear_bit (FLAGS_DMA_ACTIVE , &dd->flags)) { +if (test_bit (FLAGS_DMA_ACTIVE , &dd->flags)) {omap_sham_update_dma_stop (dd);if (dd->err) { err = dd->err;
drivers/crypto/qat/qat_common/adf_init.c +3 -2
@@ -121,6 +121,7 @@ int adf_dev_init(struct adf_accel_dev *accel_dev)struct service_hndl *service;struct list_head *list_itr;struct adf_hw_device_data *hw_data = accel_dev->hw_device; +int ret;if (!hw_data) { dev_err(&GET_DEV(accel_dev),
@@ -187,9 +188,9 @@ int adf_dev_init(struct adf_accel_dev *accel_dev) } hw_data->enable_error_correction (accel_dev); - hw_data->enable_vf2pf_comms (accel_dev); + ret = hw_data->enable_vf2pf_comms (accel_dev); -return 0 ; +return ret; }EXPORT_SYMBOL_GPL (adf_dev_init);
drivers/crypto/qat/qat_common/adf_pf2vf_msg.c +2 -0
@@ -384,6 +384,8 @@ static int adf_vf2pf_request_version(struct adf_accel_dev *accel_dev) msg |=ADF_PFVF_COMPATIBILITY_VERSION <<ADF_VF2PF_COMPAT_VER_REQ_SHIFT ;BUILD_BUG_ON (ADF_PFVF_COMPATIBILITY_VERSION >255 ); +reinit_completion (&accel_dev->vf.iov_msg_completion); +/* Send request from VF to PF */ ret =adf_iov_putmsg (accel_dev, msg,0 );if (ret) {
drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c +1 -1
@@ -340,7 +340,7 @@ static void amdgpu_i2c_put_byte(struct amdgpu_i2c_chan *i2c_bus,void amdgpu_i2c_router_select_ddc_port (struct amdgpu_connector *amdgpu_connector) { -u8 val; +u8 val =0 ;if (!amdgpu_connector->router.ddc_valid)return ;
drivers/gpu/drm/msm/dsi/dsi.c +3 -3
@@ -36,8 +36,10 @@ static int dsi_get_phy(struct msm_dsi *msm_dsi) } phy_pdev =of_find_device_by_node (phy_node); -if (phy_pdev) +if (phy_pdev) { msm_dsi->phy =platform_get_drvdata (phy_pdev); + msm_dsi->phy_dev = &phy_pdev->dev; + }of_node_put (phy_node);
@@ -46,8 +48,6 @@ static int dsi_get_phy(struct msm_dsi *msm_dsi)return -EPROBE_DEFER ; } - msm_dsi->phy_dev =get_device (&phy_pdev->dev); -return 0 ; }
drivers/i2c/busses/i2c-highlander.c +1 -1
@@ -382,7 +382,7 @@ static int highlander_i2c_probe(struct platform_device *pdev)platform_set_drvdata (pdev, dev); dev->irq =platform_get_irq (pdev,0 ); -if (iic_force_poll) +if (dev->irq <0 || iic_force_poll) dev->irq =0 ;if (dev->irq) {
drivers/i2c/busses/i2c-iop3xx.c +2 -4
@@ -459,16 +459,14 @@ iop3xx_i2c_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <0 ) { - ret = -ENXIO ; + ret = irq; goto unmap; } ret =request_irq (irq, iop3xx_i2c_irq_handler,0 , pdev->name, adapter_data); -if (ret) { - ret = -EIO ; +if (ret) goto unmap; - }memcpy (new_adapter->name, pdev->name,strlen (pdev->name)); new_adapter->owner =THIS_MODULE ;
drivers/i2c/busses/i2c-mt65xx.c +1 -1
@@ -639,7 +639,7 @@ static int mtk_i2c_probe(struct platform_device *pdev)return PTR_ERR (i2c->pdmabase); irq =platform_get_irq (pdev,0 ); -if (irq <=0 ) +if (irq <0 )return irq;init_completion (&i2c->msg_complete);
drivers/i2c/busses/i2c-s3c2410.c +1 -1
@@ -1213,7 +1213,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)if (!(i2c->quirks &QUIRK_POLL )) { i2c->irq = ret =platform_get_irq (pdev,0 ); -if (ret <=0 ) { +if (ret <0 ) {dev_err (&pdev->dev,"cannot find IRQ\n" );clk_unprepare (i2c->clk);return ret;
drivers/iio/dac/ad5624r_spi.c +17 -1
@@ -231,7 +231,7 @@ static int ad5624r_probe(struct spi_device *spi)if (!indio_dev)return -ENOMEM ; st =iio_priv (indio_dev); - st->reg =devm_regulator_get (&spi->dev,"vcc" ); + st->reg =devm_regulator_get_optional (&spi->dev,"vref" );if (!IS_ERR (st->reg)) { ret =regulator_enable (st->reg);if (ret)
@@ -242,6 +242,22 @@ static int ad5624r_probe(struct spi_device *spi) goto error_disable_reg; voltage_uv = ret; + }else { +if (PTR_ERR (st->reg) != -ENODEV ) +return PTR_ERR (st->reg); +/* Backwards compatibility. This naming is not correct */ + st->reg =devm_regulator_get_optional (&spi->dev,"vcc" ); +if (!IS_ERR (st->reg)) { + ret =regulator_enable (st->reg); +if (ret) +return ret; + + ret =regulator_get_voltage (st->reg); +if (ret <0 ) + goto error_disable_reg; + + voltage_uv = ret; + } }spi_set_drvdata (spi, indio_dev);
drivers/media/i2c/tc358743.c +1 -1
@@ -241,7 +241,7 @@ static void i2c_wr16(struct v4l2_subdev *sd, u16 reg, u16 val)static void i2c_wr16_and_or (struct v4l2_subdev *sd,u16 reg,u16 mask,u16 val) { -i2c_wrreg (sd, reg, (i2c_rdreg (sd, reg,2 ) & mask) | val,2 ); +i2c_wrreg (sd, reg, (i2c_rdreg (sd, reg,1 ) & mask) | val,1 ); }static u32 i2c_rd32 (struct v4l2_subdev *sd,u16 reg)
drivers/media/rc/rc-loopback.c +1 -1
@@ -55,7 +55,7 @@ static int loop_set_tx_mask(struct rc_dev *dev, u32 mask)if ((mask & (RXMASK_REGULAR |RXMASK_LEARNING )) != mask) {dprintk ("invalid tx mask: %u\n" , mask); -return -EINVAL ; +return 2 ; }dprintk ("setting tx mask: %u\n" , mask);
drivers/media/usb/dvb-usb/nova-t-usb2.c +4 -2
@@ -122,7 +122,7 @@ static int nova_t_rc_query(struct dvb_usb_device *d, u32 *event, int *state)static int nova_t_read_mac_address (struct dvb_usb_device *d,u8 mac[6 ]) { -int i; +int i, ret;u8 b; mac[0 ] =0x00 ;
@@ -131,7 +131,9 @@ static int nova_t_read_mac_address (struct dvb_usb_device *d, u8 mac[6])/* this is a complete guess, but works for my box */ for (i =136 ; i <139 ; i++) { -dibusb_read_eeprom_byte (d,i, &b); + ret =dibusb_read_eeprom_byte (d, i, &b); +if (ret) +return ret; mac[5 - (i -136 )] = b; }
drivers/media/usb/dvb-usb/vp702x.c +9 -3
@@ -294,16 +294,22 @@ static int vp702x_rc_query(struct dvb_usb_device *d, u32 *event, int *state)static int vp702x_read_mac_addr (struct dvb_usb_device *d,u8 mac[6 ]) {u8 i, *buf; +int ret;struct vp702x_device_state *st = d->priv;mutex_lock (&st->buf_mutex); buf = st->buf; -for (i =6 ; i <12 ; i++) -vp702x_usb_in_op (d,READ_EEPROM_REQ , i,1 , &buf[i -6 ],1 ); +for (i =6 ; i <12 ; i++) { + ret =vp702x_usb_in_op (d,READ_EEPROM_REQ , i,1 , + &buf[i -6 ],1 ); +if (ret <0 ) + goto err; + }memcpy (mac, buf,6 ); +err:mutex_unlock (&st->buf_mutex); -return 0 ; +return ret; }static int vp702x_frontend_attach (struct dvb_usb_adapter *adap)
drivers/media/usb/go7007/go7007-driver.c +0 -26
@@ -698,49 +698,23 @@ struct go7007 *go7007_alloc(const struct go7007_board_info *board, struct device *dev) {struct go7007 *go; -int i; go =kzalloc (sizeof (struct go7007 ),GFP_KERNEL );if (go ==NULL )return NULL ; go->dev = dev; go->board_info = board; - go->board_id =0 ; go->tuner_type =-1 ; - go->channel_number =0 ; - go->name[0 ] =0 ;mutex_init (&go->hw_lock);init_waitqueue_head (&go->frame_waitq);spin_lock_init (&go->spinlock); go->status =STATUS_INIT ; -memset (&go->i2c_adapter,0 ,sizeof (go->i2c_adapter)); - go->i2c_adapter_online =0 ; - go->interrupt_available =0 ;init_waitqueue_head (&go->interrupt_waitq); - go->input =0 ;go7007_update_board (go); - go->encoder_h_halve =0 ; - go->encoder_v_halve =0 ; - go->encoder_subsample =0 ; go->format =V4L2_PIX_FMT_MJPEG ; go->bitrate =1500000 ; go->fps_scale =1 ; - go->pali =0 ; go->aspect_ratio =GO7007_RATIO_1_1 ; - go->gop_size =0 ; - go->ipb =0 ; - go->closed_gop =0 ; - go->repeat_seqhead =0 ; - go->seq_header_enable =0 ; - go->gop_header_enable =0 ; - go->dvd_mode =0 ; - go->interlace_coding =0 ; -for (i =0 ; i <4 ; ++i) - go->modet[i].enable =0 ; -for (i =0 ; i <1624 ; ++i) - go->modet_map[i] =0 ; - go->audio_deliver =NULL ; - go->audio_enabled =0 ;return go; }
drivers/media/usb/stkwebcam/stk-webcam.c +4 -2
@@ -1353,7 +1353,7 @@ static int stk_camera_probe(struct usb_interface *interface,if (!dev->isoc_ep) {STK_ERROR ("Could not find isoc-in endpoint" ); err = -ENODEV ; - goto error; + goto error_put; } dev->vsettings.palette =V4L2_PIX_FMT_RGB565 ; dev->vsettings.mode =MODE_VGA ;
@@ -1366,10 +1366,12 @@ static int stk_camera_probe(struct usb_interface *interface, err =stk_register_video_device (dev);if (err) - goto error; + goto error_put;return 0 ; +error_put: +usb_put_intf (interface); error:v4l2_ctrl_handler_free (hdl);v4l2_device_unregister (&dev->v4l2_dev);
drivers/media/usb/uvc/uvc_v4l2.c +23 -11
@@ -866,8 +866,8 @@ static int uvc_ioctl_g_input(struct file *file, void *fh, unsigned int *input) {struct uvc_fh *handle = fh;struct uvc_video_chain *chain = handle->chain; +u8 *buf;int ret; -u8 i;if (chain->selector ==NULL || (chain->dev->quirks &UVC_QUIRK_IGNORE_SELECTOR_UNIT )) {
@@ -875,22 +875,27 @@ static int uvc_ioctl_g_input(struct file *file, void *fh, unsigned int *input)return 0 ; } + buf =kmalloc (1 ,GFP_KERNEL ); +if (!buf) +return -ENOMEM ; + ret =uvc_query_ctrl (chain->dev,UVC_GET_CUR , chain->selector->id, chain->dev->intfnum,UVC_SU_INPUT_SELECT_CONTROL , - &i,1 ); -if (ret <0 ) -return ret; + buf,1 ); +if (!ret) + *input = *buf -1 ; - *input = i -1 ; -return 0 ; +kfree (buf); + +return ret; }static int uvc_ioctl_s_input (struct file *file,void *fh,unsigned int input) {struct uvc_fh *handle = fh;struct uvc_video_chain *chain = handle->chain; +u8 *buf;int ret; -u32 i; ret =uvc_acquire_privileges (handle);if (ret <0 )
@@ -906,10 +911,17 @@ static int uvc_ioctl_s_input(struct file *file, void *fh, unsigned int input)if (input >= chain->selector->bNrInPins)return -EINVAL ; - i = input +1 ; -return uvc_query_ctrl (chain->dev,UVC_SET_CUR , chain->selector->id, - chain->dev->intfnum,UVC_SU_INPUT_SELECT_CONTROL , - &i,1 ); + buf =kmalloc (1 ,GFP_KERNEL ); +if (!buf) +return -ENOMEM ; + + *buf = input +1 ; + ret =uvc_query_ctrl (chain->dev,UVC_SET_CUR , chain->selector->id, + chain->dev->intfnum,UVC_SU_INPUT_SELECT_CONTROL , + buf,1 ); +kfree (buf); + +return ret; } static int uvc_ioctl_queryctrl(struct file *file, void *fh,
drivers/misc/vmw_vmci/vmci_queue_pair.c +4 -2
@@ -2344,7 +2344,8 @@ int vmci_qp_broker_map(struct vmci_handle handle, is_local = entry->qp.flags &VMCI_QPFLAG_LOCAL ; result =VMCI_SUCCESS ; -if (context_id !=VMCI_HOST_CONTEXT_ID ) { +if (context_id !=VMCI_HOST_CONTEXT_ID && + !QPBROKERSTATE_HAS_MEM (entry)) {struct vmci_qp_page_store page_store; page_store.pages = guest_mem;
@@ -2454,7 +2455,8 @@ int vmci_qp_broker_unmap(struct vmci_handle handle, is_local = entry->qp.flags &VMCI_QPFLAG_LOCAL ; -if (context_id !=VMCI_HOST_CONTEXT_ID ) { +if (context_id !=VMCI_HOST_CONTEXT_ID && +QPBROKERSTATE_HAS_MEM (entry)) {qp_acquire_queue_mutex (entry->produce_q); result =qp_save_headers (entry);if (result <VMCI_SUCCESS )
drivers/mmc/host/dw_mmc.c +1 -0
@@ -701,6 +701,7 @@ static int dw_mci_edmac_start_dma(struct dw_mci *host,int ret =0 ;/* Set external dma config: burst size, burst width */ +memset (&cfg,0 ,sizeof (cfg)); cfg.dst_addr = host->phy_regs + fifo_offset; cfg.src_addr = cfg.dst_addr; cfg.dst_addr_width =DMA_SLAVE_BUSWIDTH_4_BYTES ;
drivers/mmc/host/moxart-mmc.c +1 -0
@@ -633,6 +633,7 @@ static int moxart_probe(struct platform_device *pdev) host->dma_chan_tx, host->dma_chan_rx); host->have_dma = true; +memset (&cfg,0 ,sizeof (cfg)); cfg.src_addr_width =DMA_SLAVE_BUSWIDTH_4_BYTES ; cfg.dst_addr_width =DMA_SLAVE_BUSWIDTH_4_BYTES ;
drivers/mmc/host/rtsx_pci_sdmmc.c +23 -13
@@ -553,9 +553,22 @@ static int sd_write_long_data(struct realtek_pci_sdmmc *host,return 0 ; } +static inline void sd_enable_initial_mode (struct realtek_pci_sdmmc *host) +{ +rtsx_pci_write_register (host->pcr,SD_CFG1 , +SD_CLK_DIVIDE_MASK ,SD_CLK_DIVIDE_128 ); +} + +static inline void sd_disable_initial_mode (struct realtek_pci_sdmmc *host) +{ +rtsx_pci_write_register (host->pcr,SD_CFG1 , +SD_CLK_DIVIDE_MASK ,SD_CLK_DIVIDE_0 ); +} +static int sd_rw_multi (struct realtek_pci_sdmmc *host,struct mmc_request *mrq) {struct mmc_data *data = mrq->data; +int err;if (host->sg_count <0 ) { data->error = host->sg_count;
@@ -564,22 +577,19 @@ static int sd_rw_multi(struct realtek_pci_sdmmc *host, struct mmc_request *mrq)return data->error; } -if (data->flags &MMC_DATA_READ ) -return sd_read_long_data (host, mrq); +if (data->flags &MMC_DATA_READ ) { +if (host->initial_mode) +sd_disable_initial_mode (host); -return sd_write_long_data (host, mrq); -} + err =sd_read_long_data (host, mrq); -static inline void sd_enable_initial_mode (struct realtek_pci_sdmmc *host) -{ -rtsx_pci_write_register (host->pcr,SD_CFG1 , -SD_CLK_DIVIDE_MASK ,SD_CLK_DIVIDE_128 ); -} +if (host->initial_mode) +sd_enable_initial_mode (host); -static inline void sd_disable_initial_mode (struct realtek_pci_sdmmc *host) -{ -rtsx_pci_write_register (host->pcr,SD_CFG1 , -SD_CLK_DIVIDE_MASK ,SD_CLK_DIVIDE_0 ); +return err; + } + +return sd_write_long_data (host, mrq); } static void sd_normal_rw(struct realtek_pci_sdmmc *host,
drivers/mtd/nand/cafe_nand.c +3 -1
@@ -672,7 +672,7 @@ static int cafe_nand_probe(struct pci_dev *pdev, "CAFE NAND", mtd);if (err) {dev_warn (&pdev->dev,"Could not register IRQ %d\n" , pdev->irq); - goto out_ior; + goto out_free_rs; }/* Disable master reset, enable NAND clock */
@@ -781,6 +781,8 @@ static int cafe_nand_probe(struct pci_dev *pdev,/* Disable NAND IRQ in global IRQ mask register */ cafe_writel (cafe, ~1 &cafe_readl (cafe,GLOBAL_IRQ_MASK ),GLOBAL_IRQ_MASK );free_irq (pdev->irq, mtd); + out_free_rs: +free_rs (cafe->rs); out_ior:pci_iounmap (pdev, cafe->mmio); out_free_mtd:
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c +1 -1
@@ -1246,7 +1246,7 @@ int bnx2x_iov_init_one(struct bnx2x *bp, int int_mode_param,/* SR-IOV capability was enabled but there are no VFs*/ if (iov->total ==0 ) { - err = -EINVAL ; + err =0 ; goto failed; }
drivers/net/ethernet/chelsio/cxgb/cxgb2.c +1 -0
@@ -1133,6 +1133,7 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)if (!adapter->registered_device_map) {pr_err ("%s: could not register any net devices\n" ,pci_name (pdev)); + err = -EINVAL ; goto out_release_adapter_res; }
drivers/net/ethernet/qlogic/qede/qede_main.c +1 -1
@@ -1918,6 +1918,7 @@ static void qede_sync_free_irqs(struct qede_dev *edev) } edev->int_info.used_cnt =0 ; + edev->int_info.msix_cnt =0 ; }static int qede_req_msix_irqs (struct qede_dev *edev)
@@ -2341,7 +2342,6 @@ static int qede_load(struct qede_dev *edev, enum qede_load_mode mode) err4:qede_sync_free_irqs (edev); -memset (&edev->int_info.msix_cnt,0 ,sizeof (struct qed_int_info )); err3:qede_napi_disable_remove (edev); err2:
drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c +0 -1
@@ -440,7 +440,6 @@ int qlcnic_pinit_from_rom(struct qlcnic_adapter *adapter)QLCWR32 (adapter,QLCNIC_CRB_PEG_NET_4 +0x3c ,1 );msleep (20 ); -qlcnic_rom_unlock (adapter);/* big hammer don't reset CAM block on reset */ QLCWR32 (adapter,QLCNIC_ROMUSB_GLB_SW_RESET ,0xfeffffff );
drivers/net/ethernet/rdc/r6040.c +8 -1
@@ -133,6 +133,8 @@#define PHY_ST 0x8A/* PHY status register */ #define MAC_SM 0xAC/* MAC status machine */ #define MAC_SM_RST 0x0002/* MAC status machine reset */ +#define MD_CSC 0xb6/* MDC speed control register */ +#define MD_CSC_DEFAULT 0x0030#define MAC_ID 0xBE/* Identifier register */ #define TX_DCNT 0x80/* TX descriptor count */
@@ -369,8 +371,9 @@ static void r6040_reset_mac(struct r6040_private *lp) {void __iomem *ioaddr = lp->base;int limit =MAC_DEF_TIMEOUT ; -u16 cmd; +u16 cmd, md_csc; + md_csc =ioread16 (ioaddr +MD_CSC );iowrite16 (MAC_RST , ioaddr +MCR1 );while (limit--) { cmd =ioread16 (ioaddr +MCR1 );
@@ -382,6 +385,10 @@ static void r6040_reset_mac(struct r6040_private *lp)iowrite16 (MAC_SM_RST , ioaddr +MAC_SM );iowrite16 (0 , ioaddr +MAC_SM );mdelay (5 ); + +/* Restore MDIO clock frequency */ +if (md_csc !=MD_CSC_DEFAULT ) +iowrite16 (md_csc, ioaddr +MD_CSC ); }static void r6040_init_mac_regs (struct net_device *dev)
drivers/net/ethernet/renesas/sh_eth.c +1 -0
@@ -2426,6 +2426,7 @@ static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev)else txdesc->status |=cpu_to_edmac (mdp,TD_TACT ); +wmb ();/* cur_tx must be incremented after TACT bit was set */ mdp->cur_tx++;if (!(sh_eth_read (ndev,EDTRR ) &sh_eth_get_edtrr_trns (mdp)))
drivers/net/ethernet/xilinx/ll_temac_main.c +1 -3
@@ -735,10 +735,8 @@ temac_start_xmit(struct sk_buff *skb, struct net_device *ndev)/* Kick off the transfer */ lp->dma_out (lp,TX_TAILDESC_PTR , tail_p);/* DMA start */ -if (temac_check_tx_bd_space (lp,MAX_SKB_FRAGS +1 )) { -netdev_info (ndev,"%s -> netif_stop_queue\n" , __func__); +if (temac_check_tx_bd_space (lp,MAX_SKB_FRAGS +1 ))netif_stop_queue (ndev); - }return NETDEV_TX_OK ; }
drivers/net/phy/dp83640_reg.h +1 -1
@@ -4,7 +4,7 @@#ifndef HAVE_DP83640_REGISTERS #define HAVE_DP83640_REGISTERS -#define PAGE0 0x0000 +/* #define PAGE0 0x0000 */ #define PHYCR2 0x001c/* PHY Control Register 2 */ #define PAGE4 0x0004
drivers/net/wireless/ath/ath.h +2 -1
@@ -199,12 +199,13 @@ struct sk_buff *ath_rxbuf_alloc(struct ath_common *common,bool ath_is_mybeacon (struct ath_common *common,struct ieee80211_hdr *hdr);void ath_hw_setbssidmask (struct ath_common *common); -void ath_key_delete (struct ath_common *common,struct ieee80211_key_conf *key); +void ath_key_delete (struct ath_common *common,u8 hw_key_idx);int ath_key_config (struct ath_common *common,struct ieee80211_vif *vif,struct ieee80211_sta *sta,struct ieee80211_key_conf *key);bool ath_hw_keyreset (struct ath_common *common,u16 entry); +bool ath_hw_keysetmac (struct ath_common *common,u16 entry,const u8 *mac);void ath_hw_cycle_counters_update (struct ath_common *common);int32_t ath_hw_get_listen_time (struct ath_common *common);
drivers/net/wireless/ath/ath5k/mac80211-ops.c +1 -1
@@ -522,7 +522,7 @@ ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, }break ;case DISABLE_KEY : -ath_key_delete (common, key); +ath_key_delete (common, key->hw_key_idx);break ;default : ret = -EINVAL ;
drivers/net/wireless/ath/ath6kl/wmi.c +3 -1
@@ -2508,8 +2508,10 @@ static int ath6kl_wmi_sync_point(struct wmi *wmi, u8 if_idx) goto free_data_skb;for (index =0 ; index < num_pri_streams; index++) { -if (WARN_ON (!data_sync_bufs[index].skb)) +if (WARN_ON (!data_sync_bufs[index].skb)) { + ret = -ENOMEM ; goto free_data_skb; + } ep_id = ath6kl_ac2_endpoint_id(wmi->parent_dev, data_sync_bufs[index].
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +2 -1
@@ -3345,7 +3345,8 @@ found:"Found block at %x: code=%d ref=%d length=%d major=%d minor=%d\n" , cptr, code, reference, length, major, minor);if ((!AR_SREV_9485 (ah) && length >=1024 ) || - (AR_SREV_9485 (ah) && length >EEPROM_DATA_LEN_9485 )) { + (AR_SREV_9485 (ah) && length >EEPROM_DATA_LEN_9485 ) || + (length > cptr)) {ath_dbg (common,EEPROM ,"Skipping bad header\n" ); cptr -=COMP_HDR_LEN ;continue ;
drivers/net/wireless/ath/ath9k/htc_drv_main.c +1 -1
@@ -1463,7 +1463,7 @@ static int ath9k_htc_set_key(struct ieee80211_hw *hw, }break ;case DISABLE_KEY : -ath_key_delete (common, key); +ath_key_delete (common, key->hw_key_idx);break ;default : ret = -EINVAL ;
drivers/net/wireless/ath/ath9k/hw.h +1 -0
@@ -814,6 +814,7 @@ struct ath_hw {struct ath9k_pacal_info pacal_info;struct ar5416Stats stats;struct ath9k_tx_queue_info txq[ATH9K_NUM_TX_QUEUES ]; +DECLARE_BITMAP (pending_del_keymap,ATH_KEYMAX );enum ath9k_int imask;u32 imrs2_reg;
drivers/net/wireless/ath/ath9k/main.c +92 -3
135 lines not on this page · raw message
drivers/net/wireless/ath/key.c +25 -16
68 lines not on this page · raw message
drivers/parport/ieee1284_ops.c +1 -1
@@ -534,7 +534,7 @@ size_t parport_ieee1284_ecp_read_data (struct parport *port, goto out;/* Yield the port for a while. */ -if (count && dev->port->irq !=PARPORT_IRQ_NONE ) { +if (dev->port->irq !=PARPORT_IRQ_NONE ) {parport_release (dev);schedule_timeout_interruptible (msecs_to_jiffies (40 ));parport_claim_or_block (dev);
drivers/pci/msi.c +3 -0
@@ -748,6 +748,9 @@ static void msix_mask_all(void __iomem *base, int tsize)u32 ctrl =PCI_MSIX_ENTRY_CTRL_MASKBIT ;int i; +if (pci_msi_ignore_mask) +return ; +for (i =0 ; i < tsize; i++, base +=PCI_MSIX_ENTRY_SIZE )writel (ctrl, base +PCI_MSIX_ENTRY_VECTOR_CTRL ); }
drivers/pci/pci.c +9 -6
@@ -1334,11 +1334,7 @@ static int pci_enable_device_flags(struct pci_dev *dev, unsigned long flags)* so that things like MSI message writing will behave as expected * (e.g. if the device really is in D0 at enable time). */ -if (dev->pm_cap) { -u16 pmcsr; -pci_read_config_word (dev, dev->pm_cap +PCI_PM_CTRL , &pmcsr); - dev->current_state = (pmcsr &PCI_PM_CTRL_STATE_MASK ); - } +pci_update_current_state (dev, dev->current_state);if (atomic_inc_return (&dev->enable_cnt) >1 )return 0 ;/* already enabled */
@@ -1876,7 +1872,14 @@ int __pci_enable_wake(struct pci_dev *dev, pci_power_t state,if (enable) {int error; -if (pci_pme_capable (dev, state)) +/* +* Enable PME signaling if the device can signal PME from +* D3cold regardless of whether or not it can signal PME from +* the current target state, because that will allow it to +* signal PME when the hierarchy above it goes into D3cold and +* the device itself ends up in D3cold as a result of that. +*/ +if (pci_pme_capable (dev, state) ||pci_pme_capable (dev, PCI_D3cold))pci_pme_active (dev, true);else ret =1 ;
drivers/pci/quirks.c +7 -6
@@ -2915,12 +2915,13 @@ static void fixup_mpss_256(struct pci_dev *dev) { dev->pcie_mpss =1 ;/* 256 bytes */ } -DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_SOLARFLARE , -PCI_DEVICE_ID_SOLARFLARE_SFC4000A_0 , fixup_mpss_256); -DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_SOLARFLARE , -PCI_DEVICE_ID_SOLARFLARE_SFC4000A_1 , fixup_mpss_256); -DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_SOLARFLARE , -PCI_DEVICE_ID_SOLARFLARE_SFC4000B , fixup_mpss_256); +DECLARE_PCI_FIXUP_EARLY (PCI_VENDOR_ID_SOLARFLARE , +PCI_DEVICE_ID_SOLARFLARE_SFC4000A_0 , fixup_mpss_256); +DECLARE_PCI_FIXUP_EARLY (PCI_VENDOR_ID_SOLARFLARE , +PCI_DEVICE_ID_SOLARFLARE_SFC4000A_1 , fixup_mpss_256); +DECLARE_PCI_FIXUP_EARLY (PCI_VENDOR_ID_SOLARFLARE , +PCI_DEVICE_ID_SOLARFLARE_SFC4000B , fixup_mpss_256); +DECLARE_PCI_FIXUP_EARLY (PCI_VENDOR_ID_ASMEDIA ,0x0612 , fixup_mpss_256);/* Intel 5000 and 5100 Memory controllers have an errata with read completion * coalescing (which is enabled by default on some BIOSes) and MPS of 256B.
drivers/pci/syscall.c +3 -1
@@ -23,8 +23,10 @@ SYSCALL_DEFINE5(pciconfig_read, unsigned long, bus, unsigned long, dfn,long err;int cfg_ret; + err = -EPERM ; + dev =NULL ;if (!capable (CAP_SYS_ADMIN )) -return -EPERM ; + goto error; err = -ENODEV ; dev =pci_get_bus_and_slot (bus, dfn);
drivers/pinctrl/pinctrl-single.c +1 -0
@@ -1328,6 +1328,7 @@ static int pcs_parse_bits_in_pinctrl_entry(struct pcs_device *pcs,if (PCS_HAS_PINCONF ) {dev_err (pcs->dev,"pinconf not supported\n" ); + res = -ENOTSUPP ; goto free_pingroups; }
drivers/platform/chrome/cros_ec_proto.c +9 -0
@@ -182,6 +182,15 @@ static int cros_ec_host_command_proto_query(struct cros_ec_device *ec_dev, msg->insize =sizeof (struct ec_response_get_protocol_info ); ret =send_command (ec_dev, msg); +/* +* Send command once again when timeout occurred. +* Fingerprint MCU (FPMCU) is restarted during system boot which +* introduces small window in which FPMCU won't respond for any +* messages sent by kernel. There is no need to wait before next +* attempt because we waited at least EC_MSG_DEADLINE_MS. +*/ +if (ret == -ETIMEDOUT ) + ret =send_command (ec_dev, msg);if (ret <0 ) { dev_dbg(ec_dev->dev,
drivers/power/max17042_battery.c +6 -2
@@ -644,7 +644,7 @@ static inline void max17042_override_por_values(struct max17042_chip *chip)struct max17042_config_data *config = chip->pdata->config_data;max17042_override_por (map,MAX17042_TGAIN , config->tgain); -max17042_override_por (map, MAx17042_TOFF, config->toff); +max17042_override_por (map,MAX17042_TOFF , config->toff);max17042_override_por (map,MAX17042_CGAIN , config->cgain);max17042_override_por (map,MAX17042_COFF , config->coff);
@@ -760,8 +760,12 @@ static irqreturn_t max17042_thread_handler(int id, void *dev) {struct max17042_chip *chip = dev;u32 val; +int ret; + + ret =regmap_read (chip->regmap,MAX17042_STATUS , &val); +if (ret) +return IRQ_HANDLED ; -regmap_read (chip->regmap,MAX17042_STATUS , &val);if ((val &STATUS_INTR_SOCMIN_BIT ) || (val &STATUS_INTR_SOCMAX_BIT )) {dev_info (&chip->client->dev,"SOC threshold INTR\n" );
drivers/rtc/rtc-tps65910.c +1 -1
@@ -332,6 +332,6 @@ static struct platform_driver tps65910_rtc_driver = { };module_platform_driver (tps65910_rtc_driver); -MODULE_ALIAS ("platform:rtc-tps65910" ); +MODULE_ALIAS ("platform:tps65910-rtc" );MODULE_AUTHOR ("Venu Byravarasu <[email protected]>" );MODULE_LICENSE ("GPL" );
drivers/tty/hvc/hvsi.c +16 -3
@@ -1051,7 +1051,7 @@ static const struct tty_operations hvsi_ops = {static int __init hvsi_init (void ) { -int i; +int i, ret; hvsi_driver =alloc_tty_driver (hvsi_count);if (!hvsi_driver)
@@ -1082,12 +1082,25 @@ static int __init hvsi_init(void) } hvsi_wait = wait_for_state;/* irqs active now */ -if (tty_register_driver (hvsi_driver)) -panic ("Couldn't register hvsi console driver\n" ); + ret =tty_register_driver (hvsi_driver); +if (ret) { +pr_err ("Couldn't register hvsi console driver\n" ); + goto err_free_irq; + }printk (KERN_DEBUG "HVSI: registered %i devices\n" , hvsi_count);return 0 ; +err_free_irq: + hvsi_wait = poll_for_state; +for (i =0 ; i < hvsi_count; i++) { +struct hvsi_struct *hp = &hvsi_ports[i]; + +free_irq (hp->virq, hp); + } +tty_driver_kref_put (hvsi_driver); + +return ret; }device_initcall (hvsi_init);
drivers/tty/serial/8250/8250_pci.c +1 -1
@@ -78,7 +78,7 @@ static void moan_device(const char *str, struct pci_dev *dev)static int setup_port (struct serial_private *priv,struct uart_8250_port *port, -int bar,int offset,int regshift) +u8 bar,unsigned int offset,int regshift) {struct pci_dev *dev = priv->dev;
drivers/tty/serial/8250/8250_port.c +2 -1
@@ -124,7 +124,8 @@ static const struct serial8250_config uart_config[] = { .name = "16C950/954", .fifo_size = 128, .tx_loadsz = 128, - .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10, + .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_01, + .rxtrig_bytes = {16, 32, 112, 120},/* UART_CAP_EFR breaks billionon CF bluetooth card. */ .flags = UART_CAP_FIFO | UART_CAP_SLEEP, },
drivers/tty/serial/jsm/jsm_neo.c +2 -0
@@ -827,7 +827,9 @@ static inline void neo_parse_isr(struct jsm_board *brd, u32 port)/* Parse any modem signal changes */ jsm_dbg (INTR , &ch->ch_bd->pci_dev,"MOD_STAT: sending to parse_modem_sigs\n" ); +spin_lock_irqsave (&ch->uart_port.lock, lock_flags);neo_parse_modem (ch,readb (&ch->ch_neo_uart->msr)); +spin_unlock_irqrestore (&ch->uart_port.lock, lock_flags); } }
drivers/tty/serial/jsm/jsm_tty.c +3 -0
@@ -195,6 +195,7 @@ static void jsm_tty_break(struct uart_port *port, int break_state)static int jsm_tty_open (struct uart_port *port) { +unsigned long lock_flags;struct jsm_board *brd;struct jsm_channel *channel = container_of(port, struct jsm_channel, uart_port);
@@ -248,6 +249,7 @@ static int jsm_tty_open(struct uart_port *port) channel->ch_cached_lsr =0 ; channel->ch_stops_sent =0 ; +spin_lock_irqsave (&port->lock, lock_flags); termios = &port->state->port.tty->termios; channel->ch_c_cflag = termios->c_cflag; channel->ch_c_iflag = termios->c_iflag;
@@ -267,6 +269,7 @@ static int jsm_tty_open(struct uart_port *port)jsm_carrier (channel); channel->ch_open_count++; +spin_unlock_irqrestore (&port->lock, lock_flags);jsm_dbg (OPEN , &channel->ch_bd->pci_dev,"finish\n" );return 0 ;
drivers/tty/tty_io.c +2 -2
@@ -2287,8 +2287,6 @@ static int tty_fasync(int fd, struct file *filp, int on)* Locking: * Called functions take tty_ldiscs_lock * current->signal->tty check is safe without locks -* -* FIXME: may race normal receive processing */ static int tiocsti (struct tty_struct *tty,char __user *p)
@@ -2302,8 +2300,10 @@ static int tiocsti(struct tty_struct *tty, char __user *p)return -EFAULT ;tty_audit_tiocsti (tty, ch); ld =tty_ldisc_ref_wait (tty); +tty_buffer_lock_exclusive (tty->port);if (ld->ops->receive_buf) ld->ops->receive_buf (tty, &ch, &mbz,1 ); +tty_buffer_unlock_exclusive (tty->port);tty_ldisc_deref (ld);return 0 ; }
drivers/usb/gadget/function/u_ether.c +3 -2
@@ -507,8 +507,9 @@ static netdev_tx_t eth_start_xmit(struct sk_buff *skb, }spin_unlock_irqrestore (&dev->lock, flags); -if (skb && !in) { -dev_kfree_skb_any (skb); +if (!in) { +if (skb) +dev_kfree_skb_any (skb);return NETDEV_TX_OK ; }
drivers/usb/gadget/udc/at91_udc.c +3 -1
@@ -1898,7 +1898,9 @@ static int at91udc_probe(struct platform_device *pdev)clk_disable (udc->iclk);/* request UDC and maybe VBUS irqs */ - udc->udp_irq =platform_get_irq (pdev,0 ); + udc->udp_irq = retval =platform_get_irq (pdev,0 ); +if (retval <0 ) + goto err_unprepare_iclk; retval =devm_request_irq (dev, udc->udp_irq, at91_udc_irq,0 , driver_name, udc);if (retval) {
drivers/usb/gadget/udc/mv_u3d_core.c +10 -9
@@ -1929,14 +1929,6 @@ static int mv_u3d_probe(struct platform_device *dev) goto err_get_irq; } u3d->irq = r->start; -if (request_irq (u3d->irq, mv_u3d_irq, -IRQF_SHARED , driver_name, u3d)) { - u3d->irq =0 ; -dev_err (&dev->dev,"Request irq %d for u3d failed\n" , - u3d->irq); - retval = -ENODEV ; - goto err_request_irq; - }/* initialize gadget structure */ u3d->gadget.ops = &mv_u3d_ops;/* usb_gadget_ops */
@@ -1949,6 +1941,15 @@ static int mv_u3d_probe(struct platform_device *dev)mv_u3d_eps_init (u3d); +if (request_irq (u3d->irq, mv_u3d_irq, +IRQF_SHARED , driver_name, u3d)) { + u3d->irq =0 ; +dev_err (&dev->dev,"Request irq %d for u3d failed\n" , + u3d->irq); + retval = -ENODEV ; + goto err_request_irq; + } +/* external vbus detection */ if (u3d->vbus) { u3d->clock_gating =1 ;
@@ -1972,8 +1973,8 @@ static int mv_u3d_probe(struct platform_device *dev) err_unregister:free_irq (u3d->irq, u3d); -err_request_irq: err_get_irq: +err_request_irq:kfree (u3d->status_req); err_alloc_status_req:kfree (u3d->eps);
drivers/usb/host/ehci-orion.c +6 -2
@@ -218,8 +218,11 @@ static int ehci_orion_drv_probe(struct platform_device *pdev)* the clock does not exists. */ priv->clk =devm_clk_get (&pdev->dev,NULL ); -if (!IS_ERR (priv->clk)) -clk_prepare_enable (priv->clk); +if (!IS_ERR (priv->clk)) { + err =clk_prepare_enable (priv->clk); +if (err) + goto err_put_hcd; + } priv->phy =devm_phy_optional_get (&pdev->dev,"usb" );if (IS_ERR (priv->phy)) {
@@ -280,6 +283,7 @@ err_phy_init: err_phy_get:if (!IS_ERR (priv->clk))clk_disable_unprepare (priv->clk); +err_put_hcd:usb_put_hcd (hcd); err: dev_err(&pdev->dev, "init %s fail, %d\n",
drivers/usb/host/fotg210-hcd.c +2 -3
@@ -4495,13 +4495,12 @@ static bool itd_complete(struct fotg210_hcd *fotg210, struct fotg210_itd *itd)/* HC need not update length with this error */ if (!(t &FOTG210_ISOC_BABBLE )) { - desc->actual_length = -fotg210_itdlen (urb, desc, t); + desc->actual_length =FOTG210_ITD_LENGTH (t); urb->actual_length += desc->actual_length; } }else if (likely ((t &FOTG210_ISOC_ACTIVE ) ==0 )) { desc->status =0 ; - desc->actual_length =fotg210_itdlen (urb, desc, t); + desc->actual_length =FOTG210_ITD_LENGTH (t); urb->actual_length += desc->actual_length; }else {/* URB was too late */
drivers/usb/host/fotg210.h +0 -5
@@ -682,11 +682,6 @@ static inline unsigned fotg210_read_frame_index(struct fotg210_hcd *fotg210) return fotg210_readl(fotg210, &fotg210->regs->frame_index); } -#define fotg210_itdlen (urb, desc, t) ({ \ - usb_pipein((urb)->pipe) ? \ - (desc)->length - FOTG210_ITD_LENGTH(t) : \ - FOTG210_ITD_LENGTH(t); \ -})/*-------------------------------------------------------------------------*/ #endif /* __LINUX_FOTG210_H */
drivers/usb/host/ohci-tmio.c +3 -0
@@ -202,6 +202,9 @@ static int ohci_hcd_tmio_drv_probe(struct platform_device *dev)if (!cell)return -EINVAL ; +if (irq <0 ) +return irq; + hcd =usb_create_hcd (&ohci_tmio_hc_driver, &dev->dev,dev_name (&dev->dev));if (!hcd) { ret = -ENOMEM ;
drivers/usb/host/xhci.c +12 -12
@@ -4438,19 +4438,19 @@ static u16 xhci_calculate_u1_timeout(struct xhci_hcd *xhci, {unsigned long long timeout_ns; -if (xhci->quirks &XHCI_INTEL_HOST ) - timeout_ns =xhci_calculate_intel_u1_timeout (udev, desc); -else - timeout_ns = udev->u1_params.sel; -/* Prevent U1 if service interval is shorter than U1 exit latency */ if (usb_endpoint_xfer_int (desc) ||usb_endpoint_xfer_isoc (desc)) { -if (xhci_service_interval_to_ns (desc) <= timeout_ns) { +if (xhci_service_interval_to_ns (desc) <= udev->u1_params.mel) {dev_dbg (&udev->dev,"Disable U1, ESIT shorter than exit latency\n" );return USB3_LPM_DISABLED ; } } +if (xhci->quirks &XHCI_INTEL_HOST ) + timeout_ns =xhci_calculate_intel_u1_timeout (udev, desc); +else + timeout_ns = udev->u1_params.sel; +/* The U1 timeout is encoded in 1us intervals. * Don't return a timeout of zero, because that's USB3_LPM_DISABLED. */
@@ -4502,19 +4502,19 @@ static u16 xhci_calculate_u2_timeout(struct xhci_hcd *xhci, {unsigned long long timeout_ns; -if (xhci->quirks &XHCI_INTEL_HOST ) - timeout_ns =xhci_calculate_intel_u2_timeout (udev, desc); -else - timeout_ns = udev->u2_params.sel; -/* Prevent U2 if service interval is shorter than U2 exit latency */ if (usb_endpoint_xfer_int (desc) ||usb_endpoint_xfer_isoc (desc)) { -if (xhci_service_interval_to_ns (desc) <= timeout_ns) { +if (xhci_service_interval_to_ns (desc) <= udev->u2_params.mel) {dev_dbg (&udev->dev,"Disable U2, ESIT shorter than exit latency\n" );return USB3_LPM_DISABLED ; } } +if (xhci->quirks &XHCI_INTEL_HOST ) + timeout_ns =xhci_calculate_intel_u2_timeout (udev, desc); +else + timeout_ns = udev->u2_params.sel; +/* The U2 timeout is encoded in 256us intervals */ timeout_ns =DIV_ROUND_UP_ULL (timeout_ns,256 *1000 );/* If the necessary timeout value is bigger than what we can set in the
drivers/usb/phy/phy-fsl-usb.c +2 -0
@@ -891,6 +891,8 @@ int usb_otg_start(struct platform_device *pdev)/* request irq */ p_otg->irq =platform_get_irq (pdev,0 ); +if (p_otg->irq <0 ) +return p_otg->irq; status =request_irq (p_otg->irq, fsl_otg_isr,IRQF_SHARED , driver_name, p_otg);if (status) {
drivers/usb/phy/phy-isp1301.c +1 -1
@@ -136,7 +136,7 @@ static int isp1301_remove(struct i2c_client *client)static struct i2c_driver isp1301_driver = { .driver = { .name =DRV_NAME , - .of_match_table =of_match_ptr (isp1301_of_match), + .of_match_table = isp1301_of_match, }, .probe = isp1301_probe, .remove = isp1301_remove,
drivers/usb/phy/phy-tahvo.c +3 -1
@@ -404,7 +404,9 @@ static int tahvo_usb_probe(struct platform_device *pdev)dev_set_drvdata (&pdev->dev, tu); - tu->irq =platform_get_irq (pdev,0 ); + tu->irq = ret =platform_get_irq (pdev,0 ); +if (ret <0 ) +return ret; ret =request_threaded_irq (tu->irq,NULL , tahvo_usb_vbus_interrupt,IRQF_ONESHOT ,"tahvo-vbus" , tu);
drivers/usb/phy/phy-twl6030-usb.c +5 -0
@@ -336,6 +336,11 @@ static int twl6030_usb_probe(struct platform_device *pdev) twl->irq2 =platform_get_irq (pdev,1 ); twl->linkstat =OMAP_MUSB_UNKNOWN ; +if (twl->irq1 <0 ) +return twl->irq1; +if (twl->irq2 <0 ) +return twl->irq2; + twl->comparator.set_vbus = twl6030_set_vbus; twl->comparator.start_srp = twl6030_start_srp;
drivers/usb/serial/mos7720.c +3 -1
@@ -229,8 +229,10 @@ static int read_mos_reg(struct usb_serial *serial, unsigned int serial_portnum,int status; buf =kmalloc (1 ,GFP_KERNEL ); -if (!buf) +if (!buf) { + *data =0 ;return -ENOMEM ; + } status =usb_control_msg (usbdev, pipe, request, requesttype, value, index, buf,1 ,MOS_WDR_TIMEOUT );
drivers/video/fbdev/asiliantfb.c +3 -0
@@ -227,6 +227,9 @@ static int asiliantfb_check_var(struct fb_var_screeninfo *var, {unsigned long Ftarget, ratio, remainder; +if (!var->pixclock) +return -EINVAL ; + ratio =1000000 / var->pixclock; remainder =1000000 % var->pixclock; Ftarget =1000000 * ratio + (1000000 * remainder) / var->pixclock;
drivers/video/fbdev/core/fbmem.c +7 -0
@@ -32,6 +32,7 @@#include <linux/device.h> #include <linux/efi.h> #include <linux/fb.h> +#include <linux/overflow.h> #include <asm/fb.h>
@@ -981,6 +982,7 @@ fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var)if ((var->activate &FB_ACTIVATE_FORCE ) ||memcmp (&info->var, var,sizeof (struct fb_var_screeninfo ))) {u32 activate = var->activate; +u32 unused;/* When using FOURCC mode, make sure the red, green, blue and * transp fields are set to 0.
@@ -1005,6 +1007,11 @@ fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var)if (var->xres <8 || var->yres <8 )return -EINVAL ; +/* Too huge resolution causes multiplication overflow. */ +if (check_mul_overflow (var->xres, var->yres, &unused) || +check_mul_overflow (var->xres_virtual, var->yres_virtual, &unused)) +return -EINVAL ; + ret = info->fbops->fb_check_var (var, info);if (ret)
drivers/video/fbdev/kyro/fbdev.c +8 -0
@@ -372,6 +372,11 @@ static int kyro_dev_overlay_viewport_set(u32 x, u32 y, u32 ulWidth, u32 ulHeight/* probably haven't called CreateOverlay yet */ return -EINVAL ; +if (ulWidth ==0 || ulWidth ==0xffffffff || + ulHeight ==0 || ulHeight ==0xffffffff || + (x <2 && ulWidth +2 ==0 )) +return -EINVAL ; +/* Stop Ramdac Output */ DisableRamdacOutput (deviceInfo.pSTGReg);
@@ -394,6 +399,9 @@ static int kyrofb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) {struct kyrofb_info *par = info->par; +if (!var->pixclock) +return -EINVAL ; +if (var->bits_per_pixel !=16 && var->bits_per_pixel !=32 ) {printk (KERN_WARNING "kyrofb: depth not supported: %u\n" , var->bits_per_pixel);return -EINVAL ;
drivers/video/fbdev/riva/fbdev.c +3 -0
@@ -1088,6 +1088,9 @@ static int rivafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)int mode_valid =0 ;NVTRACE_ENTER (); +if (!var->pixclock) +return -EINVAL ; +switch (var->bits_per_pixel) { case 1 ... 8: var->red.offset = var->green.offset = var->blue.offset =0 ;
fs/btrfs/inode.c +1 -1
@@ -476,7 +476,7 @@ again:* inode has not been flagged as nocompress. This flag can * change at any time if we discover bad compression ratios. */ -if (nr_pages >1 &&inode_need_compress (inode)) { +if (inode_need_compress (inode)) {WARN_ON (pages); pages =kcalloc (nr_pages,sizeof (struct page *),GFP_NOFS );if (!pages) {
fs/cifs/cifs_unicode.c +2 -7
@@ -367,14 +367,9 @@ cifs_strndup_from_utf16(const char *src, const int maxlen,if (!dst)return NULL ;cifs_from_utf16 (dst, (__le16 *) src, len, maxlen, codepage, -NO_MAP_UNI_RSVD ); +NO_MAP_UNI_RSVD ); }else { - len =strnlen (src, maxlen); - len++; - dst =kmalloc (len,GFP_KERNEL ); -if (!dst) -return NULL ; -strlcpy (dst, src, len); + dst =kstrndup (src, maxlen,GFP_KERNEL ); }return dst;
fs/cifs/sess.c +1 -1
@@ -602,7 +602,7 @@ sess_alloc_buffer(struct sess_data *sess_data, int wct)return 0 ; out_free_smb_buf: -kfree (smb_buf); +cifs_small_buf_release (smb_buf); sess_data->iov[0 ].iov_base =NULL ; sess_data->iov[0 ].iov_len =0 ; sess_data->buf0_type =CIFS_NO_BUFFER ;
fs/ext4/inline.c +6 -0
@@ -746,6 +746,12 @@ int ext4_write_inline_data_end(struct inode *inode, loff_t pos, unsigned len,ext4_write_lock_xattr (inode, &no_expand);BUG_ON (!ext4_has_inline_data (inode)); +/* +* ei->i_inline_off may have changed since ext4_write_begin() +* called ext4_try_to_write_inline_data() +*/ + (void )ext4_find_inline_data_nolock (inode); + kaddr =kmap_atomic (page);ext4_write_inline_data (inode, &iloc, kaddr, pos, len);kunmap_atomic (kaddr);
fs/gfs2/lock_dlm.c +5 -0
@@ -296,6 +296,11 @@ static void gdlm_put_lock(struct gfs2_glock *gl)gfs2_sbstats_inc (gl,GFS2_LKS_DCOUNT );gfs2_update_request_times (gl); +/* don't want to call dlm if we've unmounted the lock protocol */ +if (test_bit (DFL_UNMOUNT , &ls->ls_recover_flags)) { +gfs2_glock_free (gl); +return ; + }/* don't want to skip dlm_unlock writing the lvb when lock has one */ if (test_bit(SDF_SKIP_DLM_UNLOCK, &sdp->sd_flags) &&
fs/udf/misc.c +11 -2
@@ -175,13 +175,22 @@ struct genericFormat *udf_get_extendedattr(struct inode *inode, uint32_t type,else offset =le32_to_cpu (eahd->appAttrLocation); -while (offset < iinfo->i_lenEAttr) { +while (offset +sizeof (*gaf) < iinfo->i_lenEAttr) { +uint32_t attrLength; + gaf = (struct genericFormat *)&ea[offset]; + attrLength =le32_to_cpu (gaf->attrLength); + +/* Detect undersized elements and buffer overflows */ +if ((attrLength <sizeof (*gaf)) || + (attrLength > (iinfo->i_lenEAttr - offset))) +break ; +if (le32_to_cpu (gaf->attrType) == type && gaf->attrSubtype == subtype)return gaf;else - offset +=le32_to_cpu (gaf->attrLength); + offset += attrLength; } }
include/linux/pci.h +3 -2
@@ -1442,8 +1442,9 @@ static inline int pci_set_dma_seg_boundary(struct pci_dev *dev, {return -EIO ; }static inline int pci_assign_resource (struct pci_dev *dev,int i) {return -EBUSY ; } -static inline int __pci_register_driver (struct pci_driver *drv, -struct module *owner) +static inline int __must_check __pci_register_driver (struct pci_driver *drv, +struct module *owner, +const char *mod_name) {return 0 ; }static inline int pci_register_driver (struct pci_driver *drv) {return 0 ; }
include/linux/power/max17042_battery.h +1 -1
@@ -75,7 +75,7 @@ enum max17042_register { MAX17042_RelaxCFG =0x2A , MAX17042_MiscCFG =0x2B ,MAX17042_TGAIN =0x2C , - MAx17042_TOFF =0x2D , +MAX17042_TOFF =0x2D ,MAX17042_CGAIN =0x2E , MAX17042_COFF = 0x2F,
include/linux/skbuff.h +1 -1
@@ -1502,7 +1502,7 @@ static inline void __skb_insert(struct sk_buff *newsk, newsk->next = next; newsk->prev = prev; next->prev = prev->next = newsk; - list->qlen++; +WRITE_ONCE (list->qlen, list->qlen +1 ); } static inline void __skb_queue_splice(const struct sk_buff_head *list,
include/uapi/linux/serial_reg.h +1 -0
@@ -61,6 +61,7 @@* ST16C654: 8 16 56 60 8 16 32 56 PORT_16654 * TI16C750: 1 16 32 56 xx xx xx xx PORT_16750 * TI16C752: 8 16 56 60 8 16 32 56 +* OX16C950: 16 32 112 120 16 32 64 112 PORT_16C950 * Tegra: 1 4 8 14 16 8 4 1 PORT_TEGRA */ #define UART_FCR_R_TRIG_00 0x00
lib/test_bpf.c +10 -3
@@ -3983,8 +3983,8 @@ static struct bpf_test tests[] = { .u.insns_int = {BPF_LD_IMM64 (R0 ,0 ),BPF_LD_IMM64 (R1 ,0xffffffffffffffffLL ), -BPF_STX_MEM (BPF_W ,R10 ,R1 ,-40 ), -BPF_LDX_MEM (BPF_W ,R0 ,R10 ,-40 ), +BPF_STX_MEM (BPF_DW ,R10 ,R1 ,-40 ), +BPF_LDX_MEM (BPF_DW ,R0 ,R10 ,-40 ),BPF_EXIT_INSN (), }, INTERNAL,
@@ -5399,7 +5399,14 @@ static int run_one(const struct bpf_prog *fp, struct bpf_test *test)u64 duration;u32 ret; -if (test->test[i].data_size ==0 && +/* +* NOTE: Several sub-tests may be present, in which case +* a zero {data_size, result} tuple indicates the end of +* the sub-test array. The first test is always run, +* even if both data_size and result happen to be zero. +*/ +if (i >0 && + test->test[i].data_size ==0 && test->test[i].result ==0 )break ;
mm/kmemleak.c +1 -1
@@ -1394,7 +1394,7 @@ static void kmemleak_scan(void)if (page_count (page) ==0 )continue ;scan_block (page, page +1 ,NULL ); -if (!(pfn % (MAX_SCAN_SIZE /sizeof (*page)))) +if (!(pfn &63 ))cond_resched (); } }
mm/page_alloc.c +4 -4
@@ -700,7 +700,7 @@ static inline void __free_one_page(struct page *page,struct page *buddy;unsigned int max_order; - max_order = min_t(unsigned int, MAX_ORDER, pageblock_order + 1); + max_order = min_t(unsigned int, MAX_ORDER - 1, pageblock_order);VM_BUG_ON (!zone_is_initialized (zone));VM_BUG_ON_PAGE (page->flags &PAGE_FLAGS_CHECK_AT_PREP , page);
@@ -715,7 +715,7 @@ static inline void __free_one_page(struct page *page,VM_BUG_ON_PAGE (bad_range (zone, page), page); continue_merging: -while (order < max_order -1 ) { +while (order < max_order) { buddy_idx =__find_buddy_index (page_idx, order); buddy = page + (buddy_idx - page_idx);if (!page_is_buddy (page, buddy, order))
@@ -736,7 +736,7 @@ continue_merging: page_idx = combined_idx; order++; } -if (max_order <MAX_ORDER ) { +if (order <MAX_ORDER -1 ) {/* If we are here, it means order is >= pageblock_order. * We want to prevent merge between freepages on isolate * pageblock and normal pageblock. Without this, pageblock
@@ -757,7 +757,7 @@ continue_merging: is_migrate_isolate(buddy_mt))) goto done_merging; } - max_order++; + max_order = order +1 ; goto continue_merging; }
net/bluetooth/cmtp/cmtp.h +1 -1
@@ -26,7 +26,7 @@#include <linux/types.h> #include <net/bluetooth/bluetooth.h> -#define BTNAMSIZ 18 +#define BTNAMSIZ 21/* CMTP ioctl defines */ #define CMTPCONNADD _IOW('C', 200, int)
net/bluetooth/hci_core.c +14 -0
@@ -1357,6 +1357,12 @@ int hci_inquiry(void __user *arg) goto done; } +/* Restrict maximum inquiry length to 60 seconds */ +if (ir.length >60 ) { + err = -EINVAL ; + goto done; + } +hci_dev_lock (hdev);if (inquiry_cache_age (hdev) >INQUIRY_CACHE_AGE_MAX ||inquiry_cache_empty (hdev) || ir.flags &IREQ_CACHE_FLUSH ) {
@@ -1679,6 +1685,14 @@ int hci_dev_do_close(struct hci_dev *hdev)hci_req_cancel (hdev,ENODEV );hci_req_lock (hdev); +if (!hci_dev_test_flag (hdev,HCI_UNREGISTER ) && + !hci_dev_test_flag (hdev,HCI_USER_CHANNEL ) && +test_bit (HCI_UP , &hdev->flags)) { +/* Execute vendor specific shutdown routine */ +if (hdev->shutdown) + hdev->shutdown (hdev); + } +if (!test_and_clear_bit (HCI_UP , &hdev->flags)) {cancel_delayed_work_sync (&hdev->cmd_timer);hci_req_unlock (hdev);
net/bluetooth/hci_event.c +15 -0
@@ -3747,6 +3747,21 @@ static void hci_sync_conn_complete_evt(struct hci_dev *hdev,switch (ev->status) {case 0x00 : +/* The synchronous connection complete event should only be +* sent once per new connection. Receiving a successful +* complete event when the connection status is already +* BT_CONNECTED means that the device is misbehaving and sent +* multiple complete event packets for the same new connection. +* +* Registering the device more than once can corrupt kernel +* memory, hence upon detecting this invalid event, we report +* an error and ignore the packet. +*/ +if (conn->state ==BT_CONNECTED ) { +bt_dev_err (hdev,"Ignoring connect complete event for existing connection" ); + goto unlock; + } + conn->handle =__le16_to_cpu (ev->handle); conn->state =BT_CONNECTED ; conn->type = ev->link_type;
net/bluetooth/sco.c +6 -5
@@ -83,7 +83,6 @@ static void sco_sock_timeout(unsigned long arg) sk->sk_state_change (sk);bh_unlock_sock (sk); -sco_sock_kill (sk);sock_put (sk); }
@@ -175,7 +174,6 @@ static void sco_conn_del(struct hci_conn *hcon, int err)sco_sock_clear_timer (sk);sco_chan_del (sk, err);bh_unlock_sock (sk); -sco_sock_kill (sk);sock_put (sk); }
@@ -392,8 +390,7 @@ static void sco_sock_cleanup_listen(struct sock *parent)*/ static void sco_sock_kill (struct sock *sk) { -if (!sock_flag (sk,SOCK_ZAPPED ) || sk->sk_socket || -sock_flag (sk,SOCK_DEAD )) +if (!sock_flag (sk,SOCK_ZAPPED ) || sk->sk_socket)return ;BT_DBG ("sk %p state %d" , sk, sk->sk_state);
@@ -445,7 +442,6 @@ static void sco_sock_close(struct sock *sk)lock_sock (sk);__sco_sock_close (sk);release_sock (sk); -sco_sock_kill (sk); }static void sco_sock_init (struct sock *sk,struct sock *parent)
@@ -763,6 +759,11 @@ static void sco_conn_defer_accept(struct hci_conn *conn, u16 setting) cp.max_latency =cpu_to_le16 (0xffff ); cp.retrans_effort =0xff ;break ; +default : +/* use CVSD settings as fallback */ + cp.max_latency =cpu_to_le16 (0xffff ); + cp.retrans_effort =0xff ; +break ; } hci_send_cmd(hdev, HCI_OP_ACCEPT_SYNC_CONN_REQ,
net/caif/chnl_net.c +3 -16
@@ -56,20 +56,6 @@ struct chnl_net {enum caif_states state; }; -static void robust_list_del (struct list_head *delete_node) -{ -struct list_head *list_node; -struct list_head *n; -ASSERT_RTNL (); -list_for_each_safe (list_node, n, &chnl_net_list) { -if (list_node == delete_node) { -list_del (list_node); -return ; - } - } -WARN_ON (1 ); -} -static int chnl_recv_cb (struct cflayer *layr,struct cfpkt *pkt) {struct sk_buff *skb;
@@ -371,6 +357,7 @@ static int chnl_net_init(struct net_device *dev)ASSERT_RTNL (); priv =netdev_priv (dev);strncpy (priv->name, dev->name,sizeof (priv->name)); +INIT_LIST_HEAD (&priv->list_field);return 0 ; }
@@ -379,7 +366,7 @@ static void chnl_net_uninit(struct net_device *dev)struct chnl_net *priv;ASSERT_RTNL (); priv =netdev_priv (dev); -robust_list_del (&priv->list_field); +list_del_init (&priv->list_field); }static const struct net_device_ops netdev_ops = {
@@ -542,7 +529,7 @@ static void __exit chnl_exit_module(void)rtnl_lock ();list_for_each_safe (list_node, _tmp, &chnl_net_list) { dev = list_entry(list_node, struct chnl_net, list_field); -list_del (list_node); +list_del_init (list_node);delete_device (dev); }rtnl_unlock ();
net/dccp/minisocks.c +2 -0
@@ -92,6 +92,8 @@ struct sock *dccp_create_openreq_child(const struct sock *sk, newdp->dccps_role =DCCP_ROLE_SERVER ; newdp->dccps_hc_rx_ackvec =NULL ; newdp->dccps_service_list =NULL ; + newdp->dccps_hc_rx_ccid =NULL ; + newdp->dccps_hc_tx_ccid =NULL ; newdp->dccps_service = dreq->dreq_service; newdp->dccps_timestamp_echo = dreq->dreq_timestamp_echo; newdp->dccps_timestamp_time = dreq->dreq_timestamp_time;
net/ipv4/icmp.c +21 -2
@@ -460,6 +460,23 @@ static int icmp_multipath_hash_skb(const struct sk_buff *skb)#endif +/* +* The device used for looking up which routing table to use for sending an ICMP +* error is preferably the source whenever it is set, which should ensure the +* icmp error can be sent to the source host, else lookup using the routing +* table of the destination device, else use the main routing table (index 0). +*/ +static struct net_device *icmp_get_route_lookup_dev (struct sk_buff *skb) +{ +struct net_device *route_lookup_dev =NULL ; + +if (skb->dev) + route_lookup_dev = skb->dev; +else if (skb_dst (skb)) + route_lookup_dev =skb_dst (skb)->dev; +return route_lookup_dev; +} + static struct rtable *icmp_route_lookup(struct net *net, struct flowi4 *fl4, struct sk_buff *skb_in,
@@ -468,6 +485,7 @@ static struct rtable *icmp_route_lookup(struct net *net, int type, int code, struct icmp_bxm *param) { + struct net_device *route_lookup_dev;struct rtable *rt, *rt2;struct flowi4 fl4_dec;int err;
@@ -481,7 +499,8 @@ static struct rtable *icmp_route_lookup(struct net *net, fl4->flowi4_proto =IPPROTO_ICMP ; fl4->fl4_icmp_type = type; fl4->fl4_icmp_code = code; - fl4->flowi4_oif =l3mdev_master_ifindex (skb_dst (skb_in)->dev); + route_lookup_dev =icmp_get_route_lookup_dev (skb_in); + fl4->flowi4_oif =l3mdev_master_ifindex (route_lookup_dev);security_skb_classify_flow (skb_in,flowi4_to_flowi (fl4)); rt = __ip_route_output_key_hash(net, fl4,
@@ -506,7 +525,7 @@ static struct rtable *icmp_route_lookup(struct net *net,if (err) goto relookup_failed; -if (inet_addr_type_dev_table (net,skb_dst (skb_in)->dev, +if (inet_addr_type_dev_table (net, route_lookup_dev, fl4_dec.saddr) ==RTN_LOCAL ) { rt2 =__ip_route_output_key (net, &fl4_dec);if (IS_ERR (rt2))
net/ipv4/igmp.c +2 -0
@@ -2631,6 +2631,7 @@ int ip_check_mc_rcu(struct in_device *in_dev, __be32 mc_addr, __be32 src_addr, u rv =1 ; }else if (im) {if (src_addr) { +spin_lock_bh (&im->lock);for (psf = im->sources; psf; psf = psf->sf_next) {if (psf->sf_inaddr == src_addr)break ;
@@ -2641,6 +2642,7 @@ int ip_check_mc_rcu(struct in_device *in_dev, __be32 mc_addr, __be32 src_addr, u im->sfcount[MCAST_EXCLUDE ]; else rv = im->sfcount[MCAST_EXCLUDE ] !=0 ; +spin_unlock_bh (&im->lock); }else rv =1 ;/* unspecified source; tentatively allow */ }
net/ipv4/ip_output.c +3 -2
@@ -376,8 +376,9 @@ static void ip_copy_addrs(struct iphdr *iph, const struct flowi4 *fl4) { BUILD_BUG_ON(offsetof(typeof(*fl4), daddr) != offsetof(typeof(*fl4), saddr) + sizeof(fl4->saddr)); -memcpy (&iph->saddr, &fl4->saddr, -sizeof (fl4->saddr) +sizeof (fl4->daddr)); + + iph->saddr = fl4->saddr; + iph->daddr = fl4->daddr; }/* Note: skb->sk can be different from sk, in case of tunnels */
net/ipv4/route.c +30 -16
70 lines not on this page · raw message
net/ipv4/tcp_ipv4.c +3 -2
@@ -2033,6 +2033,7 @@ static void *tcp_get_idx(struct seq_file *seq, loff_t pos)static void *tcp_seek_last_pos (struct seq_file *seq) {struct tcp_iter_state *st = seq->private; +int bucket = st->bucket;int offset = st->offset;int orig_num = st->num;void *rc =NULL ;
@@ -2043,7 +2044,7 @@ static void *tcp_seek_last_pos(struct seq_file *seq)break ; st->state =TCP_SEQ_STATE_LISTENING ; rc =listening_get_next (seq,NULL ); -while (offset-- && rc) +while (offset-- && rc && bucket == st->bucket) rc =listening_get_next (seq, rc);if (rc)break ;
@@ -2054,7 +2055,7 @@ static void *tcp_seek_last_pos(struct seq_file *seq)if (st->bucket > tcp_hashinfo.ehash_mask)break ; rc =established_get_first (seq); -while (offset-- && rc) +while (offset-- && rc && bucket == st->bucket) rc =established_get_next (seq, rc); }
net/l2tp/l2tp_core.c +3 -1
@@ -990,8 +990,10 @@ static int l2tp_udp_recv_core(struct l2tp_tunnel *tunnel, struct sk_buff *skb, }if (tunnel->version ==L2TP_HDR_VER_3 && -l2tp_v3_ensure_opt_in_linear (session, skb, &ptr, &optr)) +l2tp_v3_ensure_opt_in_linear (session, skb, &ptr, &optr)) { +l2tp_session_dec_refcount (session); goto error; + }l2tp_recv_common (session, skb, ptr, optr, hdrflags, length, payload_hook);l2tp_session_dec_refcount (session);
net/netlabel/netlabel_cipso_v4.c +6 -6
@@ -163,8 +163,8 @@ static int netlbl_cipsov4_add_std(struct genl_info *info,return -ENOMEM ; doi_def->map.std =kzalloc (sizeof (*doi_def->map.std),GFP_KERNEL );if (doi_def->map.std ==NULL ) { - ret_val = -ENOMEM ; - goto add_std_failure; +kfree (doi_def); +return -ENOMEM ; } doi_def->type =CIPSO_V4_MAP_TRANS ;
@@ -205,14 +205,14 @@ static int netlbl_cipsov4_add_std(struct genl_info *info, } doi_def->map.std->lvl.local =kcalloc (doi_def->map.std->lvl.local_size,sizeof (u32), -GFP_KERNEL ); +GFP_KERNEL | __GFP_NOWARN);if (doi_def->map.std->lvl.local ==NULL ) { ret_val = -ENOMEM ; goto add_std_failure; } doi_def->map.std->lvl.cipso =kcalloc (doi_def->map.std->lvl.cipso_size,sizeof (u32), -GFP_KERNEL ); +GFP_KERNEL | __GFP_NOWARN);if (doi_def->map.std->lvl.cipso ==NULL ) { ret_val = -ENOMEM ; goto add_std_failure;
@@ -279,7 +279,7 @@ static int netlbl_cipsov4_add_std(struct genl_info *info, doi_def->map.std->cat.local =kcalloc ( doi_def->map.std->cat.local_size,sizeof (u32), -GFP_KERNEL ); +GFP_KERNEL | __GFP_NOWARN);if (doi_def->map.std->cat.local ==NULL ) { ret_val = -ENOMEM ; goto add_std_failure;
@@ -287,7 +287,7 @@ static int netlbl_cipsov4_add_std(struct genl_info *info, doi_def->map.std->cat.cipso =kcalloc ( doi_def->map.std->cat.cipso_size,sizeof (u32), -GFP_KERNEL ); +GFP_KERNEL | __GFP_NOWARN);if (doi_def->map.std->cat.cipso ==NULL ) { ret_val = -ENOMEM ; goto add_std_failure;
net/netlink/af_netlink.c +3 -1
@@ -2405,13 +2405,15 @@ int nlmsg_notify(struct sock *sk, struct sk_buff *skb, u32 portid,/* errors reported via destination sk->sk_err, but propagate * delivery errors if NETLINK_BROADCAST_ERROR flag is set */ err =nlmsg_multicast (sk, skb, exclude_portid, group, flags); +if (err == -ESRCH ) + err =0 ; }if (report) {int err2; err2 =nlmsg_unicast (sk, skb, portid); -if (!err || err == -ESRCH ) +if (!err) err = err2; }
net/sunrpc/auth_gss/svcauth_gss.c +1 -1
@@ -1845,7 +1845,7 @@ gss_svc_init_net(struct net *net) goto out2;return 0 ; out2: -destroy_use_gss_proxy_proc_entry (net); +rsi_cache_destroy_net (net); out1:rsc_cache_destroy_net (net);return rv;
net/tipc/socket.c +1 -1
@@ -1757,7 +1757,7 @@ static int tipc_backlog_rcv(struct sock *sk, struct sk_buff *skb)static void tipc_sk_enqueue (struct sk_buff_head *inputq,struct sock *sk,u32 dport,struct sk_buff_head *xmitq) { -unsigned long time_limit = jiffies +2 ; +unsigned long time_limit = jiffies +usecs_to_jiffies (20000 );struct sk_buff *skb;unsigned int lim;atomic_t *dcnt;
net/unix/af_unix.c +1 -1
@@ -2700,7 +2700,7 @@ static unsigned int unix_dgram_poll(struct file *file, struct socket *sock, other =unix_peer (sk);if (other &&unix_peer (other) != sk && -unix_recvq_full (other) && +unix_recvq_full_lockless (other) &&unix_dgram_peer_wake_me (sk, other)) writable =0 ;
security/smack/smack_access.c +8 -9
@@ -90,23 +90,22 @@ int log_policy = SMACK_AUDIT_DENIED;int smk_access_entry (char *subject_label,char *object_label,struct list_head *rule_list) { -int may = -ENOENT ;struct smack_rule *srp;list_for_each_entry_rcu (srp, rule_list, list) {if (srp->smk_object->smk_known == object_label && srp->smk_subject->smk_known == subject_label) { - may = srp->smk_access; -break ; +int may = srp->smk_access; +/* +* MAY_WRITE implies MAY_LOCK. +*/ +if ((may &MAY_WRITE ) ==MAY_WRITE ) + may |=MAY_LOCK ; +return may; } } -/* -* MAY_WRITE implies MAY_LOCK. -*/ -if ((may &MAY_WRITE ) ==MAY_WRITE ) - may |=MAY_LOCK ; -return may; +return -ENOENT ; }/**
sound/core/pcm_lib.c +1 -1
@@ -1830,7 +1830,7 @@ static int snd_pcm_lib_ioctl_fifo_size(struct snd_pcm_substream *substream, channels =params_channels (params); frame_size =snd_pcm_format_size (format, channels);if (frame_size >0 ) - params->fifo_size /= (unsigned )frame_size; + params->fifo_size /= frame_size; }return 0 ; }