Linux 4.4.80
Greg KH
maintainerI'm announcing the release of the 4.4.80 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:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/boot/dts/omap3-n900.dts | 2 arch/arm/configs/s3c2410_defconfig | 6 arch/arm64/boot/dts/xilinx/zynqmp-ep108.dts | 2 arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 6 arch/arm64/mm/fault.c | 8 arch/openrisc/kernel/vmlinux.lds.S | 2 arch/powerpc/include/asm/topology.h | 14 - arch/powerpc/kernel/setup_64.c | 4 arch/powerpc/kvm/book3s_hv.c | 41 +++ arch/powerpc/kvm/book3s_hv_rmhandlers.S | 41 ++- arch/powerpc/platforms/pseries/reconfig.c | 1 arch/x86/kernel/cpu/mcheck/mce_amd.c | 3 crypto/authencesn.c | 5 drivers/acpi/glue.c | 10 drivers/base/power/domain.c | 6 drivers/block/xen-blkback/blkback.c | 3 drivers/block/xen-blkback/xenbus.c | 8 drivers/char/ipmi/ipmi_watchdog.c | 7 drivers/char/tpm/tpm-chip.c | 85 +++---- drivers/char/tpm/tpm-interface.c | 1 drivers/char/tpm/tpm-sysfs.c | 2 drivers/char/tpm/tpm.h | 5 drivers/dma/ioat/hw.h | 2 drivers/dma/ioat/init.c | 11 drivers/dma/ti-dma-crossbar.c | 2 drivers/gpu/drm/msm/adreno/adreno_gpu.c | 9 drivers/gpu/drm/msm/msm_gem_submit.c | 3 drivers/gpu/drm/msm/msm_ringbuffer.c | 3 drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c | 2 drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 20 - drivers/gpu/drm/rcar-du/rcar_du_crtc.h | 2 drivers/gpu/drm/rcar-du/rcar_du_drv.c | 185 +++++++--------- drivers/gpu/drm/rcar-du/rcar_du_hdmicon.c | 11 drivers/gpu/drm/rcar-du/rcar_du_kms.c | 7 drivers/gpu/drm/rcar-du/rcar_du_lvdscon.c | 11 drivers/gpu/drm/rcar-du/rcar_du_vgacon.c | 11 drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 2 drivers/hid/hid-core.c | 1 drivers/hid/hid-ids.h | 3 drivers/infiniband/core/uverbs_cmd.c | 5 drivers/irqchip/irq-keystone.c | 28 +- drivers/irqchip/irq-mxs.c | 4 drivers/isdn/i4l/isdn_common.c | 1 drivers/isdn/i4l/isdn_net.c | 5 drivers/isdn/i4l/isdn_ppp.c | 2 drivers/mailbox/mailbox.c | 13 - drivers/md/raid5.c | 2 drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c | 2 drivers/net/ethernet/mellanox/mlx4/icm.c | 7 drivers/net/ethernet/realtek/r8169.c | 1 drivers/net/ethernet/renesas/sh_eth.c | 1 drivers/net/phy/phy_device.c | 2 drivers/net/usb/kaweth.c | 10 drivers/net/wireless/ath/ath10k/wmi-ops.h | 6 drivers/net/wireless/ath/wil6210/main.c | 15 - drivers/nfc/fdp/i2c.c | 6 drivers/nvdimm/btt.c | 9 drivers/nvmem/imx-ocotp.c | 2 drivers/scsi/fnic/fnic.h | 1 drivers/scsi/fnic/fnic_scsi.c | 16 + drivers/scsi/mpt3sas/mpt3sas_base.c | 33 +- drivers/scsi/snic/snic_main.c | 3 drivers/spi/spi-dw.c | 5 drivers/staging/comedi/comedi_fops.c | 6 drivers/usb/gadget/function/f_hid.c | 2 drivers/vfio/pci/vfio_pci.c | 4 drivers/vfio/pci/vfio_pci_rdwr.c | 5 drivers/video/fbdev/cobalt_lcdfb.c | 5 fs/btrfs/inode.c | 11 fs/dcache.c | 27 ++ fs/debugfs/inode.c | 10 fs/namei.c | 8 fs/notify/fsnotify.c | 8 fs/pstore/ram.c | 5 fs/pstore/ram_core.c | 25 +- fs/seq_file.c | 7 fs/xfs/xfs_aops.c | 21 + include/linux/dcache.h | 6 include/linux/fsnotify.h | 31 -- include/linux/phy.h | 4 include/linux/pstore_ram.h | 11 include/linux/seq_file.h | 13 - kernel/resource.c | 13 - kernel/sched/core.c | 15 + kernel/sched/sched.h | 13 - net/8021q/vlan.c | 5 net/8021q/vlan.h | 2 net/8021q/vlan_dev.c | 20 + net/core/dev.c | 19 + net/ipv6/ip6_output.c | 2 net/key/af_key.c | 46 +++ net/xfrm/xfrm_policy.c | 9 sound/soc/codecs/nau8825.c | 3 sound/soc/codecs/nau8825.h | 3 sound/soc/codecs/tlv320aic3x.c | 13 + sound/soc/soc-pcm.c | 4 sound/usb/endpoint.c | 3 tools/lib/traceevent/plugin_sched_switch.c | 4 tools/perf/Makefile.perf | 4 tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 67 +++-- tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c | 24 +- tools/perf/util/symbol-elf.c | 6 103 files changed, 751 insertions(+), 461 deletions(-)
Adrian Hunter (4):
perf intel-pt: Fix ip compression
perf intel-pt: Fix last_ip usage
perf intel-pt: Use FUP always when scanning for an IP
perf intel-pt: Ensure never to set 'last_ip' when packet 'count' is zero
Al Viro (1):
dentry name snapshots
Andrzej Hajda (1):
v4l: s5c73m3: fix negation operator
Annie Cherkaev (1):
isdn/i4l: fix buffer overflow
Arnaldo Carvalho de Melo (2):
perf tools: Install tools/lib/traceevent plugins with install-bin perf symbols: Robustify reading of build-id from sysfs
Arnd Bergmann (1):
vfio-pci: use 32-bit comparisons for register address for gcc-4.5
Arvind Yadav (2):
video: fbdev: cobalt_lcdfb: Handle return NULL error from devm_ioremap
vfio-pci: Handle error from pci_iomap
Ben Skeggs (1):
drm/nouveau/bar/gf100: fix access to upper half of BAR2
Brian Foster (1):
xfs: don't BUG() on mixed direct and mapped I/O
Burak Ok (1):
scsi: snic: Return error code on memory allocation failure
Calvin Owens (1):
mpt3sas: Don't overreach ioc->reply_post[] during initialization
Cheah Kok Cheong (1):
Staging: comedi: comedi_fops: Avoid orphaned proc entry
Christophe JAILLET (1):
dmaengine: ti-dma-crossbar: Add some 'of_node_put()' in error path.
Chun-Hao Lin (1):
r8169: add support for RTL8168 series add-on card.
Daniel Bristot de Oliveira (1):
tools lib traceevent: Fix prev/next_prio for deadline tasks
Daniel Schultz (1):
nvmem: imx-ocotp: Fix wrong register size
Daniel Vetter (1):
drm/rcar: Nuke preclose hook
Dave Jiang (2):
dmaengine: ioatdma: Add Skylake PCI Dev ID
dmaengine: ioatdma: workaround SKX ioatdma version
David Lechner (1):
usb: gadget: Fix copy/pasted error message
Eric Dumazet (2):
net: reduce skb_warn_bad_offload() noise
net: skb_needs_check() accepts CHECKSUM_NONE for tx
Florian Fainelli (1):
net: phy: Do not perform software reset for Generic PHY
Greg Kroah-Hartman (2):
Revert "powerpc/numa: Fix percpu allocations to be NUMA aware" Linux 4.4.80
Herbert Xu (1):
crypto: authencesn - Fix digest_null crash
Ioan-Adrian Ratiu (1):
ALSA: usb-audio: test EP_FLAG_RUNNING at urb completion
Ismail, Mustafa (1):
RDMA/uverbs: Fix the check for port number
Jarkko Sakkinen (1):
tpm: fix a kernel memory leak in tpm-sysfs.c
Jia-Ju Bai (1):
isdn: Fix a sleep-in-atomic bug
Jiri Kosina (1):
HID: ignore Petzl USB headlamp
Joel Fernandes (2):
pstore: Make spinlock per zone instead of global
pstore: Allow prz to control need for locking
John Hsu (1):
ASoC: nau8825: fix invalid configuration in Pre-Scalar of FLL
Jordan Crouse (2):
drm/msm: Ensure that the hardware write pointer is valid drm/msm: Verify that MSM_SUBMIT_BO_FLAGS are set
Juergen Gross (2):
xen/blkback: don't free be structure too early xen/blkback: don't use xen_blkif_get() in xen-blkback kthread
Kees Cook (2):
pstore: Correctly initialize spinlock and flags
pstore: Use dynamic spinlock initializer
Konstantin Khlebnikov (1):
sched/cgroup: Move sched_online_group() back into css_online() to fix crash
Krzysztof Kozlowski (1):
ARM: s3c2410_defconfig: Fix invalid values for NF_CT_PROTO_*
Laurent Pinchart (2):
drm: rcar-du: Perform initialization/cleanup at probe/remove time
drm: rcar-du: Simplify and fix probe error handling
Laurent Vivier (1):
powerpc/pseries: Fix of_node_put() underflow during reconfig remove
Leon Romanovsky (1):
net/mlx4: Remove BUG_ON from ICM allocation routine
Linus Torvalds (2):
Make file credentials available to the seqfile interfaces /proc/iomem: only expose physical resource addresses to privileged users
Lior David (1):
wil6210: fix deadlock when using fw_no_recovery option
Liu Bo (1):
Btrfs: adjust outstanding_extents counter properly when dio write is split
Mark Rutland (1):
arm64: mm: fix show_pte KERN_CONT fallout
Michal Kazior (1):
ath10k: fix null deref on wmi-tlv when trying spectral scan
Michal Simek (1):
ARM64: zynqmp: Fix W=1 dtc 1.4 warnings
Mike Manning (1):
vlan: Propagate MAC address to VLANs
Moritz Fischer (1):
ARM64: zynqmp: Fix i2c node's compatible string
Ofer Heifetz (1):
md/raid5: add thread_group worker async_tx_issue_pending_all
Oliver Neukum (2):
kaweth: fix firmware download
kaweth: fix oops upon failed memory allocation
Pali Rohár (1):
ARM: dts: n900: Mark eMMC slot with no-sdio and no-sd flags
Patrick Lai (1):
ASoC: dpcm: Avoid putting stream state to STOP when FE stream is paused
Paul Mackerras (4):
KVM: PPC: Book3S HV: Context-switch EBB registers properly
KVM: PPC: Book3S HV: Restore critical SPRs to host values on guest exit
KVM: PPC: Book3S HV: Reload HTM registers explicitly
KVM: PPC: Book3S HV: Save/restore host values of debug registers
Peter Ujfalusi (1):
ASoC: tlv320aic3x: Mark the RESET register as volatile
Phil Reid (1):
spi: dw: Make debugfs name unique between instances
Rafael J. Wysocki (1):
ACPI / scan: Prefer devices without _HID/_CID for _ADR matching
Satish Kharat (1):
scsi: fnic: Avoid sending reset to firmware when another reset is in progress
Sergei Shtylyov (1):
sh_eth: enable RX descriptor word 0 shift on SH7734
Sinclair Yeh (1):
drm/vmwgfx: Fix gcc-7.1.1 warning
Stafford Horne (1):
openrisc: Add _text symbol to fix ksym build error
Stefan Berger (1):
tpm: Replace device number bitmap with IDR
Stefan Wahren (1):
irqchip/mxs: Enable SKIP_SET_WAKE and MASK_ON_SUSPEND
Steffen Klassert (1):
xfrm: Don't use sk_family for socket policy lookups
Strashko, Grygorii (1):
irqchip/keystone: Fix "scheduling while atomic" on rt
Sudeep Holla (4):
mailbox: always wait in mbox_send_message for blocking Tx mode
mailbox: skip complete wait event if timer expired
mailbox: handle empty message in tx_tick
PM / Domains: defer dev_pm_domain_set() until genpd->attach_dev succeeds if present
Sudip Mukherjee (1):
nfc: fdp: fix NULL pointer dereference
Thomas Gleixner (1):
x86/mce/AMD: Make the init code more robust
Valentin Vidic (1):
ipmi/watchdog: fix watchdog timeout set on reboot
Vishal Verma (1):
libnvdimm, btt: fix btt_rw_page not returning errors
Wanpeng Li (1):
sched/cputime: Fix prev steal time accouting during CPU hotplug
Yuejie Shi (1):
af_key: Add lock to key dump
Zheng Li (1):
ipv6: Should use consistent conditional judgement for ip6 fragment between __ip6_append_data and ip6_finish_output
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 79 +SUBLEVEL = 80 EXTRAVERSION = NAME = Blurry Fish Butt
arch/arm/boot/dts/omap3-n900.dts +2 -0
@@ -697,6 +697,8 @@ vmmc_aux-supply = <&vsim>; bus-width = <8>; non-removable; + no-sdio; + no-sd; }; &mmc3 {
arch/arm/configs/s3c2410_defconfig +3 -3
@@ -87,9 +87,9 @@ CONFIG_IPV6_TUNNEL=m CONFIG_NETFILTER=y CONFIG_NF_CONNTRACK=m CONFIG_NF_CONNTRACK_EVENTS=y -CONFIG_NF_CT_PROTO_DCCP=m -CONFIG_NF_CT_PROTO_SCTP=m -CONFIG_NF_CT_PROTO_UDPLITE=m +CONFIG_NF_CT_PROTO_DCCP=y +CONFIG_NF_CT_PROTO_SCTP=y +CONFIG_NF_CT_PROTO_UDPLITE=y CONFIG_NF_CONNTRACK_AMANDA=m CONFIG_NF_CONNTRACK_FTP=m CONFIG_NF_CONNTRACK_H323=m
arch/arm64/boot/dts/xilinx/zynqmp-ep108.dts +1 -1
@@ -26,7 +26,7 @@ stdout-path = "serial0:115200n8"; }; - memory { + memory@0 { device_type = "memory"; reg = <0x0 0x0 0x40000000>; };
arch/arm64/boot/dts/xilinx/zynqmp.dtsi +3 -3
@@ -71,7 +71,7 @@ <1 10 0xf01>; }; - amba_apu { + amba_apu: amba_apu@0 { compatible = "simple-bus"; #address-cells = <2>; #size-cells = <1>;
@@ -191,7 +191,7 @@ }; i2c0: i2c@ff020000 { - compatible = "cdns,i2c-r1p10"; + compatible = "cdns,i2c-r1p14", "cdns,i2c-r1p10"; status = "disabled"; interrupt-parent = <&gic>; interrupts = <0 17 4>;
@@ -202,7 +202,7 @@ }; i2c1: i2c@ff030000 { - compatible = "cdns,i2c-r1p10"; + compatible = "cdns,i2c-r1p14", "cdns,i2c-r1p10"; status = "disabled"; interrupt-parent = <&gic>; interrupts = <0 18 4>;
arch/arm64/mm/fault.c +4 -4
@@ -66,21 +66,21 @@ void show_pte(struct mm_struct *mm, unsigned long addr)break ; pud =pud_offset (pgd, addr); -printk (", *pud=%016llx" ,pud_val (*pud)); +pr_cont (", *pud=%016llx" ,pud_val (*pud));if (pud_none (*pud) ||pud_bad (*pud))break ; pmd =pmd_offset (pud, addr); -printk (", *pmd=%016llx" ,pmd_val (*pmd)); +pr_cont (", *pmd=%016llx" ,pmd_val (*pmd));if (pmd_none (*pmd) ||pmd_bad (*pmd))break ; pte =pte_offset_map (pmd, addr); -printk (", *pte=%016llx" ,pte_val (*pte)); +pr_cont (", *pte=%016llx" ,pte_val (*pte));pte_unmap (pte); }while (0 ); -printk ("\n" ); +pr_cont ("\n" ); }#ifdef CONFIG_ARM64_HW_AFDBM
arch/openrisc/kernel/vmlinux.lds.S +2 -0
@@ -38,6 +38,8 @@ SECTIONS /* Read-only sections, merged into text segment: */ . = LOAD_BASE ; + _text = .; + /* _s_kernel_ro must be page aligned */ . = ALIGN(PAGE_SIZE); _s_kernel_ro = .;
arch/powerpc/include/asm/topology.h +0 -14
@@ -44,22 +44,8 @@ extern void __init dump_numa_cpu_topology(void);extern int sysfs_add_device_to_node (struct device *dev,int nid);extern void sysfs_remove_device_from_node (struct device *dev,int nid); -static inline int early_cpu_to_node (int cpu) -{ -int nid; - - nid = numa_cpu_lookup_table[cpu]; - -/* -* Fall back to node 0 if nid is unset (it should be, except bugs). -* This allows callers to safely do NODE_DATA(early_cpu_to_node(cpu)). -*/ -return (nid <0 ) ?0 : nid; -}#else -static inline int early_cpu_to_node (int cpu) {return 0 ; } -static inline void dump_numa_cpu_topology (void ) {}static inline int sysfs_add_device_to_node (struct device *dev,int nid)
arch/powerpc/kernel/setup_64.c +2 -2
@@ -751,7 +751,7 @@ void __init setup_arch(char **cmdline_p)static void *__init pcpu_fc_alloc (unsigned int cpu,size_t size,size_t align) { -return __alloc_bootmem_node (NODE_DATA (early_cpu_to_node (cpu)), size, align, +return __alloc_bootmem_node (NODE_DATA (cpu_to_node (cpu)), size, align,__pa (MAX_DMA_ADDRESS )); }
@@ -762,7 +762,7 @@ static void __init pcpu_fc_free(void *ptr, size_t size)static int pcpu_cpu_distance (unsigned int from,unsigned int to) { -if (early_cpu_to_node (from) ==early_cpu_to_node (to)) +if (cpu_to_node (from) ==cpu_to_node (to))return LOCAL_DISTANCE ;else return REMOTE_DISTANCE ;
arch/powerpc/kvm/book3s_hv.c +40 -1
68 lines not on this page · raw message
arch/powerpc/kvm/book3s_hv_rmhandlers.S +34 -7
91 lines not on this page · raw message
arch/powerpc/platforms/pseries/reconfig.c +0 -1
@@ -82,7 +82,6 @@ static int pSeries_reconfig_remove_node(struct device_node *np)of_detach_node (np);of_node_put (parent); -of_node_put (np);/* Must decrement the refcount */ return 0 ; }
arch/x86/kernel/cpu/mcheck/mce_amd.c +3 -0
@@ -682,6 +682,9 @@ static int threshold_create_bank(unsigned int cpu, unsigned int bank)const char *name = th_names[bank];int err =0 ; +if (!dev) +return -ENODEV ; +if (is_shared_bank (bank)) { nb =node_to_amd_nb (amd_get_nb_id (cpu));
crypto/authencesn.c +5 -0
@@ -245,6 +245,9 @@ static int crypto_authenc_esn_decrypt_tail(struct aead_request *req,u8 *ihash = ohash +crypto_ahash_digestsize (auth);u32 tmp[2 ]; +if (!authsize) + goto decrypt; +/* Move high-order bits of sequence number back. */ scatterwalk_map_and_copy (tmp, dst,4 ,4 ,0 );scatterwalk_map_and_copy (tmp +1 , dst, assoclen + cryptlen,4 ,0 );
@@ -253,6 +256,8 @@ static int crypto_authenc_esn_decrypt_tail(struct aead_request *req,if (crypto_memneq (ihash, ohash, authsize))return -EBADMSG ; +decrypt: +sg_init_table (areq_ctx->dst,2 ); dst =scatterwalk_ffwd (areq_ctx->dst, dst, assoclen);
drivers/acpi/glue.c +9 -1
@@ -98,7 +98,15 @@ static int find_child_checks(struct acpi_device *adev, bool check_children)if (check_children &&list_empty (&adev->children))return -ENODEV ; -return sta_present ?FIND_CHILD_MAX_SCORE :FIND_CHILD_MIN_SCORE ; +/* +* If the device has a _HID (or _CID) returning a valid ACPI/PNP +* device ID, it is better to make it look less attractive here, so that +* the other device with the same _ADR value (that may not have a valid +* device ID) can be matched going forward. [This means a second spec +* violation in a row, so whatever we do here is best effort anyway.] +*/ +return sta_present &&list_empty (&adev->pnp.ids) ? +FIND_CHILD_MAX_SCORE :FIND_CHILD_MIN_SCORE ; } struct acpi_device *acpi_find_child_device(struct acpi_device *parent,
drivers/base/power/domain.c +4 -2
@@ -1188,7 +1188,6 @@ static struct generic_pm_domain_data *genpd_alloc_dev_data(struct device *dev, } dev->power.subsys_data->domain_data = &gpd_data->base; - dev->pm_domain = &genpd->domain;spin_unlock_irq (&dev->power.lock);
@@ -1207,7 +1206,6 @@ static void genpd_free_dev_data(struct device *dev, {spin_lock_irq (&dev->power.lock); - dev->pm_domain =NULL ; dev->power.subsys_data->domain_data =NULL ;spin_unlock_irq (&dev->power.lock);
@@ -1248,6 +1246,8 @@ int __pm_genpd_add_device(struct generic_pm_domain *genpd, struct device *dev,if (ret) goto out; + dev->pm_domain = &genpd->domain; + genpd->device_count++; genpd->max_off_time_changed = true;
@@ -1299,6 +1299,8 @@ int pm_genpd_remove_device(struct generic_pm_domain *genpd,if (genpd->detach_dev) genpd->detach_dev (genpd, dev); + dev->pm_domain =NULL ; +list_del_init (&pdd->list_node);mutex_unlock (&genpd->lock);
drivers/block/xen-blkback/blkback.c +0 -3
@@ -595,8 +595,6 @@ int xen_blkif_schedule(void *arg)unsigned long timeout;int ret; -xen_blkif_get (blkif); -while (!kthread_should_stop ()) {if (try_to_freeze ())continue ;
@@ -650,7 +648,6 @@ purge_gnt_list:print_stats (blkif); blkif->xenblkd =NULL ; -xen_blkif_put (blkif);return 0 ; }
drivers/block/xen-blkback/xenbus.c +3 -5
@@ -221,7 +221,6 @@ static int xen_blkif_disconnect(struct xen_blkif *blkif)if (blkif->xenblkd) {kthread_stop (blkif->xenblkd);wake_up (&blkif->shutdown_wq); - blkif->xenblkd =NULL ; }/* The above kthread_stop() guarantees that at this point we
@@ -266,9 +265,10 @@ static int xen_blkif_disconnect(struct xen_blkif *blkif)static void xen_blkif_free (struct xen_blkif *blkif) { - -xen_blkif_disconnect (blkif); +WARN_ON (xen_blkif_disconnect (blkif));xen_vbd_free (&blkif->vbd); +kfree (blkif->be->mode); +kfree (blkif->be);/* Make sure everything is drained before shutting down */ BUG_ON (blkif->persistent_gnt_c !=0 );
@@ -445,8 +445,6 @@ static int xen_blkbk_remove(struct xenbus_device *dev)xen_blkif_put (be->blkif); } -kfree (be->mode); -kfree (be);return 0 ; }
drivers/char/ipmi/ipmi_watchdog.c +4 -3
@@ -1162,10 +1162,11 @@ static int wdog_reboot_handler(struct notifier_block *this, ipmi_watchdog_state =WDOG_TIMEOUT_NONE ;ipmi_set_timeout (IPMI_SET_TIMEOUT_NO_HB ); }else if (ipmi_watchdog_state !=WDOG_TIMEOUT_NONE ) { -/* Set a long timer to let the reboot happens, but -reboot if it hangs, but only if the watchdog +/* Set a long timer to let the reboot happen or +reset if it hangs, but only if the watchdog timer was already running. */ - timeout =120 ; +if (timeout <120 ) + timeout =120 ; pretimeout =0 ; ipmi_watchdog_state =WDOG_TIMEOUT_RESET ;ipmi_set_timeout (IPMI_SET_TIMEOUT_NO_HB );
drivers/char/tpm/tpm-chip.c +46 -39
152 lines not on this page · raw message
drivers/char/tpm/tpm-interface.c +1 -0
@@ -1127,6 +1127,7 @@ static int __init tpm_init(void) static void __exit tpm_exit(void) { +idr_destroy (&dev_nums_idr);class_destroy (tpm_class);unregister_chrdev_region (tpm_devt,TPM_NUM_DEVICES ); }
drivers/char/tpm/tpm-sysfs.c +2 -0
@@ -38,6 +38,8 @@ static ssize_t pubek_show(struct device *dev, struct device_attribute *attr,struct tpm_chip *chip =dev_get_drvdata (dev); +memset (&tpm_cmd,0 ,sizeof (tpm_cmd)); + tpm_cmd.header.in = tpm_readpubek_header; err =tpm_transmit_cmd (chip, &tpm_cmd,READ_PUBEK_RESULT_SIZE ,0 ,"attempting to read the PUBEK" );
drivers/char/tpm/tpm.h +2 -3
@@ -34,7 +34,7 @@enum tpm_const {TPM_MINOR =224 ,/* officially assigned */ TPM_BUFSIZE =4096 , -TPM_NUM_DEVICES =256 , +TPM_NUM_DEVICES =65536 ,TPM_RETRY =50 ,/* 5 seconds */ };
@@ -200,8 +200,6 @@ struct tpm_chip {acpi_handle acpi_dev_handle;char ppi_version[TPM_PPI_VERSION_LEN +1 ];#endif /* CONFIG_ACPI */ - -struct list_head list; };#define to_tpm_chip (d) container_of(d, struct tpm_chip, dev)
@@ -497,6 +495,7 @@ static inline void tpm_buf_append_u32(struct tpm_buf *buf, const u32 value)extern struct class *tpm_class;extern dev_t tpm_devt;extern const struct file_operations tpm_fops; +extern struct idr dev_nums_idr;enum tpm_transmit_flags {TPM_TRANSMIT_UNLOCKED =BIT (0 ),
drivers/dma/ioat/hw.h +2 -0
@@ -64,6 +64,8 @@#define PCI_DEVICE_ID_INTEL_IOAT_BDX8 0x6f2e#define PCI_DEVICE_ID_INTEL_IOAT_BDX9 0x6f2f +#define PCI_DEVICE_ID_INTEL_IOAT_SKX 0x2021 +#define IOAT_VER_1_2 0x12/* Version 1.2 */ #define IOAT_VER_2_0 0x20/* Version 2.0 */ #define IOAT_VER_3_0 0x30/* Version 3.0 */
drivers/dma/ioat/init.c +10 -1
@@ -105,6 +105,8 @@ static struct pci_device_id ioat_pci_tbl[] = { { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT_BDX8) }, { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT_BDX9) }, + { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT_SKX) }, +/* I/OAT v3.3 platforms */ { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT_BWD0) }, { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_IOAT_BWD1) },
@@ -250,10 +252,15 @@ static bool is_bdx_ioat(struct pci_dev *pdev) } } +static inline bool is_skx_ioat (struct pci_dev *pdev) +{ +return (pdev->device ==PCI_DEVICE_ID_INTEL_IOAT_SKX ) ? true : false; +} +static bool is_xeon_cb32 (struct pci_dev *pdev) {return is_jf_ioat (pdev) ||is_snb_ioat (pdev) ||is_ivb_ioat (pdev) || -is_hsw_ioat (pdev) ||is_bdx_ioat (pdev); +is_hsw_ioat (pdev) ||is_bdx_ioat (pdev) ||is_skx_ioat (pdev); }bool is_bwd_ioat (struct pci_dev *pdev)
@@ -1350,6 +1357,8 @@ static int ioat_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) device->version =readb (device->reg_base +IOAT_VER_OFFSET );if (device->version >=IOAT_VER_3_0 ) { +if (is_skx_ioat (pdev)) + device->version =IOAT_VER_3_2 ; err =ioat3_dma_probe (device, ioat_dca_enabled);if (device->version >=IOAT_VER_3_3 )
drivers/dma/ti-dma-crossbar.c +2 -0
@@ -146,6 +146,7 @@ static int ti_am335x_xbar_probe(struct platform_device *pdev) match =of_match_node (ti_am335x_master_match, dma_node);if (!match) {dev_err (&pdev->dev,"DMA master is not supported\n" ); +of_node_put (dma_node);return -EINVAL ; }
@@ -310,6 +311,7 @@ static int ti_dra7_xbar_probe(struct platform_device *pdev) match =of_match_node (ti_dra7_master_match, dma_node);if (!match) {dev_err (&pdev->dev,"DMA master is not supported\n" ); +of_node_put (dma_node);return -EINVAL ; }
drivers/gpu/drm/msm/adreno/adreno_gpu.c +8 -1
@@ -204,7 +204,14 @@ int adreno_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit,void adreno_flush (struct msm_gpu *gpu) {struct adreno_gpu *adreno_gpu =to_adreno_gpu (gpu); -uint32_t wptr =get_wptr (gpu->rb); +uint32_t wptr; + +/* +* Mask wptr value that we calculate to fit in the HW range. This is +* to account for the possibility that the last command fit exactly into +* the ringbuffer and rb->next hasn't wrapped to zero yet +*/ + wptr =get_wptr (gpu->rb) & ((gpu->rb->size /4 ) -1 );/* ensure writes to ringbuffer have hit system memory: */ mb ();
drivers/gpu/drm/msm/msm_gem_submit.c +2 -1
@@ -90,7 +90,8 @@ static int submit_lookup_objects(struct msm_gem_submit *submit,pagefault_disable (); } -if (submit_bo.flags & ~MSM_SUBMIT_BO_FLAGS ) { +if ((submit_bo.flags & ~MSM_SUBMIT_BO_FLAGS ) || + !(submit_bo.flags &MSM_SUBMIT_BO_FLAGS )) {DRM_ERROR ("invalid flags: %x\n" , submit_bo.flags); ret = -EINVAL ; goto out_unlock;
drivers/gpu/drm/msm/msm_ringbuffer.c +2 -1
@@ -23,7 +23,8 @@ struct msm_ringbuffer *msm_ringbuffer_new(struct msm_gpu *gpu, int size)struct msm_ringbuffer *ring;int ret; - size =ALIGN (size,4 );/* size should be dword aligned */ +if (WARN_ON (!is_power_of_2 (size))) +return ERR_PTR (-EINVAL ); ring =kzalloc (sizeof (*ring),GFP_KERNEL );if (!ring) {
drivers/gpu/drm/nouveau/nvkm/subdev/bar/gf100.c +1 -1
@@ -129,7 +129,7 @@ gf100_bar_init(struct nvkm_bar *base)if (bar->bar[0 ].mem) { addr =nvkm_memory_addr (bar->bar[0 ].mem) >>12 ; -nvkm_wr32 (device,0x001714 ,0xc0000000 | addr); +nvkm_wr32 (device,0x001714 ,0x80000000 | addr); }return 0 ;
drivers/gpu/drm/rcar-du/rcar_du_crtc.c +0 -20
@@ -282,26 +282,6 @@ static void rcar_du_crtc_update_planes(struct rcar_du_crtc *rcrtc)* Page Flip */ -void rcar_du_crtc_cancel_page_flip (struct rcar_du_crtc *rcrtc, -struct drm_file *file) -{ -struct drm_pending_vblank_event *event; -struct drm_device *dev = rcrtc->crtc.dev; -unsigned long flags; - -/* Destroy the pending vertical blanking event associated with the -* pending page flip, if any, and disable vertical blanking interrupts. -*/ -spin_lock_irqsave (&dev->event_lock, flags); - event = rcrtc->event; -if (event && event->base.file_priv == file) { - rcrtc->event =NULL ; - event->base.destroy (&event->base); -drm_crtc_vblank_put (&rcrtc->crtc); - } -spin_unlock_irqrestore (&dev->event_lock, flags); -} -static void rcar_du_crtc_finish_page_flip (struct rcar_du_crtc *rcrtc) {struct drm_pending_vblank_event *event;
drivers/gpu/drm/rcar-du/rcar_du_crtc.h +0 -2
@@ -67,8 +67,6 @@ enum rcar_du_output {int rcar_du_crtc_create (struct rcar_du_group *rgrp,unsigned int index);void rcar_du_crtc_enable_vblank (struct rcar_du_crtc *rcrtc,bool enable); -void rcar_du_crtc_cancel_page_flip (struct rcar_du_crtc *rcrtc, -struct drm_file *file);void rcar_du_crtc_suspend (struct rcar_du_crtc *rcrtc);void rcar_du_crtc_resume (struct rcar_du_crtc *rcrtc);
drivers/gpu/drm/rcar-du/rcar_du_drv.c +91 -94
211 lines not on this page · raw message
drivers/gpu/drm/rcar-du/rcar_du_hdmicon.c +1 -10
@@ -55,12 +55,6 @@ static const struct drm_connector_helper_funcs connector_helper_funcs = { .best_encoder = rcar_du_connector_best_encoder, }; -static void rcar_du_hdmi_connector_destroy (struct drm_connector *connector) -{ -drm_connector_unregister (connector); -drm_connector_cleanup (connector); -} -static enum drm_connector_status rcar_du_hdmi_connector_detect (struct drm_connector *connector,bool force) {
@@ -79,7 +73,7 @@ static const struct drm_connector_funcs connector_funcs = { .reset = drm_atomic_helper_connector_reset, .detect = rcar_du_hdmi_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, - .destroy = rcar_du_hdmi_connector_destroy, + .destroy = drm_connector_cleanup, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, };
@@ -108,9 +102,6 @@ int rcar_du_hdmi_connector_init(struct rcar_du_device *rcdu,return ret;drm_connector_helper_add (connector, &connector_helper_funcs); - ret =drm_connector_register (connector); -if (ret <0 ) -return ret; connector->dpms =DRM_MODE_DPMS_OFF ; drm_object_property_set_value(&connector->base,
drivers/gpu/drm/rcar-du/rcar_du_kms.c +7 -0
@@ -761,6 +761,13 @@ int rcar_du_modeset_init(struct rcar_du_device *rcdu)if (ret <0 )return ret; +/* Initialize vertical blanking interrupts handling. Start with vblank +* disabled for all CRTCs. +*/ + ret =drm_vblank_init (dev, (1 << rcdu->info->num_crtcs) -1 ); +if (ret <0 ) +return ret; +/* Initialize the groups. */ num_groups =DIV_ROUND_UP (rcdu->num_crtcs,2 );
drivers/gpu/drm/rcar-du/rcar_du_lvdscon.c +1 -10
@@ -62,12 +62,6 @@ static const struct drm_connector_helper_funcs connector_helper_funcs = { .best_encoder = rcar_du_connector_best_encoder, }; -static void rcar_du_lvds_connector_destroy (struct drm_connector *connector) -{ -drm_connector_unregister (connector); -drm_connector_cleanup (connector); -} -static enum drm_connector_status rcar_du_lvds_connector_detect (struct drm_connector *connector,bool force) {
@@ -79,7 +73,7 @@ static const struct drm_connector_funcs connector_funcs = { .reset = drm_atomic_helper_connector_reset, .detect = rcar_du_lvds_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, - .destroy = rcar_du_lvds_connector_destroy, + .destroy = drm_connector_cleanup, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, };
@@ -117,9 +111,6 @@ int rcar_du_lvds_connector_init(struct rcar_du_device *rcdu,return ret;drm_connector_helper_add (connector, &connector_helper_funcs); - ret =drm_connector_register (connector); -if (ret <0 ) -return ret; connector->dpms =DRM_MODE_DPMS_OFF ; drm_object_property_set_value(&connector->base,
drivers/gpu/drm/rcar-du/rcar_du_vgacon.c +1 -10
@@ -31,12 +31,6 @@ static const struct drm_connector_helper_funcs connector_helper_funcs = { .best_encoder = rcar_du_connector_best_encoder, }; -static void rcar_du_vga_connector_destroy (struct drm_connector *connector) -{ -drm_connector_unregister (connector); -drm_connector_cleanup (connector); -} -static enum drm_connector_status rcar_du_vga_connector_detect (struct drm_connector *connector,bool force) {
@@ -48,7 +42,7 @@ static const struct drm_connector_funcs connector_funcs = { .reset = drm_atomic_helper_connector_reset, .detect = rcar_du_vga_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, - .destroy = rcar_du_vga_connector_destroy, + .destroy = drm_connector_cleanup, .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, };
@@ -76,9 +70,6 @@ int rcar_du_vga_connector_init(struct rcar_du_device *rcdu,return ret;drm_connector_helper_add (connector, &connector_helper_funcs); - ret =drm_connector_register (connector); -if (ret <0 ) -return ret; connector->dpms =DRM_MODE_DPMS_OFF ; drm_object_property_set_value(&connector->base,
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +1 -1
@@ -471,7 +471,7 @@ static int vmw_cmd_invalid(struct vmw_private *dev_priv,struct vmw_sw_context *sw_context, SVGA3dCmdHeader *header) { - return capable(CAP_SYS_ADMIN) ? : -EINVAL; + return -EINVAL; } static int vmw_cmd_ok(struct vmw_private *dev_priv,
drivers/hid/hid-core.c +1 -0
@@ -2427,6 +2427,7 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_PANJIT, 0x0002) }, { HID_USB_DEVICE(USB_VENDOR_ID_PANJIT, 0x0003) }, { HID_USB_DEVICE(USB_VENDOR_ID_PANJIT, 0x0004) }, + { HID_USB_DEVICE(USB_VENDOR_ID_PETZL, USB_DEVICE_ID_PETZL_HEADLAMP) }, { HID_USB_DEVICE(USB_VENDOR_ID_PHILIPS, USB_DEVICE_ID_PHILIPS_IEEE802154_DONGLE) }, { HID_USB_DEVICE(USB_VENDOR_ID_POWERCOM, USB_DEVICE_ID_POWERCOM_UPS) }, #if defined(CONFIG_MOUSE_SYNAPTICS_USB) || defined(CONFIG_MOUSE_SYNAPTICS_USB_MODULE)
drivers/hid/hid-ids.h +3 -0
@@ -777,6 +777,9 @@#define USB_VENDOR_ID_PETALYNX 0x18b1#define USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE 0x0037 +#define USB_VENDOR_ID_PETZL 0x2122 +#define USB_DEVICE_ID_PETZL_HEADLAMP 0x1234 +#define USB_VENDOR_ID_PHILIPS 0x0471#define USB_DEVICE_ID_PHILIPS_IEEE802154_DONGLE 0x0617
drivers/infiniband/core/uverbs_cmd.c +3 -2
@@ -2287,8 +2287,9 @@ ssize_t ib_uverbs_modify_qp(struct ib_uverbs_file *file,if (copy_from_user (&cmd, buf,sizeof cmd))return -EFAULT ; -if (cmd.port_num <rdma_start_port (ib_dev) || - cmd.port_num >rdma_end_port (ib_dev)) +if ((cmd.attr_mask &IB_QP_PORT ) && + (cmd.port_num <rdma_start_port (ib_dev) || + cmd.port_num >rdma_end_port (ib_dev)))return -EINVAL ; INIT_UDATA(&udata, buf + sizeof cmd, NULL, in_len - sizeof cmd,
drivers/irqchip/irq-keystone.c +19 -9
@@ -19,9 +19,9 @@#include <linux/bitops.h> #include <linux/module.h> #include <linux/moduleparam.h> +#include <linux/interrupt.h> #include <linux/irqdomain.h> #include <linux/irqchip.h> -#include <linux/irqchip/chained_irq.h> #include <linux/of.h> #include <linux/of_platform.h> #include <linux/mfd/syscon.h>
@@ -39,6 +39,7 @@ struct keystone_irq_device {struct irq_domain *irqd;struct regmap *devctrl_regs;u32 devctrl_offset; +raw_spinlock_t wa_lock; };static inline u32 keystone_irq_readl (struct keystone_irq_device *kirq)
@@ -83,17 +84,15 @@ static void keystone_irq_ack(struct irq_data *d)/* nothing to do here */ } -static void keystone_irq_handler (struct irq_desc *desc) +static irqreturn_t keystone_irq_handler (int irq,void *keystone_irq) { -unsigned int irq =irq_desc_get_irq (desc); -struct keystone_irq_device *kirq =irq_desc_get_handler_data (desc); +struct keystone_irq_device *kirq = keystone_irq; +unsigned long wa_lock_flags;unsigned long pending;int src, virq;dev_dbg (kirq->dev,"start irq %d\n" , irq); -chained_irq_enter (irq_desc_get_chip (desc), desc); - pending =keystone_irq_readl (kirq);keystone_irq_writel (kirq, pending);
@@ -111,13 +110,15 @@ static void keystone_irq_handler(struct irq_desc *desc)if (!virq)dev_warn (kirq->dev,"sporious irq detected hwirq %d, virq %d\n" , src, virq); +raw_spin_lock_irqsave (&kirq->wa_lock, wa_lock_flags);generic_handle_irq (virq); +raw_spin_unlock_irqrestore (&kirq->wa_lock, + wa_lock_flags); } } -chained_irq_exit (irq_desc_get_chip (desc), desc); -dev_dbg (kirq->dev,"end irq %d\n" , irq); +return IRQ_HANDLED ; } static int keystone_irq_map(struct irq_domain *h, unsigned int virq,
@@ -182,9 +183,16 @@ static int keystone_irq_probe(struct platform_device *pdev)return -ENODEV ; } +raw_spin_lock_init (&kirq->wa_lock); +platform_set_drvdata (pdev, kirq); -irq_set_chained_handler_and_data (kirq->irq, keystone_irq_handler, kirq); + ret =request_irq (kirq->irq, keystone_irq_handler, +0 ,dev_name (dev), kirq); +if (ret) { +irq_domain_remove (kirq->irqd); +return ret; + }/* clear all source bits */ keystone_irq_writel (kirq, ~0x0 );
@@ -199,6 +207,8 @@ static int keystone_irq_remove(struct platform_device *pdev)struct keystone_irq_device *kirq =platform_get_drvdata (pdev);int hwirq; +free_irq (kirq->irq, kirq); +for (hwirq =0 ; hwirq <KEYSTONE_N_IRQ ; hwirq++)irq_dispose_mapping (irq_find_mapping (kirq->irqd, hwirq));
drivers/irqchip/irq-mxs.c +4 -0
@@ -131,12 +131,16 @@ static struct irq_chip mxs_icoll_chip = { .irq_ack = icoll_ack_irq, .irq_mask = icoll_mask_irq, .irq_unmask = icoll_unmask_irq, + .flags = IRQCHIP_MASK_ON_SUSPEND | + IRQCHIP_SKIP_SET_WAKE, };static struct irq_chip asm9260_icoll_chip = { .irq_ack = icoll_ack_irq, .irq_mask = asm9260_mask_irq, .irq_unmask = asm9260_unmask_irq, + .flags =IRQCHIP_MASK_ON_SUSPEND | +IRQCHIP_SKIP_SET_WAKE , }; asmlinkage void __exception_irq_entry icoll_handle_irq(struct pt_regs *regs)
drivers/isdn/i4l/isdn_common.c +1 -0
@@ -1379,6 +1379,7 @@ isdn_ioctl(struct file *file, uint cmd, ulong arg)if (arg) {if (copy_from_user (bname, argp,sizeof (bname) -1 ))return -EFAULT ; + bname[sizeof (bname)-1 ] =0 ; }else return -EINVAL ; ret =mutex_lock_interruptible (&dev->mtx);
drivers/isdn/i4l/isdn_net.c +2 -3
@@ -2611,10 +2611,9 @@ isdn_net_newslave(char *parm)char newname[10 ];if (p) { -/* Slave-Name MUST not be empty */ -if (!strlen (p +1 )) +/* Slave-Name MUST not be empty or overflow 'newname' */ +if (strscpy (newname, p +1 ,sizeof (newname)) <=0 )return NULL ; -strcpy (newname, p +1 ); *p =0 ;/* Master must already exist */ if (!(n =isdn_net_findif (parm)))
drivers/isdn/i4l/isdn_ppp.c +1 -1
@@ -2364,7 +2364,7 @@ static struct ippp_ccp_reset_state *isdn_ppp_ccp_reset_alloc_state(struct ippp_s id);return NULL ; }else { - rs =kzalloc (sizeof (struct ippp_ccp_reset_state ),GFP_KERNEL ); + rs =kzalloc (sizeof (struct ippp_ccp_reset_state ),GFP_ATOMIC );if (!rs)return NULL ; rs->state = CCPResetIdle;
drivers/mailbox/mailbox.c +8 -5
@@ -104,11 +104,14 @@ static void tx_tick(struct mbox_chan *chan, int r)/* Submit next message */ msg_submit (chan); +if (!mssg) +return ; +/* Notify the client */ -if (mssg && chan->cl->tx_done) +if (chan->cl->tx_done) chan->cl->tx_done (chan->cl, mssg, r); -if (chan->cl->tx_block) +if (r != -ETIME && chan->cl->tx_block)complete (&chan->tx_complete); }
@@ -261,7 +264,7 @@ int mbox_send_message(struct mbox_chan *chan, void *mssg)msg_submit (chan); -if (chan->cl->tx_block && chan->active_req) { +if (chan->cl->tx_block) {unsigned long wait;int ret;
@@ -272,8 +275,8 @@ int mbox_send_message(struct mbox_chan *chan, void *mssg) ret =wait_for_completion_timeout (&chan->tx_complete, wait);if (ret ==0 ) { - t = -EIO ; -tx_tick (chan, -EIO ); + t = -ETIME ; +tx_tick (chan, t); } }
drivers/md/raid5.c +2 -0
@@ -5821,6 +5821,8 @@ static void raid5_do_work(struct work_struct *work)pr_debug ("%d stripes handled\n" , handled);spin_unlock_irq (&conf->device_lock); + +async_tx_issue_pending_all ();blk_finish_plug (&plug);pr_debug ("--- raid5worker inactive\n" );
drivers/media/i2c/s5c73m3/s5c73m3-ctrls.c +1 -1
@@ -211,7 +211,7 @@ static int s5c73m3_3a_lock(struct s5c73m3 *state, struct v4l2_ctrl *ctrl) }if ((ctrl->val ^ ctrl->cur.val) &V4L2_LOCK_FOCUS ) - ret =s5c73m3_af_run (state, ~af_lock); + ret =s5c73m3_af_run (state, !af_lock);return ret; }
drivers/net/ethernet/mellanox/mlx4/icm.c +6 -1
@@ -118,8 +118,13 @@ static int mlx4_alloc_icm_coherent(struct device *dev, struct scatterlist *mem,if (!buf)return -ENOMEM ; +if (offset_in_page (buf)) { +dma_free_coherent (dev,PAGE_SIZE << order, + buf,sg_dma_address (mem)); +return -ENOMEM ; + } +sg_set_buf (mem, buf,PAGE_SIZE << order); -BUG_ON (mem->offset);sg_dma_len (mem) =PAGE_SIZE << order;return 0 ; }
drivers/net/ethernet/realtek/r8169.c +1 -0
@@ -326,6 +326,7 @@ enum cfg_version {static const struct pci_device_id rtl8169_pci_tbl[] = { {PCI_DEVICE (PCI_VENDOR_ID_REALTEK ,0x8129 ),0 ,0 ,RTL_CFG_0 }, {PCI_DEVICE (PCI_VENDOR_ID_REALTEK ,0x8136 ),0 ,0 ,RTL_CFG_2 }, + {PCI_DEVICE (PCI_VENDOR_ID_REALTEK ,0x8161 ),0 ,0 ,RTL_CFG_1 }, {PCI_DEVICE (PCI_VENDOR_ID_REALTEK ,0x8167 ),0 ,0 ,RTL_CFG_0 }, {PCI_DEVICE (PCI_VENDOR_ID_REALTEK ,0x8168 ),0 ,0 ,RTL_CFG_1 }, {PCI_DEVICE (PCI_VENDOR_ID_REALTEK ,0x8169 ),0 ,0 ,RTL_CFG_0 },
drivers/net/ethernet/renesas/sh_eth.c +1 -0
@@ -750,6 +750,7 @@ static struct sh_eth_cpu_data sh7734_data = { .tsu = 1, .hw_crc = 1, .select_mii = 1, + .shift_rd0 = 1, };/* SH7763 */
drivers/net/phy/phy_device.c +1 -1
@@ -1442,7 +1442,7 @@ static struct phy_driver genphy_driver[] = { .phy_id = 0xffffffff, .phy_id_mask = 0xffffffff, .name = "Generic PHY", - .soft_reset = genphy_soft_reset, + .soft_reset = genphy_no_soft_reset, .config_init = genphy_config_init, .features =PHY_GBIT_FEATURES |SUPPORTED_MII | SUPPORTED_AUI | SUPPORTED_FIBRE |
drivers/net/usb/kaweth.c +7 -3
@@ -1009,6 +1009,7 @@ static int kaweth_probe(struct net_device *netdev;const eth_addr_t bcast_addr = {0xFF ,0xFF ,0xFF ,0xFF ,0xFF ,0xFF };int result =0 ; +int rv = -EIO ; dev_dbg(dev, "Kawasaki Device Probe (Device number:%d): 0x%4.4x:0x%4.4x:0x%4.4x\n",
@@ -1029,6 +1030,7 @@ static int kaweth_probe( kaweth =netdev_priv (netdev); kaweth->dev = udev; kaweth->net = netdev; + kaweth->intf = intf;spin_lock_init (&kaweth->device_lock);init_waitqueue_head (&kaweth->term_wait);
@@ -1048,6 +1050,10 @@ static int kaweth_probe(/* Download the firmware */ dev_info (dev,"Downloading firmware...\n" ); kaweth->firmware_buf = (__u8 *)__get_free_page (GFP_KERNEL ); +if (!kaweth->firmware_buf) { + rv = -ENOMEM ; + goto err_free_netdev; + } if ((result = kaweth_download_firmware(kaweth, "kaweth/new_code.bin", 100,
@@ -1139,8 +1145,6 @@ err_fw:dev_dbg (dev,"Initializing net device.\n" ); - kaweth->intf = intf; - kaweth->tx_urb =usb_alloc_urb (0 ,GFP_KERNEL );if (!kaweth->tx_urb) goto err_free_netdev;
@@ -1204,7 +1208,7 @@ err_only_tx: err_free_netdev:free_netdev (netdev); -return -EIO ; +return rv; }/****************************************************************
drivers/net/wireless/ath/ath10k/wmi-ops.h +6 -0
@@ -639,6 +639,9 @@ ath10k_wmi_vdev_spectral_conf(struct ath10k *ar,struct sk_buff *skb;u32 cmd_id; +if (!ar->wmi.ops->gen_vdev_spectral_conf) +return -EOPNOTSUPP ; + skb = ar->wmi.ops->gen_vdev_spectral_conf (ar, arg);if (IS_ERR (skb))return PTR_ERR (skb);
@@ -654,6 +657,9 @@ ath10k_wmi_vdev_spectral_enable(struct ath10k *ar, u32 vdev_id, u32 trigger,struct sk_buff *skb;u32 cmd_id; +if (!ar->wmi.ops->gen_vdev_spectral_enable) +return -EOPNOTSUPP ; + skb = ar->wmi.ops->gen_vdev_spectral_enable (ar, vdev_id, trigger, enable);if (IS_ERR (skb))
drivers/net/wireless/ath/wil6210/main.c +8 -7
@@ -330,18 +330,19 @@ static void wil_fw_error_worker(struct work_struct *work) wil->last_fw_recovery = jiffies; +wil_info (wil,"fw error recovery requested (try %d)...\n" , + wil->recovery_count); +if (!no_fw_recovery) + wil->recovery_state = fw_recovery_running; +if (wil_wait_for_recovery (wil) !=0 ) +return ; +mutex_lock (&wil->mutex);switch (wdev->iftype) {case NL80211_IFTYPE_STATION :case NL80211_IFTYPE_P2P_CLIENT :case NL80211_IFTYPE_MONITOR : -wil_info (wil,"fw error recovery requested (try %d)...\n" , - wil->recovery_count); -if (!no_fw_recovery) - wil->recovery_state = fw_recovery_running; -if (0 !=wil_wait_for_recovery (wil)) -break ; - +/* silent recovery, upper layers will see disconnect */ __wil_down (wil);__wil_up (wil);break ;
drivers/nfc/fdp/i2c.c +3 -3
@@ -210,14 +210,14 @@ static irqreturn_t fdp_nci_i2c_irq_thread_fn(int irq, void *phy_id)struct sk_buff *skb;int r; - client = phy->i2c_dev; -dev_dbg (&client->dev,"%s\n" , __func__); -if (!phy || irq != phy->i2c_dev->irq) {WARN_ON_ONCE (1 );return IRQ_NONE ; } + client = phy->i2c_dev; +dev_dbg (&client->dev,"%s\n" , __func__); + r =fdp_nci_i2c_read (phy, &skb);if (r == -EREMOTEIO )
drivers/nvdimm/btt.c +6 -3
@@ -1205,10 +1205,13 @@ static int btt_rw_page(struct block_device *bdev, sector_t sector, struct page *page, int rw) {struct btt *btt = bdev->bd_disk->private_data; +int rc; -btt_do_bvec (btt,NULL , page,PAGE_CACHE_SIZE ,0 , rw, sector); -page_endio (page, rw &WRITE ,0 ); -return 0 ; + rc =btt_do_bvec (btt,NULL , page,PAGE_CACHE_SIZE ,0 , rw, sector); +if (rc ==0 ) +page_endio (page, rw &WRITE ,0 ); + +return rc; }
drivers/nvmem/imx-ocotp.c +1 -1
@@ -88,7 +88,7 @@ static struct nvmem_config imx_ocotp_nvmem_config = {static const struct of_device_id imx_ocotp_dt_ids[] = { { .compatible ="fsl,imx6q-ocotp" , (void *)128 }, - { .compatible ="fsl,imx6sl-ocotp" , (void *)32 }, + { .compatible ="fsl,imx6sl-ocotp" , (void *)64 }, { .compatible ="fsl,imx6sx-ocotp" , (void *)128 }, { }, };
drivers/scsi/fnic/fnic.h +1 -0
@@ -248,6 +248,7 @@ struct fnic {struct completion *remove_wait;/* device remove thread blocks */ atomic_t in_flight;/* io counter */ +bool internal_reset_inprogress;u32 _reserved;/* fill hole */ unsigned long state_flags;/* protected by host lock */ enum fnic_state state;
drivers/scsi/fnic/fnic_scsi.c +16 -0
@@ -2533,6 +2533,19 @@ int fnic_host_reset(struct scsi_cmnd *sc)unsigned long wait_host_tmo;struct Scsi_Host *shost = sc->device->host;struct fc_lport *lp =shost_priv (shost); +struct fnic *fnic =lport_priv (lp); +unsigned long flags; + +spin_lock_irqsave (&fnic->fnic_lock, flags); +if (fnic->internal_reset_inprogress ==0 ) { + fnic->internal_reset_inprogress =1 ; + }else { +spin_unlock_irqrestore (&fnic->fnic_lock, flags); +FNIC_SCSI_DBG (KERN_DEBUG , fnic->lport->host, +"host reset in progress skipping another host reset\n" ); +return SUCCESS ; + } +spin_unlock_irqrestore (&fnic->fnic_lock, flags);/* * If fnic_reset is successful, wait for fabric login to complete
@@ -2553,6 +2566,9 @@ int fnic_host_reset(struct scsi_cmnd *sc) } } +spin_lock_irqsave (&fnic->fnic_lock, flags); + fnic->internal_reset_inprogress =0 ; +spin_unlock_irqrestore (&fnic->fnic_lock, flags);return ret; }
drivers/scsi/mpt3sas/mpt3sas_base.c +16 -17
@@ -4981,15 +4981,14 @@ _base_make_ioc_ready(struct MPT3SAS_ADAPTER *ioc, int sleep_flag,static int _base_make_ioc_operational (struct MPT3SAS_ADAPTER *ioc,int sleep_flag) { -int r, i; +int r, i, index;unsigned long flags;u32 reply_address;u16 smid;struct _tr_list *delayed_tr, *delayed_tr_next;u8 hide_flag;struct adapter_reply_queue *reply_q; -long reply_post_free; -u32 reply_post_free_sz, index =0 ; +Mpi2ReplyDescriptorsUnion_t *reply_post_free_contig;dinitprintk (ioc,pr_info (MPT3SAS_FMT "%s\n" , ioc->name, __func__));
@@ -5061,27 +5060,27 @@ _base_make_ioc_operational(struct MPT3SAS_ADAPTER *ioc, int sleep_flag)_base_assign_reply_queues (ioc);/* initialize Reply Post Free Queue */ - reply_post_free_sz = ioc->reply_post_queue_depth * -sizeof (Mpi2DefaultReplyDescriptor_t); - reply_post_free = (long )ioc->reply_post[index].reply_post_free; + index =0 ; + reply_post_free_contig = ioc->reply_post[0 ].reply_post_free;list_for_each_entry (reply_q, &ioc->reply_queue_list, list) { +/* +* If RDPQ is enabled, switch to the next allocation. +* Otherwise advance within the contiguous region. +*/ +if (ioc->rdpq_array_enable) { + reply_q->reply_post_free = + ioc->reply_post[index++].reply_post_free; + }else { + reply_q->reply_post_free = reply_post_free_contig; + reply_post_free_contig += ioc->reply_post_queue_depth; + } + reply_q->reply_post_host_index =0 ; - reply_q->reply_post_free = (Mpi2ReplyDescriptorsUnion_t *) - reply_post_free;for (i =0 ; i < ioc->reply_post_queue_depth; i++) reply_q->reply_post_free[i].Words =cpu_to_le64 (ULLONG_MAX );if (!_base_is_controller_msix_enabled (ioc)) goto skip_init_reply_post_free_queue; -/* -* If RDPQ is enabled, switch to the next allocation. -* Otherwise advance within the contiguous region. -*/ -if (ioc->rdpq_array_enable) - reply_post_free = (long ) - ioc->reply_post[++index].reply_post_free; -else - reply_post_free += reply_post_free_sz; } skip_init_reply_post_free_queue:
drivers/scsi/snic/snic_main.c +3 -0
@@ -584,6 +584,7 @@ snic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)if (!pool) {SNIC_HOST_ERR (shost,"dflt sgl pool creation failed\n" ); + ret = -ENOMEM ; goto err_free_res; }
@@ -594,6 +595,7 @@ snic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)if (!pool) {SNIC_HOST_ERR (shost,"max sgl pool creation failed\n" ); + ret = -ENOMEM ; goto err_free_dflt_sgl_pool; }
@@ -604,6 +606,7 @@ snic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)if (!pool) {SNIC_HOST_ERR (shost,"snic tmreq info pool creation failed.\n" ); + ret = -ENOMEM ; goto err_free_max_sgl_pool; }
drivers/spi/spi-dw.c +4 -1
@@ -107,7 +107,10 @@ static const struct file_operations dw_spi_regs_ops = {static int dw_spi_debugfs_init (struct dw_spi *dws) { - dws->debugfs =debugfs_create_dir ("dw_spi" ,NULL ); +char name[128 ]; + +snprintf (name,128 ,"dw_spi-%s" ,dev_name (&dws->master->dev)); + dws->debugfs =debugfs_create_dir (name,NULL );if (!dws->debugfs)return -ENOMEM ;
drivers/staging/comedi/comedi_fops.c +3 -3
@@ -2901,9 +2901,6 @@ static int __init comedi_init(void) comedi_class->dev_groups = comedi_dev_groups; -/* XXX requires /proc interface */ -comedi_proc_init (); -/* create devices files for legacy/manual use */ for (i =0 ; i < comedi_num_legacy_minors; i++) {struct comedi_device *dev;
@@ -2921,6 +2918,9 @@ static int __init comedi_init(void)mutex_unlock (&dev->mutex); } +/* XXX requires /proc interface */ +comedi_proc_init (); +return 0 ; }module_init (comedi_init);
drivers/usb/gadget/function/f_hid.c +1 -1
@@ -539,7 +539,7 @@ static int hidg_set_alt(struct usb_function *f, unsigned intf, unsigned alt) } status =usb_ep_enable (hidg->out_ep);if (status <0 ) { -ERROR (cdev,"Enable IN endpoint FAILED!\n" ); +ERROR (cdev,"Enable OUT endpoint FAILED!\n" ); goto fail; } hidg->out_ep->driver_data = hidg;
drivers/vfio/pci/vfio_pci.c +4 -0
@@ -902,6 +902,10 @@ static int vfio_pci_mmap(void *device_data, struct vm_area_struct *vma)return ret; vdev->barmap[index] =pci_iomap (pdev, index,0 ); +if (!vdev->barmap[index]) { +pci_release_selected_regions (pdev,1 << index); +return -ENOMEM ; + } } vma->vm_private_data = vdev;
drivers/vfio/pci/vfio_pci_rdwr.c +4 -1
@@ -190,7 +190,10 @@ ssize_t vfio_pci_vga_rw(struct vfio_pci_device *vdev, char __user *buf,if (!vdev->has_vga)return -EINVAL ; -switch (pos) { +if (pos >0xbfffful ) +return -EINVAL ; + +switch ((u32 )pos) { case 0xa0000 ... 0xbffff: count =min (count, (size_t )(0xc0000 - pos)); iomem =ioremap_nocache (0xa0000 ,0xbffff -0xa0000 +1 );
drivers/video/fbdev/cobalt_lcdfb.c +5 -0
@@ -350,6 +350,11 @@ static int cobalt_lcdfb_probe(struct platform_device *dev) info->screen_size =resource_size (res); info->screen_base =devm_ioremap (&dev->dev, res->start, info->screen_size); +if (!info->screen_base) { +framebuffer_release (info); +return -ENOMEM ; + } + info->fbops = &cobalt_lcd_fbops; info->fix = cobalt_lcdfb_fix; info->fix.smem_start = res->start;
fs/btrfs/inode.c +9 -2
@@ -7521,11 +7521,18 @@ static void adjust_dio_outstanding_extents(struct inode *inode,* within our reservation, otherwise we need to adjust our inode * counter appropriately. */ -if (dio_data->outstanding_extents) { +if (dio_data->outstanding_extents >= num_extents) { dio_data->outstanding_extents -= num_extents; }else { +/* +* If dio write length has been split due to no large enough +* contiguous space, we need to compensate our inode counter +* appropriately. +*/ +u64 num_needed = num_extents - dio_data->outstanding_extents; +spin_lock (&BTRFS_I (inode)->lock); -BTRFS_I (inode)->outstanding_extents += num_extents; +BTRFS_I (inode)->outstanding_extents += num_needed;spin_unlock (&BTRFS_I (inode)->lock); } }
fs/dcache.c +27 -0
@@ -269,6 +269,33 @@ static inline int dname_external(const struct dentry *dentry)return dentry->d_name.name != dentry->d_iname; } +void take_dentry_name_snapshot (struct name_snapshot *name,struct dentry *dentry) +{ +spin_lock (&dentry->d_lock); +if (unlikely (dname_external (dentry))) { +struct external_name *p =external_name (dentry); +atomic_inc (&p->u.count); +spin_unlock (&dentry->d_lock); + name->name = p->name; + }else { +memcpy (name->inline_name, dentry->d_iname,DNAME_INLINE_LEN ); +spin_unlock (&dentry->d_lock); + name->name = name->inline_name; + } +} +EXPORT_SYMBOL (take_dentry_name_snapshot); + +void release_dentry_name_snapshot (struct name_snapshot *name) +{ +if (unlikely (name->name != name->inline_name)) { +struct external_name *p; + p = container_of(name->name, struct external_name, name[0]); +if (unlikely (atomic_dec_and_test (&p->u.count))) +kfree_rcu (p, u.head); + } +} +EXPORT_SYMBOL (release_dentry_name_snapshot); +static inline void __d_set_inode_and_type (struct dentry *dentry,struct inode *inode,unsigned type_flags)
fs/debugfs/inode.c +5 -5
@@ -669,7 +669,7 @@ struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, {int error;struct dentry *dentry =NULL , *trap; -const char *old_name; +struct name_snapshot old_name; trap =lock_rename (new_dir, old_dir);/* Source or destination directories don't exist? */
@@ -684,19 +684,19 @@ struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry,if (IS_ERR (dentry) || dentry == trap ||d_really_is_positive (dentry)) goto exit; - old_name =fsnotify_oldname_init (old_dentry->d_name.name); +take_dentry_name_snapshot (&old_name, old_dentry); error =simple_rename (d_inode (old_dir), old_dentry,d_inode (new_dir), dentry);if (error) { -fsnotify_oldname_free (old_name); +release_dentry_name_snapshot (&old_name); goto exit; }d_move (old_dentry, dentry); -fsnotify_move (d_inode (old_dir),d_inode (new_dir), old_name, +fsnotify_move (d_inode (old_dir),d_inode (new_dir), old_name.name,d_is_dir (old_dentry),NULL , old_dentry); -fsnotify_oldname_free (old_name); +release_dentry_name_snapshot (&old_name);unlock_rename (new_dir, old_dir);dput (dentry);return old_dentry;
fs/namei.c +4 -4
@@ -4179,11 +4179,11 @@ int vfs_rename(struct inode *old_dir, struct dentry *old_dentry, {int error;bool is_dir =d_is_dir (old_dentry); -const unsigned char *old_name;struct inode *source = old_dentry->d_inode;struct inode *target = new_dentry->d_inode;bool new_is_dir = false;unsigned max_links = new_dir->i_sb->s_max_links; +struct name_snapshot old_name;/* * Check source == target.
@@ -4237,7 +4237,7 @@ int vfs_rename(struct inode *old_dir, struct dentry *old_dentry,if (error)return error; - old_name =fsnotify_oldname_init (old_dentry->d_name.name); +take_dentry_name_snapshot (&old_name, old_dentry);dget (new_dentry);if (!is_dir || (flags &RENAME_EXCHANGE ))lock_two_nondirectories (source, target);
@@ -4298,14 +4298,14 @@ out:mutex_unlock (&target->i_mutex);dput (new_dentry);if (!error) { -fsnotify_move (old_dir, new_dir, old_name, is_dir, +fsnotify_move (old_dir, new_dir, old_name.name, is_dir, !(flags &RENAME_EXCHANGE ) ? target :NULL , old_dentry);if (flags &RENAME_EXCHANGE ) {fsnotify_move (new_dir, old_dir, old_dentry->d_name.name, new_is_dir,NULL , new_dentry); } } -fsnotify_oldname_free (old_name); +release_dentry_name_snapshot (&old_name);return error; }
fs/notify/fsnotify.c +6 -2
@@ -104,16 +104,20 @@ int __fsnotify_parent(struct path *path, struct dentry *dentry, __u32 mask)if (unlikely (!fsnotify_inode_watches_children (p_inode)))__fsnotify_update_child_dentry_flags (p_inode);else if (p_inode->i_fsnotify_mask & mask) { +struct name_snapshot name; +/* we are notifying a parent so come up with the new mask which * specifies these are events which came from a child. */ mask |=FS_EVENT_ON_CHILD ; +take_dentry_name_snapshot (&name, dentry);if (path) ret =fsnotify (p_inode, mask, path,FSNOTIFY_EVENT_PATH , - dentry->d_name.name,0 ); + name.name,0 );else ret =fsnotify (p_inode, mask, dentry->d_inode,FSNOTIFY_EVENT_INODE , - dentry->d_name.name,0 ); + name.name,0 ); +release_dentry_name_snapshot (&name); }dput (parent);
fs/pstore/ram.c +3 -2
@@ -413,7 +413,7 @@ static int ramoops_init_przs(struct device *dev, struct ramoops_context *cxt,for (i =0 ; i < cxt->max_dump_cnt; i++) { cxt->przs[i] =persistent_ram_new (*paddr, cxt->record_size,0 , &cxt->ecc_info, - cxt->memtype); + cxt->memtype,0 );if (IS_ERR (cxt->przs[i])) { err =PTR_ERR (cxt->przs[i]); dev_err(dev, "failed to request mem region (0x%zx@0x%llx): %d\n",
@@ -450,7 +450,8 @@ static int ramoops_init_prz(struct device *dev, struct ramoops_context *cxt,return -ENOMEM ; } - *prz =persistent_ram_new (*paddr, sz, sig, &cxt->ecc_info, cxt->memtype); + *prz =persistent_ram_new (*paddr, sz, sig, &cxt->ecc_info, + cxt->memtype,0 );if (IS_ERR (*prz)) {int err =PTR_ERR (*prz);
fs/pstore/ram_core.c +16 -9
@@ -47,16 +47,15 @@ static inline size_t buffer_start(struct persistent_ram_zone *prz)return atomic_read (&prz->buffer->start); } -static DEFINE_RAW_SPINLOCK (buffer_lock); -/* increase and wrap the start pointer, returning the old value */ static size_t buffer_start_add (struct persistent_ram_zone *prz,size_t a) {int old;int new; -unsigned long flags; +unsigned long flags =0 ; -raw_spin_lock_irqsave (&buffer_lock, flags); +if (!(prz->flags &PRZ_FLAG_NO_LOCK )) +raw_spin_lock_irqsave (&prz->buffer_lock, flags); old =atomic_read (&prz->buffer->start); new = old + a;
@@ -64,7 +63,8 @@ static size_t buffer_start_add(struct persistent_ram_zone *prz, size_t a) new -= prz->buffer_size;atomic_set (&prz->buffer->start, new); -raw_spin_unlock_irqrestore (&buffer_lock, flags); +if (!(prz->flags &PRZ_FLAG_NO_LOCK )) +raw_spin_unlock_irqrestore (&prz->buffer_lock, flags);return old; }
@@ -74,9 +74,10 @@ static void buffer_size_add(struct persistent_ram_zone *prz, size_t a) {size_t old;size_t new; -unsigned long flags; +unsigned long flags =0 ; -raw_spin_lock_irqsave (&buffer_lock, flags); +if (!(prz->flags &PRZ_FLAG_NO_LOCK )) +raw_spin_lock_irqsave (&prz->buffer_lock, flags); old =atomic_read (&prz->buffer->size);if (old == prz->buffer_size)
@@ -88,7 +89,8 @@ static void buffer_size_add(struct persistent_ram_zone *prz, size_t a)atomic_set (&prz->buffer->size, new); exit: -raw_spin_unlock_irqrestore (&buffer_lock, flags); +if (!(prz->flags &PRZ_FLAG_NO_LOCK )) +raw_spin_unlock_irqrestore (&prz->buffer_lock, flags); } static void notrace persistent_ram_encode_rs8(struct persistent_ram_zone *prz,
@@ -448,6 +450,7 @@ static int persistent_ram_post_init(struct persistent_ram_zone *prz, u32 sig, prz->buffer->sig); } +/* Rewind missing or invalid memory area. */ prz->buffer->sig = sig;persistent_ram_zap (prz);
@@ -474,7 +477,7 @@ void persistent_ram_free(struct persistent_ram_zone *prz)struct persistent_ram_zone *persistent_ram_new (phys_addr_t start,size_t size,u32 sig,struct persistent_ram_ecc_info *ecc_info, -unsigned int memtype) +unsigned int memtype,u32 flags) {struct persistent_ram_zone *prz;int ret = -ENOMEM ;
@@ -485,6 +488,10 @@ struct persistent_ram_zone *persistent_ram_new(phys_addr_t start, size_t size, goto err; } +/* Initialize general buffer state. */ +raw_spin_lock_init (&prz->buffer_lock); + prz->flags = flags; + ret =persistent_ram_buffer_map (start, size, prz, memtype);if (ret) goto err;
fs/seq_file.c +4 -3
@@ -72,9 +72,10 @@ int seq_open(struct file *file, const struct seq_operations *op)mutex_init (&p->lock); p->op = op; -#ifdef CONFIG_USER_NS - p->user_ns = file->f_cred->user_ns; -#endif + +// No refcounting: the lifetime of 'p' is constrained +// to the lifetime of the file. + p->file = file;/* * Wrappers around seq_open(e.g. swaps_open) need to be
fs/xfs/xfs_aops.c +20 -1
@@ -1426,6 +1426,26 @@ __xfs_get_blocks(if (error) goto out_unlock; +/* +* The only time we can ever safely find delalloc blocks on direct I/O +* is a dio write to post-eof speculative preallocation. All other +* scenarios are indicative of a problem or misuse (such as mixing +* direct and mapped I/O). +* +* The file may be unmapped by the time we get here so we cannot +* reliably fail the I/O based on mapping. Instead, fail the I/O if this +* is a read or a write within eof. Otherwise, carry on but warn as a +* precuation if the file happens to be mapped. +*/ +if (direct && imap.br_startblock ==DELAYSTARTBLOCK ) { +if (!create || offset <i_size_read (VFS_I (ip))) { +WARN_ON_ONCE (1 ); + error = -EIO ; + goto out_unlock; + } +WARN_ON_ONCE (mapping_mapped (VFS_I (ip)->i_mapping)); + } +/* for DAX, we convert unwritten extents directly */ if (create && (!nimaps ||
@@ -1525,7 +1545,6 @@ __xfs_get_blocks(set_buffer_new (bh_result);if (imap.br_startblock ==DELAYSTARTBLOCK ) { -BUG_ON (direct);if (create) {set_buffer_uptodate (bh_result);set_buffer_mapped (bh_result);
include/linux/dcache.h +6 -0
@@ -615,5 +615,11 @@ static inline struct inode *d_real_inode(struct dentry *dentry) return d_backing_inode(d_real(dentry)); } +struct name_snapshot { +const char *name; +char inline_name[DNAME_INLINE_LEN ]; +}; +void take_dentry_name_snapshot (struct name_snapshot *,struct dentry *); +void release_dentry_name_snapshot (struct name_snapshot *);#endif /* __LINUX_DCACHE_H */
include/linux/fsnotify.h +0 -31
@@ -310,35 +310,4 @@ static inline void fsnotify_change(struct dentry *dentry, unsigned int ia_valid) } } -#if defined(CONFIG_FSNOTIFY )/* notify helpers */ - -/* -* fsnotify_oldname_init - save off the old filename before we change it -*/ -static inline const unsigned char *fsnotify_oldname_init (const unsigned char *name) -{ -return kstrdup (name,GFP_KERNEL ); -} - -/* -* fsnotify_oldname_free - free the name we got from fsnotify_oldname_init -*/ -static inline void fsnotify_oldname_free (const unsigned char *old_name) -{ -kfree (old_name); -} - -#else /* CONFIG_FSNOTIFY */ - -static inline const char *fsnotify_oldname_init (const unsigned char *name) -{ -return NULL ; -} - -static inline void fsnotify_oldname_free (const unsigned char *old_name) -{ -} - -#endif /* CONFIG_FSNOTIFY */ -#endif /* _LINUX_FS_NOTIFY_H */
include/linux/phy.h +4 -0
@@ -785,6 +785,10 @@ int genphy_read_status(struct phy_device *phydev);int genphy_suspend (struct phy_device *phydev);int genphy_resume (struct phy_device *phydev);int genphy_soft_reset (struct phy_device *phydev); +static inline int genphy_no_soft_reset (struct phy_device *phydev) +{ +return 0 ; +}void phy_driver_unregister (struct phy_driver *drv);void phy_drivers_unregister (struct phy_driver *drv,int n);int phy_driver_register (struct phy_driver *new_driver);
include/linux/pstore_ram.h +10 -1
@@ -23,6 +23,13 @@#include <linux/types.h> #include <linux/init.h> +/* +* Choose whether access to the RAM zone requires locking or not. If a zone +* can be written to from different CPUs like with ftrace for example, then +* PRZ_FLAG_NO_LOCK is used. For all other cases, locking is required. +*/ +#define PRZ_FLAG_NO_LOCK BIT(0) +struct persistent_ram_buffer ;struct rs_control ;
@@ -39,6 +46,8 @@ struct persistent_ram_zone {void *vaddr;struct persistent_ram_buffer *buffer;size_t buffer_size; +u32 flags; +raw_spinlock_t buffer_lock;/* ECC correction */ char *par_buffer;
@@ -54,7 +63,7 @@ struct persistent_ram_zone {struct persistent_ram_zone *persistent_ram_new (phys_addr_t start,size_t size,u32 sig,struct persistent_ram_ecc_info *ecc_info, -unsigned int memtype); +unsigned int memtype,u32 flags);void persistent_ram_free (struct persistent_ram_zone *prz);void persistent_ram_zap (struct persistent_ram_zone *prz);
include/linux/seq_file.h +4 -9
@@ -7,13 +7,10 @@#include <linux/mutex.h> #include <linux/cpumask.h> #include <linux/nodemask.h> +#include <linux/fs.h> +#include <linux/cred.h> struct seq_operations ; -struct file ; -struct path ; -struct inode ; -struct dentry ; -struct user_namespace ;struct seq_file {char *buf;
@@ -27,9 +24,7 @@ struct seq_file {struct mutex lock;const struct seq_operations *op;int poll_event; -#ifdef CONFIG_USER_NS -struct user_namespace *user_ns; -#endif +const struct file *file;void *private; };
@@ -147,7 +142,7 @@ int seq_release_private(struct inode *, struct file *);static inline struct user_namespace *seq_user_ns (struct seq_file *seq) {#ifdef CONFIG_USER_NS -return seq->user_ns; +return seq->file->f_cred->user_ns;#else extern struct user_namespace init_user_ns;return &init_user_ns;
kernel/resource.c +11 -2
@@ -105,16 +105,25 @@ static int r_show(struct seq_file *m, void *v) {struct resource *root = m->private;struct resource *r = v, *p; +unsigned long long start, end;int width = root->end <0x10000 ?4 :8 ;int depth;for (depth =0 , p = r; depth <MAX_IORES_LEVEL ; depth++, p = p->parent)if (p->parent == root)break ; + +if (file_ns_capable (m->file, &init_user_ns,CAP_SYS_ADMIN )) { + start = r->start; + end = r->end; + }else { + start = end =0 ; + } +seq_printf (m,"%*s%0*llx-%0*llx : %s\n" , depth *2 ,"" , - width, (unsigned long long ) r->start, - width, (unsigned long long ) r->end, + width, start, + width, end, r->name ? r->name :"<BAD>" );return 0 ; }
kernel/sched/core.c +12 -3
@@ -5553,7 +5553,6 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu)case CPU_UP_PREPARE : rq->calc_load_update = calc_load_update; -account_reset_rq (rq);break ;case CPU_ONLINE :
@@ -8253,11 +8252,20 @@ cpu_cgroup_css_alloc(struct cgroup_subsys_state *parent_css)if (IS_ERR (tg))return ERR_PTR (-ENOMEM ); -sched_online_group (tg, parent); -return &tg->css; } +/* Expose task group only after completing cgroup initialization */ +static int cpu_cgroup_css_online (struct cgroup_subsys_state *css) +{ +struct task_group *tg =css_tg (css); +struct task_group *parent =css_tg (css->parent); + +if (parent) +sched_online_group (tg, parent); +return 0 ; +} +static void cpu_cgroup_css_released (struct cgroup_subsys_state *css) {struct task_group *tg =css_tg (css);
@@ -8632,6 +8640,7 @@ static struct cftype cpu_files[] = {struct cgroup_subsys cpu_cgrp_subsys = { .css_alloc = cpu_cgroup_css_alloc, + .css_online = cpu_cgroup_css_online, .css_released = cpu_cgroup_css_released, .css_free = cpu_cgroup_css_free, .fork = cpu_cgroup_fork,
kernel/sched/sched.h +0 -13
@@ -1770,16 +1770,3 @@ static inline u64 irq_time_read(int cpu) }#endif /* CONFIG_64BIT */ #endif /* CONFIG_IRQ_TIME_ACCOUNTING */ - -static inline void account_reset_rq (struct rq *rq) -{ -#ifdef CONFIG_IRQ_TIME_ACCOUNTING - rq->prev_irq_time =0 ; -#endif -#ifdef CONFIG_PARAVIRT - rq->prev_steal_time =0 ; -#endif -#ifdef CONFIG_PARAVIRT_TIME_ACCOUNTING - rq->prev_steal_time_rq =0 ; -#endif -}
net/8021q/vlan.c +5 -0
@@ -292,6 +292,10 @@ static void vlan_sync_address(struct net_device *dev,if (ether_addr_equal (vlan->real_dev_addr, dev->dev_addr))return ; +/* vlan continues to inherit address of lower device */ +if (vlan_dev_inherit_address (vlandev, dev)) + goto out; +/* vlan address was different from the old address and is equal to * the new address */ if (!ether_addr_equal(vlandev->dev_addr, vlan->real_dev_addr) &&
@@ -304,6 +308,7 @@ static void vlan_sync_address(struct net_device *dev, !ether_addr_equal(vlandev->dev_addr, dev->dev_addr))dev_uc_add (dev, vlandev->dev_addr); +out:ether_addr_copy (vlan->real_dev_addr, dev->dev_addr); }
net/8021q/vlan.h +2 -0
@@ -109,6 +109,8 @@ int vlan_check_real_dev(struct net_device *real_dev,void vlan_setup (struct net_device *dev);int register_vlan_dev (struct net_device *dev);void unregister_vlan_dev (struct net_device *dev,struct list_head *head); +bool vlan_dev_inherit_address (struct net_device *dev, +struct net_device *real_dev);static inline u32 vlan_get_ingress_priority (struct net_device *dev,u16 vlan_tci)
net/8021q/vlan_dev.c +17 -3
@@ -244,6 +244,17 @@ void vlan_dev_get_realdev_name(const struct net_device *dev, char *result)strncpy (result,vlan_dev_priv (dev)->real_dev->name,23 ); } +bool vlan_dev_inherit_address (struct net_device *dev, +struct net_device *real_dev) +{ +if (dev->addr_assign_type !=NET_ADDR_STOLEN ) +return false; + +ether_addr_copy (dev->dev_addr, real_dev->dev_addr); +call_netdevice_notifiers (NETDEV_CHANGEADDR , dev); +return true; +} +static int vlan_dev_open (struct net_device *dev) {struct vlan_dev_priv *vlan =vlan_dev_priv (dev);
@@ -254,7 +265,8 @@ static int vlan_dev_open(struct net_device *dev) !(vlan->flags & VLAN_FLAG_LOOSE_BINDING))return -ENETDOWN ; -if (!ether_addr_equal (dev->dev_addr, real_dev->dev_addr)) { +if (!ether_addr_equal (dev->dev_addr, real_dev->dev_addr) && + !vlan_dev_inherit_address (dev, real_dev)) { err =dev_uc_add (real_dev, dev->dev_addr);if (err <0 ) goto out;
@@ -558,8 +570,10 @@ static int vlan_dev_init(struct net_device *dev)/* ipv6 shared card related stuff */ dev->dev_id = real_dev->dev_id; -if (is_zero_ether_addr (dev->dev_addr)) -eth_hw_addr_inherit (dev, real_dev); +if (is_zero_ether_addr (dev->dev_addr)) { +ether_addr_copy (dev->dev_addr, real_dev->dev_addr); + dev->addr_assign_type =NET_ADDR_STOLEN ; + }if (is_zero_ether_addr (dev->broadcast))memcpy (dev->broadcast, real_dev->broadcast, dev->addr_len);
net/core/dev.c +13 -6
@@ -2550,9 +2550,10 @@ EXPORT_SYMBOL(skb_mac_gso_segment);static inline bool skb_needs_check (struct sk_buff *skb,bool tx_path) {if (tx_path) -return skb->ip_summed !=CHECKSUM_PARTIAL ; -else -return skb->ip_summed ==CHECKSUM_NONE ; +return skb->ip_summed !=CHECKSUM_PARTIAL && + skb->ip_summed !=CHECKSUM_NONE ; + +return skb->ip_summed ==CHECKSUM_NONE ; }/**
@@ -2571,11 +2572,12 @@ static inline bool skb_needs_check(struct sk_buff *skb, bool tx_path)struct sk_buff *__skb_gso_segment (struct sk_buff *skb,netdev_features_t features,bool tx_path) { +struct sk_buff *segs; +if (unlikely (skb_needs_check (skb, tx_path))) {int err; -skb_warn_bad_offload (skb); - +/* We're going to init ->check field in TCP or UDP header */ err =skb_cow_head (skb,0 );if (err <0 )return ERR_PTR (err);
@@ -2590,7 +2592,12 @@ struct sk_buff *__skb_gso_segment(struct sk_buff *skb,skb_reset_mac_header (skb);skb_reset_mac_len (skb); -return skb_mac_gso_segment (skb, features); + segs =skb_mac_gso_segment (skb, features); + +if (unlikely (skb_needs_check (skb, tx_path))) +skb_warn_bad_offload (skb); + +return segs; }EXPORT_SYMBOL (__skb_gso_segment);
net/ipv6/ip6_output.c +1 -1
@@ -1361,7 +1361,7 @@ emsgsize:*/ cork->length += length; - if (((length > mtu) || + if ((((length + fragheaderlen) > mtu) || (skb && skb_is_gso(skb))) && (sk->sk_protocol == IPPROTO_UDP) && (rt->dst.dev->features & NETIF_F_UFO) &&
net/key/af_key.c +38 -8
114 lines not on this page · raw message
net/xfrm/xfrm_policy.c +4 -5
@@ -1216,7 +1216,7 @@ static inline int policy_to_flow_dir(int dir) }static struct xfrm_policy *xfrm_sk_policy_lookup (const struct sock *sk,int dir, -const struct flowi *fl) +const struct flowi *fl,u16 family) {struct xfrm_policy *pol;struct net *net =sock_net (sk);
@@ -1225,8 +1225,7 @@ static struct xfrm_policy *xfrm_sk_policy_lookup(const struct sock *sk, int dir,read_lock_bh (&net->xfrm.xfrm_policy_lock); pol =rcu_dereference (sk->sk_policy[dir]);if (pol !=NULL ) { -bool match =xfrm_selector_match (&pol->selector, fl, - sk->sk_family); +bool match =xfrm_selector_match (&pol->selector, fl, family);int err =0 ;if (match) {
@@ -2174,7 +2173,7 @@ struct dst_entry *xfrm_lookup(struct net *net, struct dst_entry *dst_orig, sk =sk_const_to_full_sk (sk);if (sk && sk->sk_policy[XFRM_POLICY_OUT ]) { num_pols =1 ; - pols[0 ] =xfrm_sk_policy_lookup (sk,XFRM_POLICY_OUT , fl); + pols[0 ] =xfrm_sk_policy_lookup (sk,XFRM_POLICY_OUT , fl, family); err =xfrm_expand_policies (fl, family, pols, &num_pols, &num_xfrms);if (err <0 )
@@ -2453,7 +2452,7 @@ int __xfrm_policy_check(struct sock *sk, int dir, struct sk_buff *skb, pol =NULL ; sk =sk_to_full_sk (sk);if (sk && sk->sk_policy[dir]) { - pol =xfrm_sk_policy_lookup (sk, dir, &fl); + pol =xfrm_sk_policy_lookup (sk, dir, &fl, family);if (IS_ERR (pol)) {XFRM_INC_STATS (net,LINUX_MIB_XFRMINPOLERROR );return 0 ;
sound/soc/codecs/nau8825.c +2 -1
@@ -936,7 +936,8 @@ static void nau8825_fll_apply(struct nau8825 *nau8825, NAU8825_FLL_INTEGER_MASK, fll_param->fll_int);/* FLL pre-scaler */ regmap_update_bits (nau8825->regmap,NAU8825_REG_FLL4 , -NAU8825_FLL_REF_DIV_MASK , fll_param->clk_ref_div); +NAU8825_FLL_REF_DIV_MASK , + fll_param->clk_ref_div <<NAU8825_FLL_REF_DIV_SFT );/* select divided VCO input */ regmap_update_bits (nau8825->regmap,NAU8825_REG_FLL5 ,NAU8825_FLL_FILTER_SW_MASK ,0x0000 );
sound/soc/codecs/nau8825.h +2 -1
@@ -114,7 +114,8 @@#define NAU8825_FLL_INTEGER_MASK (0x3ff << 0)/* FLL4 (0x07) */ -#define NAU8825_FLL_REF_DIV_MASK (0x3 << 10) +#define NAU8825_FLL_REF_DIV_SFT 10 +#define NAU8825_FLL_REF_DIV_MASK (0x3 << NAU8825_FLL_REF_DIV_SFT)/* FLL5 (0x08) */ #define NAU8825_FLL_FILTER_SW_MASK (0x1 << 14)
sound/soc/codecs/tlv320aic3x.c +13 -0
@@ -126,6 +126,16 @@ static const struct reg_default aic3x_reg[] = { { 108, 0x00 }, { 109, 0x00 }, }; +static bool aic3x_volatile_reg (struct device *dev,unsigned int reg) +{ +switch (reg) { +case AIC3X_RESET : +return true; +default : +return false; + } +} +static const struct regmap_config aic3x_regmap = { .reg_bits =8 , .val_bits = 8,
@@ -133,6 +143,9 @@ static const struct regmap_config aic3x_regmap = { .max_register = DAC_ICC_ADJ, .reg_defaults = aic3x_reg, .num_reg_defaults = ARRAY_SIZE(aic3x_reg), + + .volatile_reg = aic3x_volatile_reg, + .cache_type = REGCACHE_RBTREE, };
sound/soc/soc-pcm.c +3 -1
@@ -2073,9 +2073,11 @@ static int dpcm_fe_dai_do_trigger(struct snd_pcm_substream *substream, int cmd)break ;case SNDRV_PCM_TRIGGER_STOP :case SNDRV_PCM_TRIGGER_SUSPEND : -case SNDRV_PCM_TRIGGER_PAUSE_PUSH : fe->dpcm[stream].state =SND_SOC_DPCM_STATE_STOP ;break ; +case SNDRV_PCM_TRIGGER_PAUSE_PUSH : + fe->dpcm[stream].state =SND_SOC_DPCM_STATE_PAUSED ; +break ; } out:
sound/usb/endpoint.c +3 -0
@@ -384,6 +384,9 @@ static void snd_complete_urb(struct urb *urb)if (unlikely (atomic_read (&ep->chip->shutdown))) goto exit_clear; +if (unlikely (!test_bit (EP_FLAG_RUNNING , &ep->flags))) + goto exit_clear; +if (usb_pipeout (ep->pipe)) {retire_outbound_urb (ep, ctx);/* can be stopped during retire callback */
tools/lib/traceevent/plugin_sched_switch.c +2 -2
@@ -111,7 +111,7 @@ static int sched_switch_handler(struct trace_seq *s,trace_seq_printf (s,"%lld " , val);if (pevent_get_field_val (s, event,"prev_prio" , record, &val,0 ) ==0 ) -trace_seq_printf (s,"[%lld] " , val); +trace_seq_printf (s,"[%d] " , (int ) val);if (pevent_get_field_val (s, event,"prev_state" , record, &val,0 ) ==0 )write_state (s, val);
@@ -129,7 +129,7 @@ static int sched_switch_handler(struct trace_seq *s,trace_seq_printf (s,"%lld" , val);if (pevent_get_field_val (s, event,"next_prio" , record, &val,0 ) ==0 ) -trace_seq_printf (s," [%lld]" , val); +trace_seq_printf (s," [%d]" , (int ) val);return 0 ; }
tools/perf/Makefile.perf +2 -2
@@ -563,9 +563,9 @@ install-tests: all install-gtk $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr'; \ $(INSTALL) tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr' -install-bin: install-tools install-tests +install-bin: install-tools install-tests install-traceevent-plugins -install: install-bin try-install-man install-traceevent-plugins +install: install-bin try-install-man install-python_ext: $(PYTHON_WORD) util/setup.py --quiet install --root='/$(DESTDIR_SQ)'
tools/perf/util/intel-pt-decoder/intel-pt-decoder.c +38 -29
173 lines not on this page · raw message
tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c +17 -7
@@ -293,36 +293,46 @@ static int intel_pt_get_ip(enum intel_pt_pkt_type type, unsigned int byte, const unsigned char *buf, size_t len, struct intel_pt_pkt *packet) { - switch (byte >> 5) { + int ip_len; + + packet->count = byte >>5 ; + +switch (packet->count) {case 0 : - packet->count = 0; + ip_len =0 ;break ;case 1 :if (len <3 )return INTEL_PT_NEED_MORE_BYTES ; - packet->count =2 ; + ip_len =2 ; packet->payload =le16_to_cpu (*(uint16_t *)(buf +1 ));break ;case 2 :if (len <5 )return INTEL_PT_NEED_MORE_BYTES ; - packet->count =4 ; + ip_len =4 ; packet->payload =le32_to_cpu (*(uint32_t *)(buf +1 ));break ;case 3 : -case 6 : +case 4 :if (len <7 )return INTEL_PT_NEED_MORE_BYTES ; - packet->count =6 ; + ip_len =6 ;memcpy_le64 (&packet->payload, buf +1 ,6 );break ; +case 6 : +if (len <9 ) +return INTEL_PT_NEED_MORE_BYTES ; + ip_len =8 ; + packet->payload =le64_to_cpu (*(uint64_t *)(buf +1 )); +break ;default :return INTEL_PT_BAD_PACKET ; } packet->type = type; -return packet->count +1 ; +return ip_len +1 ; } static int intel_pt_get_mode(const unsigned char *buf, size_t len,
tools/perf/util/symbol-elf.c +6 -0
@@ -488,6 +488,12 @@ int sysfs__read_build_id(const char *filename, void *build_id, size_t size)break ; }else {int n = namesz + descsz; + +if (n > (int )sizeof (bf)) { + n =sizeof (bf); +pr_debug ("%s: truncating reading of build id in sysfs file %s: n_namesz=%u, n_descsz=%u.\n" , + __func__, filename, nhdr.n_namesz, nhdr.n_descsz); + }if (read (fd, bf, n) != n)break ; }