Linux 4.4.229
Sasha Levin
maintainer-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
I'm announcing the release of the 4.4.229 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,
Sasha
Makefile | 2 +- arch/arm/mach-imx/pm-imx5.c | 6 +- arch/arm64/kernel/perf_regs.c | 25 +++++- arch/openrisc/kernel/entry.S | 4 +- arch/powerpc/include/asm/kprobes.h | 3 +- arch/powerpc/kernel/machine_kexec.c | 8 +- arch/powerpc/platforms/ps3/mm.c | 22 +++--- arch/powerpc/platforms/pseries/ras.c | 5 +- arch/s390/include/asm/syscall.h | 12 ++- arch/sparc/kernel/ptrace_32.c | 9 ++- arch/sparc/kernel/ptrace_64.c | 13 +--- arch/x86/kernel/kprobes/core.c | 12 ++- arch/x86/kvm/x86.c | 4 +- crypto/algboss.c | 2 - drivers/acpi/sysfs.c | 4 +- drivers/ata/libata-core.c | 11 ++- drivers/base/platform.c | 2 + drivers/block/ps3disk.c | 1 - drivers/clk/qcom/gcc-msm8916.c | 8 +- drivers/clk/samsung/clk-exynos5433.c | 3 +- drivers/clk/sunxi/clk-sunxi.c | 2 +- drivers/clk/ti/composite.c | 1 + drivers/firmware/efi/esrt.c | 2 +- drivers/gpu/drm/drm_dp_mst_topology.c | 58 ++++++++------ drivers/gpu/drm/drm_encoder_slave.c | 5 +- drivers/gpu/drm/qxl/qxl_kms.c | 2 +- drivers/gpu/drm/radeon/ni_dpm.c | 2 +- drivers/i2c/busses/i2c-piix4.c | 3 +- drivers/i2c/busses/i2c-pxa.c | 13 ++-- drivers/infiniband/core/mad.c | 1 + drivers/md/bcache/btree.c | 8 +- drivers/mfd/wm8994-core.c | 1 + drivers/net/ethernet/atheros/alx/main.c | 9 ++- drivers/net/ethernet/broadcom/tg3.c | 4 +- drivers/net/ethernet/intel/e1000e/netdev.c | 14 +++- drivers/net/hamradio/yam.c | 1 + drivers/net/usb/ax88179_178a.c | 11 +-- drivers/pci/pcie/aspm.c | 10 --- drivers/pci/quirks.c | 1 + drivers/power/smb347-charger.c | 1 + drivers/s390/cio/qdio.h | 1 - drivers/s390/cio/qdio_setup.c | 1 - drivers/s390/cio/qdio_thinint.c | 14 ++-- drivers/scsi/arm/acornscsi.c | 4 +- drivers/scsi/ibmvscsi/ibmvscsi.c | 2 + drivers/scsi/iscsi_boot_sysfs.c | 2 +- drivers/scsi/lpfc/lpfc_els.c | 2 + drivers/scsi/mpt3sas/mpt3sas_base.c | 2 + drivers/scsi/qla2xxx/tcm_qla2xxx.c | 2 + drivers/scsi/scsi_devinfo.c | 5 +- drivers/scsi/sr.c | 6 +- drivers/staging/sm750fb/sm750.c | 1 + drivers/tty/hvc/hvc_console.c | 16 +++- drivers/tty/n_gsm.c | 26 ++++--- drivers/tty/serial/amba-pl011.c | 1 + drivers/usb/class/cdc-acm.c | 2 + drivers/usb/class/usblp.c | 5 +- drivers/usb/core/quirks.c | 3 +- drivers/usb/dwc2/core_intr.c | 7 +- drivers/usb/dwc2/gadget.c | 6 -- drivers/usb/dwc2/platform.c | 11 +++ drivers/usb/gadget/udc/lpc32xx_udc.c | 11 +-- drivers/usb/gadget/udc/m66592-udc.c | 2 +- drivers/usb/gadget/udc/mv_udc_core.c | 3 +- drivers/usb/gadget/udc/s3c2410_udc.c | 4 - drivers/usb/host/ehci-exynos.c | 5 +- drivers/usb/host/ehci-mxc.c | 2 + drivers/usb/host/ehci-pci.c | 7 ++ drivers/usb/host/ehci-platform.c | 5 ++ drivers/usb/host/ohci-platform.c | 5 ++ drivers/usb/host/ohci-sm501.c | 1 + drivers/usb/host/xhci-plat.c | 11 ++- drivers/usb/host/xhci.c | 4 + drivers/usb/host/xhci.h | 2 +- drivers/vfio/pci/vfio_pci_config.c | 14 +++- drivers/watchdog/da9062_wdt.c | 5 -- fs/block_dev.c | 12 +-- fs/cifs/smb2ops.c | 12 +++ fs/dlm/dlm_internal.h | 1 - fs/ext4/extents.c | 2 +- fs/gfs2/ops_fstype.c | 2 +- fs/nfs/direct.c | 13 +++- fs/nfs/file.c | 1 + fs/nfs/flexfilelayout/flexfilelayout.c | 11 ++- fs/nfsd/nfs4callback.c | 2 + fs/ocfs2/ocfs2_fs.h | 4 +- fs/ocfs2/suballoc.c | 9 ++- include/linux/bitops.h | 2 +- include/linux/elfnote.h | 2 +- include/linux/genhd.h | 2 + include/linux/kprobes.h | 4 + include/linux/libata.h | 3 + include/linux/pci_ids.h | 2 + include/net/sctp/constants.h | 8 +- include/net/sock.h | 1 - kernel/kprobes.c | 27 ++++++- kernel/sched/core.c | 3 +- kernel/trace/blktrace.c | 13 ++++ kernel/trace/trace_events_trigger.c | 21 ++++- lib/zlib_inflate/inffast.c | 91 +++++++++------------- mm/slab_common.c | 2 +- net/core/dev.c | 49 ++++++------ net/core/sock.c | 2 + net/ipv4/fib_semantics.c | 2 +- net/ipv4/ip_tunnel.c | 14 ++-- net/ipv4/tcp_cubic.c | 2 + net/ipv4/tcp_input.c | 12 ++- net/ipv6/ip6_gre.c | 9 ++- net/ipv6/mcast.c | 1 + net/l2tp/l2tp_core.c | 7 +- net/netfilter/ipset/ip_set_core.c | 2 + net/sched/sch_fq.c | 32 ++++---- net/sched/sch_generic.c | 1 + net/sctp/associola.c | 5 +- net/sctp/bind_addr.c | 1 + net/sctp/protocol.c | 1 + net/sunrpc/addr.c | 4 +- net/sunrpc/rpc_pipe.c | 1 + net/sunrpc/xdr.c | 4 + scripts/Kbuild.include | 11 +-- scripts/mksysmap | 2 +- security/selinux/ss/services.c | 4 + sound/isa/wavefront/wavefront_synth.c | 8 +- sound/soc/fsl/fsl_asrc_dma.c | 1 + sound/usb/card.h | 4 + sound/usb/endpoint.c | 43 ++++++++-- sound/usb/endpoint.h | 1 + sound/usb/mixer.c | 41 +++++++--- sound/usb/mixer.h | 15 +++- sound/usb/mixer_quirks.c | 11 +-- sound/usb/mixer_scarlett.c | 6 +- sound/usb/pcm.c | 2 + sound/usb/quirks.c | 1 + tools/perf/builtin-report.c | 3 +- .../networking/timestamping/timestamping.c | 10 ++- 135 files changed, 698 insertions(+), 369 deletions(-)
Adam Honse (1):
i2c: piix4: Detect secondary SMBus controller on AMD AM4 chipsets
Ahmed S. Darwish (2):
block: nr_sects_write(): Disable preemption on seqcount write
net: core: device_rename: Use rwsem instead of a seqcount
Al Cooper (1):
xhci: Fix enumeration issue when setting max packet size for FS devices.
Al Viro (2):
sparc64: fix misuses of access_process_vm() in genregs32_[sg]et() fix a braino in "sparc32: fix register window handling in genregs32_[gs]et()"
Alex Williamson (1):
vfio-pci: Mask cap zero
Alexander Tsoy (1):
ALSA: usb-audio: Improve frames size computation
Arnd Bergmann (2):
dlm: remove BUG() before panic() include/linux/bitops.h: avoid clang shift-count-overflow warnings
Bob Peterson (1):
gfs2: Allow lock_nolock mount to specify jid=X
Bryan O'Donoghue (1):
clk: qcom: msm8916: Fix the address location of pll->config_reg
Chen Yu (1):
e1000e: Do not wake up the system via WOL if device wakeup is disabled
Christophe JAILLET (1):
scsi: acornscsi: Fix an error handling path in acornscsi_probe()
Chuck Lever (1):
SUNRPC: Properly set the @subbuf parameter of xdr_buf_subsegment()
Chuhong Yuan (1):
USB: ohci-sm501: Add missed iounmap() in remove
Colin Ian King (1):
usb: gadget: lpc32xx_udc: don't dereference ep pointer before null check
Dan Carpenter (2):
ALSA: isa/wavefront: prevent out of bounds write in ioctl
usb: gadget: udc: Potential Oops in error handling code
Daniel Mack (1):
ALSA: usb-audio: allow clock source validity interrupts
David Christensen (1):
tg3: driver sleeps indefinitely when EEH errors exceed eeh_max_freezes
Denis Efremov (1):
drm/radeon: fix fb_div check in ni_init_smc_spll_table()
Dmitry Osipenko (1):
power: supply: smb347-charger: IRQSTAT_D is volatile
Dmitry V. Levin (1):
s390: fix syscall_get_error for compat processes
Dongdong Liu (2):
PCI: Disable MSI for HiSilicon Hip06/Hip07 Root Ports
PCI: Disable MSI for HiSilicon Hip06/Hip07 only in Root Port mode
Emmanuel Nicolet (1):
ps3disk: use the default segment boundary
Eric Biggers (1):
crypto: algboss - don't wait during notifier callback
Eric Dumazet (1):
tcp: grow window for OOO packets only for SACK flows
Fabrice Gasnier (1):
usb: dwc2: gadget: move gadget resume after the core is in L0 state
Fan Guo (1):
RDMA/mad: Fix possible memory leak in ib_mad_post_receive_mads()
Fedor Tokarev (1):
net: sunrpc: Fix off-by-one issues in 'rpc_ntop6'
Gaurav Singh (1):
perf report: Fix NULL pointer dereference in hists__fprintf_nr_sample_events()
Geoff Levand (1):
powerpc/ps3: Fix kexec shutdown hang
Gregory CLEMENT (3):
tty: n_gsm: Fix SOF skipping
tty: n_gsm: Fix waking up upper tty layer when room available
tty: n_gsm: Fix bogus i++ in gsm_data_kick
Huacai Chen (1):
drm/qxl: Use correct notify port address when creating cursor ring
Jann Horn (1):
lib/zlib: remove outdated and incorrect pre-increment optimization
Jason Yan (1):
block: Fix use-after-free in blkdev_get()
Jeffle Xu (1):
ext4: fix partial cluster initialization when splitting extent
Jeremy Kerr (1):
net: usb: ax88179_178a: fix packet alignment padding
Jiping Ma (1):
arm64: perf: Report the PC value in REGS_ABI_32 mode
Jiri Olsa (1):
kretprobe: Prevent triggering kretprobe from within kprobe_flush_task
Joakim Tjernlund (1):
cdc-acm: Add DISABLE_ECHO quirk for Microchip/SMSC chip
John Stultz (1):
serial: amba-pl011: Make sure we initialize the port.lock spinlock
Julian Scheel (1):
ALSA: usb-audio: uac1: Invalidate ctl on interrupt
Julian Wiedmann (1):
s390/qdio: put thinint indicator after early error
Junxiao Bi (3):
ocfs2: load global_inode_alloc
ocfs2: fix value of OCFS2_INVALID_SLOT
ocfs2: fix panic on nfs server over ocfs2
Juri Lelli (1):
sched/core: Fix PI boosting between RT and DEADLINE tasks
Kai-Heng Feng (3):
PCI/ASPM: Allow ASPM on links to PCIe-to-PCI/PCI-X Bridges
libata: Use per port sync for detach
xhci: Poll for U0 after disabling USB2 LPM
Kuppuswamy Sathyanarayanan (1):
drivers: base: Fix NULL pointer exception in __platform_driver_probe() if a driver developer is foolish
Longfang Liu (1):
USB: ehci: reopen solution for Synopsys HC bug
Luis Chamberlain (1):
blktrace: break out of blktrace setup on concurrent calls
Lyude Paul (2):
drm/dp_mst: Reformat drm_dp_check_act_status() a bit drm/dp_mst: Increase ACT retry timeout to 3s
Marcelo Ricardo Leitner (1):
sctp: Don't advertise IPv4 addresses if ipv6only is set on the socket
Marek Szyprowski (2):
mfd: wm8994: Fix driver operation if loaded as modules
clk: samsung: exynos5433: Add IGNORE_UNUSED flag to sclk_i2s1
Martin Wilck (1):
scsi: scsi_devinfo: handle non-terminated strings
Masahiro Yamada (1):
kbuild: improve cc-option to clean up all temporary files
Masami Hiramatsu (3):
kprobes: Fix to protect kick_kprobe_optimizer() by kprobe_mutex x86/kprobes: Avoid kretprobe recursion bug
tracing: Fix event trigger to accept redundant spaces
Matej Dujava (1):
staging: sm750fb: add missing case while setting FB_VISUAL
Mathias Nyman (1):
xhci: Fix incorrect EP_STATE_MASK
Minas Harutyunyan (1):
usb: dwc2: Postponed gadget registration to the udc class driver
Nathan Chancellor (2):
USB: gadget: udc: s3c2410_udc: Remove pointless NULL check in s3c2410_udc_nuke
ACPI: sysfs: Fix pm_profile_attr type
Naveen N. Rao (1):
powerpc/kprobes: Fixes for kprobe_lookup_name() on BE
Neal Cardwell (1):
tcp_cubic: fix spurious HYSTART_DELAY exit upon drop in min RTT
Nicholas Piggin (1):
powerpc/pseries/ras: Fix FWNMI_VALID off by one
Nick Desaulniers (1):
elfnote: mark all .note sections SHF_ALLOC
Olga Kornievskaia (1):
NFSv4 fix CLOSE not waiting for direct IO compeletion
Oliver Neukum (1):
usblp: poison URBs upon disconnect
Pingfan Liu (1):
powerpc/crashkernel: Take "mem=" option into account
Qais Yousef (3):
usb/ohci-platform: Fix a warning when hibernating usb/xhci-plat: Set PM runtime as active on resume usb/ehci-platform: Set PM runtime as active on resume
Qian Cai (1):
vfio/pci: fix memory leaks in alloc_perm_bits()
Qiushi Wu (3):
usb: gadget: fix potential double-free in m66592_probe.
scsi: iscsi: Fix reference count leak in iscsi_boot_create_kobj efi/esrt: Fix reference count leak in esre_create_sysfs_entry.
Raghavendra Rao Ananta (1):
tty: hvc: Fix data abort due to race in hvc_open
Ridge Kennedy (1):
l2tp: Allow duplicate session creation with UDP
Rikard Falkeborn (1):
clk: sunxi: Fix incorrect usage of round_down()
Russell King (3):
i2c: pxa: clear all master action bits in i2c_pxa_stop_message()
i2c: pxa: fix i2c_pxa_scream_blue_murder() debug output
netfilter: ipset: fix unaligned atomic access
Sasha Levin (1):
Linux 4.4.229
Simon Arlott (1):
scsi: sr: Fix sr_probe() missing deallocate of device minor
Stafford Horne (1):
openrisc: Fix issue with argument clobbering for clone/fork
Stefan Riedmueller (1):
watchdog: da9062: No need to ping manually before setting timeout
Suganath Prabu S (1):
scsi: mpt3sas: Fix double free warnings
Taehee Yoo (3):
ip_tunnel: fix use-after-free in ip_tunnel_lookup()
ip6_gre: fix use-after-free in ip6gre_tunnel_lookup()
net: core: reduce recursion limit value
Takashi Iwai (3):
ALSA: usb-audio: Clean up mixer element list traverse
ALSA: usb-audio: Fix OOB access of mixer element list
ALSA: usb-audio: Fix invalid NULL check in snd_emuusb_set_samplerate()
Tang Bin (2):
USB: host: ehci-mxc: Add error handling in ehci_mxc_drv_probe()
usb: host: ehci-exynos: Fix error check in exynos_ehci_probe()
Tariq Toukan (1):
net: Do not clear the sock TX queue in sk_set_socket()
Tero Kristo (1):
clk: ti: composite: fix memory leak
Thomas Gleixner (1):
sched/rt, net: Use CONFIG_PREEMPTION.patch
Toke Høiland-Jørgensen (1):
net: Revert "pkt_sched: fq: use proper locking in fq_dump_stats()"
Tom Rix (1):
selinux: fix double free
Tomasz Meresiński (1):
usb: add USB_QUIRK_DELAY_INIT for Logitech C922
Trond Myklebust (1):
pNFS/flexfiles: Fix list corruption if the mirror count changes
Tyrel Datwyler (1):
scsi: ibmvscsi: Don't send host info in adapter info MAD after LPM
Valentin Longchamp (1):
net: sched: export __netdev_watchdog_up()
Vasily Averin (1):
sunrpc: fixed rollback in rpc_gssd_dummy_populate()
Viacheslav Dubeyko (1):
scsi: qla2xxx: Fix issue with adapter's stopping state
Waiman Long (1):
mm/slab: use memzero_explicit() in kzfree()
Wang Hai (2):
yam: fix possible memory leak in yam_init_driver
mld: fix memory leak in ipv6_mc_destroy_dev()
Wolfram Sang (1):
drm: encoder_slave: fix refcouting error for modules
Xiaoyao Li (1):
KVM: X86: Fix MSR range of APIC registers in X2APIC mode
Xiyu Yang (3):
scsi: lpfc: Fix lpfc_nodelist leak when processing unsolicited event
nfsd: Fix svc_xprt refcnt leak when setup callback client failed
ASoC: fsl_asrc_dma: Fix dma_chan leak when config DMA channel failed
Yang Yingliang (1):
net: fix memleak in register_netdevice()
Yick W. Tse (1):
ALSA: usb-audio: add quirk for Denon DCD-1500RE
Zekun Shen (1):
net: alx: fix race condition in alx_remove
Zhang Xiaoxu (2):
cifs/smb3: Fix data inconsistent when punch hole cifs/smb3: Fix data inconsistent when zero file range
Zhiqiang Liu (1):
bcache: fix potential deadlock problem in btree_gc_coalesce
ashimida (1):
mksysmap: Fix the mismatch of '.L' symbols in System.map
guodeqing (1):
net: Fix the arp error in some cases
tannerlove (1):
selftests/net: in timestamping, strncpy needs to preserve null byte
yu kuai (1):
ARM: imx5: add missing put_device() call in imx_suspend_alloc_ocram()
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEE4n5dijQDou9mhzu83qZv95d3LNwFAl78lfYACgkQ3qZv95d3 LNwD/Q//aPtMqlRhrV+NNFXlPEzcaBAbfWKJrOJuJCxxeIkK7V+jBjm619Eaawd7 atj19bcU5vYVnh4mIXX2qTrxLcXfBdIOJS61vw7EDjUid65CGbWXWnjxbjr7FCCI Q3F7XxuTOCEM6hV0Zi/dkqnlOJy057DdILYmD2xVzgbZfmcW//5bmmhU9YmAIMQ4 243wcZ/sCv99I+nPIiOB5cfvofW8ZM/Mg2rGUkvPmj1kEWPv4KYplXFHN9unj8kv OyD4nLnuQwjMyimDkCik0Y9RJmdMPuVXhJVl+c//07LsiXBIHOJ2J1joVf/Fstlr EEjKHoPgDE0nEpvDuHyXb/DZJU8dws/vevQQENv+msvDDW43RvWTXgESJBVZSszE 0HceTWas9tVpBxEcjtaIDq6sQUCYycFLb5UDdF/gnbXUIZeN0+EVT0BApjJaakYl RFqV1NEa6f6UZ8f+48wK2qimIbLhaeqQ6SK4pAtABt10yjHcsVOdlROAdhKW5IWa DJJfAO0f6dNRU56mFy5dXjnsbSwkq42ka+lGGSgcwOpS+ujLc0mYTgjd2TXHgRyA sUZIavQTYoC+ed4e3A7IPUa8Nr9BHc6oyGL6RPgtnvVvfwx40DMNYWmof4/oJjs+ 7ivV13iIgC4yShkSt7nOOr/WYqyAEIvf074z1NRdo/Fege+ulM0= =M7CA
-----END PGP SIGNATURE-----
Sasha Levin
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 228 +SUBLEVEL = 229 EXTRAVERSION = NAME = Blurry Fish Butt
arch/arm/mach-imx/pm-imx5.c +4 -2
@@ -301,14 +301,14 @@ static int __init imx_suspend_alloc_ocram(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, size);if (!ocram_base) {pr_warn ("%s: unable to alloc ocram!\n" , __func__); ret = -ENOMEM ; - goto put_node; + goto put_device; } phys =gen_pool_virt_to_phys (ocram_pool, ocram_base);
@@ -318,6 +318,8 @@ static int __init imx_suspend_alloc_ocram(if (virt_out) *virt_out = virt; +put_device: +put_device (&pdev->dev); put_node:of_node_put (node);
arch/arm64/kernel/perf_regs.c +22 -3
@@ -13,15 +13,34 @@ u64 perf_reg_value(struct pt_regs *regs, int idx)return 0 ;/* -* Compat (i.e. 32 bit) mode: -* - PC has been set in the pt_regs struct in kernel_entry, -* - Handle SP and LR here. +* Our handling of compat tasks (PERF_SAMPLE_REGS_ABI_32) is weird, but +* we're stuck with it for ABI compatability reasons. +* +* For a 32-bit consumer inspecting a 32-bit task, then it will look at +* the first 16 registers (see arch/arm/include/uapi/asm/perf_regs.h). +* These correspond directly to a prefix of the registers saved in our +* 'struct pt_regs', with the exception of the PC, so we copy that down +* (x15 corresponds to SP_hyp in the architecture). +* +* So far, so good. +* +* The oddity arises when a 64-bit consumer looks at a 32-bit task and +* asks for registers beyond PERF_REG_ARM_MAX. In this case, we return +* SP_usr, LR_usr and PC in the positions where the AArch64 SP, LR and +* PC registers would normally live. The initial idea was to allow a +* 64-bit unwinder to unwind a 32-bit task and, although it's not clear +* how well that works in practice, somebody might be relying on it. +* +* At the time we make a sample, we don't know whether the consumer is +* 32-bit or 64-bit, so we have to cater for both possibilities. */ if (compat_user_mode (regs)) {if ((u32 )idx ==PERF_REG_ARM64_SP )return regs->compat_sp;if ((u32 )idx ==PERF_REG_ARM64_LR )return regs->compat_lr; +if (idx ==15 ) +return regs->pc; }if ((u32 )idx ==PERF_REG_ARM64_SP )
arch/openrisc/kernel/entry.S +2 -2
@@ -1092,13 +1092,13 @@ ENTRY(__sys_clone) l.movhi r29,hi(sys_clone) l.ori r29,r29,lo(sys_clone) l.j _fork_save_extra_regs_and_call - l.addi r7,r1,0 + l.nop ENTRY(__sys_fork) l.movhi r29,hi(sys_fork) l.ori r29,r29,lo(sys_fork) l.j _fork_save_extra_regs_and_call - l.addi r3,r1,0 + l.nop ENTRY(sys_rt_sigreturn) l.j _sys_rt_sigreturn
arch/powerpc/include/asm/kprobes.h +2 -1
@@ -29,6 +29,7 @@#include <linux/types.h> #include <linux/ptrace.h> #include <linux/percpu.h> +#include <linux/module.h> #include <asm/probes.h> #include <asm/code-patching.h>
@@ -61,7 +62,7 @@ typedef ppc_opcode_t kprobe_opcode_t;#define kprobe_lookup_name (name, addr) \ { \ char dot_name[MODULE_NAME_LEN + 1 + KSYM_NAME_LEN]; \ - char *modsym; \ + const char *modsym; \ bool dot_appended = false; \ if ((modsym = strchr(name, ':')) != NULL) { \ modsym++; \
arch/powerpc/kernel/machine_kexec.c +5 -3
@@ -113,11 +113,12 @@ void machine_kexec(struct kimage *image)void __init reserve_crashkernel (void ) { -unsigned long long crash_size, crash_base; +unsigned long long crash_size, crash_base, total_mem_sz;int ret; + total_mem_sz = memory_limit ? memory_limit :memblock_phys_mem_size ();/* use common parsing */ - ret =parse_crashkernel (boot_command_line,memblock_phys_mem_size (), + ret =parse_crashkernel (boot_command_line, total_mem_sz, &crash_size, &crash_base);if (ret ==0 && crash_size >0 ) { crashk_res.start = crash_base;
@@ -176,6 +177,7 @@ void __init reserve_crashkernel(void)/* Crash kernel trumps memory limit */ if (memory_limit && memory_limit <= crashk_res.end) { memory_limit = crashk_res.end +1 ; + total_mem_sz = memory_limit;printk ("Adjusted memory limit for crashkernel, now 0x%llx\n" , memory_limit); }
@@ -184,7 +186,7 @@ void __init reserve_crashkernel(void)"for crashkernel (System RAM: %ldMB)\n" , (unsigned long )(crash_size >>20 ), (unsigned long )(crashk_res.start >>20 ), - (unsigned long)(memblock_phys_mem_size() >> 20)); + (unsigned long)(total_mem_sz >> 20));if (!memblock_is_region_memory (crashk_res.start, crash_size) ||memblock_reserve (crashk_res.start, crash_size)) {
arch/powerpc/platforms/ps3/mm.c +12 -10
@@ -212,13 +212,14 @@ void ps3_mm_vas_destroy(void) {int result; -DBG ("%s:%d: map.vas_id = %llu\n" , __func__, __LINE__, map.vas_id); -if (map.vas_id) { result =lv1_select_virtual_address_space (0 ); -BUG_ON (result); - result =lv1_destruct_virtual_address_space (map.vas_id); -BUG_ON (result); + result +=lv1_destruct_virtual_address_space (map.vas_id); + +if (result) { +lv1_panic (0 ); + } + map.vas_id =0 ; } }
@@ -316,19 +317,20 @@ static void ps3_mm_region_destroy(struct mem_region *r)int result;if (!r->destroy) { -pr_info ("%s:%d: Not destroying high region: %llxh %llxh\n" , - __func__, __LINE__, r->base, r->size);return ; } -DBG ("%s:%d: r->base = %llxh\n" , __func__, __LINE__, r->base); -if (r->base) { result =lv1_release_memory (r->base); -BUG_ON (result); + +if (result) { +lv1_panic (0 ); + } + r->size = r->base = r->offset =0 ; map.total = map.rm.size; } +ps3_mm_set_repository_highmem (NULL ); }
arch/powerpc/platforms/pseries/ras.c +3 -2
@@ -265,10 +265,11 @@ static irqreturn_t ras_error_interrupt(int irq, void *dev_id)/* * Some versions of FWNMI place the buffer inside the 4kB page starting at * 0x7000. Other versions place it inside the rtas buffer. We check both. +* Minimum size of the buffer is 16 bytes. */ #define VALID_FWNMI_BUFFER (A ) \ - ((((A) >= 0x7000) && ((A) < 0x7ff0)) || \ - (((A) >= rtas.base) && ((A) < (rtas.base + rtas.size - 16)))) + ((((A) >= 0x7000) && ((A) <= 0x8000 - 16)) || \ + (((A) >= rtas.base) && ((A) <= (rtas.base + rtas.size - 16))))/* * Get the error information for errors coming through the
arch/s390/include/asm/syscall.h +11 -1
@@ -41,7 +41,17 @@ static inline void syscall_rollback(struct task_struct *task,static inline long syscall_get_error (struct task_struct *task,struct pt_regs *regs) { -return IS_ERR_VALUE (regs->gprs[2 ]) ? regs->gprs[2 ] :0 ; +unsigned long error = regs->gprs[2 ]; +#ifdef CONFIG_COMPAT +if (test_tsk_thread_flag (task,TIF_31BIT )) { +/* +* Sign-extend the value so (int)-EFOO becomes (long)-EFOO +* and will match correctly in comparisons. +*/ + error = (long )(int )error; + } +#endif +return IS_ERR_VALUE (error) ? error :0 ; } static inline long syscall_get_return_value(struct task_struct *task,
arch/sparc/kernel/ptrace_32.c +7 -2
@@ -167,12 +167,17 @@ static int genregs32_set(struct task_struct *target,if (ret || !count)return ret; ret =user_regset_copyin (&pos, &count, &kbuf, &ubuf, - ®s->y, + ®s->npc,34 *sizeof (u32),35 *sizeof (u32));if (ret || !count)return ret; + ret =user_regset_copyin (&pos, &count, &kbuf, &ubuf, + ®s->y, +35 *sizeof (u32),36 *sizeof (u32)); +if (ret || !count) +return ret;return user_regset_copyin_ignore (&pos, &count, &kbuf, &ubuf, -35 *sizeof (u32),38 *sizeof (u32)); +36 *sizeof (u32),38 *sizeof (u32)); } static int fpregs32_get(struct task_struct *target,
arch/sparc/kernel/ptrace_64.c +2 -11
@@ -534,13 +534,8 @@ static int genregs32_get(struct task_struct *target, ®, sizeof(reg), 0) != sizeof(reg))return -EFAULT ; -if (access_process_vm (target, - (unsigned long ) u, - ®,sizeof (reg),1 ) - !=sizeof (reg)) +if (put_user (reg, u++))return -EFAULT ; - pos++; - u++; } } }
@@ -639,11 +634,7 @@ static int genregs32_set(struct task_struct *target, } }else {for (; count >0 && pos <32 ; count--) { -if (access_process_vm (target, - (unsigned long ) - u, - ®,sizeof (reg),0 ) - !=sizeof (reg)) +if (get_user (reg, u++))return -EFAULT ; if (access_process_vm(target, (unsigned long)
arch/x86/kernel/kprobes/core.c +10 -2
@@ -750,6 +750,13 @@ __visible __used void *trampoline_handler(struct pt_regs *regs)void *frame_pointer;bool skipped = false; +/* +* Set a dummy kprobe for avoiding kretprobe recursion. +* Since kretprobe never run in kprobe handler, kprobe must not +* be running at this point. +*/ +kprobe_busy_begin (); +INIT_HLIST_HEAD (&empty_rp);kretprobe_hash_lock (current, &head, &flags);/* fixup registers */
@@ -825,10 +832,9 @@ __visible __used void *trampoline_handler(struct pt_regs *regs) orig_ret_address = (unsigned long )ri->ret_addr;if (ri->rp && ri->rp->handler) {__this_cpu_write (current_kprobe, &ri->rp->kp); -get_kprobe_ctlblk ()->kprobe_status =KPROBE_HIT_ACTIVE ; ri->ret_addr = correct_ret_addr; ri->rp->handler (ri, regs); -__this_cpu_write (current_kprobe,NULL ); +__this_cpu_write (current_kprobe, &kprobe_busy); }recycle_rp_inst (ri, &empty_rp);
@@ -844,6 +850,8 @@ __visible __used void *trampoline_handler(struct pt_regs *regs)kretprobe_hash_unlock (current, &flags); +kprobe_busy_end (); +hlist_for_each_entry_safe (ri, tmp, &empty_rp, hlist) {hlist_del (&ri->hlist);kfree (ri);
arch/x86/kvm/x86.c +2 -2
@@ -2162,7 +2162,7 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)return kvm_mtrr_set_msr (vcpu, msr, data);case MSR_IA32_APICBASE :return kvm_set_apic_base (vcpu, msr_info); - case APIC_BASE_MSR ... APIC_BASE_MSR + 0x3ff: + case APIC_BASE_MSR ... APIC_BASE_MSR + 0xff:return kvm_x2apic_msr_write (vcpu, msr, data);case MSR_IA32_TSCDEADLINE :kvm_set_lapic_tscdeadline_msr (vcpu, data);
@@ -2432,7 +2432,7 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)case MSR_IA32_APICBASE : msr_info->data =kvm_get_apic_base (vcpu);break ; - case APIC_BASE_MSR ... APIC_BASE_MSR + 0x3ff: + case APIC_BASE_MSR ... APIC_BASE_MSR + 0xff:return kvm_x2apic_msr_read (vcpu, msr_info->index, &msr_info->data);break ;case MSR_IA32_TSCDEADLINE :
crypto/algboss.c +0 -2
@@ -194,8 +194,6 @@ static int cryptomgr_schedule_probe(struct crypto_larval *larval)if (IS_ERR (thread)) goto err_put_larval; -wait_for_completion_interruptible (&larval->completion); -return NOTIFY_STOP ; err_put_larval:
drivers/acpi/sysfs.c +2 -2
@@ -776,13 +776,13 @@ static void __exit interrupt_stats_exit(void) }static ssize_t -acpi_show_profile (struct device *dev,struct device_attribute *attr, +acpi_show_profile (struct kobject *kobj,struct kobj_attribute *attr,char *buf) {return sprintf (buf,"%d\n" , acpi_gbl_FADT.preferred_profile); } -static const struct device_attribute pm_profile_attr = +static const struct kobj_attribute pm_profile_attr =__ATTR (pm_profile,S_IRUGO , acpi_show_profile,NULL ); static ssize_t hotplug_enabled_show(struct kobject *kobj,
drivers/ata/libata-core.c +5 -6
@@ -56,7 +56,6 @@#include <linux/workqueue.h> #include <linux/scatterlist.h> #include <linux/io.h> -#include <linux/async.h> #include <linux/log2.h> #include <linux/slab.h> #include <linux/glob.h>
@@ -6222,7 +6221,7 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)/* perform each probe asynchronously */ for (i =0 ; i < host->n_ports; i++) {struct ata_port *ap = host->ports[i]; -async_schedule (async_port_probe, ap); + ap->cookie =async_schedule (async_port_probe, ap); }return 0 ;
@@ -6355,11 +6354,11 @@ void ata_host_detach(struct ata_host *host) {int i; -/* Ensure ata_port probe has completed */ -async_synchronize_full (); - -for (i =0 ; i < host->n_ports; i++) +for (i =0 ; i < host->n_ports; i++) { +/* Ensure ata_port probe has completed */ +async_synchronize_cookie (host->ports[i]->cookie +1 );ata_port_detach (host->ports[i]); + }/* the host is dead now, dissociate ACPI */ ata_acpi_dissociate (host);
drivers/base/platform.c +2 -0
@@ -638,6 +638,8 @@ int __init_or_module __platform_driver_probe(struct platform_driver *drv,/* temporary section violation during probe() */ drv->probe = probe; retval = code =__platform_driver_register (drv, module); +if (retval) +return retval;/* * Fixup that section violation, being paranoid about code scanning
drivers/block/ps3disk.c +0 -1
@@ -464,7 +464,6 @@ static int ps3disk_probe(struct ps3_system_bus_device *_dev)blk_queue_bounce_limit (queue,BLK_BOUNCE_HIGH );blk_queue_max_hw_sectors (queue, dev->bounce_size >>9 ); -blk_queue_segment_boundary (queue,-1UL );blk_queue_dma_alignment (queue, dev->blk_size-1 );blk_queue_logical_block_size (queue, dev->blk_size);
drivers/clk/qcom/gcc-msm8916.c +4 -4
@@ -270,7 +270,7 @@ static struct clk_pll gpll0 = { .l_reg = 0x21004, .m_reg = 0x21008, .n_reg = 0x2100c, - .config_reg = 0x21014, + .config_reg = 0x21010, .mode_reg = 0x21000, .status_reg = 0x2101c, .status_bit = 17,
@@ -297,7 +297,7 @@ static struct clk_pll gpll1 = { .l_reg = 0x20004, .m_reg = 0x20008, .n_reg = 0x2000c, - .config_reg = 0x20014, + .config_reg = 0x20010, .mode_reg = 0x20000, .status_reg = 0x2001c, .status_bit = 17,
@@ -324,7 +324,7 @@ static struct clk_pll gpll2 = { .l_reg = 0x4a004, .m_reg = 0x4a008, .n_reg = 0x4a00c, - .config_reg = 0x4a014, + .config_reg = 0x4a010, .mode_reg = 0x4a000, .status_reg = 0x4a01c, .status_bit = 17,
@@ -351,7 +351,7 @@ static struct clk_pll bimc_pll = { .l_reg = 0x23004, .m_reg = 0x23008, .n_reg = 0x2300c, - .config_reg = 0x23014, + .config_reg = 0x23010, .mode_reg = 0x23000, .status_reg = 0x2301c, .status_bit = 17,
drivers/clk/samsung/clk-exynos5433.c +2 -1
@@ -1708,7 +1708,8 @@ static struct samsung_gate_clock peric_gate_clks[] __initdata = {GATE (CLK_SCLK_PCM1 ,"sclk_pcm1" ,"sclk_pcm1_peric" ,ENABLE_SCLK_PERIC ,7 ,CLK_SET_RATE_PARENT ,0 ),GATE (CLK_SCLK_I2S1 ,"sclk_i2s1" ,"sclk_i2s1_peric" , -ENABLE_SCLK_PERIC ,6 ,CLK_SET_RATE_PARENT ,0 ), +ENABLE_SCLK_PERIC ,6 , +CLK_SET_RATE_PARENT |CLK_IGNORE_UNUSED ,0 ),GATE (CLK_SCLK_SPI2 ,"sclk_spi2" ,"sclk_spi2_peric" ,ENABLE_SCLK_PERIC ,5 ,CLK_SET_RATE_PARENT ,0 ), GATE(CLK_SCLK_SPI1, "sclk_spi1", "sclk_spi1_peric", ENABLE_SCLK_PERIC,
drivers/clk/sunxi/clk-sunxi.c +1 -1
@@ -311,7 +311,7 @@ static void sun6i_a31_get_pll1_factors(u32 *freq, u32 parent_rate,* Round down the frequency to the closest multiple of either * 6 or 16 */ -u32 round_freq_6 =round_down (freq_mhz,6 ); +u32 round_freq_6 =rounddown (freq_mhz,6 );u32 round_freq_16 =round_down (freq_mhz,16 );if (round_freq_6 > round_freq_16)
drivers/clk/ti/composite.c +1 -0
@@ -228,6 +228,7 @@ cleanup:if (!cclk->comp_clks[i])continue ;list_del (&cclk->comp_clks[i]->link); +kfree (cclk->comp_clks[i]->parent_names);kfree (cclk->comp_clks[i]); }
drivers/firmware/efi/esrt.c +1 -1
@@ -182,7 +182,7 @@ static int esre_create_sysfs_entry(void *esre, int entry_num) rc =kobject_init_and_add (&entry->kobj, &esre1_ktype,NULL ,"%s" , name);if (rc) { -kfree (entry); +kobject_put (&entry->kobj);return rc; } }
drivers/gpu/drm/drm_dp_mst_topology.c +33 -25
78 lines not on this page · raw message
drivers/gpu/drm/drm_encoder_slave.c +3 -2
@@ -84,7 +84,7 @@ int drm_i2c_encoder_init(struct drm_device *dev, err = encoder_drv->encoder_init (client, dev, encoder);if (err) - goto fail_unregister; + goto fail_module_put;if (info->platform_data) encoder->slave_funcs->set_config(&encoder->base,
@@ -92,9 +92,10 @@ int drm_i2c_encoder_init(struct drm_device *dev,return 0 ; +fail_module_put: +module_put (module); fail_unregister:i2c_unregister_device (client); -module_put (module); fail:return err; }
drivers/gpu/drm/qxl/qxl_kms.c +1 -1
@@ -199,7 +199,7 @@ static int qxl_device_init(struct qxl_device *qdev, &(qdev->ram_header->cursor_ring_hdr),sizeof (struct qxl_command ),QXL_CURSOR_RING_SIZE , - qdev->io_base +QXL_IO_NOTIFY_CMD , + qdev->io_base +QXL_IO_NOTIFY_CURSOR , false, &qdev->cursor_event);
drivers/gpu/drm/radeon/ni_dpm.c +1 -1
@@ -2128,7 +2128,7 @@ static int ni_init_smc_spll_table(struct radeon_device *rdev)if (clk_s & ~(SMC_NISLANDS_SPLL_DIV_TABLE_CLKS_MASK >>SMC_NISLANDS_SPLL_DIV_TABLE_CLKS_SHIFT )) ret = -EINVAL ; -if (clk_s & ~(SMC_NISLANDS_SPLL_DIV_TABLE_CLKS_MASK >>SMC_NISLANDS_SPLL_DIV_TABLE_CLKS_SHIFT )) +if (fb_div & ~(SMC_NISLANDS_SPLL_DIV_TABLE_FBDIV_MASK >>SMC_NISLANDS_SPLL_DIV_TABLE_FBDIV_SHIFT )) ret = -EINVAL ;if (clk_v & ~(SMC_NISLANDS_SPLL_DIV_TABLE_CLKV_MASK >>SMC_NISLANDS_SPLL_DIV_TABLE_CLKV_SHIFT ))
drivers/i2c/busses/i2c-piix4.c +2 -1
@@ -647,7 +647,8 @@ static int piix4_probe(struct pci_dev *dev, const struct pci_device_id *id) }if (dev->vendor ==PCI_VENDOR_ID_AMD && - dev->device ==PCI_DEVICE_ID_AMD_HUDSON2_SMBUS ) { + (dev->device ==PCI_DEVICE_ID_AMD_HUDSON2_SMBUS || + dev->device ==PCI_DEVICE_ID_AMD_KERNCZ_SMBUS )) { retval =piix4_setup_sb800 (dev, id,1 ); }
drivers/i2c/busses/i2c-pxa.c +5 -8
@@ -297,11 +297,10 @@ static void i2c_pxa_scream_blue_murder(struct pxa_i2c *i2c, const char *why)dev_err (dev,"IBMR: %08x IDBR: %08x ICR: %08x ISR: %08x\n" ,readl (_IBMR (i2c)),readl (_IDBR (i2c)),readl (_ICR (i2c)),readl (_ISR (i2c))); -dev_dbg (dev,"log: " ); +dev_err (dev,"log:" );for (i =0 ; i < i2c->irqlogidx; i++) -pr_debug ("[%08x:%08x] " , i2c->isrlog[i], i2c->icrlog[i]); - - pr_debug("\n"); +pr_cont (" [%03x:%05x]" , i2c->isrlog[i], i2c->icrlog[i]); + pr_cont("\n"); }#else /* ifdef DEBUG */
@@ -691,11 +690,9 @@ static inline void i2c_pxa_stop_message(struct pxa_i2c *i2c) {u32 icr; -/* -* Clear the STOP and ACK flags -*/ +/* Clear the START, STOP, ACK, TB and MA flags */ icr =readl (_ICR (i2c)); - icr &= ~(ICR_STOP |ICR_ACKNAK ); + icr &= ~(ICR_START |ICR_STOP |ICR_ACKNAK |ICR_TB |ICR_MA );writel (icr,_ICR (i2c)); }
drivers/infiniband/core/mad.c +1 -0
@@ -2912,6 +2912,7 @@ static int ib_mad_post_receive_mads(struct ib_mad_qp_info *qp_info, DMA_FROM_DEVICE);if (unlikely (ib_dma_mapping_error (qp_info->port_priv->device, sg_list.addr))) { +kfree (mad_priv); ret = -ENOMEM ;break ; }
drivers/md/bcache/btree.c +6 -2
@@ -1375,7 +1375,7 @@ static int btree_gc_coalesce(struct btree *b, struct btree_op *op,if (__set_blocks (n1, n1->keys + n2->keys,block_bytes (b->c)) >btree_blocks (new_nodes[i])) - goto out_nocoalesce; + goto out_unlock_nocoalesce; keys = n2->keys;/* Take the key of the node we're getting rid of */
@@ -1404,7 +1404,7 @@ static int btree_gc_coalesce(struct btree *b, struct btree_op *op,if (__bch_keylist_realloc (&keylist,bkey_u64s (&new_nodes[i]->key))) - goto out_nocoalesce; + goto out_unlock_nocoalesce;bch_btree_node_write (new_nodes[i], &cl);bch_keylist_add (&keylist, &new_nodes[i]->key);
@@ -1450,6 +1450,10 @@ static int btree_gc_coalesce(struct btree *b, struct btree_op *op,/* Invalidated our iterator */ return -EINTR ; +out_unlock_nocoalesce: +for (i =0 ; i < nodes; i++) +mutex_unlock (&new_nodes[i]->write_lock); + out_nocoalesce:closure_sync (&cl);bch_keylist_free (&keylist);
drivers/mfd/wm8994-core.c +1 -0
@@ -690,3 +690,4 @@ module_i2c_driver(wm8994_i2c_driver);MODULE_DESCRIPTION ("Core support for the WM8994 audio CODEC" );MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Mark Brown <[email protected]>" ); +MODULE_SOFTDEP ("pre: wm8994_regulator" );
drivers/net/ethernet/atheros/alx/main.c +5 -4
@@ -872,8 +872,12 @@ out_free_rings:static void __alx_stop (struct alx_priv *alx) { -alx_halt (alx);alx_free_irq (alx); + +cancel_work_sync (&alx->link_check_wk); +cancel_work_sync (&alx->reset_wk); + +alx_halt (alx);alx_free_rings (alx); }
@@ -1406,9 +1410,6 @@ static void alx_remove(struct pci_dev *pdev)struct alx_priv *alx =pci_get_drvdata (pdev);struct alx_hw *hw = &alx->hw; -cancel_work_sync (&alx->link_check_wk); -cancel_work_sync (&alx->reset_wk); -/* restore permanent mac address */ alx_set_macaddr (hw, hw->perm_addr);
drivers/net/ethernet/broadcom/tg3.c +2 -2
@@ -18182,8 +18182,8 @@ static pci_ers_result_t tg3_io_error_detected(struct pci_dev *pdev,rtnl_lock (); -/* We probably don't have netdev yet */ -if (!netdev || !netif_running (netdev)) +/* Could be second call or maybe we don't have netdev yet */ +if (!netdev || tp->pcierr_recovery || !netif_running (netdev)) goto done;/* We needn't recover from permanent error */
drivers/net/ethernet/intel/e1000e/netdev.c +10 -4
@@ -6270,11 +6270,17 @@ static int __e1000_shutdown(struct pci_dev *pdev, bool runtime)struct net_device *netdev =pci_get_drvdata (pdev);struct e1000_adapter *adapter =netdev_priv (netdev);struct e1000_hw *hw = &adapter->hw; -u32 ctrl, ctrl_ext, rctl, status; -/* Runtime suspend should only enable wakeup for link changes */ -u32 wufc = runtime ?E1000_WUFC_LNKC : adapter->wol; +u32 ctrl, ctrl_ext, rctl, status, wufc;int retval =0 ; +/* Runtime suspend should only enable wakeup for link changes */ +if (runtime) + wufc =E1000_WUFC_LNKC ; +else if (device_may_wakeup (&pdev->dev)) + wufc = adapter->wol; +else + wufc =0 ; + status =er32 (STATUS );if (status &E1000_STATUS_LU ) wufc &= ~E1000_WUFC_LNKC ;
@@ -6332,7 +6338,7 @@ static int __e1000_shutdown(struct pci_dev *pdev, bool runtime)e1000e_igp3_phy_powerdown_workaround_ich8lan (&adapter->hw); }else if ((hw->mac.type == e1000_pch_lpt) || (hw->mac.type == e1000_pch_spt)) { -if (!(wufc & (E1000_WUFC_EX |E1000_WUFC_MC |E1000_WUFC_BC ))) +if (wufc && !(wufc & (E1000_WUFC_EX |E1000_WUFC_MC |E1000_WUFC_BC )))/* ULP does not support wake from unicast, multicast * or broadcast. */
drivers/net/hamradio/yam.c +1 -0
@@ -1160,6 +1160,7 @@ static int __init yam_init_driver(void) err =register_netdev (dev);if (err) {printk (KERN_WARNING "yam: cannot register net device %s\n" , dev->name); +free_netdev (dev); goto error; } yam_devs[i] = dev;
drivers/net/usb/ax88179_178a.c +6 -5
@@ -1396,10 +1396,10 @@ static int ax88179_rx_fixup(struct usbnet *dev, struct sk_buff *skb) }if (pkt_cnt ==0 ) { -/* Skip IP alignment psudo header */ -skb_pull (skb,2 ); skb->len = pkt_len; -skb_set_tail_pointer (skb, pkt_len); +/* Skip IP alignment pseudo header */ +skb_pull (skb,2 ); +skb_set_tail_pointer (skb, skb->len); skb->truesize = pkt_len +sizeof (struct sk_buff );ax88179_rx_checksum (skb, pkt_hdr);return 1 ;
@@ -1408,8 +1408,9 @@ static int ax88179_rx_fixup(struct usbnet *dev, struct sk_buff *skb) ax_skb =skb_clone (skb,GFP_ATOMIC );if (ax_skb) { ax_skb->len = pkt_len; - ax_skb->data = skb->data +2 ; -skb_set_tail_pointer (ax_skb, pkt_len); +/* Skip IP alignment pseudo header */ +skb_pull (ax_skb,2 ); +skb_set_tail_pointer (ax_skb, ax_skb->len); ax_skb->truesize = pkt_len +sizeof (struct sk_buff );ax88179_rx_checksum (ax_skb, pkt_hdr);usbnet_skb_return (dev, ax_skb);
drivers/pci/pcie/aspm.c +0 -10
@@ -388,16 +388,6 @@ static void pcie_aspm_cap_init(struct pcie_link_state *link, int blacklist)/* Setup initial capable state. Will be updated later */ link->aspm_capable = link->aspm_support; -/* -* If the downstream component has pci bridge function, don't -* do ASPM for now. -*/ -list_for_each_entry (child, &linkbus->devices, bus_list) { -if (pci_pcie_type (child) ==PCI_EXP_TYPE_PCI_BRIDGE ) { - link->aspm_disable =ASPM_STATE_ALL ; -break ; - } - }/* Get and check endpoint acceptable latencies */ list_for_each_entry (child, &linkbus->devices, bus_list) {
drivers/pci/quirks.c +1 -0
@@ -1624,6 +1624,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7520_MCH, quirDECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_E7320_MCH , quirk_pcie_mch);DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_E7525_MCH , quirk_pcie_mch); +DECLARE_PCI_FIXUP_CLASS_FINAL (PCI_VENDOR_ID_HUAWEI ,0x1610 ,PCI_CLASS_BRIDGE_PCI ,8 , quirk_pcie_mch);/* * It's possible for the MSI to get corrupted if shpc and acpi
drivers/power/smb347-charger.c +1 -0
@@ -1141,6 +1141,7 @@ static bool smb347_volatile_reg(struct device *dev, unsigned int reg)switch (reg) {case IRQSTAT_A :case IRQSTAT_C : +case IRQSTAT_D :case IRQSTAT_E :case IRQSTAT_F :case STAT_A :
drivers/s390/cio/qdio.h +0 -1
@@ -376,7 +376,6 @@ static inline int multicast_outbound(struct qdio_q *q)extern u64 last_ai_time;/* prototypes for thin interrupt */ -void qdio_setup_thinint (struct qdio_irq *irq_ptr);int qdio_establish_thinint (struct qdio_irq *irq_ptr);void qdio_shutdown_thinint (struct qdio_irq *irq_ptr);void tiqdio_add_input_queues (struct qdio_irq *irq_ptr);
drivers/s390/cio/qdio_setup.c +0 -1
@@ -479,7 +479,6 @@ int qdio_setup_irq(struct qdio_initialize *init_data)setup_queues (irq_ptr, init_data);setup_qib (irq_ptr, init_data); -qdio_setup_thinint (irq_ptr); set_impl_params(irq_ptr, init_data->qib_param_field_format, init_data->qib_param_field, init_data->input_slib_elements,
drivers/s390/cio/qdio_thinint.c +8 -6
@@ -268,17 +268,19 @@ int __init tiqdio_register_thinints(void)int qdio_establish_thinint (struct qdio_irq *irq_ptr) { +int rc; +if (!is_thinint_irq (irq_ptr))return 0 ; -return set_subchannel_ind (irq_ptr,0 ); -} -void qdio_setup_thinint (struct qdio_irq *irq_ptr) -{ -if (!is_thinint_irq (irq_ptr)) -return ; irq_ptr->dsci =get_indicator ();DBF_HEX (&irq_ptr->dsci,sizeof (void *)); + + rc =set_subchannel_ind (irq_ptr,0 ); +if (rc) +put_indicator (irq_ptr->dsci); + +return rc; }void qdio_shutdown_thinint (struct qdio_irq *irq_ptr)
drivers/scsi/arm/acornscsi.c +3 -1
@@ -2912,8 +2912,10 @@ static int acornscsi_probe(struct expansion_card *ec, const struct ecard_id *id) ashost->base =ecardm_iomap (ec,ECARD_RES_MEMC ,0 ,0 ); ashost->fast =ecardm_iomap (ec,ECARD_RES_IOCFAST ,0 ,0 ); -if (!ashost->base || !ashost->fast) +if (!ashost->base || !ashost->fast) { + ret = -ENOMEM ; goto out_put; + } host->irq = ec->irq; ashost->host = host;
drivers/scsi/ibmvscsi/ibmvscsi.c +2 -0
@@ -427,6 +427,8 @@ static int ibmvscsi_reenable_crq_queue(struct crq_queue *queue,int rc =0 ;struct vio_dev *vdev =to_vio_dev (hostdata->dev); +set_adapter_info (hostdata); +/* Re-enable the CRQ */ do { if (rc)
drivers/scsi/iscsi_boot_sysfs.c +1 -1
@@ -319,7 +319,7 @@ iscsi_boot_create_kobj(struct iscsi_boot_kset *boot_kset, boot_kobj->kobj.kset = boot_kset->kset;if (kobject_init_and_add (&boot_kobj->kobj, &iscsi_boot_ktype,NULL , name, index)) { -kfree (boot_kobj); +kobject_put (&boot_kobj->kobj);return NULL ; } boot_kobj->data = data;
drivers/scsi/lpfc/lpfc_els.c +2 -0
@@ -7315,6 +7315,8 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,spin_lock_irq (shost->host_lock);if (ndlp->nlp_flag &NLP_IN_DEV_LOSS ) {spin_unlock_irq (shost->host_lock); +if (newnode) +lpfc_nlp_put (ndlp); goto dropit; }spin_unlock_irq (shost->host_lock);
drivers/scsi/mpt3sas/mpt3sas_base.c +2 -0
@@ -3136,7 +3136,9 @@ _base_release_memory_pools(struct MPT3SAS_ADAPTER *ioc) ioc->scsi_lookup =NULL ; }kfree (ioc->hpr_lookup); + ioc->hpr_lookup =NULL ;kfree (ioc->internal_lookup); + ioc->internal_lookup =NULL ;if (ioc->chain_lookup) {for (i =0 ; i < ioc->chain_depth; i++) {if (ioc->chain_lookup[i].chain_buffer)
drivers/scsi/qla2xxx/tcm_qla2xxx.c +2 -0
@@ -827,6 +827,7 @@ static ssize_t tcm_qla2xxx_tpg_enable_store(struct config_item *item,atomic_set (&tpg->lport_tpg_enabled,0 );qlt_stop_phase1 (vha->vha_tgt.qla_tgt); +qlt_stop_phase2 (vha->vha_tgt.qla_tgt); }return count;
@@ -990,6 +991,7 @@ static ssize_t tcm_qla2xxx_npiv_tpg_enable_store(struct config_item *item,atomic_set (&tpg->lport_tpg_enabled,0 );qlt_stop_phase1 (vha->vha_tgt.qla_tgt); +qlt_stop_phase2 (vha->vha_tgt.qla_tgt); }return count;
drivers/scsi/scsi_devinfo.c +3 -2
@@ -443,7 +443,8 @@ static struct scsi_dev_info_list *scsi_dev_info_list_find(const char *vendor,/* * vendor strings must be an exact match */ -if (vmax !=strlen (devinfo->vendor) || +if (vmax !=strnlen (devinfo->vendor, +sizeof (devinfo->vendor)) ||memcmp (devinfo->vendor, vskip, vmax))continue ;
@@ -451,7 +452,7 @@ static struct scsi_dev_info_list *scsi_dev_info_list_find(const char *vendor,* @model specifies the full string, and * must be larger or equal to devinfo->model */ - mlen =strlen (devinfo->model); + mlen =strnlen (devinfo->model,sizeof (devinfo->model));if (mmax < mlen ||memcmp (devinfo->model, mskip, mlen))continue ;return devinfo;
drivers/scsi/sr.c +5 -1
@@ -746,7 +746,7 @@ static int sr_probe(struct device *dev) cd->cdi.disk = disk;if (register_cdrom (&cd->cdi)) - goto fail_put; + goto fail_minor;/* * Initialize block layer runtime PM stuffs before the
@@ -764,6 +764,10 @@ static int sr_probe(struct device *dev)return 0 ; +fail_minor: +spin_lock (&sr_index_lock); +clear_bit (minor, sr_index_bits); +spin_unlock (&sr_index_lock); fail_put:put_disk (disk); fail_free:
drivers/staging/sm750fb/sm750.c +1 -0
@@ -894,6 +894,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index) fix->visual =FB_VISUAL_PSEUDOCOLOR ;break ;case 16 : +case 24 :case 32 : fix->visual =FB_VISUAL_TRUECOLOR ;break ;
drivers/tty/hvc/hvc_console.c +14 -2
@@ -89,6 +89,8 @@ static LIST_HEAD(hvc_structs);*/ static DEFINE_SPINLOCK (hvc_structs_lock); +/* Mutex to serialize hvc_open */ +static DEFINE_MUTEX (hvc_open_mutex);/* * This value is used to assign a tty->index value to a hvc_struct based * upon order of exposure via hvc_probe(), when we can not match it to
@@ -333,16 +335,24 @@ static int hvc_install(struct tty_driver *driver, struct tty_struct *tty)*/ static int hvc_open (struct tty_struct *tty,struct file * filp) { -struct hvc_struct *hp = tty->driver_data; +struct hvc_struct *hp;unsigned long flags;int rc =0 ; +mutex_lock (&hvc_open_mutex); + + hp = tty->driver_data; +if (!hp) { + rc = -EIO ; + goto out; + } +spin_lock_irqsave (&hp->port.lock, flags);/* Check and then increment for fast path open. */ if (hp->port.count++ >0 ) {spin_unlock_irqrestore (&hp->port.lock, flags);hvc_kick (); -return 0 ; + goto out; }/* else count == 0 */ spin_unlock_irqrestore (&hp->port.lock, flags);
@@ -371,6 +381,8 @@ static int hvc_open(struct tty_struct *tty, struct file * filp)/* Force wakeup of the polling thread */ hvc_kick (); +out: +mutex_unlock (&hvc_open_mutex);return rc; }
drivers/tty/n_gsm.c +15 -11
@@ -681,11 +681,10 @@ static struct gsm_msg *gsm_data_alloc(struct gsm_mux *gsm, u8 addr, int len,* FIXME: lock against link layer control transmissions */ -static void gsm_data_kick (struct gsm_mux *gsm) +static void gsm_data_kick (struct gsm_mux *gsm,struct gsm_dlci *dlci) {struct gsm_msg *msg, *nmsg;int len; -int skip_sof =0 ;list_for_each_entry_safe (msg, nmsg, &gsm->tx_list, list) {if (gsm->constipated && msg->addr)
@@ -707,18 +706,23 @@ static void gsm_data_kick(struct gsm_mux *gsm)print_hex_dump_bytes ("gsm_data_kick: " ,DUMP_PREFIX_OFFSET , gsm->txframe, len); - -if (gsm->output (gsm, gsm->txframe + skip_sof, - len - skip_sof) <0 ) +if (gsm->output (gsm, gsm->txframe, len) <0 )break ;/* FIXME: Can eliminate one SOF in many more cases */ gsm->tx_bytes -= msg->len; -/* For a burst of frames skip the extra SOF within the -burst */ - skip_sof =1 ;list_del (&msg->list);kfree (msg); + +if (dlci) { +tty_port_tty_wakeup (&dlci->port); + }else { +int i =0 ; + +for (i =0 ; i <NUM_DLCI ; i++) +if (gsm->dlci[i]) +tty_port_tty_wakeup (&gsm->dlci[i]->port); + } } }
@@ -770,7 +774,7 @@ static void __gsm_data_queue(struct gsm_dlci *dlci, struct gsm_msg *msg)/* Add to the actual output queue */ list_add_tail (&msg->list, &gsm->tx_list); gsm->tx_bytes += msg->len; -gsm_data_kick (gsm); +gsm_data_kick (gsm, dlci); }/**
@@ -1231,7 +1235,7 @@ static void gsm_control_message(struct gsm_mux *gsm, unsigned int command,gsm_control_reply (gsm,CMD_FCON ,NULL ,0 );/* Kick the link in case it is idling */ spin_lock_irqsave (&gsm->tx_lock, flags); -gsm_data_kick (gsm); +gsm_data_kick (gsm,NULL );spin_unlock_irqrestore (&gsm->tx_lock, flags);break ;case CMD_FCOFF :
@@ -2429,7 +2433,7 @@ static void gsmld_write_wakeup(struct tty_struct *tty)/* Queue poll */ clear_bit (TTY_DO_WRITE_WAKEUP , &tty->flags);spin_lock_irqsave (&gsm->tx_lock, flags); -gsm_data_kick (gsm); +gsm_data_kick (gsm,NULL );if (gsm->tx_bytes <TX_THRESH_LO ) {gsm_dlci_data_sweep (gsm); }
drivers/tty/serial/amba-pl011.c +1 -0
@@ -2323,6 +2323,7 @@ static int pl011_setup_port(struct device *dev, struct uart_amba_port *uap, uap->port.fifosize = uap->fifosize; uap->port.flags =UPF_BOOT_AUTOCONF ; uap->port.line = index; +spin_lock_init (&uap->port.lock); amba_ports[index] = uap;
drivers/usb/class/cdc-acm.c +2 -0
@@ -1684,6 +1684,8 @@ static int acm_reset_resume(struct usb_interface *intf)static const struct usb_device_id acm_ids[] = {/* quirky and broken devices */ + {USB_DEVICE (0x0424 ,0x274e ),/* Microchip Technology, Inc. (formerly SMSC) */ + .driver_info =DISABLE_ECHO , },/* DISABLE ECHO in termios flag */ {USB_DEVICE (0x076d ,0x0006 ),/* Denso Cradle CU-321 */ .driver_info =NO_UNION_NORMAL , },/* has no union descriptor */ {USB_DEVICE (0x17ef ,0x7000 ),/* Lenovo USB modem */
drivers/usb/class/usblp.c +4 -1
@@ -481,7 +481,8 @@ static int usblp_release(struct inode *inode, struct file *file)usb_autopm_put_interface (usblp->intf);if (!usblp->present)/* finish cleanup from disconnect */ -usblp_cleanup (usblp); +usblp_cleanup (usblp);/* any URBs must be dead */ +mutex_unlock (&usblp_mutex);return 0 ; }
@@ -1397,9 +1398,11 @@ static void usblp_disconnect(struct usb_interface *intf)usblp_unlink_urbs (usblp);mutex_unlock (&usblp->mut); +usb_poison_anchored_urbs (&usblp->urbs);if (!usblp->used)usblp_cleanup (usblp); +mutex_unlock (&usblp_mutex); }
drivers/usb/core/quirks.c +2 -1
@@ -73,11 +73,12 @@ static const struct usb_device_id usb_quirk_list[] = {/* Logitech HD Webcam C270 */ { USB_DEVICE(0x046d, 0x0825), .driver_info = USB_QUIRK_RESET_RESUME }, - /* Logitech HD Pro Webcams C920, C920-C, C925e and C930e */ + /* Logitech HD Pro Webcams C920, C920-C, C922, C925e and C930e */ { USB_DEVICE(0x046d, 0x082d), .driver_info = USB_QUIRK_DELAY_INIT }, { USB_DEVICE(0x046d, 0x0841), .driver_info = USB_QUIRK_DELAY_INIT }, { USB_DEVICE(0x046d, 0x0843), .driver_info = USB_QUIRK_DELAY_INIT }, { USB_DEVICE(0x046d, 0x085b), .driver_info = USB_QUIRK_DELAY_INIT }, + { USB_DEVICE(0x046d, 0x085c), .driver_info = USB_QUIRK_DELAY_INIT }, /* Logitech ConferenceCam CC3000e */ { USB_DEVICE(0x046d, 0x0847), .driver_info = USB_QUIRK_DELAY_INIT },
drivers/usb/dwc2/core_intr.c +5 -2
@@ -363,10 +363,13 @@ static void dwc2_handle_wakeup_detected_intr(struct dwc2_hsotg *hsotg)if (ret && (ret != -ENOTSUPP ))dev_err (hsotg->dev,"exit hibernation failed\n" ); +/* Change to L0 state */ + hsotg->lx_state =DWC2_L0 ;call_gadget (hsotg, resume); + }else { +/* Change to L0 state */ + hsotg->lx_state =DWC2_L0 ; } -/* Change to L0 state */ - hsotg->lx_state =DWC2_L0 ; }else {if (hsotg->core_params->hibernation) {dwc2_writel (GINTSTS_WKUPINT , hsotg->regs +GINTSTS );
drivers/usb/dwc2/gadget.c +0 -6
@@ -3656,12 +3656,6 @@ int dwc2_gadget_init(struct dwc2_hsotg *hsotg, int irq) epnum, 0); } - ret =usb_add_gadget_udc (dev, &hsotg->gadget); -if (ret) { -dwc2_hsotg_ep_free_request (&hsotg->eps_out[0 ]->ep, - hsotg->ctrl_req); -return ret; - }dwc2_hsotg_dump (hsotg);return 0 ;
drivers/usb/dwc2/platform.c +11 -0
@@ -452,6 +452,17 @@ static int dwc2_driver_probe(struct platform_device *dev)if (hsotg->dr_mode ==USB_DR_MODE_PERIPHERAL )dwc2_lowlevel_hw_disable (hsotg); +#if IS_ENABLED (CONFIG_USB_DWC2_PERIPHERAL ) || \ +IS_ENABLED (CONFIG_USB_DWC2_DUAL_ROLE ) +/* Postponed adding a new gadget to the udc class driver list */ +if (hsotg->gadget_enabled) { + retval =usb_add_gadget_udc (hsotg->dev, &hsotg->gadget); +if (retval) { +dwc2_hsotg_remove (hsotg); + goto error; + } + } +#endif /* CONFIG_USB_DWC2_PERIPHERAL || CONFIG_USB_DWC2_DUAL_ROLE */ return 0 ; error:
drivers/usb/gadget/udc/lpc32xx_udc.c +6 -5
@@ -1662,17 +1662,17 @@ static int lpc32xx_ep_enable(struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc) { struct lpc32xx_ep *ep = container_of(_ep, struct lpc32xx_ep, ep); -struct lpc32xx_udc *udc = ep->udc; +struct lpc32xx_udc *udc;u16 maxpacket;u32 tmp;unsigned long flags;/* Verify EP data */ if ((!_ep) || (!ep) || (!desc) || - (desc->bDescriptorType !=USB_DT_ENDPOINT )) { -dev_dbg (udc->dev,"bad ep or descriptor\n" ); + (desc->bDescriptorType !=USB_DT_ENDPOINT ))return -EINVAL ; - } + + udc = ep->udc; maxpacket =usb_endpoint_maxp (desc);if ((maxpacket ==0 ) || (maxpacket > ep->maxpacket)) {dev_dbg (udc->dev,"bad ep descriptor's packet size\n" );
@@ -1920,7 +1920,7 @@ static int lpc32xx_ep_dequeue(struct usb_ep *_ep, struct usb_request *_req)static int lpc32xx_ep_set_halt (struct usb_ep *_ep,int value) { struct lpc32xx_ep *ep = container_of(_ep, struct lpc32xx_ep, ep); -struct lpc32xx_udc *udc = ep->udc; +struct lpc32xx_udc *udc;unsigned long flags;if ((!ep) || (ep->hwep_num <=1 ))
@@ -1930,6 +1930,7 @@ static int lpc32xx_ep_set_halt(struct usb_ep *_ep, int value)if (ep->is_in)return -EAGAIN ; + udc = ep->udc;spin_lock_irqsave (&udc->lock, flags);if (value ==1 ) {
drivers/usb/gadget/udc/m66592-udc.c +1 -1
@@ -1684,7 +1684,7 @@ static int m66592_probe(struct platform_device *pdev) err_add_udc:m66592_free_request (&m66592->ep[0 ].ep, m66592->ep0_req); - + m66592->ep0_req =NULL ; clean_up3:if (m66592->pdata->on_chip) {clk_disable (m66592->clk);
drivers/usb/gadget/udc/mv_udc_core.c +2 -1
@@ -2322,7 +2322,8 @@ static int mv_udc_probe(struct platform_device *pdev)return 0 ; err_create_workqueue: -destroy_workqueue (udc->qwork); +if (udc->qwork) +destroy_workqueue (udc->qwork); err_destroy_dma:dma_pool_destroy (udc->dtd_pool); err_free_dma:
drivers/usb/gadget/udc/s3c2410_udc.c +0 -4
@@ -269,10 +269,6 @@ static void s3c2410_udc_done(struct s3c2410_ep *ep,static void s3c2410_udc_nuke (struct s3c2410_udc *udc,struct s3c2410_ep *ep,int status) { -/* Sanity check */ -if (&ep->queue ==NULL ) -return ; -while (!list_empty (&ep->queue)) {struct s3c2410_request *req; req = list_entry(ep->queue.next, struct s3c2410_request,
drivers/usb/host/ehci-exynos.c +2 -3
@@ -199,9 +199,8 @@ skip_phy: hcd->rsrc_len =resource_size (res); irq =platform_get_irq (pdev,0 ); -if (!irq) { -dev_err (&pdev->dev,"Failed to get IRQ\n" ); - err = -ENODEV ; +if (irq <0 ) { + err = irq; goto fail_io; }
drivers/usb/host/ehci-mxc.c +2 -0
@@ -63,6 +63,8 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); +if (irq <0 ) +return irq; hcd =usb_create_hcd (&ehci_mxc_hc_driver, dev,dev_name (dev));if (!hcd)
drivers/usb/host/ehci-pci.c +7 -0
@@ -229,6 +229,13 @@ static int ehci_pci_setup(struct usb_hcd *hcd)ehci_info (ehci,"applying MosChip frame-index workaround\n" ); ehci->frame_index_bug =1 ;break ; +case PCI_VENDOR_ID_HUAWEI : +/* Synopsys HC bug */ +if (pdev->device ==0xa239 ) { +ehci_info (ehci,"applying Synopsys HC workaround\n" ); + ehci->has_synopsys_hc_bug =1 ; + } +break ; }/* optional debug port, normally in the first BAR */
drivers/usb/host/ehci-platform.c +5 -0
@@ -375,6 +375,11 @@ static int ehci_platform_resume(struct device *dev) }ehci_resume (hcd, priv->reset_on_resume); + +pm_runtime_disable (dev); +pm_runtime_set_active (dev); +pm_runtime_enable (dev); +return 0 ; }#endif /* CONFIG_PM_SLEEP */
drivers/usb/host/ohci-platform.c +5 -0
@@ -339,6 +339,11 @@ static int ohci_platform_resume(struct device *dev) }ohci_resume (hcd, false); + +pm_runtime_disable (dev); +pm_runtime_set_active (dev); +pm_runtime_enable (dev); +return 0 ; }#endif /* CONFIG_PM_SLEEP */
drivers/usb/host/ohci-sm501.c +1 -0
@@ -196,6 +196,7 @@ static int ohci_hcd_sm501_drv_remove(struct platform_device *pdev)struct resource *mem;usb_remove_hcd (hcd); +iounmap (hcd->regs);release_mem_region (hcd->rsrc_start, hcd->rsrc_len);usb_put_hcd (hcd);dma_release_declared_memory (&pdev->dev);
drivers/usb/host/xhci-plat.c +10 -1
@@ -249,8 +249,17 @@ static int xhci_plat_resume(struct device *dev) {struct usb_hcd *hcd =dev_get_drvdata (dev);struct xhci_hcd *xhci =hcd_to_xhci (hcd); +int ret; + + ret =xhci_resume (xhci,0 ); +if (ret) +return ret; -return xhci_resume (xhci,0 ); +pm_runtime_disable (dev); +pm_runtime_set_active (dev); +pm_runtime_enable (dev); + +return 0 ; }static const struct dev_pm_ops xhci_plat_pm_ops = {
drivers/usb/host/xhci.c +4 -0
@@ -1340,6 +1340,7 @@ static int xhci_check_maxpacket(struct xhci_hcd *xhci, unsigned int slot_id, xhci->devs[slot_id]->out_ctx, ep_index); ep_ctx =xhci_get_ep_ctx (xhci, command->in_ctx, ep_index); + ep_ctx->ep_info &=cpu_to_le32 (~EP_STATE_MASK );/* must clear */ ep_ctx->ep_info2 &=cpu_to_le32 (~MAX_PACKET_MASK ); ep_ctx->ep_info2 |=cpu_to_le32 (MAX_PACKET (max_packet_size));
@@ -4263,6 +4264,9 @@ int xhci_set_usb2_hardware_lpm(struct usb_hcd *hcd,mutex_lock (hcd->bandwidth_mutex);xhci_change_max_exit_latency (xhci, udev,0 );mutex_unlock (hcd->bandwidth_mutex); +readl_poll_timeout (port_array[port_num], pm_val, + (pm_val &PORT_PLS_MASK ) ==XDEV_U0 , +100 ,10000 );return 0 ; } }
drivers/usb/host/xhci.h +1 -1
@@ -706,7 +706,7 @@ struct xhci_ep_ctx {* 4 - TRB error * 5-7 - reserved */ -#define EP_STATE_MASK (0xf) +#define EP_STATE_MASK (0x7)#define EP_STATE_DISABLED 0#define EP_STATE_RUNNING 1#define EP_STATE_HALTED 2
drivers/vfio/pci/vfio_pci_config.c +11 -3
@@ -1405,7 +1405,12 @@ static int vfio_cap_init(struct vfio_pci_device *vdev)if (ret)return ret; -if (cap <=PCI_CAP_ID_MAX ) { +/* +* ID 0 is a NULL capability, conflicting with our fake +* PCI_CAP_ID_BASIC. As it has no content, consider it +* hidden for now. +*/ +if (cap && cap <=PCI_CAP_ID_MAX ) { len = pci_cap_length[cap];if (len ==0xFF ) {/* Variable length */ len =vfio_cap_len (vdev, cap, pos);
@@ -1644,8 +1649,11 @@ void vfio_config_free(struct vfio_pci_device *vdev) vdev->vconfig =NULL ;kfree (vdev->pci_config_map); vdev->pci_config_map =NULL ; -kfree (vdev->msi_perm); - vdev->msi_perm =NULL ; +if (vdev->msi_perm) { +free_perm_bits (vdev->msi_perm); +kfree (vdev->msi_perm); + vdev->msi_perm =NULL ; + } }/*
drivers/watchdog/da9062_wdt.c +0 -5
@@ -94,11 +94,6 @@ static int da9062_wdt_update_timeout_register(struct da9062_watchdog *wdt, unsigned int regval) {struct da9062 *chip = wdt->hw; -int ret; - - ret =da9062_reset_watchdog_timer (wdt); -if (ret) -return ret; return regmap_update_bits(chip->regmap, DA9062AA_CONTROL_D,
fs/block_dev.c +7 -5
@@ -1181,10 +1181,8 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part)*/ if (!for_part) { ret =devcgroup_inode_permission (bdev->bd_inode, perm); -if (ret !=0 ) { -bdput (bdev); +if (ret !=0 )return ret; - } } restart:
@@ -1253,8 +1251,10 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part) goto out_clear;BUG_ON (for_part); ret =__blkdev_get (whole, mode,1 ); -if (ret) +if (ret) { +bdput (whole); goto out_clear; + } bdev->bd_contains = whole; bdev->bd_part =disk_get_part (disk, partno); if (!(disk->flags & GENHD_FL_UP) ||
@@ -1311,7 +1311,6 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part)put_disk (disk);module_put (owner); out: -bdput (bdev);return ret; }
@@ -1397,6 +1396,9 @@ int blkdev_get(struct block_device *bdev, fmode_t mode, void *holder)bdput (whole); } +if (res) +bdput (bdev); +return res; }EXPORT_SYMBOL (blkdev_get);
fs/cifs/smb2ops.c +12 -0
@@ -1145,6 +1145,12 @@ static long smb3_zero_range(struct file *file, struct cifs_tcon *tcon, inode =d_inode (cfile->dentry); cifsi =CIFS_I (inode); +/* +* We zero the range through ioctl, so we need remove the page caches +* first, otherwise the data may be inconsistent with the server. +*/ +truncate_pagecache_range (inode, offset, offset + len -1 ); +/* if file not oplocked can't be sure whether asking to extend size */ if (!CIFS_CACHE_READ (cifsi))if (keep_size == false)
@@ -1201,6 +1207,12 @@ static long smb3_punch_hole(struct file *file, struct cifs_tcon *tcon,if (!smb2_set_sparse (xid, tcon, cfile, inode, set_sparse))return -EOPNOTSUPP ; +/* +* We implement the punch hole through ioctl, so we need remove the page +* caches first, otherwise the data may be inconsistent with the server. +*/ +truncate_pagecache_range (inode, offset, offset + len -1 ); +cifs_dbg (FYI ,"offset %lld len %lld" , offset, len); fsctl_buf.FileOffset =cpu_to_le64 (offset);
fs/dlm/dlm_internal.h +0 -1
@@ -92,7 +92,6 @@ do { \ __LINE__, __FILE__, #x, jiffies); \ {do} \ printk("\n"); \ - BUG(); \ panic("DLM: Record message above and reboot.\n"); \ } \ }
fs/ext4/extents.c +1 -1
@@ -2902,7 +2902,7 @@ again:* in use to avoid freeing it when removing blocks. */ if (sbi->s_cluster_ratio >1 ) { - pblk =ext4_ext_pblock (ex) + end - ee_block +2 ; + pblk =ext4_ext_pblock (ex) + end - ee_block +1 ; partial_cluster = -(long long )EXT4_B2C (sbi, pblk); }
fs/gfs2/ops_fstype.c +1 -1
@@ -916,7 +916,7 @@ fail: }static const match_table_t nolock_tokens = { - { Opt_jid,"jid=%d\n" , }, + { Opt_jid,"jid=%d" , }, { Opt_err,NULL }, };
fs/nfs/direct.c +9 -4
@@ -385,8 +385,6 @@ static void nfs_direct_complete(struct nfs_direct_req *dreq, bool write)if (write)nfs_zap_mapping (inode, inode->i_mapping); -inode_dio_end (inode); -if (dreq->iocb) {long res = (long ) dreq->error;if (!res)
@@ -396,7 +394,10 @@ static void nfs_direct_complete(struct nfs_direct_req *dreq, bool write)complete_all (&dreq->completion); +igrab (inode);nfs_direct_req_release (dreq); +inode_dio_end (inode); +iput (inode); }static void nfs_direct_readpage_release (struct nfs_page *req)
@@ -537,8 +538,10 @@ static ssize_t nfs_direct_read_schedule_iovec(struct nfs_direct_req *dreq,* generic layer handle the completion. */ if (requested_bytes ==0 ) { -inode_dio_end (inode); +igrab (inode);nfs_direct_req_release (dreq); +inode_dio_end (inode); +iput (inode);return result <0 ? result : -EIO ; }
@@ -939,8 +942,10 @@ static ssize_t nfs_direct_write_schedule_iovec(struct nfs_direct_req *dreq,* generic layer handle the completion. */ if (requested_bytes ==0 ) { -inode_dio_end (inode); +igrab (inode);nfs_direct_req_release (dreq); +inode_dio_end (inode); +iput (inode);return result <0 ? result : -EIO ; }
fs/nfs/file.c +1 -0
@@ -82,6 +82,7 @@ nfs_file_release(struct inode *inode, struct file *filp)dprintk ("NFS: release(%pD2)\n" , filp);nfs_inc_stats (inode,NFSIOS_VFSRELEASE ); +inode_dio_wait (inode);nfs_file_clear_open_context (filp);return 0 ; }
fs/nfs/flexfilelayout/flexfilelayout.c +7 -4
@@ -855,9 +855,8 @@ ff_layout_pg_init_write(struct nfs_pageio_descriptor *pgio, goto out_mds;/* Use a direct mapping of ds_idx to pgio mirror_idx */ -if (WARN_ON_ONCE (pgio->pg_mirror_count != -FF_LAYOUT_MIRROR_COUNT (pgio->pg_lseg))) - goto out_mds; +if (pgio->pg_mirror_count !=FF_LAYOUT_MIRROR_COUNT (pgio->pg_lseg)) + goto out_eagain;for (i =0 ; i < pgio->pg_mirror_count; i++) { ds =nfs4_ff_layout_prepare_ds (pgio->pg_lseg, i, true);
@@ -869,11 +868,15 @@ ff_layout_pg_init_write(struct nfs_pageio_descriptor *pgio, }return ; - +out_eagain: +pnfs_generic_pg_cleanup (pgio); + pgio->pg_error = -EAGAIN ; +return ; out_mds:pnfs_put_lseg (pgio->pg_lseg); pgio->pg_lseg =NULL ;nfs_pageio_reset_write_mds (pgio); + pgio->pg_error = -EAGAIN ; } static unsigned int
fs/nfsd/nfs4callback.c +2 -0
@@ -1096,6 +1096,8 @@ static void nfsd4_process_cb_update(struct nfsd4_callback *cb) err =setup_callback_client (clp, &conn, ses);if (err) {nfsd4_mark_cb_down (clp, err); +if (c) +svc_xprt_put (c->cn_xprt);return ; } }
fs/ocfs2/ocfs2_fs.h +2 -2
@@ -304,7 +304,7 @@#define OCFS2_MAX_SLOTS 255/* Slot map indicator for an empty slot */ -#define OCFS2_INVALID_SLOT -1 +#define OCFS2_INVALID_SLOT ((u16)-1)#define OCFS2_VOL_UUID_LEN 16#define OCFS2_MAX_VOL_LABEL_LEN 64
@@ -340,8 +340,8 @@ struct ocfs2_system_inode_info {enum {BAD_BLOCK_SYSTEM_INODE =0 ,GLOBAL_INODE_ALLOC_SYSTEM_INODE , +#define OCFS2_FIRST_ONLINE_SYSTEM_INODE GLOBAL_INODE_ALLOC_SYSTEM_INODE SLOT_MAP_SYSTEM_INODE, -#define OCFS2_FIRST_ONLINE_SYSTEM_INODE SLOT_MAP_SYSTEM_INODEHEARTBEAT_SYSTEM_INODE ,GLOBAL_BITMAP_SYSTEM_INODE ,USER_QUOTA_SYSTEM_INODE ,
fs/ocfs2/suballoc.c +6 -3
@@ -2863,9 +2863,12 @@ int ocfs2_test_inode_bit(struct ocfs2_super *osb, u64 blkno, int *res) goto bail; } - inode_alloc_inode = -ocfs2_get_system_file_inode (osb,INODE_ALLOC_SYSTEM_INODE , - suballoc_slot); +if (suballoc_slot == (u16 )OCFS2_INVALID_SLOT ) + inode_alloc_inode =ocfs2_get_system_file_inode (osb, +GLOBAL_INODE_ALLOC_SYSTEM_INODE , suballoc_slot); +else + inode_alloc_inode =ocfs2_get_system_file_inode (osb, +INODE_ALLOC_SYSTEM_INODE , suballoc_slot);if (!inode_alloc_inode) {/* the error code could be inaccurate, but we are not able to * get the correct one. */
include/linux/bitops.h +1 -1
@@ -59,7 +59,7 @@ static inline int get_count_order(unsigned int count)static __always_inline unsigned long hweight_long (unsigned long w) { -return sizeof (w) ==4 ?hweight32 (w) :hweight64 (w); +return sizeof (w) ==4 ?hweight32 (w) :hweight64 ((__u64 )w); }/**
include/linux/elfnote.h +1 -1
@@ -53,7 +53,7 @@ .popsection ;#define ELFNOTE (name, type, desc) \ - ELFNOTE_START(name, type, "") \ + ELFNOTE_START(name, type, "a") \ desc ; \ ELFNOTE_END
include/linux/genhd.h +2 -0
@@ -727,9 +727,11 @@ static inline sector_t part_nr_sects_read(struct hd_struct *part)static inline void part_nr_sects_write (struct hd_struct *part,sector_t size) {#if BITS_PER_LONG ==32 && defined(CONFIG_LBDAF ) && defined(CONFIG_SMP ) +preempt_disable ();write_seqcount_begin (&part->nr_sects_seq); part->nr_sects = size;write_seqcount_end (&part->nr_sects_seq); +preempt_enable ();#elif BITS_PER_LONG ==32 && defined(CONFIG_LBDAF ) && defined(CONFIG_PREEMPT )preempt_disable (); part->nr_sects = size;
include/linux/kprobes.h +4 -0
@@ -366,6 +366,10 @@ static inline struct kprobe_ctlblk *get_kprobe_ctlblk(void)return this_cpu_ptr (&kprobe_ctlblk); } +extern struct kprobe kprobe_busy; +void kprobe_busy_begin (void ); +void kprobe_busy_end (void ); +int register_kprobe (struct kprobe *p);void unregister_kprobe (struct kprobe *p);int register_kprobes (struct kprobe **kps,int num);
include/linux/libata.h +3 -0
@@ -38,6 +38,7 @@#include <linux/acpi.h> #include <linux/cdrom.h> #include <linux/sched.h> +#include <linux/async.h> /* * Define if arch has non-standard setup. This is a _PCI_ standard
@@ -872,6 +873,8 @@ struct ata_port {struct timer_list fastdrain_timer;unsigned long fastdrain_cnt; +async_cookie_t cookie; +int em_message_type;void *private_data;
include/linux/pci_ids.h +2 -0
@@ -2496,6 +2496,8 @@#define PCI_DEVICE_ID_KORENIX_JETCARDF2 0x1700#define PCI_DEVICE_ID_KORENIX_JETCARDF3 0x17ff +#define PCI_VENDOR_ID_HUAWEI 0x19e5 +#define PCI_VENDOR_ID_NETRONOME 0x19ee#define PCI_DEVICE_ID_NETRONOME_NFP3200 0x3200#define PCI_DEVICE_ID_NETRONOME_NFP3240 0x3240
include/net/sctp/constants.h +5 -3
@@ -357,11 +357,13 @@ typedef enum { ipv4_is_anycast_6to4(a))/* Flags used for the bind address copy functions. */ -#define SCTP_ADDR6_ALLOWED 0x00000001/* IPv6 address is allowed by +#define SCTP_ADDR4_ALLOWED 0x00000001/* IPv4 address is allowed by local sock family */ -#define SCTP_ADDR4_PEERSUPP 0x00000002/* IPv4 address is supported by +#define SCTP_ADDR6_ALLOWED 0x00000002/* IPv6 address is allowed by +local sock family */ +#define SCTP_ADDR4_PEERSUPP 0x00000004/* IPv4 address is supported by peer */ -#define SCTP_ADDR6_PEERSUPP 0x00000004/* IPv6 address is supported by +#define SCTP_ADDR6_PEERSUPP 0x00000008/* IPv6 address is supported by peer */ /* Reasons to retransmit. */
include/net/sock.h +0 -1
@@ -1678,7 +1678,6 @@ static inline int sk_tx_queue_get(const struct sock *sk)static inline void sk_set_socket (struct sock *sk,struct socket *sock) { -sk_tx_queue_clear (sk); sk->sk_socket = sock; }
kernel/kprobes.c +26 -1
@@ -561,11 +561,12 @@ static void kprobe_optimizer(struct work_struct *work)do_free_cleaned_kprobes ();mutex_unlock (&module_mutex); -mutex_unlock (&kprobe_mutex);/* Step 5: Kick optimizer again if needed */ if (!list_empty (&optimizing_list) || !list_empty (&unoptimizing_list))kick_kprobe_optimizer (); + +mutex_unlock (&kprobe_mutex); }/* Wait for completing optimization and unoptimization */
@@ -1149,6 +1150,26 @@ __releases(hlist_lock) }NOKPROBE_SYMBOL (kretprobe_table_unlock); +struct kprobe kprobe_busy = { + .addr = (void *) get_kprobe, +}; + +void kprobe_busy_begin (void ) +{ +struct kprobe_ctlblk *kcb; + +preempt_disable (); +__this_cpu_write (current_kprobe, &kprobe_busy); + kcb =get_kprobe_ctlblk (); + kcb->kprobe_status =KPROBE_HIT_ACTIVE ; +} + +void kprobe_busy_end (void ) +{ +__this_cpu_write (current_kprobe,NULL ); +preempt_enable (); +} +/* * This function is called from finish_task_switch when task tk becomes dead, * so that we can recycle any function-return probe instances associated
@@ -1166,6 +1187,8 @@ void kprobe_flush_task(struct task_struct *tk)/* Early boot. kretprobe_table_locks not yet initialized. */ return ; +kprobe_busy_begin (); +INIT_HLIST_HEAD (&empty_rp); hash =hash_ptr (tk,KPROBE_HASH_BITS ); head = &kretprobe_inst_table[hash];
@@ -1179,6 +1202,8 @@ void kprobe_flush_task(struct task_struct *tk)hlist_del (&ri->hlist);kfree (ri); } + +kprobe_busy_end (); }NOKPROBE_SYMBOL (kprobe_flush_task);
kernel/sched/core.c +2 -1
@@ -3439,7 +3439,8 @@ void rt_mutex_setprio(struct task_struct *p, int prio)if (dl_prio (prio)) {struct task_struct *pi_task =rt_mutex_get_top_task (p);if (!dl_prio (p->normal_prio) || - (pi_task &&dl_entity_preempt (&pi_task->dl, &p->dl))) { + (pi_task &&dl_prio (pi_task->prio) && +dl_entity_preempt (&pi_task->dl, &p->dl))) { p->dl.dl_boosted =1 ; enqueue_flag |=ENQUEUE_REPLENISH ; }else
kernel/trace/blktrace.c +13 -0
@@ -15,6 +15,9 @@* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * */ + +#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/kernel.h> #include <linux/blkdev.h> #include <linux/blktrace_api.h>
@@ -481,6 +484,16 @@ int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev,*/ strreplace (buts->name,'/' ,'_' ); +/* +* bdev can be NULL, as with scsi-generic, this is a helpful as +* we can be. +*/ +if (q->blk_trace) { +pr_warn ("Concurrent blktraces are not allowed on %s\n" , + buts->name); +return -EBUSY ; + } + bt =kzalloc (sizeof (*bt),GFP_KERNEL );if (!bt)return -ENOMEM ;
kernel/trace/trace_events_trigger.c +19 -2
@@ -204,11 +204,17 @@ static int event_trigger_regex_open(struct inode *inode, struct file *file)static int trigger_process_regex (struct trace_event_file *file,char *buff) { -char *command, *next = buff; +char *command, *next;struct event_command *p;int ret = -EINVAL ; + next = buff =skip_spaces (buff); command =strsep (&next,": \t" ); +if (next) { + next =skip_spaces (next); +if (!*next) + next =NULL ; + } command = (command[0 ] !='!' ) ? command : command +1 ;mutex_lock (&trigger_cmd_mutex);
@@ -615,8 +621,14 @@ event_trigger_callback(struct event_command *cmd_ops,int ret;/* separate the trigger from the filter (t:n [if filter]) */ -if (param &&isdigit (param[0 ])) +if (param &&isdigit (param[0 ])) { trigger =strsep (¶m," \t" ); +if (param) { + param =skip_spaces (param); +if (!*param) + param =NULL ; + } + } trigger_ops = cmd_ops->get_trigger_ops (cmd, trigger);
@@ -1185,6 +1197,11 @@ event_enable_trigger_func(struct event_command *cmd_ops, trigger =strsep (¶m," \t" );if (!trigger)return -EINVAL ; +if (param) { + param =skip_spaces (param); +if (!*param) + param =NULL ; + } system =strsep (&trigger,":" );if (!trigger)
lib/zlib_inflate/inffast.c +35 -56
216 lines not on this page · raw message
mm/slab_common.c +1 -1
@@ -1269,7 +1269,7 @@ void kzfree(const void *p)if (unlikely (ZERO_OR_NULL_PTR (mem)))return ; ks =ksize (mem); -memset (mem,0 , ks); +memzero_explicit (mem, ks);kfree (mem); }EXPORT_SYMBOL (kzfree);
net/core/dev.c +26 -23
120 lines not on this page · raw message
net/core/sock.c +2 -0
@@ -1435,6 +1435,7 @@ struct sock *sk_alloc(struct net *net, int family, gfp_t priority,sock_update_classid (sk);sock_update_netprioidx (sk); +sk_tx_queue_clear (sk); }return sk;
@@ -1601,6 +1602,7 @@ struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority)*/ sk_refcnt_debug_inc (newsk);sk_set_socket (newsk,NULL ); +sk_tx_queue_clear (newsk); newsk->sk_wq =NULL ;sk_update_clone (sk, newsk);
net/ipv4/fib_semantics.c +1 -1
@@ -776,7 +776,7 @@ static int fib_check_nh(struct fib_config *cfg, struct fib_info *fi,if (fl4.flowi4_scope <RT_SCOPE_LINK ) fl4.flowi4_scope =RT_SCOPE_LINK ; -if (cfg->fc_table) +if (cfg->fc_table && cfg->fc_table !=RT_TABLE_MAIN ) tbl =fib_get_table (net, cfg->fc_table);if (tbl)
net/ipv4/ip_tunnel.c +8 -6
@@ -98,9 +98,10 @@ struct ip_tunnel *ip_tunnel_lookup(struct ip_tunnel_net *itn, __be32 remote, __be32 local, __be32 key) { - unsigned int hash; struct ip_tunnel *t, *cand = NULL;struct hlist_head *head; +struct net_device *ndev; +unsigned int hash; hash =ip_tunnel_hash (key, remote); head = &itn->tunnels[hash];
@@ -175,8 +176,9 @@ struct ip_tunnel *ip_tunnel_lookup(struct ip_tunnel_net *itn,if (t)return t; -if (itn->fb_tunnel_dev && itn->fb_tunnel_dev->flags &IFF_UP ) -return netdev_priv (itn->fb_tunnel_dev); + ndev =READ_ONCE (itn->fb_tunnel_dev); +if (ndev && ndev->flags &IFF_UP ) +return netdev_priv (ndev);return NULL ; }
@@ -1160,9 +1162,9 @@ void ip_tunnel_uninit(struct net_device *dev)struct ip_tunnel_net *itn; itn =net_generic (net, tunnel->ip_tnl_net_id); -/* fb_tunnel_dev will be unregisted in net-exit call. */ -if (itn->fb_tunnel_dev != dev) -ip_tunnel_del (itn,netdev_priv (dev)); +ip_tunnel_del (itn,netdev_priv (dev)); +if (itn->fb_tunnel_dev == dev) +WRITE_ONCE (itn->fb_tunnel_dev,NULL );dst_cache_reset (&tunnel->dst_cache); }
net/ipv4/tcp_cubic.c +2 -0
@@ -414,6 +414,8 @@ static void hystart_update(struct sock *sk, u32 delay)if (hystart_detect &HYSTART_DELAY ) {/* obtain the minimum delay of more than sampling packets */ +if (ca->curr_rtt > delay) + ca->curr_rtt = delay;if (ca->sample_cnt <HYSTART_MIN_SAMPLES ) {if (ca->curr_rtt ==0 || ca->curr_rtt > delay) ca->curr_rtt = delay;
net/ipv4/tcp_input.c +10 -2
@@ -4465,7 +4465,11 @@ static void tcp_data_queue_ofo(struct sock *sk, struct sk_buff *skb)if (tcp_ooo_try_coalesce (sk, tp->ooo_last_skb, skb, &fragstolen)) { coalesce_done: -tcp_grow_window (sk, skb); +/* For non sack flows, do not grow window to force DUPACK +* and trigger fast retransmit. +*/ +if (tcp_is_sack (tp)) +tcp_grow_window (sk, skb);kfree_skb_partial (skb, fragstolen); skb =NULL ; goto add_sack;
@@ -4545,7 +4549,11 @@ add_sack:tcp_sack_new_ofo_skb (sk, seq, end_seq); end:if (skb) { -tcp_grow_window (sk, skb); +/* For non sack flows, do not grow window to force DUPACK +* and trigger fast retransmit. +*/ +if (tcp_is_sack (tp)) +tcp_grow_window (sk, skb);skb_set_owner_r (skb, sk); } }
net/ipv6/ip6_gre.c +6 -3
@@ -125,6 +125,7 @@ static struct ip6_tnl *ip6gre_tunnel_lookup(struct net_device *dev,int dev_type = (gre_proto ==htons (ETH_P_TEB )) ?ARPHRD_ETHER :ARPHRD_IP6GRE ;int score, cand_score =4 ; +struct net_device *ndev;for_each_ip_tunnel_rcu (t, ign->tunnels_r_l[h0 ^ h1]) { if (!ipv6_addr_equal(local, &t->parms.laddr) ||
@@ -227,9 +228,9 @@ static struct ip6_tnl *ip6gre_tunnel_lookup(struct net_device *dev,if (cand)return cand; - dev = ign->fb_tunnel_dev; -if (dev->flags &IFF_UP ) -return netdev_priv (dev); + ndev =READ_ONCE (ign->fb_tunnel_dev); +if (ndev && ndev->flags &IFF_UP ) +return netdev_priv (ndev);return NULL ; }
@@ -364,6 +365,8 @@ static void ip6gre_tunnel_uninit(struct net_device *dev)struct ip6gre_net *ign =net_generic (t->net, ip6gre_net_id);ip6gre_tunnel_unlink (ign, t); +if (ign->fb_tunnel_dev == dev) +WRITE_ONCE (ign->fb_tunnel_dev,NULL );dst_cache_reset (&t->dst_cache);dev_put (dev); }
net/ipv6/mcast.c +1 -0
@@ -2580,6 +2580,7 @@ void ipv6_mc_destroy_dev(struct inet6_dev *idev)write_unlock_bh (&idev->lock);igmp6_group_dropped (i); +ip6_mc_clear_src (i);ma_put (i);write_lock_bh (&idev->lock);
net/l2tp/l2tp_core.c +6 -1
@@ -351,8 +351,13 @@ int l2tp_session_register(struct l2tp_session *session,spin_lock_bh (&pn->l2tp_session_hlist_lock); +/* IP encap expects session IDs to be globally unique, while +* UDP encap doesn't. +*/ hlist_for_each_entry (session_walk, g_head, global_hlist) -if (session_walk->session_id == session->session_id) { +if (session_walk->session_id == session->session_id && + (session_walk->tunnel->encap ==L2TP_ENCAPTYPE_IP || + tunnel->encap ==L2TP_ENCAPTYPE_IP )) { err = -EEXIST ; goto err_tlock_pnlock; }
net/netfilter/ipset/ip_set_core.c +2 -0
@@ -379,6 +379,8 @@ ip_set_elem_len(struct ip_set *set, struct nlattr *tb[], size_t len,for (id =0 ; id <IPSET_EXT_ID_MAX ; id++) {if (!add_extension (id, cadt_flags, tb))continue ; +if (align < ip_set_extensions[id].align) + align = ip_set_extensions[id].align; len =ALIGN (len, ip_set_extensions[id].align); set->offset[id] = len; set->extensions |= ip_set_extensions[id].type;
net/sched/sch_fq.c +14 -18
@@ -830,24 +830,20 @@ nla_put_failure:static int fq_dump_stats (struct Qdisc *sch,struct gnet_dump *d) {struct fq_sched_data *q =qdisc_priv (sch); -struct tc_fq_qd_stats st; - -sch_tree_lock (sch); - - st.gc_flows = q->stat_gc_flows; - st.highprio_packets = q->stat_internal_packets; - st.tcp_retrans = q->stat_tcp_retrans; - st.throttled = q->stat_throttled; - st.flows_plimit = q->stat_flows_plimit; - st.pkts_too_long = q->stat_pkts_too_long; - st.allocation_errors = q->stat_allocation_errors; - st.time_next_delayed_flow = q->time_next_delayed_flow -ktime_get_ns (); - st.flows = q->flows; - st.inactive_flows = q->inactive_flows; - st.throttled_flows = q->throttled_flows; - st.pad =0 ; - -sch_tree_unlock (sch); +u64 now =ktime_get_ns (); +struct tc_fq_qd_stats st = { + .gc_flows = q->stat_gc_flows, + .highprio_packets = q->stat_internal_packets, + .tcp_retrans = q->stat_tcp_retrans, + .throttled = q->stat_throttled, + .flows_plimit = q->stat_flows_plimit, + .pkts_too_long = q->stat_pkts_too_long, + .allocation_errors = q->stat_allocation_errors, + .flows = q->flows, + .inactive_flows = q->inactive_flows, + .throttled_flows = q->throttled_flows, + .time_next_delayed_flow = q->time_next_delayed_flow - now, + };return gnet_stats_copy_app (d, &st,sizeof (st)); }
net/sched/sch_generic.c +1 -0
@@ -329,6 +329,7 @@ void __netdev_watchdog_up(struct net_device *dev)dev_hold (dev); } } +EXPORT_SYMBOL_GPL (__netdev_watchdog_up);static void dev_watchdog_up (struct net_device *dev) {
net/sctp/associola.c +4 -1
@@ -1575,12 +1575,15 @@ void sctp_assoc_rwnd_decrease(struct sctp_association *asoc, unsigned int len)int sctp_assoc_set_bind_addr_from_ep (struct sctp_association *asoc,sctp_scope_t scope,gfp_t gfp) { +struct sock *sk = asoc->base.sk;int flags;/* Use scoping rules to determine the subset of addresses from * the endpoint. */ - flags = (PF_INET6 == asoc->base.sk->sk_family) ?SCTP_ADDR6_ALLOWED :0 ; + flags = (PF_INET6 == sk->sk_family) ?SCTP_ADDR6_ALLOWED :0 ; +if (!inet_v6_ipv6only (sk)) + flags |=SCTP_ADDR4_ALLOWED ;if (asoc->peer.ipv4_address) flags |=SCTP_ADDR4_PEERSUPP ;if (asoc->peer.ipv6_address)
net/sctp/bind_addr.c +1 -0
@@ -449,6 +449,7 @@ static int sctp_copy_one_addr(struct net *net, struct sctp_bind_addr *dest,* well as the remote peer. */ if ((((AF_INET == addr->sa.sa_family) && + (flags & SCTP_ADDR4_ALLOWED) && (flags & SCTP_ADDR4_PEERSUPP))) || (((AF_INET6 == addr->sa.sa_family) && (flags & SCTP_ADDR6_ALLOWED) &&
net/sctp/protocol.c +1 -0
@@ -210,6 +210,7 @@ int sctp_copy_local_addr_list(struct net *net, struct sctp_bind_addr *bp,* sock as well as the remote peer. */ if ((((AF_INET == addr->a.sa.sa_family) && + (copy_flags & SCTP_ADDR4_ALLOWED) && (copy_flags & SCTP_ADDR4_PEERSUPP))) || (((AF_INET6 == addr->a.sa.sa_family) && (copy_flags & SCTP_ADDR6_ALLOWED) &&
net/sunrpc/addr.c +2 -2
@@ -81,11 +81,11 @@ static size_t rpc_ntop6(const struct sockaddr *sap, rc =snprintf (scopebuf,sizeof (scopebuf),"%c%u" ,IPV6_SCOPE_DELIMITER , sin6->sin6_scope_id); -if (unlikely ((size_t )rc >sizeof (scopebuf))) +if (unlikely ((size_t )rc >=sizeof (scopebuf)))return 0 ; len += rc; -if (unlikely (len > buflen)) +if (unlikely (len >= buflen))return 0 ;strcat (buf, scopebuf);
net/sunrpc/rpc_pipe.c +1 -0
@@ -1347,6 +1347,7 @@ rpc_gssd_dummy_populate(struct dentry *root, struct rpc_pipe *pipe_data) q.len =strlen (gssd_dummy_clnt_dir[0 ].name); clnt_dentry =d_hash_and_lookup (gssd_dentry, &q);if (!clnt_dentry) { +__rpc_depopulate (gssd_dentry, gssd_dummy_clnt_dir,0 ,1 ); pipe_dentry =ERR_PTR (-ENOENT ); goto out; }
net/sunrpc/xdr.c +4 -0
@@ -1031,6 +1031,7 @@ xdr_buf_subsegment(struct xdr_buf *buf, struct xdr_buf *subbuf, base =0 ; }else { base -= buf->head[0 ].iov_len; + subbuf->head[0 ].iov_base = buf->head[0 ].iov_base; subbuf->head[0 ].iov_len =0 ; }
@@ -1043,6 +1044,8 @@ xdr_buf_subsegment(struct xdr_buf *buf, struct xdr_buf *subbuf, base =0 ; }else { base -= buf->page_len; + subbuf->pages = buf->pages; + subbuf->page_base =0 ; subbuf->page_len =0 ; }
@@ -1054,6 +1057,7 @@ xdr_buf_subsegment(struct xdr_buf *buf, struct xdr_buf *subbuf, base =0 ; }else { base -= buf->tail[0 ].iov_len; + subbuf->tail[0 ].iov_base = buf->tail[0 ].iov_base; subbuf->tail[0 ].iov_len =0 ; }
scripts/Kbuild.include +6 -5
@@ -81,20 +81,21 @@ cc-cross-prefix = \ fi))) # output directory for tests below -TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/) +TMPOUT = $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/).tmp_$$$$ # try-run # Usage: option = $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise) # Exit code chooses option. "$$TMP" is can be used as temporary file and # is automatically cleaned up. try-run = $(shell set -e; \ - TMP="$(TMPOUT).$$$$.tmp"; \ - TMPO="$(TMPOUT).$$$$.o"; \ + TMP=$(TMPOUT)/tmp; \ + TMPO=$(TMPOUT)/tmp.o; \ + mkdir -p $(TMPOUT); \ + trap "rm -rf $(TMPOUT)" EXIT; \ if ($(1)) >/dev/null 2>&1; \ then echo "$(2)"; \ else echo "$(3)"; \ - fi; \ - rm -f "$$TMP" "$$TMPO") + fi) # as-option # Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,)
scripts/mksysmap +1 -1
@@ -41,4 +41,4 @@ # so we just ignore them to let readprofile continue to work. # (At least sparc64 has __crc_ in the middle). -$NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)\|\( .L\)' > $2 +$NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)\|\( \.L\)' > $2
security/selinux/ss/services.c +4 -0
@@ -2622,8 +2622,12 @@ err:if (*names) {for (i =0 ; i < *len; i++)kfree ((*names)[i]); +kfree (*names); }kfree (*values); + *len =0 ; + *names =NULL ; + *values =NULL ; goto out; }
sound/isa/wavefront/wavefront_synth.c +7 -1
@@ -1174,7 +1174,10 @@ wavefront_send_alias (snd_wavefront_t *dev, wavefront_patch_info *header)"alias for %d\n" , header->number, header->hdr.a.OriginalSample); - + +if (header->number >=WF_MAX_SAMPLE ) +return -EINVAL ; +munge_int32 (header->number, &alias_hdr[0 ],2 );munge_int32 (header->hdr.a.OriginalSample, &alias_hdr[2 ],2 ); munge_int32 (*((unsigned int *)&header->hdr.a.sampleStartOffset),
@@ -1205,6 +1208,9 @@ wavefront_send_multisample (snd_wavefront_t *dev, wavefront_patch_info *header)int num_samples;unsigned char *msample_hdr; +if (header->number >=WF_MAX_SAMPLE ) +return -EINVAL ; + msample_hdr =kmalloc (WF_MSAMPLE_BYTES ,GFP_KERNEL );if (! msample_hdr)return -ENOMEM ;
sound/soc/fsl/fsl_asrc_dma.c +1 -0
@@ -243,6 +243,7 @@ static int fsl_asrc_dma_hw_params(struct snd_pcm_substream *substream, ret =dmaengine_slave_config (pair->dma_chan[dir], &config_be);if (ret) {dev_err (dev,"failed to config DMA channel for Back-End\n" ); +dma_release_channel (pair->dma_chan[dir]);return ret; }
sound/usb/card.h +4 -0
@@ -80,6 +80,10 @@ struct snd_usb_endpoint {dma_addr_t sync_dma;/* DMA address of syncbuf */ unsigned int pipe;/* the data i/o pipe */ +unsigned int framesize[2 ];/* small/large frame sizes in samples */ +unsigned int sample_rem;/* remainder from division fs/fps */ +unsigned int sample_accum;/* sample accumulator */ +unsigned int fps;/* frames per second */ unsigned int freqn;/* nominal sampling rate in fs/fps in Q16.16 format */ unsigned int freqm;/* momentary sampling rate in fs/fps in Q16.16 format */ int freqshift;/* how much to shift the feedback value to get Q16.16 */
sound/usb/endpoint.c +38 -5
78 lines not on this page · raw message
sound/usb/endpoint.h +1 -0
@@ -27,6 +27,7 @@ void snd_usb_endpoint_release(struct snd_usb_endpoint *ep);void snd_usb_endpoint_free (struct snd_usb_endpoint *ep);int snd_usb_endpoint_implicit_feedback_sink (struct snd_usb_endpoint *ep); +int snd_usb_endpoint_slave_next_packet_size (struct snd_usb_endpoint *ep);int snd_usb_endpoint_next_packet_size (struct snd_usb_endpoint *ep); void snd_usb_handle_sync_urb(struct snd_usb_endpoint *ep,
sound/usb/mixer.c +29 -12
101 lines not on this page · raw message
sound/usb/mixer.h +13 -2
@@ -48,10 +48,17 @@ struct usb_mixer_elem_list {struct usb_mixer_elem_list *next_id_elem;/* list of controls with same id */ struct snd_kcontrol *kctl;unsigned int id; +bool is_std_info;usb_mixer_elem_dump_func_t dump;usb_mixer_elem_resume_func_t resume; }; +/* iterate over mixer element list of the given unit id */ +#define for_each_mixer_elem (list, mixer, id) \ + for ((list) = (mixer)->id_elems[id]; (list); (list) = (list)->next_id_elem) +#define mixer_elem_list_to_info (list) \ + container_of(list, struct usb_mixer_elem_info, head) +struct usb_mixer_elem_info {struct usb_mixer_elem_list head;unsigned int control;/* CS or ICN (high byte) */
@@ -79,8 +86,12 @@ void snd_usb_mixer_notify_id(struct usb_mixer_interface *mixer, int unitid);int snd_usb_mixer_set_ctl_value (struct usb_mixer_elem_info *cval,int request,int validx,int value_set); -int snd_usb_mixer_add_control (struct usb_mixer_elem_list *list, -struct snd_kcontrol *kctl); +int snd_usb_mixer_add_list (struct usb_mixer_elem_list *list, +struct snd_kcontrol *kctl, +bool is_std_info); + +#define snd_usb_mixer_add_control (list, kctl) \ + snd_usb_mixer_add_list(list, kctl, true) void snd_usb_mixer_elem_init_std(struct usb_mixer_elem_list *list, struct usb_mixer_interface *mixer,
sound/usb/mixer_quirks.c +6 -5
@@ -168,7 +168,8 @@ static int add_single_ctl_with_resume(struct usb_mixer_interface *mixer,return -ENOMEM ; } kctl->private_free = snd_usb_mixer_elem_free; -return snd_usb_mixer_add_control (list, kctl); +/* don't use snd_usb_mixer_add_control() here, this is a special list element */ +return snd_usb_mixer_add_list (list, kctl, false); }/*
@@ -1167,17 +1168,17 @@ void snd_emuusb_set_samplerate(struct snd_usb_audio *chip, {struct usb_mixer_interface *mixer;struct usb_mixer_elem_info *cval; -int unitid =12 ;/* SamleRate ExtensionUnit ID */ +int unitid =12 ;/* SampleRate ExtensionUnit ID */ list_for_each_entry (mixer, &chip->mixer_list, list) { - cval = (struct usb_mixer_elem_info *)mixer->id_elems[unitid]; -if (cval) { +if (mixer->id_elems[unitid]) { + cval =mixer_elem_list_to_info (mixer->id_elems[unitid]);snd_usb_mixer_set_ctl_value (cval,UAC_SET_CUR , cval->control <<8 , samplerate_id);snd_usb_mixer_notify_id (mixer, unitid); +break ; } -break ; } }
sound/usb/mixer_scarlett.c +2 -4
@@ -287,8 +287,7 @@ static int scarlett_ctl_switch_put(struct snd_kcontrol *kctl,static int scarlett_ctl_resume (struct usb_mixer_elem_list *list) { -struct usb_mixer_elem_info *elem = - container_of(list, struct usb_mixer_elem_info, head); +struct usb_mixer_elem_info *elem =mixer_elem_list_to_info (list);int i;for (i =0 ; i < elem->channels; i++)
@@ -447,8 +446,7 @@ static int scarlett_ctl_enum_put(struct snd_kcontrol *kctl,static int scarlett_ctl_enum_resume (struct usb_mixer_elem_list *list) { -struct usb_mixer_elem_info *elem = - container_of(list, struct usb_mixer_elem_info, head); +struct usb_mixer_elem_info *elem =mixer_elem_list_to_info (list);if (elem->cached)snd_usb_set_cur_mix_value (elem,0 ,0 , *elem->cache_val);
sound/usb/pcm.c +2 -0
@@ -1473,6 +1473,8 @@ static void prepare_playback_urb(struct snd_usb_substream *subs,for (i =0 ; i < ctx->packets; i++) {if (ctx->packet_size[i]) counts = ctx->packet_size[i]; +else if (ep->sync_master) + counts =snd_usb_endpoint_slave_next_packet_size (ep);else counts =snd_usb_endpoint_next_packet_size (ep);
sound/usb/quirks.c +1 -0
@@ -1162,6 +1162,7 @@ bool snd_usb_get_sample_rate_quirk(struct snd_usb_audio *chip)static bool is_marantz_denon_dac (unsigned int id) {switch (id) { +case USB_ID (0x154e ,0x1002 ):/* Denon DCD-1500RE */ case USB_ID (0x154e ,0x1003 ):/* Denon DA-300USB */ case USB_ID (0x154e ,0x3005 ):/* Marantz HD-DAC1 */ case USB_ID (0x154e ,0x3006 ):/* Marantz SA-14S1 */
tools/perf/builtin-report.c +1 -2
@@ -334,8 +334,7 @@ static size_t hists__fprintf_nr_sample_events(struct hists *hists, struct reportif (evname !=NULL ) ret +=fprintf (fp," of event '%s'" , evname); -if (symbol_conf.show_ref_callgraph && -strstr (evname,"call-graph=no" )) { +if (symbol_conf.show_ref_callgraph && evname &&strstr (evname,"call-graph=no" )) { ret +=fprintf (fp,", show reference callgraph" ); }
tools/testing/selftests/networking/timestamping/timestamping.c +8 -2
@@ -332,10 +332,16 @@ int main(int argc, char **argv)int val;socklen_t len;struct timeval next; +size_t if_len;if (argc <2 )usage (0 ); interface = argv[1 ]; + if_len =strlen (interface); +if (if_len >=IFNAMSIZ ) { +printf ("interface name exceeds IFNAMSIZ\n" ); +exit (1 ); + }for (i =2 ; i < argc; i++) {if (!strcasecmp (argv[i],"SO_TIMESTAMP" ))
@@ -369,12 +375,12 @@ int main(int argc, char **argv)bail ("socket" );memset (&device,0 ,sizeof (device)); -strncpy (device.ifr_name, interface,sizeof (device.ifr_name)); +memcpy (device.ifr_name, interface, if_len +1 );if (ioctl (sock,SIOCGIFADDR , &device) <0 )bail ("getting interface IP address" );memset (&hwtstamp,0 ,sizeof (hwtstamp)); -strncpy (hwtstamp.ifr_name, interface,sizeof (hwtstamp.ifr_name)); +memcpy (hwtstamp.ifr_name, interface, if_len +1 ); hwtstamp.ifr_data = (void *)&hwconfig;memset (&hwconfig,0 ,sizeof (hwconfig)); hwconfig.tx_type =