Skip to content
  1. Dec 01, 2017
    • David Howells's avatar
      afs: Properly reset afs_vnode (inode) fields · f8de483e
      David Howells authored
      
      
      When an AFS inode is allocated by afs_alloc_inode(), the allocated
      afs_vnode struct isn't necessarily reset from the last time it was used as
      an inode because the slab constructor is only invoked once when the memory
      is obtained from the page allocator.
      
      This means that information can leak from one inode to the next because
      we're not calling kmem_cache_zalloc().  Some of the information isn't
      reset, in particular the permit cache pointer.
      
      Bring the clearances up to date.
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Tested-by: default avatarMarc Dionne <marc.dionne@auristor.com>
      f8de483e
    • David Howells's avatar
      afs: Fix permit refcounting · 1bcab125
      David Howells authored
      
      
      Fix four refcount bugs in afs_cache_permit():
      
       (1) When checking the result of the kzalloc(), we can't just return, but
           must put 'permits'.
      
       (2) We shouldn't put permits immediately after hashing a new permit as we
           need to keep the pointer stable so that we can check to see if
           vnode->permit_cache has changed before we decide whether to assign to
           it.
      
       (3) 'permits' is being put twice.
      
       (4) We need to put either the replacement or the thing replaced after the
           assignment to vnode->permit_cache.
      
      Without this, lots of the following are seen:
      
        Kernel BUG at ffffffffa039857b [verbose debug info unavailable]
        ------------[ cut here ]------------
        Kernel BUG at ffffffffa039858a [verbose debug info unavailable]
        ------------[ cut here ]------------
      
      The addresses are in the .text..refcount section of the kafs.ko module.
      Following the relocation records for the __ex_table section shows one to be
      due to the decrement in afs_put_permits() and the other to be key_get() in
      afs_cache_permit().
      
      Occasionally, the following is seen:
      
        refcount_t overflow at afs_cache_permit+0x57d/0x5c0 [kafs] in cc1[562], uid/euid: 0/0
        WARNING: CPU: 0 PID: 562 at kernel/panic.c:657 refcount_error_report+0x9c/0xac
        ...
      
      Reported-by: default avatarMarc Dionne <marc.dionne@auristor.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Tested-by: default avatarMarc Dionne <marc.dionne@auristor.com>
      1bcab125
    • Linus Torvalds's avatar
      Merge tag 'apparmor-pr-2017-11-30' of... · df8ba95c
      Linus Torvalds authored
      Merge tag 'apparmor-pr-2017-11-30' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor
      
      Pull apparmor bugfix from John Johansen:
       "Fix oops in audit_signal_cb hook marked for stable"
      
      * tag 'apparmor-pr-2017-11-30' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor:
        apparmor: fix oops in audit_signal_cb hook
      df8ba95c
    • Linus Torvalds's avatar
      Merge tag 'acpi-4.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 42062b98
      Linus Torvalds authored
      Pull ACPI fixes from Rafael Wysocki:
       "These fix a regression related to the ACPI EC handling during system
        suspend/resume on some platforms and prevent modalias from being
        exposed to user space for ACPI device object with "not functional and
        not present" status.
      
        Specifics:
      
         - Fix an ACPI EC driver regression (from the 4.9 cycle) causing the
           driver's power management operations to be omitted during system
           suspend/resume on platforms where the EC instance from the ECDT
           table is used instead of the one from the DSDT (Lv Zheng).
      
         - Prevent modalias from being exposed to user space for ACPI device
           objects with _STA returning 0 (not present and not functional) to
           prevent driver modules from being loaded automatically for hardware
           that is not actually present on some platforms (Hans de Goede)"
      
      * tag 'acpi-4.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI / EC: Fix regression related to PM ops support in ECDT device
        ACPI / bus: Leave modalias empty for devices which are not present
      42062b98
    • Linus Torvalds's avatar
      Merge tag 'pm-4.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 0cf710f8
      Linus Torvalds authored
      Pull power management fixes from Rafael Wysocki:
      
       - add missing module information to the Mediatek cpufreq driver module
         (Jesse Chan)
      
       - fix config dependencies for the Loongson cpufreq driver (James Hogan)
      
       - fix two issues related to CPU offline in the cpupower utility
         (Abhishek Goel).
      
      * tag 'pm-4.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        cpufreq: mediatek: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE
        cpufreq: Add Loongson machine dependencies
        cpupower : Fix cpupower working when cpu0 is offline
        cpupowerutils: bench - Fix cpu online check
      0cf710f8
    • Linus Torvalds's avatar
      Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · 9c41180b
      Linus Torvalds authored
      Pull quota & reiserfs changes from Jan Kara:
      
       - two error checking improvements for quota
      
       - remove bogus i_version increase for reiserfs
      
      * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        quota: Check for register_shrinker() failure.
        quota: propagate error from __dquot_initialize
        reiserfs: remove unneeded i_version bump
      9c41180b
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 9e0600f5
      Linus Torvalds authored
      Pull KVM fixes from Paolo Bonzini:
      
       - x86 bugfixes: APIC, nested virtualization, IOAPIC
      
       - PPC bugfix: HPT guests on a POWER9 radix host
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (26 commits)
        KVM: Let KVM_SET_SIGNAL_MASK work as advertised
        KVM: VMX: Fix vmx->nested freeing when no SMI handler
        KVM: VMX: Fix rflags cache during vCPU reset
        KVM: X86: Fix softlockup when get the current kvmclock
        KVM: lapic: Fixup LDR on load in x2apic
        KVM: lapic: Split out x2apic ldr calculation
        KVM: PPC: Book3S HV: Fix migration and HPT resizing of HPT guests on radix hosts
        KVM: vmx: use X86_CR4_UMIP and X86_FEATURE_UMIP
        KVM: x86: Fix CPUID function for word 6 (80000001_ECX)
        KVM: nVMX: Fix vmx_check_nested_events() return value in case an event was reinjected to L2
        KVM: x86: ioapic: Preserve read-only values in the redirection table
        KVM: x86: ioapic: Clear Remote IRR when entry is switched to edge-triggered
        KV...
      9e0600f5
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 22985bf5
      Linus Torvalds authored
      Pull s390 fixes from Martin Schwidefsky:
      
       - SPDX identifiers are added to more of the s390 specific files.
      
       - The ELF_ET_DYN_BASE base patch from Kees is reverted, with the change
         some old 31-bit programs crash.
      
       - Bug fixes and cleanups.
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (29 commits)
        s390/gs: add compat regset for the guarded storage broadcast control block
        s390: revert ELF_ET_DYN_BASE base changes
        s390: Remove redundant license text
        s390: crypto: Remove redundant license text
        s390: include: Remove redundant license text
        s390: kernel: Remove redundant license text
        s390: add SPDX identifiers to the remaining files
        s390: appldata: add SPDX identifiers to the remaining files
        s390: pci: add SPDX identifiers to the remaining files
        s390: mm: add SPDX identifiers to the remaining files
        s390: crypto: add SPDX identifiers to the remaining files
        s390: kernel: add SPDX identifiers to the remaining files
        s390: sthyi: add SPDX identifiers to the remaining files
        s390: drivers: Remove redundant license text
        s390: crypto: Remove redundant license text
        s390: virtio: add SPDX identifiers to the remaining files
        s390: scsi: zfcp_aux: add SPDX identifier
        s390: net: add SPDX identifiers to the remaining files
        s390: char: add SPDX identifiers to the remaining files
        s390: cio: add SPDX identifiers to the remaining files
        ...
      22985bf5
  2. Nov 30, 2017