Linux 4.14.197
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.14.197 kernel.
All users of the 4.14 kernel series must upgrade.
The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/filesystems/affs.txt | 16 + Makefile | 2 arch/arm64/include/asm/kvm_arm.h | 3 arch/arm64/include/asm/kvm_asm.h | 43 +++++ arch/arm64/kernel/vmlinux.lds.S | 8 arch/arm64/kvm/hyp/entry.S | 26 ++- arch/arm64/kvm/hyp/hyp-entry.S | 63 +++++-- arch/arm64/kvm/hyp/switch.c | 39 ++++ arch/mips/kernel/smp-bmips.c | 2 arch/mips/mm/c-r4k.c | 4 arch/s390/include/asm/percpu.h | 28 +-- arch/xtensa/platforms/iss/simdisk.c | 1 drivers/ata/libata-core.c | 5 drivers/ata/libata-scsi.c | 8 drivers/block/brd.c | 1 drivers/block/null_blk.c | 2 drivers/block/rbd.c | 9 - drivers/block/zram/zram_drv.h | 1 drivers/cpuidle/cpuidle.c | 3 drivers/dma/at_hdmac.c | 2 drivers/dma/of-dma.c | 8 drivers/dma/pl330.c | 2 drivers/gpu/drm/msm/msm_drv.c | 8 drivers/hid/hid-core.c | 15 + drivers/hid/hid-input.c | 4 drivers/hid/hid-multitouch.c | 2 drivers/hwmon/applesmc.c | 31 +-- drivers/ide/ide-cd.c | 8 drivers/ide/ide-cd.h | 6 drivers/iommu/intel_irq_remapping.c | 10 - drivers/md/dm-cache-metadata.c | 8 drivers/md/dm-thin-metadata.c | 8 drivers/net/ethernet/arc/emac_mdio.c | 1 drivers/net/ethernet/broadcom/bcmsysport.c | 6 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 3 drivers/net/ethernet/broadcom/tg3.c | 17 +- drivers/net/ethernet/hisilicon/hns/hns_enet.c | 9 - drivers/net/ethernet/mellanox/mlx4/mr.c | 2 drivers/net/ethernet/renesas/ravb_main.c | 110 ++++++------- drivers/net/gtp.c | 1 drivers/net/usb/asix_common.c | 2 drivers/net/usb/qmi_wwan.c | 2 drivers/nvdimm/nd.h | 1 drivers/nvme/target/core.c | 6 drivers/nvme/target/fc.c | 4 drivers/scsi/gdth.h | 3 drivers/thermal/ti-soc-thermal/omap4-thermal-data.c | 23 +- drivers/thermal/ti-soc-thermal/omap4xxx-bandgap.h | 10 - drivers/xen/xenbus/xenbus_client.c | 10 - fs/affs/amigaffs.c | 27 +++ fs/affs/file.c | 26 ++- fs/btrfs/ctree.c | 8 fs/btrfs/extent_io.c | 8 fs/btrfs/extent_io.h | 6 fs/btrfs/ioctl.c | 27 ++- fs/btrfs/volumes.c | 3 fs/ceph/file.c | 1 fs/eventpoll.c | 6 include/linux/blkdev.h | 42 +++-- include/linux/bvec.h | 9 - include/linux/device-mapper.h | 2 include/linux/hid.h | 42 +++-- include/linux/ide.h | 1 include/linux/libata.h | 1 include/linux/log2.h | 2 include/linux/uaccess.h | 26 +++ include/net/netfilter/nf_tables.h | 2 include/uapi/linux/msdos_fs.h | 2 include/uapi/linux/netfilter/nf_tables.h | 2 mm/hugetlb.c | 26 ++- mm/maccess.c | 167 ++++++++++++++++++-- mm/slub.c | 12 - net/batman-adv/bat_v_ogm.c | 11 - net/batman-adv/bridge_loop_avoidance.c | 5 net/batman-adv/gateway_client.c | 6 net/netfilter/nf_tables_api.c | 3 net/netfilter/nft_payload.c | 4 net/wireless/reg.c | 3 scripts/checkpatch.pl | 4 sound/core/oss/mulaw.c | 4 sound/firewire/digi00x/digi00x.c | 5 sound/pci/ca0106/ca0106_main.c | 3 sound/pci/hda/patch_hdmi.c | 1 tools/include/uapi/linux/perf_event.h | 2 tools/perf/Documentation/perf-record.txt | 4 tools/perf/Documentation/perf-stat.txt | 4 87 files changed, 809 insertions(+), 287 deletions(-)
Al Grant (1):
perf tools: Correct SNOOPX field offset
Al Viro (1):
fix regression in "epoll: Keep a reference on files added to the check list"
Amit Engel (1):
nvmet: Disable keep-alive timer when kato is cleared to 0h
Bart Van Assche (1):
block: Move SECTOR_SIZE and SECTOR_SHIFT definitions into <linux/blkdev.h>
Christophe JAILLET (1):
nvmet-fc: Fix a missed _irqsave version of spin_lock in 'nvmet_fc_fod_op_done()'
Daniel Borkmann (1):
uaccess: Add non-pagefault user-space write function
Daniele Palmas (1):
net: usb: qmi_wwan: add Telit 0x1050 composition
Dinghao Liu (3):
net: hns: Fix memleak in hns_nic_dev_probe
net: systemport: Fix memleak in bcm_sysport_probe
net: arc_emac: Fix memleak in arc_mdio_probe
Eugeniu Rosca (1):
mm: slub: fix conversion of freelist_corrupted()
Florian Fainelli (2):
MIPS: mm: BMIPS5000 has inclusive physical caches
MIPS: BMIPS: Also call bmips_cpu_setup() for secondary cores
Florian Westphal (1):
netfilter: nf_tables: fix destination register zeroing
Greg Kroah-Hartman (1):
Linux 4.14.197
Himadri Pandya (1):
net: usb: Fix uninit-was-stored issue in asix_read_phy_addr()
James Morse (4):
KVM: arm64: Add kvm_extable for vaxorcism code
KVM: arm64: Defer guest entry when an asynchronous exception is pending
KVM: arm64: Survive synchronous exceptions caused by AT instructions
KVM: arm64: Set HCR_EL2.PTW to prevent AT taking synchronous exception
Jason Gunthorpe (1):
include/linux/log2.h: add missing () around n in roundup_pow_of_two()
Jeff Layton (1):
ceph: don't allow setlease on cephfs
Johannes Berg (1):
cfg80211: regulatory: reject invalid hints
Josef Bacik (3):
btrfs: drop path before adding new uuid tree entry
btrfs: set the lockdep class for log tree extent buffers
btrfs: fix potential deadlock in the search ioctl
Jussi Kivilinna (1):
batman-adv: bla: use netif_rx_ni when not in interrupt context
Kai Vehmanen (1):
ALSA: hda/hdmi: always check pin power status in i915 pin fixup
Kim Phillips (1):
perf record/stat: Explicitly call out event modifiers in the documentation
Krishna Manikandan (1):
drm/msm: add shutdown support for display platform_driver
Linus Lüssing (1):
batman-adv: Fix own OGM check in aggregated OGMs
Lu Baolu (1):
iommu/vt-d: Serialize IOMMU GCMD register modifications
Marc Zyngier (2):
HID: core: Correctly handle ReportSize being zero
HID: core: Sanitize event code and type when mapping input
Marek Szyprowski (1):
dmaengine: pl330: Fix burst length if burst size is smaller than bus width
Masami Hiramatsu (1):
uaccess: Add non-pagefault user-space read functions
Max Staudt (1):
affs: fix basic permission bits to actually work
Michael Chan (1):
tg3: Fix soft lockup when tg3_reset_task() fails.
Ming Lei (1):
block: allow for_each_bvec to support zero len bvec
Mrinal Pandey (1):
checkpatch: fix the usage of capture group ( ... )
Muchun Song (1):
mm/hugetlb: fix a race between hugetlb sysctl handlers
Nicolas Dichtel (1):
gtp: add GTPA_LINK info to msg sent to userspace
Nikolay Borisov (2):
btrfs: Remove redundant extent_buffer_get in get_old_root
btrfs: Remove extraneous extent_buffer_get from tree_mod_log_rewind
Pablo Neira Ayuso (2):
netfilter: nf_tables: add NFTA_SET_USERDATA if not null
netfilter: nf_tables: incorrect enum nft_list_attributes definition
Peter Ujfalusi (1):
dmaengine: of-dma: Fix of_dma_router_xlate's of_dma_xlate handling
Peter Zijlstra (1):
cpuidle: Fixup IRQ state
Rogan Dawes (1):
usb: qmi_wwan: add D-Link DWM-222 A2 device ID
Shung-Hsi Yu (1):
net: ethernet: mlx4: Fix memory allocation in mlx4_buddy_init()
Simon Leiner (1):
xen/xenbus: Fix granting of vmalloc'd memory
Sven Eckelmann (1):
batman-adv: Avoid uninitialized chaddr when handling DHCP
Sven Schnelle (1):
s390: don't trace preemption in percpu macros
Takashi Iwai (1):
ALSA: pcm: oss: Remove superfluous WARN_ON() for mulaw sanity check
Takashi Sakamoto (1):
ALSA: firewire-digi00x: exclude Avid Adrenaline from detection
Tejun Heo (1):
libata: implement ATA_HORKAGE_MAX_TRIM_128M and apply to Sandisks
Tom Rix (1):
hwmon: (applesmc) check status earlier.
Tong Zhang (1):
ALSA: ca0106: fix error code handling
Tony Lindgren (1):
thermal: ti-soc-thermal: Fix bogus thermal shutdowns for omap4430
Vasundhara Volam (2):
bnxt_en: Check for zero dir entries in NVRAM.
bnxt_en: Fix PCI AER error recovery flow
Ye Bin (2):
dm cache metadata: Avoid returning cmd->bm wild pointer on error
dm thin metadata: Avoid returning cmd->bm wild pointer on errorYu Kuai (1):
dmaengine: at_hdmac: check return value of of_find_device_by_node() in at_dma_xlate()
Yuusuke Ashizuka (1):
ravb: Fixed to be able to unload modules
Greg Kroah-Hartman
maintainerDocumentation/filesystems/affs.txt +10 -6
@@ -93,13 +93,15 @@ The Amiga protection flags RWEDRWEDHSPARWED are handled as follows: - R maps to r for user, group and others. On directories, R implies x. - - If both W and D are allowed, w will be set. + - W maps to w. - E maps to x. - - H and P are always retained and ignored under Linux. + - D is ignored. - - A is always reset when a file is written to. + - H, S and P are always retained and ignored under Linux. + + - A is cleared when a file is written to. User id and group id will be used unless set[gu]id are given as mount options. Since most of the Amiga file systems are single user systems
@@ -111,11 +113,13 @@ Linux -> Amiga: The Linux rwxrwxrwx file mode is handled as follows: - - r permission will set R for user, group and others. + - r permission will allow R for user, group and others. + + - w permission will allow W for user, group and others. - - w permission will set W and D for user, group and others. + - x permission of the user will allow E for plain files. - - x permission of the user will set E for plain files. + - D will be allowed for user, group and others. - All other flags (suid, sgid, ...) are ignored and will not be retained.
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 14 -SUBLEVEL = 196 +SUBLEVEL = 197 EXTRAVERSION = NAME = Petit Gorille
arch/arm64/include/asm/kvm_arm.h +2 -1
@@ -78,10 +78,11 @@* IMO: Override CPSR.I and enable signaling with VI * FMO: Override CPSR.F and enable signaling with VF * SWIO: Turn set/way invalidates into set/way clean+invalidate +* PTW: Take a stage2 fault if a stage1 walk steps in device memory */ #define HCR_GUEST_FLAGS (HCR_TSC | HCR_TSW | HCR_TWE | HCR_TWI | HCR_VM | \ HCR_TVM | HCR_BSU_IS | HCR_FB | HCR_TAC | \ - HCR_AMO | HCR_SWIO | HCR_TIDCP | HCR_RW) + HCR_AMO | HCR_SWIO | HCR_TIDCP | HCR_RW | HCR_PTW)#define HCR_VIRT_EXCP_MASK (HCR_VSE | HCR_VI | HCR_VF)#define HCR_INT_OVERRIDE (HCR_FMO | HCR_IMO)#define HCR_HOST_NVHE_FLAGS (HCR_RW | HCR_API | HCR_APK)
arch/arm64/include/asm/kvm_asm.h +43 -0
55 lines not on this page · raw message
arch/arm64/kernel/vmlinux.lds.S +8 -0
@@ -24,6 +24,13 @@ ENTRY(_text) jiffies = jiffies_64; + +#define HYPERVISOR_EXTABLE \ + . = ALIGN(SZ_8); \ + VMLINUX_SYMBOL(__start___kvm_ex_table) = .; \ + *(__kvm_ex_table) \ + VMLINUX_SYMBOL(__stop___kvm_ex_table) = .; + #define HYPERVISOR_TEXT \ /* \ * Align to 4 KB so that \
@@ -39,6 +46,7 @@ jiffies = jiffies_64; VMLINUX_SYMBOL(__hyp_idmap_text_end) = .; \ VMLINUX_SYMBOL(__hyp_text_start) = .; \ *(.hyp.text) \ + HYPERVISOR_EXTABLE \ VMLINUX_SYMBOL(__hyp_text_end) = .; #define IDMAP_TEXT \
arch/arm64/kvm/hyp/entry.S +20 -6
@@ -17,6 +17,7 @@ #include <linux/linkage.h> +#include <asm/alternative.h> #include <asm/asm-offsets.h> #include <asm/assembler.h> #include <asm/fpsimdmacros.h>
@@ -62,6 +63,15 @@ ENTRY(__guest_enter) // Store the host regs save_callee_saved_regs x1 + // Now the host state is stored if we have a pending RAS SError it must + // affect the host. If any asynchronous exception is pending we defer + // the guest entry. + mrs x1, isr_el1 + cbz x1, 1f + mov x0, #ARM_EXCEPTION_IRQ + ret + +1: add x18, x0, #VCPU_CONTEXT // Restore guest regs x0-x17
@@ -135,18 +145,22 @@ ENTRY(__guest_exit) // This is our single instruction exception window. A pending // SError is guaranteed to occur at the earliest when we unmask // it, and at the latest just after the ISB. - .global abort_guest_exit_start abort_guest_exit_start: isb - .global abort_guest_exit_end abort_guest_exit_end: + msr daifset, #4 // Mask aborts + ret + + _kvm_extable abort_guest_exit_start, 9997f + _kvm_extable abort_guest_exit_end, 9997f +9997: + msr daifset, #4 // Mask aborts + mov x0, #(1 << ARM_EXIT_WITH_SERROR_BIT) - // If the exception took place, restore the EL1 exception - // context so that we can report some information. - // Merge the exception code with the SError pending bit. - tbz x0, #ARM_EXIT_WITH_SERROR_BIT, 1f + // restore the EL1 exception context so that we can report some + // information. Merge the exception code with the SError pending bit. msr elr_el2, x2 msr esr_el2, x3 msr spsr_el2, x4
arch/arm64/kvm/hyp/hyp-entry.S +42 -21
88 lines not on this page · raw message
arch/arm64/kvm/hyp/switch.c +35 -4
@@ -22,11 +22,15 @@#include <kvm/arm_psci.h> +#include <asm/extable.h> #include <asm/kvm_asm.h> #include <asm/kvm_emulate.h> #include <asm/kvm_hyp.h> #include <asm/fpsimd.h> +extern struct exception_table_entry __start___kvm_ex_table; +extern struct exception_table_entry __stop___kvm_ex_table; + static bool __hyp_text __fpsimd_enabled_nvhe(void) {return !(read_sysreg (cptr_el2) &CPTR_EL2_TFP );
@@ -216,10 +220,10 @@ static bool __hyp_text __translate_far_to_hpfar(u64 far, u64 *hpfar)* saved the guest context yet, and we may return early... */ par =read_sysreg (par_el1); - asmvolatile ("at s1e1r, %0" : :"r" (far)); -isb (); - - tmp =read_sysreg (par_el1); +if (!__kvm_at ("s1e1r" , far)) + tmp =read_sysreg (par_el1); +else + tmp =1 ;/* back to the guest */ write_sysreg (par, par_el1);if (unlikely (tmp &1 ))
@@ -486,3 +490,30 @@ void __hyp_text __noreturn hyp_panic(struct kvm_cpu_context *host_ctxt)unreachable (); } + +asmlinkage void __hyp_text kvm_unexpected_el2_exception(void) +{ +unsigned long addr, fixup; +struct kvm_cpu_context *host_ctxt; +struct exception_table_entry *entry, *end; +unsigned long elr_el2 =read_sysreg (elr_el2); + + entry =hyp_symbol_addr (__start___kvm_ex_table); + end =hyp_symbol_addr (__stop___kvm_ex_table); + host_ctxt =__hyp_this_cpu_ptr (kvm_host_cpu_state); + +while (entry < end) { + addr = (unsigned long )&entry->insn + entry->insn; + fixup = (unsigned long )&entry->fixup + entry->fixup; + +if (addr != elr_el2) { + entry++; +continue ; + } + +write_sysreg (fixup, elr_el2); +return ; + } + +hyp_panic (host_ctxt); +}
arch/mips/kernel/smp-bmips.c +2 -0
@@ -240,6 +240,8 @@ static int bmips_boot_secondary(int cpu, struct task_struct *idle)*/ static void bmips_init_secondary (void ) { +bmips_cpu_setup (); +switch (current_cpu_type ()) {case CPU_BMIPS4350 :case CPU_BMIPS4380 :
arch/mips/mm/c-r4k.c +4 -0
@@ -1781,7 +1781,11 @@ static void setup_scache(void)printk ("MIPS secondary cache %ldkB, %s, linesize %d bytes.\n" , scache_size >>10 , way_string[c->scache.ways], c->scache.linesz); + +if (current_cpu_type () ==CPU_BMIPS5000 ) + c->options |= MIPS_CPU_INCLUSIVE_CACHES; } +#else if (!(c->scache.flags &MIPS_CACHE_NOT_PRESENT ))panic ("Dunno how to handle MIPS32 / MIPS64 second level cache" );
arch/s390/include/asm/percpu.h +14 -14
@@ -29,7 +29,7 @@typedef typeof (pcp)pcp_op_T__ ; \pcp_op_T__ old__, new__, prev__; \pcp_op_T__ *ptr__; \ -preempt_disable (); \ +preempt_disable_notrace (); \ ptr__ =raw_cpu_ptr (&(pcp)); \ prev__ = *ptr__; \ do { \
@@ -37,7 +37,7 @@ new__ = old__ op (val); \ prev__ =cmpxchg (ptr__, old__, new__); \ }while (prev__ != old__); \ -preempt_enable (); \ +preempt_enable_notrace (); \ new__; \ })
@@ -68,7 +68,7 @@typedef typeof (pcp)pcp_op_T__ ; \pcp_op_T__ val__ = (val); \pcp_op_T__ old__, *ptr__; \ -preempt_disable (); \ +preempt_disable_notrace (); \ ptr__ =raw_cpu_ptr (&(pcp)); \if (__builtin_constant_p (val__) && \ ((szcast )val__ >-129 ) && ((szcast )val__ <128 )) { \
@@ -84,7 +84,7 @@ : [val__] "d" (val__) \ : "cc"); \ } \ -preempt_enable (); \ +preempt_enable_notrace (); \ }#define this_cpu_add_4 (pcp, val) arch_this_cpu_add(pcp, val, "laa", "asi", int)
@@ -95,14 +95,14 @@typedef typeof (pcp)pcp_op_T__ ; \pcp_op_T__ val__ = (val); \pcp_op_T__ old__, *ptr__; \ -preempt_disable (); \ +preempt_disable_notrace (); \ ptr__ =raw_cpu_ptr (&(pcp)); \ asmvolatile ( \ op" %[old__],%[val__],%[ptr__]\n" \ : [old__]"=d" (old__), [ptr__]"+Q" (*ptr__) \ : [val__]"d" (val__) \ :"cc" ); \ -preempt_enable (); \ +preempt_enable_notrace (); \ old__ + val__; \ })
@@ -114,14 +114,14 @@typedef typeof (pcp)pcp_op_T__ ; \pcp_op_T__ val__ = (val); \pcp_op_T__ old__, *ptr__; \ -preempt_disable (); \ +preempt_disable_notrace (); \ ptr__ =raw_cpu_ptr (&(pcp)); \ asmvolatile ( \ op" %[old__],%[val__],%[ptr__]\n" \ : [old__]"=d" (old__), [ptr__]"+Q" (*ptr__) \ : [val__]"d" (val__) \ :"cc" ); \ -preempt_enable (); \ +preempt_enable_notrace (); \ }#define this_cpu_and_4 (pcp, val) arch_this_cpu_to_op(pcp, val, "lan")
@@ -136,10 +136,10 @@typedef typeof (pcp)pcp_op_T__ ; \pcp_op_T__ ret__; \pcp_op_T__ *ptr__; \ -preempt_disable (); \ +preempt_disable_notrace (); \ ptr__ =raw_cpu_ptr (&(pcp)); \ ret__ =cmpxchg (ptr__, oval, nval); \ -preempt_enable (); \ +preempt_enable_notrace (); \ ret__; \ })
@@ -152,10 +152,10 @@ ({ \typeof (pcp) *ptr__; \typeof (pcp) ret__; \ -preempt_disable (); \ +preempt_disable_notrace (); \ ptr__ =raw_cpu_ptr (&(pcp)); \ ret__ =xchg (ptr__, nval); \ -preempt_enable (); \ +preempt_enable_notrace (); \ ret__; \ })
@@ -171,11 +171,11 @@typeof (pcp1) *p1__; \typeof (pcp2) *p2__; \int ret__; \ -preempt_disable (); \ +preempt_disable_notrace (); \ p1__ =raw_cpu_ptr (&(pcp1)); \ p2__ =raw_cpu_ptr (&(pcp2)); \ ret__ =__cmpxchg_double (p1__, p2__, o1__, o2__, n1__, n2__); \ -preempt_enable (); \ +preempt_enable_notrace (); \ ret__; \ })
arch/xtensa/platforms/iss/simdisk.c +0 -1
@@ -21,7 +21,6 @@#include <platform/simcall.h> #define SIMDISK_MAJOR 240 -#define SECTOR_SHIFT 9#define SIMDISK_MINORS 1#define MAX_SIMDISK_COUNT 10
drivers/ata/libata-core.c +2 -3
@@ -4488,9 +4488,8 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {/* https://bugzilla.kernel.org/show_bug.cgi?id=15573 */ { "C300-CTFDDAC128MAG", "0001", ATA_HORKAGE_NONCQ, }, - /* Some Sandisk SSDs lock up hard with NCQ enabled. Reported on - SD7SN6S256G and SD8SN8U256G */ - { "SanDisk SD[78]SN*G", NULL, ATA_HORKAGE_NONCQ, }, + /* Sandisk SD7/8/9s lock up hard on large trims */ + { "SanDisk SD[789]*", NULL, ATA_HORKAGE_MAX_TRIM_128M, }, /* devices which puke on READ_NATIVE_MAX */ { "HDS724040KLSA80", "KFAOA20N", ATA_HORKAGE_BROKEN_HPA, },
drivers/ata/libata-scsi.c +7 -1
@@ -2392,6 +2392,7 @@ static unsigned int ata_scsiop_inq_89(struct ata_scsi_args *args, u8 *rbuf)static unsigned int ata_scsiop_inq_b0 (struct ata_scsi_args *args,u8 *rbuf) { +struct ata_device *dev = args->dev;u16 min_io_sectors; rbuf[1 ] =0xb0 ;
@@ -2417,7 +2418,12 @@ static unsigned int ata_scsiop_inq_b0(struct ata_scsi_args *args, u8 *rbuf)* with the unmap bit set. */ if (ata_id_has_trim (args->id)) { -put_unaligned_be64 (65535 *ATA_MAX_TRIM_RNUM , &rbuf[36 ]); +u64 max_blocks =65535 *ATA_MAX_TRIM_RNUM ; + +if (dev->horkage &ATA_HORKAGE_MAX_TRIM_128M ) + max_blocks =128 << (20 -SECTOR_SHIFT ); + +put_unaligned_be64 (max_blocks, &rbuf[36 ]);put_unaligned_be32 (1 , &rbuf[28 ]); }
drivers/block/brd.c +0 -1
@@ -28,7 +28,6 @@#include <linux/uaccess.h> -#define SECTOR_SHIFT 9#define PAGE_SECTORS_SHIFT (PAGE_SHIFT - SECTOR_SHIFT)#define PAGE_SECTORS (1 << PAGE_SECTORS_SHIFT)
drivers/block/null_blk.c +0 -2
@@ -16,10 +16,8 @@#include <linux/configfs.h> #include <linux/badblocks.h> -#define SECTOR_SHIFT 9#define PAGE_SECTORS_SHIFT (PAGE_SHIFT - SECTOR_SHIFT)#define PAGE_SECTORS (1 << PAGE_SECTORS_SHIFT) -#define SECTOR_SIZE (1 << SECTOR_SHIFT)#define SECTOR_MASK (PAGE_SECTORS - 1)#define FREE_BATCH 16
drivers/block/rbd.c +0 -9
@@ -50,15 +50,6 @@#define RBD_DEBUG /* Activate rbd_assert() calls */ -/* -* The basic unit of block I/O is a sector. It is interpreted in a -* number of contexts in Linux (blk, bio, genhd), but the default is -* universally 512 bytes. These symbols are just slightly more -* meaningful than the bare numbers they represent. -*/ -#define SECTOR_SHIFT 9 -#define SECTOR_SIZE (1ULL << SECTOR_SHIFT) -/* * Increment the given counter and return its updated value. * If the counter is already 0 it will not be incremented.
drivers/block/zram/zram_drv.h +0 -1
@@ -37,7 +37,6 @@ static const size_t max_zpage_size = PAGE_SIZE / 4 * 3;/*-- End of configurable params */ -#define SECTOR_SHIFT 9#define SECTORS_PER_PAGE_SHIFT (PAGE_SHIFT - SECTOR_SHIFT)#define SECTORS_PER_PAGE (1 << SECTORS_PER_PAGE_SHIFT)#define ZRAM_LOGICAL_BLOCK_SHIFT 12
drivers/cpuidle/cpuidle.c +2 -1
@@ -144,7 +144,8 @@ static void enter_s2idle_proper(struct cpuidle_driver *drv,*/ stop_critical_timings (); drv->states[index].enter_s2idle (dev, drv, index); -WARN_ON (!irqs_disabled ()); +if (WARN_ON_ONCE (!irqs_disabled ())) +local_irq_disable ();/* * timekeeping_resume() that will be called by tick_unfreeze() for the * first CPU executing it calls functions containing RCU read-side
drivers/dma/at_hdmac.c +2 -0
@@ -1677,6 +1677,8 @@ static struct dma_chan *at_dma_xlate(struct of_phandle_args *dma_spec,return NULL ; dmac_pdev =of_find_device_by_node (dma_spec->np); +if (!dmac_pdev) +return NULL ;dma_cap_zero (mask);dma_cap_set (DMA_SLAVE , mask);
drivers/dma/of-dma.c +4 -4
@@ -72,12 +72,12 @@ static struct dma_chan *of_dma_router_xlate(struct of_phandle_args *dma_spec,return NULL ; chan = ofdma_target->of_dma_xlate (&dma_spec_target, ofdma_target); -if (chan) { - chan->router = ofdma->dma_router; - chan->route_data = route_data; - }else { +if (IS_ERR_OR_NULL (chan)) { ofdma->dma_router->route_free (ofdma->dma_router->dev, route_data); + }else { + chan->router = ofdma->dma_router; + chan->route_data = route_data; }/*
drivers/dma/pl330.c +1 -1
@@ -2661,6 +2661,7 @@ pl330_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dst,while (burst != (1 << desc->rqcfg.brst_size)) desc->rqcfg.brst_size++; + desc->rqcfg.brst_len =get_burst_len (desc, len);/* * If burst size is smaller than bus width then make sure we only * transfer one at a time to avoid a burst stradling an MFIFO entry.
@@ -2668,7 +2669,6 @@ pl330_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dst,if (desc->rqcfg.brst_size *8 < pl330->pcfg.data_bus_width) desc->rqcfg.brst_len =1 ; - desc->rqcfg.brst_len =get_burst_len (desc, len); desc->bytes_requested = len; desc->txd.flags = flags;
drivers/gpu/drm/msm/msm_drv.c +8 -0
@@ -1134,6 +1134,13 @@ static int msm_pdev_remove(struct platform_device *pdev)return 0 ; } +static void msm_pdev_shutdown (struct platform_device *pdev) +{ +struct drm_device *drm =platform_get_drvdata (pdev); + +drm_atomic_helper_shutdown (drm); +} +static const struct of_device_id dt_match[] = { { .compatible ="qcom,mdp4" , .data = (void *)4 },/* MDP4 */ { .compatible ="qcom,mdss" , .data = (void *)5 },/* MDP5 MDSS */
@@ -1144,6 +1151,7 @@ MODULE_DEVICE_TABLE(of, dt_match);static struct platform_driver msm_platform_driver = { .probe = msm_pdev_probe, .remove = msm_pdev_remove, + .shutdown = msm_pdev_shutdown, .driver = { .name ="msm" , .of_match_table = dt_match,
drivers/hid/hid-core.c +13 -2
@@ -1426,6 +1426,17 @@ static void hid_output_field(const struct hid_device *hid, } } +/* +* Compute the size of a report. +*/ +static size_t hid_compute_report_size (struct hid_report *report) +{ +if (report->size) +return ((report->size -1 ) >>3 ) +1 ; + +return 0 ; +} +/* * Create a report. 'data' has to be allocated using * hid_alloc_report_buf() so that it has proper size.
@@ -1438,7 +1449,7 @@ void hid_output_report(struct hid_report *report, __u8 *data)if (report->id >0 ) *data++ = report->id; -memset (data,0 , ((report->size -1 ) >>3 ) +1 ); +memset (data,0 ,hid_compute_report_size (report));for (n =0 ; n < report->maxfield; n++)hid_output_field (report->device, report->field[n], data); }
@@ -1565,7 +1576,7 @@ int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, u32 size, csize--; } - rsize = ((report->size -1 ) >>3 ) +1 ; + rsize =hid_compute_report_size (report);if (report_enum->numbered && rsize >=HID_MAX_BUFFER_SIZE ) rsize =HID_MAX_BUFFER_SIZE -1 ;
drivers/hid/hid-input.c +4 -0
@@ -1116,6 +1116,10 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel } mapped: +/* Mapping failed, bail out */ +if (!bit) +return ; +if (device->driver->input_mapped && device->driver->input_mapped (device, hidinput, field, usage, &bit, &max) <0 ) {
drivers/hid/hid-multitouch.c +2 -0
@@ -616,6 +616,8 @@ static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi, (usage->hid & HID_USAGE) > 1) code--;hid_map_usage (hi, usage, bit, max,EV_KEY , code); +if (!*bit) +return -1 ;input_set_capability (hi->input,EV_KEY , code);return 1 ;
drivers/hwmon/applesmc.c +16 -15
@@ -760,15 +760,18 @@ static ssize_t applesmc_light_show(struct device *dev, } ret =applesmc_read_key (LIGHT_SENSOR_LEFT_KEY , buffer, data_length); +if (ret) + goto out;/* newer macbooks report a single 10-bit bigendian value */ if (data_length ==10 ) { left =be16_to_cpu (*(__be16 *)(buffer +6 )) >>2 ; goto out; } left = buffer[2 ]; + + ret =applesmc_read_key (LIGHT_SENSOR_RIGHT_KEY , buffer, data_length);if (ret) goto out; - ret =applesmc_read_key (LIGHT_SENSOR_RIGHT_KEY , buffer, data_length); right = buffer[2 ]; out:
@@ -817,12 +820,11 @@ static ssize_t applesmc_show_fan_speed(struct device *dev, to_index(attr)); ret =applesmc_read_key (newkey, buffer,2 ); - speed = ((buffer[0 ] <<8 | buffer[1 ]) >>2 ); -if (ret)return ret; -else -return snprintf (sysfsbuf,PAGE_SIZE ,"%u\n" , speed); + + speed = ((buffer[0 ] <<8 | buffer[1 ]) >>2 ); +return snprintf (sysfsbuf,PAGE_SIZE ,"%u\n" , speed); } static ssize_t applesmc_store_fan_speed(struct device *dev,
@@ -858,12 +860,11 @@ static ssize_t applesmc_show_fan_manual(struct device *dev,u8 buffer[2 ]; ret =applesmc_read_key (FANS_MANUAL , buffer,2 ); - manual = ((buffer[0 ] <<8 | buffer[1 ]) >>to_index (attr)) &0x01 ; -if (ret)return ret; -else -return snprintf (sysfsbuf,PAGE_SIZE ,"%d\n" , manual); + + manual = ((buffer[0 ] <<8 | buffer[1 ]) >>to_index (attr)) &0x01 ; +return snprintf (sysfsbuf,PAGE_SIZE ,"%d\n" , manual); } static ssize_t applesmc_store_fan_manual(struct device *dev,
@@ -879,10 +880,11 @@ static ssize_t applesmc_store_fan_manual(struct device *dev,return -EINVAL ; ret =applesmc_read_key (FANS_MANUAL , buffer,2 ); - val = (buffer[0 ] <<8 | buffer[1 ]);if (ret) goto out; + val = (buffer[0 ] <<8 | buffer[1 ]); +if (input) val = val | (0x01 <<to_index (attr));else
@@ -958,13 +960,12 @@ static ssize_t applesmc_key_count_show(struct device *dev,u32 count; ret =applesmc_read_key (KEY_COUNT_KEY , buffer,4 ); - count = ((u32 )buffer[0 ]<<24 ) + ((u32 )buffer[1 ]<<16 ) + - ((u32 )buffer[2 ]<<8 ) + buffer[3 ]; -if (ret)return ret; -else -return snprintf (sysfsbuf,PAGE_SIZE ,"%d\n" , count); + + count = ((u32 )buffer[0 ]<<24 ) + ((u32 )buffer[1 ]<<16 ) + + ((u32 )buffer[2 ]<<8 ) + buffer[3 ]; +return snprintf (sysfsbuf,PAGE_SIZE ,"%d\n" , count); } static ssize_t applesmc_key_at_index_read_show(struct device *dev,
drivers/ide/ide-cd.c +4 -4
@@ -712,7 +712,7 @@ static ide_startstop_t cdrom_start_rw(ide_drive_t *drive, struct request *rq)struct request_queue *q = drive->queue;int write =rq_data_dir (rq) ==WRITE ;unsigned short sectors_per_frame = -queue_logical_block_size (q) >>SECTOR_BITS ; +queue_logical_block_size (q) >>SECTOR_SHIFT ; ide_debug_log(IDE_DBG_RQ, "rq->cmd[0]: 0x%x, rq->cmd_flags: 0x%x, " "secs_per_frame: %u",
@@ -919,7 +919,7 @@ static int cdrom_read_capacity(ide_drive_t *drive, unsigned long *capacity,* end up being bogus. */ blocklen =be32_to_cpu (capbuf.blocklen); - blocklen = (blocklen >>SECTOR_BITS ) <<SECTOR_BITS ; + blocklen = (blocklen >>SECTOR_SHIFT ) <<SECTOR_SHIFT ;switch (blocklen) {case 512 :case 1024 :
@@ -935,7 +935,7 @@ static int cdrom_read_capacity(ide_drive_t *drive, unsigned long *capacity, } *capacity =1 +be32_to_cpu (capbuf.lba); - *sectors_per_frame = blocklen >>SECTOR_BITS ; + *sectors_per_frame = blocklen >>SECTOR_SHIFT ;ide_debug_log (IDE_DBG_PROBE ,"cap: %lu, sectors_per_frame: %lu" , *capacity, *sectors_per_frame);
@@ -1012,7 +1012,7 @@ int ide_cd_read_toc(ide_drive_t *drive, struct request_sense *sense) drive->probed_capacity = toc->capacity * sectors_per_frame;blk_queue_logical_block_size (drive->queue, - sectors_per_frame <<SECTOR_BITS ); + sectors_per_frame <<SECTOR_SHIFT );/* first read just the header, so we know how long the TOC is */ stat = cdrom_read_tocentry(drive, 0, 1, 0, (char *) &toc->hdr,
drivers/ide/ide-cd.h +1 -5
@@ -21,11 +21,7 @@/************************************************************************/ -#define SECTOR_BITS 9 -#ifndef SECTOR_SIZE -#define SECTOR_SIZE (1 << SECTOR_BITS) -#endif -#define SECTORS_PER_FRAME (CD_FRAMESIZE >> SECTOR_BITS) +#define SECTORS_PER_FRAME (CD_FRAMESIZE >> SECTOR_SHIFT)#define SECTOR_BUFFER_SIZE (CD_FRAMESIZE * 32)/* Capabilities Page size including 8 bytes of Mode Page Header */
drivers/iommu/intel_irq_remapping.c +8 -2
@@ -479,12 +479,18 @@ static void iommu_enable_irq_remapping(struct intel_iommu *iommu)/* Enable interrupt-remapping */ iommu->gcmd |=DMA_GCMD_IRE ; - iommu->gcmd &= ~DMA_GCMD_CFI ;/* Block compatibility-format MSIs */ writel (iommu->gcmd, iommu->reg +DMAR_GCMD_REG ); -IOMMU_WAIT_OP (iommu,DMAR_GSTS_REG , readl, (sts &DMA_GSTS_IRES ), sts); +/* Block compatibility-format MSIs */ +if (sts &DMA_GSTS_CFIS ) { + iommu->gcmd &= ~DMA_GCMD_CFI ; +writel (iommu->gcmd, iommu->reg +DMAR_GCMD_REG ); +IOMMU_WAIT_OP (iommu,DMAR_GSTS_REG , + readl, !(sts &DMA_GSTS_CFIS ), sts); + } +/* * With CFI clear in the Global Command register, we should be * protected from dangerous (i.e. compatibility) interrupts
drivers/md/dm-cache-metadata.c +6 -2
@@ -536,12 +536,16 @@ static int __create_persistent_data_objects(struct dm_cache_metadata *cmd, CACHE_MAX_CONCURRENT_LOCKS);if (IS_ERR (cmd->bm)) {DMERR ("could not create block manager" ); -return PTR_ERR (cmd->bm); + r =PTR_ERR (cmd->bm); + cmd->bm =NULL ; +return r; } r =__open_or_format_metadata (cmd, may_format_device); -if (r) +if (r) {dm_block_manager_destroy (cmd->bm); + cmd->bm =NULL ; + }return r; }
drivers/md/dm-thin-metadata.c +6 -2
@@ -698,12 +698,16 @@ static int __create_persistent_data_objects(struct dm_pool_metadata *pmd, bool f THIN_MAX_CONCURRENT_LOCKS);if (IS_ERR (pmd->bm)) {DMERR ("could not create block manager" ); -return PTR_ERR (pmd->bm); + r =PTR_ERR (pmd->bm); + pmd->bm =NULL ; +return r; } r =__open_or_format_metadata (pmd, format_device); -if (r) +if (r) {dm_block_manager_destroy (pmd->bm); + pmd->bm =NULL ; + }return r; }
drivers/net/ethernet/arc/emac_mdio.c +1 -0
@@ -153,6 +153,7 @@ int arc_mdio_probe(struct arc_emac_priv *priv)if (IS_ERR (data->reset_gpio)) { error =PTR_ERR (data->reset_gpio);dev_err (priv->dev,"Failed to request gpio: %d\n" , error); +mdiobus_free (bus);return error; }
drivers/net/ethernet/broadcom/bcmsysport.c +4 -2
@@ -2087,8 +2087,10 @@ static int bcm_sysport_probe(struct platform_device *pdev) priv->tx_rings =devm_kcalloc (&pdev->dev, txq,sizeof (struct bcm_sysport_tx_ring ),GFP_KERNEL ); -if (!priv->tx_rings) -return -ENOMEM ; +if (!priv->tx_rings) { + ret = -ENOMEM ; + goto err_free_netdev; + } priv->is_lite = params->is_lite; priv->num_rx_desc_words = params->num_rx_desc_words;
drivers/net/ethernet/broadcom/bnxt/bnxt.c +3 -0
@@ -8251,6 +8251,7 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)bnxt_parse_log_pcie_link (bp); +pci_save_state (pdev);return 0 ; init_err_cleanup_tc:
@@ -8412,6 +8413,8 @@ static pci_ers_result_t bnxt_io_slot_reset(struct pci_dev *pdev) "Cannot re-enable PCI device after reset.\n"); }else {pci_set_master (pdev); +pci_restore_state (pdev); +pci_save_state (pdev); err =bnxt_hwrm_func_reset (bp);if (!err &&netif_running (netdev))
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +3 -0
@@ -1761,6 +1761,9 @@ static int bnxt_get_nvram_directory(struct net_device *dev, u32 len, u8 *data)if (rc !=0 )return rc; +if (!dir_entries || !entry_length) +return -EIO ; +/* Insert 2 bytes of directory info (count and size of entries) */ if (len <2 )return -EINVAL ;
drivers/net/ethernet/broadcom/tg3.c +13 -4
@@ -7204,8 +7204,8 @@ static inline void tg3_reset_task_schedule(struct tg3 *tp)static inline void tg3_reset_task_cancel (struct tg3 *tp) { -cancel_work_sync (&tp->reset_task); -tg3_flag_clear (tp,RESET_TASK_PENDING ); +if (test_and_clear_bit (TG3_FLAG_RESET_TASK_PENDING , tp->tg3_flags)) +cancel_work_sync (&tp->reset_task);tg3_flag_clear (tp,TX_RECOVERY_PENDING ); }
@@ -11182,18 +11182,27 @@ static void tg3_reset_task(struct work_struct *work)tg3_halt (tp,RESET_KIND_SHUTDOWN ,0 ); err =tg3_init_hw (tp, true); -if (err) +if (err) { +tg3_full_unlock (tp); + tp->irq_sync =0 ; +tg3_napi_enable (tp); +/* Clear this flag so that tg3_reset_task_cancel() will not +* call cancel_work_sync() and wait forever. +*/ +tg3_flag_clear (tp,RESET_TASK_PENDING ); +dev_close (tp->dev); goto out; + }tg3_netif_start (tp); -out:tg3_full_unlock (tp);if (!err)tg3_phy_start (tp);tg3_flag_clear (tp,RESET_TASK_PENDING ); +out:rtnl_unlock (); }
drivers/net/ethernet/hisilicon/hns/hns_enet.c +6 -3
@@ -2433,8 +2433,10 @@ static int hns_nic_dev_probe(struct platform_device *pdev) priv->enet_ver =AE_VERSION_1 ; else if (acpi_dev_found(hns_enet_acpi_match[1].id)) priv->enet_ver = AE_VERSION_2; - else - return -ENXIO; + else { + ret = -ENXIO ; + goto out_read_prop_fail; + }/* try to find port-idx-in-ae first */ ret = acpi_node_get_property_reference(dev->fwnode,
@@ -2446,7 +2448,8 @@ static int hns_nic_dev_probe(struct platform_device *pdev) priv->fwnode =acpi_fwnode_handle (args.adev); }else {dev_err (dev,"cannot read cfg data from OF or acpi\n" ); -return -ENXIO ; + ret = -ENXIO ; + goto out_read_prop_fail; } ret =device_property_read_u32 (dev,"port-idx-in-ae" , &port_id);
drivers/net/ethernet/mellanox/mlx4/mr.c +1 -1
@@ -114,7 +114,7 @@ static int mlx4_buddy_init(struct mlx4_buddy *buddy, int max_order) goto err_out;for (i =0 ; i <= buddy->max_order; ++i) { - s =BITS_TO_LONGS (1 << (buddy->max_order - i)); + s =BITS_TO_LONGS (1UL << (buddy->max_order - i)); buddy->bits[i] =kvmalloc_array (s,sizeof (long ),GFP_KERNEL | __GFP_ZERO);if (!buddy->bits[i]) goto err_out_free;
drivers/net/ethernet/renesas/ravb_main.c +55 -55
158 lines not on this page · raw message
drivers/net/gtp.c +1 -0
@@ -1187,6 +1187,7 @@ static int gtp_genl_fill_info(struct sk_buff *skb, u32 snd_portid, u32 snd_seq, goto nlmsg_failure;if (nla_put_u32 (skb,GTPA_VERSION , pctx->gtp_version) || +nla_put_u32 (skb,GTPA_LINK , pctx->dev->ifindex) ||nla_put_be32 (skb,GTPA_PEER_ADDRESS , pctx->peer_addr_ip4.s_addr) ||nla_put_be32 (skb,GTPA_MS_ADDRESS , pctx->ms_addr_ip4.s_addr)) goto nla_put_failure;
drivers/net/usb/asix_common.c +1 -1
@@ -309,7 +309,7 @@ int asix_read_phy_addr(struct usbnet *dev, int internal)netdev_dbg (dev->net,"asix_get_phy_addr()\n" ); -if (ret <0 ) { +if (ret <2 ) {netdev_err (dev->net,"Error reading PHYID register: %02x\n" , ret); goto out; }
drivers/net/usb/qmi_wwan.c +2 -0
@@ -1216,6 +1216,7 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x19d2, 0x2002, 4)}, /* ZTE (Vodafone) K3765-Z */ {QMI_FIXED_INTF(0x2001, 0x7e19, 4)}, /* D-Link DWM-221 B1 */ {QMI_FIXED_INTF(0x2001, 0x7e35, 4)}, /* D-Link DWM-222 */ + {QMI_FIXED_INTF(0x2001, 0x7e3d, 4)}, /* D-Link DWM-222 A2 */ {QMI_FIXED_INTF(0x2020, 0x2031, 4)}, /* Olicard 600 */ {QMI_FIXED_INTF(0x2020, 0x2033, 4)}, /* BroadMobi BM806U */ {QMI_FIXED_INTF(0x2020, 0x2060, 4)}, /* BroadMobi BM818 */
@@ -1251,6 +1252,7 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x2357, 0x9000, 4)}, /* TP-LINK MA260 */ {QMI_QUIRK_SET_DTR(0x1bc7, 0x1031, 3)}, /* Telit LE910C1-EUX */ {QMI_QUIRK_SET_DTR(0x1bc7, 0x1040, 2)}, /* Telit LE922A */ + {QMI_QUIRK_SET_DTR(0x1bc7, 0x1050, 2)}, /* Telit FN980 */ {QMI_FIXED_INTF(0x1bc7, 0x1100, 3)}, /* Telit ME910 */ {QMI_FIXED_INTF(0x1bc7, 0x1101, 3)}, /* Telit ME910 dual modem */ {QMI_FIXED_INTF(0x1bc7, 0x1200, 5)}, /* Telit LE920 */
drivers/nvdimm/nd.h +0 -1
@@ -29,7 +29,6 @@ enum {* BTT instance */ ND_MAX_LANES =256 , -SECTOR_SHIFT =9 ,INT_LBASIZE_ALIGNMENT =64 , NVDIMM_IO_ATOMIC = 1, };
drivers/nvme/target/core.c +6 -0
@@ -208,6 +208,9 @@ static void nvmet_keep_alive_timer(struct work_struct *work)static void nvmet_start_keep_alive_timer (struct nvmet_ctrl *ctrl) { +if (unlikely (ctrl->kato ==0 )) +return ; +pr_debug ("ctrl %d start keep-alive timer for %d secs\n" , ctrl->cntlid, ctrl->kato);
@@ -217,6 +220,9 @@ static void nvmet_start_keep_alive_timer(struct nvmet_ctrl *ctrl)static void nvmet_stop_keep_alive_timer (struct nvmet_ctrl *ctrl) { +if (unlikely (ctrl->kato ==0 )) +return ; +pr_debug ("ctrl %d stop keep-alive\n" , ctrl->cntlid);cancel_delayed_work_sync (&ctrl->ka_work);
drivers/nvme/target/fc.c +2 -2
@@ -1994,9 +1994,9 @@ nvmet_fc_fod_op_done(struct nvmet_fc_fcp_iod *fod)return ;if (fcpreq->fcp_error || fcpreq->transferred_length != fcpreq->transfer_length) { -spin_lock (&fod->flock); +spin_lock_irqsave (&fod->flock, flags); fod->abort = true; -spin_unlock (&fod->flock); +spin_unlock_irqrestore (&fod->flock, flags);nvmet_req_complete (&fod->req,NVME_SC_INTERNAL );return ;
drivers/scsi/gdth.h +0 -3
@@ -178,9 +178,6 @@#define MSG_SIZE 34/* size of message structure */ #define MSG_REQUEST 0/* async. event: message */ -/* cacheservice defines */ -#define SECTOR_SIZE 0x200/* always 512 bytes per sec. */ -/* DPMEM constants */ #define DPMEM_MAGIC 0xC0FFEE11#define IC_HEADER_BYTES 48
drivers/thermal/ti-soc-thermal/omap4-thermal-data.c +12 -11
@@ -49,20 +49,21 @@ static struct temp_sensor_data omap4430_mpu_temp_sensor_data = {/* * Temperature values in milli degree celsius -* ADC code values from 530 to 923 +* ADC code values from 13 to 107, see TRM +* "18.4.10.2.3 ADC Codes Versus Temperature". */ static const int omap4430_adc_to_temp[OMAP4430_ADC_END_VALUE -OMAP4430_ADC_START_VALUE +1 ] = { --38000 ,-35000 ,-34000 ,-32000 ,-30000 ,-28000 ,-26000 ,-24000 ,-22000 , --20000 ,-18000 ,-17000 ,-15000 ,-13000 ,-12000 ,-10000 ,-8000 ,-6000 , --5000 ,-3000 ,-1000 ,0 ,2000 ,3000 ,5000 ,6000 ,8000 ,10000 ,12000 , -13000 ,15000 ,17000 ,19000 ,21000 ,23000 ,25000 ,27000 ,28000 ,30000 , -32000 ,33000 ,35000 ,37000 ,38000 ,40000 ,42000 ,43000 ,45000 ,47000 , -48000 ,50000 ,52000 ,53000 ,55000 ,57000 ,58000 ,60000 ,62000 ,64000 , -66000 ,68000 ,70000 ,71000 ,73000 ,75000 ,77000 ,78000 ,80000 ,82000 , -83000 ,85000 ,87000 ,88000 ,90000 ,92000 ,93000 ,95000 ,97000 ,98000 , -100000 ,102000 ,103000 ,105000 ,107000 ,109000 ,111000 ,113000 ,115000 , -117000 ,118000 ,120000 ,122000 ,123000 , +-40000 ,-38000 ,-35000 ,-34000 ,-32000 ,-30000 ,-28000 ,-26000 ,-24000 , +-22000 ,-20000 ,-18500 ,-17000 ,-15000 ,-13500 ,-12000 ,-10000 ,-8000 , +-6500 ,-5000 ,-3500 ,-1500 ,0 ,2000 ,3500 ,5000 ,6500 ,8500 ,10000 , +12000 ,13500 ,15000 ,17000 ,19000 ,21000 ,23000 ,25000 ,27000 ,28500 , +30000 ,32000 ,33500 ,35000 ,37000 ,38500 ,40000 ,42000 ,43500 ,45000 , +47000 ,48500 ,50000 ,52000 ,53500 ,55000 ,57000 ,58500 ,60000 ,62000 , +64000 ,66000 ,68000 ,70000 ,71500 ,73500 ,75000 ,77000 ,78500 ,80000 , +82000 ,83500 ,85000 ,87000 ,88500 ,90000 ,92000 ,93500 ,95000 ,97000 , +98500 ,100000 ,102000 ,103500 ,105000 ,107000 ,109000 ,111000 ,113000 , +115000 ,117000 ,118500 ,120000 ,122000 ,123500 ,125000 , };/* OMAP4430 data */
drivers/thermal/ti-soc-thermal/omap4xxx-bandgap.h +7 -3
@@ -67,9 +67,13 @@* and thresholds for OMAP4430. */ -/* ADC conversion table limits */ -#define OMAP4430_ADC_START_VALUE 0 -#define OMAP4430_ADC_END_VALUE 127 +/* +* ADC conversion table limits. Ignore values outside the TRM listed +* range to avoid bogus thermal shutdowns. See omap4430 TRM chapter +* "18.4.10.2.3 ADC Codes Versus Temperature". +*/ +#define OMAP4430_ADC_START_VALUE 13 +#define OMAP4430_ADC_END_VALUE 107/* bandgap clock limits (no control on 4430) */ #define OMAP4430_MAX_FREQ 32768#define OMAP4430_MIN_FREQ 32768
drivers/xen/xenbus/xenbus_client.c +8 -2
@@ -365,8 +365,14 @@ int xenbus_grant_ring(struct xenbus_device *dev, void *vaddr,int i, j;for (i =0 ; i < nr_pages; i++) { - err =gnttab_grant_foreign_access (dev->otherend_id, -virt_to_gfn (vaddr),0 ); +unsigned long gfn; + +if (is_vmalloc_addr (vaddr)) + gfn =pfn_to_gfn (vmalloc_to_pfn (vaddr)); +else + gfn =virt_to_gfn (vaddr); + + err =gnttab_grant_foreign_access (dev->otherend_id, gfn,0 );if (err <0 ) {xenbus_dev_fatal (dev, err,"granting access to ring page" );
fs/affs/amigaffs.c +27 -0
@@ -419,24 +419,51 @@ affs_mode_to_prot(struct inode *inode)u32 prot =AFFS_I (inode)->i_protect;umode_t mode = inode->i_mode; +/* +* First, clear all RWED bits for owner, group, other. +* Then, recalculate them afresh. +* +* We'll always clear the delete-inhibit bit for the owner, as that is +* the classic single-user mode AmigaOS protection bit and we need to +* stay compatible with all scenarios. +* +* Since multi-user AmigaOS is an extension, we'll only set the +* delete-allow bit if any of the other bits in the same user class +* (group/other) are used. +*/ + prot &= ~(FIBF_NOEXECUTE |FIBF_NOREAD + |FIBF_NOWRITE |FIBF_NODELETE + |FIBF_GRP_EXECUTE |FIBF_GRP_READ + |FIBF_GRP_WRITE |FIBF_GRP_DELETE + |FIBF_OTR_EXECUTE |FIBF_OTR_READ + |FIBF_OTR_WRITE |FIBF_OTR_DELETE ); + +/* Classic single-user AmigaOS flags. These are inverted. */ if (!(mode &0100 )) prot |=FIBF_NOEXECUTE ;if (!(mode &0400 )) prot |=FIBF_NOREAD ;if (!(mode &0200 )) prot |=FIBF_NOWRITE ; + +/* Multi-user extended flags. Not inverted. */ if (mode &0010 ) prot |=FIBF_GRP_EXECUTE ;if (mode &0040 ) prot |=FIBF_GRP_READ ;if (mode &0020 ) prot |=FIBF_GRP_WRITE ; +if (mode &0070 ) + prot |=FIBF_GRP_DELETE ; +if (mode &0001 ) prot |=FIBF_OTR_EXECUTE ;if (mode &0004 ) prot |=FIBF_OTR_READ ;if (mode &0002 ) prot |=FIBF_OTR_WRITE ; +if (mode &0007 ) + prot |=FIBF_OTR_DELETE ;AFFS_I (inode)->i_protect = prot; }
fs/affs/file.c +25 -1
@@ -428,6 +428,24 @@ static int affs_write_begin(struct file *file, struct address_space *mapping,return ret; } +static int affs_write_end (struct file *file,struct address_space *mapping, +loff_t pos,unsigned int len,unsigned int copied, +struct page *page,void *fsdata) +{ +struct inode *inode = mapping->host; +int ret; + + ret =generic_write_end (file, mapping, pos, len, copied, page, fsdata); + +/* Clear Archived bit on file writes, as AmigaOS would do */ +if (AFFS_I (inode)->i_protect &FIBF_ARCHIVED ) { +AFFS_I (inode)->i_protect &= ~FIBF_ARCHIVED ; +mark_inode_dirty (inode); + } + +return ret; +} +static sector_t _affs_bmap (struct address_space *mapping,sector_t block) {return generic_block_bmap (mapping,block,affs_get_block);
@@ -437,7 +455,7 @@ const struct address_space_operations affs_aops = { .readpage = affs_readpage, .writepage = affs_writepage, .write_begin = affs_write_begin, - .write_end = generic_write_end, + .write_end = affs_write_end, .direct_IO = affs_direct_IO, .bmap = _affs_bmap };
@@ -794,6 +812,12 @@ static int affs_write_end_ofs(struct file *file, struct address_space *mapping,if (tmp > inode->i_size) inode->i_size =AFFS_I (inode)->mmu_private = tmp; +/* Clear Archived bit on file writes, as AmigaOS would do */ +if (AFFS_I (inode)->i_protect &FIBF_ARCHIVED ) { +AFFS_I (inode)->i_protect &= ~FIBF_ARCHIVED ; +mark_inode_dirty (inode); + } + err_first_bh:unlock_page (page);put_page (page);
fs/btrfs/ctree.c +5 -3
@@ -1367,7 +1367,8 @@ tree_mod_log_rewind(struct btrfs_fs_info *fs_info, struct btrfs_path *path,btrfs_tree_read_unlock_blocking (eb);free_extent_buffer (eb); -extent_buffer_get (eb_rewin); +btrfs_set_buffer_lockdep_class (btrfs_header_owner (eb_rewin), + eb_rewin,btrfs_header_level (eb_rewin));btrfs_tree_read_lock (eb_rewin);__tree_mod_log_rewind (fs_info, eb_rewin, time_seq, tm); WARN_ON(btrfs_header_nritems(eb_rewin) >
@@ -1438,8 +1439,6 @@ get_old_root(struct btrfs_root *root, u64 time_seq)if (!eb)return NULL ; -extent_buffer_get (eb); -btrfs_tree_read_lock (eb);if (old_root) {btrfs_set_header_bytenr (eb, eb->start);btrfs_set_header_backref_rev (eb,BTRFS_MIXED_BACKREF_REV );
@@ -1447,6 +1446,9 @@ get_old_root(struct btrfs_root *root, u64 time_seq)btrfs_set_header_level (eb, old_root->level);btrfs_set_header_generation (eb, old_generation); } +btrfs_set_buffer_lockdep_class (btrfs_header_owner (eb), eb, +btrfs_header_level (eb)); +btrfs_tree_read_lock (eb);if (tm)__tree_mod_log_rewind (fs_info, eb, time_seq, tm);else
fs/btrfs/extent_io.c +4 -4
@@ -5448,9 +5448,9 @@ void read_extent_buffer(const struct extent_buffer *eb, void *dstv, } } -int read_extent_buffer_to_user (const struct extent_buffer *eb, -void __user *dstv, -unsigned long start,unsigned long len) +int read_extent_buffer_to_user_nofault (const struct extent_buffer *eb, +void __user *dstv, +unsigned long start,unsigned long len) {size_t cur;size_t offset;
@@ -5471,7 +5471,7 @@ int read_extent_buffer_to_user(const struct extent_buffer *eb, cur =min (len, (PAGE_SIZE - offset)); kaddr =page_address (page); -if (copy_to_user (dst, kaddr + offset, cur)) { +if (probe_user_write (dst, kaddr + offset, cur)) { ret = -EFAULT ;break ; }
fs/btrfs/extent_io.h +3 -3
@@ -455,9 +455,9 @@ int memcmp_extent_buffer(const struct extent_buffer *eb, const void *ptrv,void read_extent_buffer (const struct extent_buffer *eb,void *dst,unsigned long start,unsigned long len); -int read_extent_buffer_to_user (const struct extent_buffer *eb, -void __user *dst,unsigned long start, -unsigned long len); +int read_extent_buffer_to_user_nofault (const struct extent_buffer *eb, +void __user *dst,unsigned long start, +unsigned long len);void write_extent_buffer_fsid (struct extent_buffer *eb,const void *src);void write_extent_buffer_chunk_tree_uuid (struct extent_buffer *eb,const void *src);
fs/btrfs/ioctl.c +20 -7
@@ -2021,9 +2021,14 @@ static noinline int copy_to_sk(struct btrfs_path *path, sh.len = item_len; sh.transid = found_transid; -/* copy search result header */ -if (copy_to_user (ubuf + *sk_offset, &sh,sizeof (sh))) { - ret = -EFAULT ; +/* +* Copy search result header. If we fault then loop again so we +* can fault in the pages and -EFAULT there if there's a +* problem. Otherwise we'll fault and then copy the buffer in +* properly this next time through +*/ +if (probe_user_write (ubuf + *sk_offset, &sh,sizeof (sh))) { + ret =0 ; goto out; }
@@ -2031,10 +2036,14 @@ static noinline int copy_to_sk(struct btrfs_path *path,if (item_len) {char __user *up = ubuf + *sk_offset; -/* copy the item */ -if (read_extent_buffer_to_user (leaf, up, - item_off, item_len)) { - ret = -EFAULT ; +/* +* Copy the item, same behavior as above, but reset the +* * sk_offset so we copy the full thing again. +*/ +if (read_extent_buffer_to_user_nofault (leaf, up, + item_off, item_len)) { + ret =0 ; + *sk_offset -=sizeof (sh); goto out; }
@@ -2122,6 +2131,10 @@ static noinline int search_ioctl(struct inode *inode, key.offset = sk->min_offset;while (1 ) { + ret =fault_in_pages_writeable (ubuf, *buf_size - sk_offset); +if (ret) +break ; + ret =btrfs_search_forward (root, &key, path, sk->min_transid);if (ret !=0 ) {if (ret >0 )
fs/btrfs/volumes.c +2 -1
@@ -4174,6 +4174,7 @@ static int btrfs_uuid_scan_kthread(void *data) goto skip; } update_tree: +btrfs_release_path (path);if (!btrfs_is_empty_uuid (root_item.uuid)) { ret = btrfs_uuid_tree_add(trans, fs_info, root_item.uuid,
@@ -4199,6 +4200,7 @@ static int btrfs_uuid_scan_kthread(void *data) } skip: +btrfs_release_path (path);if (trans) { ret =btrfs_end_transaction (trans); trans =NULL ;
@@ -4206,7 +4208,6 @@ static int btrfs_uuid_scan_kthread(void *data)break ; } -btrfs_release_path (path);if (key.offset < (u64)-1 ) { key.offset++; }else if (key.type <BTRFS_ROOT_ITEM_KEY ) {
fs/ceph/file.c +1 -0
@@ -1728,6 +1728,7 @@ const struct file_operations ceph_file_fops = { .mmap = ceph_mmap, .fsync = ceph_fsync, .lock = ceph_lock, + .setlease = simple_nosetlease, .flock = ceph_flock, .splice_read = generic_file_splice_read, .splice_write = iter_file_splice_write,
fs/eventpoll.c +3 -3
@@ -1901,9 +1901,9 @@ static int ep_loop_check_proc(void *priv, void *cookie, int call_nests)* during ep_insert(). */ if (list_empty (&epi->ffd.file->f_tfile_llink)) { -get_file (epi->ffd.file); -list_add (&epi->ffd.file->f_tfile_llink, - &tfile_check_list); +if (get_file_rcu (epi->ffd.file)) +list_add (&epi->ffd.file->f_tfile_llink, + &tfile_check_list); } } }
include/linux/blkdev.h +31 -11
94 lines not on this page · raw message
include/linux/bvec.h +8 -1
@@ -119,10 +119,17 @@ static inline bool bvec_iter_rewind(const struct bio_vec *bv, return true; } +static inline void bvec_iter_skip_zero_bvec (struct bvec_iter *iter) +{ + iter->bi_bvec_done =0 ; + iter->bi_idx++; +} +#define for_each_bvec (bvl, bio_vec, iter, start) \ for (iter = (start); \ (iter).bi_size && \ ((bvl = bvec_iter_bvec((bio_vec), (iter))), 1); \ - bvec_iter_advance((bio_vec), &(iter), (bvl).bv_len)) + (bvl).bv_len ? (void)bvec_iter_advance((bio_vec), &(iter), \ + (bvl).bv_len) : bvec_iter_skip_zero_bvec(&(iter)))#endif /* __LINUX_BVEC_ITER_H */
include/linux/device-mapper.h +0 -2
@@ -577,8 +577,6 @@ do { \ #define DMEMIT(x...) sz += ((sz >= maxlen) ? \ 0 : scnprintf(result + sz, maxlen - sz, x)) -#define SECTOR_SHIFT 9 -/* * Definitions of return values from target end_io function. */
include/linux/hid.h +29 -13
70 lines not on this page · raw message
include/linux/ide.h +0 -1
@@ -165,7 +165,6 @@ struct ide_io_ports {*/ #define PARTN_BITS 6/* number of minor dev bits for partitions */ #define MAX_DRIVES 2/* per interface; 2 assumed by lots of code */ -#define SECTOR_SIZE 512/* * Timeouts for various operations:
include/linux/libata.h +1 -0
@@ -440,6 +440,7 @@ enum {ATA_HORKAGE_NO_DMA_LOG = (1 <<23 ),/* don't use DMA for log read */ ATA_HORKAGE_NOTRIM = (1 <<24 ),/* don't use TRIM */ ATA_HORKAGE_MAX_SEC_1024 = (1 <<25 ),/* Limit max sects to 1024 */ + ATA_HORKAGE_MAX_TRIM_128M = (1 << 26), /* Limit max trim size to 128M *//* DMA mask for user DMA control: User visible values; DO NOT renumber */
include/linux/log2.h +1 -1
@@ -159,7 +159,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n)#define roundup_pow_of_two (n) \ ( \ __builtin_constant_p(n) ? ( \ - (n == 1) ? 1 : \ + ((n) == 1) ? 1 : \ (1UL << (ilog2((n) - 1) + 1)) \ ) : \ __roundup_pow_of_two(n) \
include/linux/uaccess.h +26 -0
@@ -242,6 +242,17 @@ static inline unsigned long __copy_from_user_inatomic_nocache(void *to,extern long probe_kernel_read (void *dst,const void *src,size_t size);extern long __probe_kernel_read (void *dst,const void *src,size_t size); +/* +* probe_user_read(): safely attempt to read from a location in user space +* @dst: pointer to the buffer that shall take the data +* @src: address to read from +* @size: size of the data chunk +* +* Safely read from address @src to the buffer at @dst. If a kernel fault +* happens, handle that and return -EFAULT. +*/ +extern long probe_user_read (void *dst,const void __user *src,size_t size); +/* * probe_kernel_write(): safely attempt to write to a location * @dst: address to write to
@@ -254,7 +265,22 @@ extern long __probe_kernel_read(void *dst, const void *src, size_t size);extern long notrace probe_kernel_write (void *dst,const void *src,size_t size);extern long notrace __probe_kernel_write (void *dst,const void *src,size_t size); +/* +* probe_user_write(): safely attempt to write to a location in user space +* @dst: address to write to +* @src: pointer to the data that shall be written +* @size: size of the data chunk +* +* Safely write to address @dst from the buffer at @src. If a kernel fault +* happens, handle that and return -EFAULT. +*/ +extern long notrace probe_user_write (void __user *dst,const void *src,size_t size); +extern long notrace __probe_user_write (void __user *dst,const void *src,size_t size); +extern long strncpy_from_unsafe (char *dst,const void *unsafe_addr,long count); +extern long strncpy_from_unsafe_user (char *dst,const void __user *unsafe_addr, +long count); +extern long strnlen_unsafe_user (const void __user *unsafe_addr,long count);/** * probe_kernel_address(): safely attempt to read from a location
include/net/netfilter/nf_tables.h +2 -0
@@ -136,6 +136,8 @@ static inline u8 nft_reg_load8(u32 *sreg)static inline void nft_data_copy (u32 *dst,const struct nft_data *src,unsigned int len) { +if (len %NFT_REG32_SIZE ) + dst[len /NFT_REG32_SIZE ] =0 ;memcpy (dst, src, len); }
include/uapi/linux/msdos_fs.h +2 -0
@@ -10,7 +10,9 @@* The MS-DOS filesystem constants/structures */ +#ifndef SECTOR_SIZE #define SECTOR_SIZE 512/* sector size (bytes) */ +#endif #define SECTOR_BITS 9/* log2(SECTOR_SIZE) */ #define MSDOS_DPB (MSDOS_DPS)/* dir entries per block */ #define MSDOS_DPB_BITS 4/* log2(MSDOS_DPB) */
include/uapi/linux/netfilter/nf_tables.h +1 -1
@@ -125,7 +125,7 @@ enum nf_tables_msg_types {* @NFTA_LIST_ELEM: list element (NLA_NESTED) */ enum nft_list_attributes { -NFTA_LIST_UNPEC , +NFTA_LIST_UNSPEC ,NFTA_LIST_ELEM , __NFTA_LIST_MAX };
mm/hugetlb.c +20 -6
@@ -2911,6 +2911,22 @@ static unsigned int cpuset_mems_nr(unsigned int *array) }#ifdef CONFIG_SYSCTL +static int proc_hugetlb_doulongvec_minmax (struct ctl_table *table,int write, +void *buffer,size_t *length, +loff_t *ppos,unsigned long *out) +{ +struct ctl_table dup_table; + +/* +* In order to avoid races with __do_proc_doulongvec_minmax(), we +* can duplicate the @table and alter the duplicate of it. +*/ + dup_table = *table; + dup_table.data = out; + +return proc_doulongvec_minmax (&dup_table, write, buffer, length, ppos); +} +static int hugetlb_sysctl_handler_common (bool obey_mempolicy,struct ctl_table *table,int write,void __user *buffer,size_t *length,loff_t *ppos)
@@ -2922,9 +2938,8 @@ static int hugetlb_sysctl_handler_common(bool obey_mempolicy,if (!hugepages_supported ())return -EOPNOTSUPP ; - table->data = &tmp; - table->maxlen =sizeof (unsigned long ); - ret =proc_doulongvec_minmax (table, write, buffer, length, ppos); + ret =proc_hugetlb_doulongvec_minmax (table, write, buffer, length, ppos, + &tmp);if (ret) goto out;
@@ -2968,9 +2983,8 @@ int hugetlb_overcommit_handler(struct ctl_table *table, int write,if (write &&hstate_is_gigantic (h))return -EINVAL ; - table->data = &tmp; - table->maxlen =sizeof (unsigned long ); - ret =proc_doulongvec_minmax (table, write, buffer, length, ppos); + ret =proc_hugetlb_doulongvec_minmax (table, write, buffer, length, ppos, + &tmp);if (ret) goto out;
mm/maccess.c +157 -10
205 lines not on this page · raw message
mm/slub.c +6 -6
@@ -659,12 +659,12 @@ static void slab_fix(struct kmem_cache *s, char *fmt, ...) }static bool freelist_corrupted (struct kmem_cache *s,struct page *page, -void *freelist,void *nextfree) +void **freelist,void *nextfree) {if ((s->flags &SLAB_CONSISTENCY_CHECKS ) && - !check_valid_pointer (s, page, nextfree)) { -object_err (s, page, freelist,"Freechain corrupt" ); - freelist =NULL ; + !check_valid_pointer (s, page, nextfree) && freelist) { +object_err (s, page, *freelist,"Freechain corrupt" ); + *freelist =NULL ;slab_fix (s,"Isolate corrupted freechain" );return true; }
@@ -1354,7 +1354,7 @@ static inline void dec_slabs_node(struct kmem_cache *s, int node, int objects) {}static bool freelist_corrupted (struct kmem_cache *s,struct page *page, -void *freelist,void *nextfree) +void **freelist,void *nextfree) {return false; }
@@ -2053,7 +2053,7 @@ static void deactivate_slab(struct kmem_cache *s, struct page *page,* 'freelist' is already corrupted. So isolate all objects * starting at 'freelist'. */ -if (freelist_corrupted (s, page, freelist, nextfree)) +if (freelist_corrupted (s, page, &freelist, nextfree))break ; do {
net/batman-adv/bat_v_ogm.c +6 -5
@@ -715,6 +715,12 @@ static void batadv_v_ogm_process(const struct sk_buff *skb, int ogm_offset,ntohl (ogm_packet->seqno), ogm_throughput, ogm_packet->ttl, ogm_packet->version, ntohs(ogm_packet->tvlv_len)); +if (batadv_is_my_mac (bat_priv, ogm_packet->orig)) { +batadv_dbg (BATADV_DBG_BATMAN , bat_priv, +"Drop packet: originator packet from ourself\n" ); +return ; + } +/* If the throughput metric is 0, immediately drop the packet. No need * to create orig_node / neigh_node for an unusable route. */
@@ -842,11 +848,6 @@ int batadv_v_ogm_packet_recv(struct sk_buff *skb,if (batadv_is_my_mac (bat_priv, ethhdr->h_source)) goto free_skb; - ogm_packet = (struct batadv_ogm2_packet *)skb->data; - -if (batadv_is_my_mac (bat_priv, ogm_packet->orig)) - goto free_skb; -batadv_inc_counter (bat_priv,BATADV_CNT_MGMT_RX );batadv_add_counter (bat_priv,BATADV_CNT_MGMT_RX_BYTES , skb->len +ETH_HLEN );
net/batman-adv/bridge_loop_avoidance.c +4 -1
@@ -450,7 +450,10 @@ static void batadv_bla_send_claim(struct batadv_priv *bat_priv, u8 *mac,batadv_add_counter (bat_priv,BATADV_CNT_RX_BYTES , skb->len +ETH_HLEN ); -netif_rx (skb); +if (in_interrupt ()) +netif_rx (skb); +else +netif_rx_ni (skb); out:if (primary_if)batadv_hardif_put (primary_if);
net/batman-adv/gateway_client.c +4 -2
@@ -674,8 +674,10 @@ batadv_gw_dhcp_recipient_get(struct sk_buff *skb, unsigned int *header_len, chaddr_offset = *header_len +BATADV_DHCP_CHADDR_OFFSET ;/* store the client address if the message is going to a client */ -if (ret ==BATADV_DHCP_TO_CLIENT && -pskb_may_pull (skb, chaddr_offset +ETH_ALEN )) { +if (ret ==BATADV_DHCP_TO_CLIENT ) { +if (!pskb_may_pull (skb, chaddr_offset +ETH_ALEN )) +return BATADV_DHCP_NO ; +/* check if the DHCP packet carries an Ethernet DHCP */ p = skb->data + *header_len +BATADV_DHCP_HTYPE_OFFSET ;if (*p !=BATADV_DHCP_HTYPE_ETHERNET )
net/netfilter/nf_tables_api.c +2 -1
@@ -2882,7 +2882,8 @@ static int nf_tables_fill_set(struct sk_buff *skb, const struct nft_ctx *ctx, goto nla_put_failure; } -if (nla_put (skb,NFTA_SET_USERDATA , set->udlen, set->udata)) +if (set->udata && +nla_put (skb,NFTA_SET_USERDATA , set->udlen, set->udata)) goto nla_put_failure; desc =nla_nest_start (skb,NFTA_SET_DESC );
net/netfilter/nft_payload.c +3 -1
@@ -79,7 +79,9 @@ static void nft_payload_eval(const struct nft_expr *expr,u32 *dest = ®s->data[priv->dreg];int offset; - dest[priv->len /NFT_REG32_SIZE ] =0 ; +if (priv->len %NFT_REG32_SIZE ) + dest[priv->len /NFT_REG32_SIZE ] =0 ; +switch (priv->base) {case NFT_PAYLOAD_LL_HEADER :if (!skb_mac_header_was_set (skb))
net/wireless/reg.c +3 -0
@@ -2408,6 +2408,9 @@ int regulatory_hint_user(const char *alpha2,if (WARN_ON (!alpha2))return -EINVAL ; +if (!is_world_regdom (alpha2) && !is_an_alpha2 (alpha2)) +return -EINVAL ; + request =kzalloc (sizeof (struct regulatory_request ),GFP_KERNEL );if (!request)return -ENOMEM ;
scripts/checkpatch.pl +2 -2
@@ -2428,8 +2428,8 @@ sub process { # Check if the commit log has what seems like a diff which can confuse patch if ($in_commit_log && !$commit_log_has_diff && - (($line =~ m@^\s+diff\b.*a/[\w/]+@ && - $line =~ m@^\s+diff\b.*a/([\w/]+)\s+b/$1\b@) || + (($line =~ m@^\s+diff\b.*a/([\w/]+)@ && + $line =~ m@^\s+diff\b.*a/[\w/]+\s+b/$1\b@) || $line =~ m@^\s*(?:\-\-\-\s+a/|\+\+\+\s+b/)@ || $line =~ m/^\s*\@\@ \-\d+,\d+ \+\d+,\d+ \@\@/)) { ERROR("DIFF_IN_COMMIT_MSG",
sound/core/oss/mulaw.c +2 -2
@@ -329,8 +329,8 @@ int snd_pcm_plugin_build_mulaw(struct snd_pcm_substream *plug,snd_BUG ();return -EINVAL ; } -if (snd_BUG_ON (!snd_pcm_format_linear (format->format))) -return -ENXIO ; +if (!snd_pcm_format_linear (format->format)) +return -EINVAL ; err = snd_pcm_plugin_build(plug, "Mu-Law<->linear conversion", src_format, dst_format,
sound/firewire/digi00x/digi00x.c +5 -0
@@ -15,6 +15,7 @@ MODULE_LICENSE("GPL v2");#define VENDOR_DIGIDESIGN 0x00a07e#define MODEL_CONSOLE 0x000001#define MODEL_RACK 0x000002 +#define SPEC_VERSION 0x000001static int name_card (struct snd_dg00x *dg00x) {
@@ -185,14 +186,18 @@ static const struct ieee1394_device_id snd_dg00x_id_table[] = {/* Both of 002/003 use the same ID. */ { .match_flags = IEEE1394_MATCH_VENDOR_ID | + IEEE1394_MATCH_VERSION | IEEE1394_MATCH_MODEL_ID, .vendor_id = VENDOR_DIGIDESIGN, + .version = SPEC_VERSION, .model_id = MODEL_CONSOLE, }, { .match_flags = IEEE1394_MATCH_VENDOR_ID | + IEEE1394_MATCH_VERSION | IEEE1394_MATCH_MODEL_ID, .vendor_id = VENDOR_DIGIDESIGN, + .version = SPEC_VERSION, .model_id = MODEL_RACK, }, {}
sound/pci/ca0106/ca0106_main.c +2 -1
@@ -551,7 +551,8 @@ static int snd_ca0106_pcm_power_dac(struct snd_ca0106 *chip, int channel_id,else /* Power down */ chip->spi_dac_reg[reg] |= bit; -return snd_ca0106_spi_write (chip, chip->spi_dac_reg[reg]); +if (snd_ca0106_spi_write (chip, chip->spi_dac_reg[reg]) !=0 ) +return -ENXIO ; }return 0 ; }
sound/pci/hda/patch_hdmi.c +1 -0
@@ -2546,6 +2546,7 @@ static void i915_pin_cvt_fixup(struct hda_codec *codec, hda_nid_t cvt_nid) {if (per_pin) { +haswell_verify_D0 (codec, per_pin->cvt_nid, per_pin->pin_nid);snd_hda_set_dev_select (codec, per_pin->pin_nid, per_pin->dev_id);intel_verify_pin_cvt_connect (codec, per_pin);
tools/include/uapi/linux/perf_event.h +1 -1
@@ -1033,7 +1033,7 @@ union perf_mem_data_src {#define PERF_MEM_SNOOPX_FWD 0x01/* forward */ /* 1 free */ -#define PERF_MEM_SNOOPX_SHIFT 37 +#define PERF_MEM_SNOOPX_SHIFT 38/* locked instruction */ #define PERF_MEM_LOCK_NA 0x01/* not available */
tools/perf/Documentation/perf-record.txt +4 -0
@@ -33,6 +33,10 @@ OPTIONS - a raw PMU event (eventsel+umask) in the form of rNNN where NNN is a hexadecimal event descriptor. + - a symbolic or raw PMU event followed by an optional colon + and a list of event modifiers, e.g., cpu-cycles:p. See the + linkperf:perf-list[1] man page for details on event modifiers. + - a symbolically formed PMU event like 'pmu/param1=0x3,param2/' where 'param1', 'param2', etc are defined as formats for the PMU in /sys/bus/event_source/devices/<pmu>/format/*.
tools/perf/Documentation/perf-stat.txt +4 -0
@@ -39,6 +39,10 @@ report:: - a raw PMU event (eventsel+umask) in the form of rNNN where NNN is a hexadecimal event descriptor. + - a symbolic or raw PMU event followed by an optional colon + and a list of event modifiers, e.g., cpu-cycles:p. See the + linkperf:perf-list[1] man page for details on event modifiers. + - a symbolically formed event like 'pmu/param1=0x3,param2/' where param1 and param2 are defined as formats for the PMU in /sys/bus/event_source/devices/<pmu>/format/*