10 Aug, 2017

2 commits


07 Aug, 2017

10 commits

  • usb_device_id are not supposed to change at runtime. All functions
    working with usb_device_id provided by work with
    const usb_device_id. So mark the non-const structs as const.

    Signed-off-by: Arvind Yadav
    Signed-off-by: Takashi Iwai

    Arvind Yadav
     
  • usb_device_id are not supposed to change at runtime. All functions
    working with usb_device_id provided by work with
    const usb_device_id. So mark the non-const structs as const.

    Signed-off-by: Arvind Yadav
    Signed-off-by: Takashi Iwai

    Arvind Yadav
     
  • usb_device_id are not supposed to change at runtime. All functions
    working with usb_device_id provided by work with
    const usb_device_id. So mark the non-const structs as const.

    Signed-off-by: Arvind Yadav
    Signed-off-by: Takashi Iwai

    Arvind Yadav
     
  • usb_device_id are not supposed to change at runtime. All functions
    working with usb_device_id provided by work with
    const usb_device_id. So mark the non-const structs as const.

    Signed-off-by: Arvind Yadav
    Signed-off-by: Takashi Iwai

    Arvind Yadav
     
  • usb_device_id are not supposed to change at runtime. All functions
    working with usb_device_id provided by work with
    const usb_device_id. So mark the non-const structs as const.

    Signed-off-by: Arvind Yadav
    Signed-off-by: Takashi Iwai

    Arvind Yadav
     
  • usb_device_id are not supposed to change at runtime. All functions
    working with usb_device_id provided by work with
    const usb_device_id. So mark the non-const structs as const.

    Signed-off-by: Arvind Yadav
    Signed-off-by: Takashi Iwai

    Arvind Yadav
     
  • usb_device_id are not supposed to change at runtime. All functions
    working with usb_device_id provided by work with
    const usb_device_id. So mark the non-const structs as const.

    Signed-off-by: Arvind Yadav
    Signed-off-by: Takashi Iwai

    Arvind Yadav
     
  • Cannonlake is next generation Intel platform. This commit adds PCI ID for
    it.

    Signed-off-by: Guneshwor Singh
    Signed-off-by: Takashi Iwai

    Guneshwor Singh
     
  • Declare snd_akm4xxx structures as const as they are only passed
    to the function snd_ice1712_akm4xxx_init. This argument is of type
    const, so make the structures const.
    Done using Coccinelle:

    @match disable optional_qualifier@
    identifier s;
    position p;
    @@
    static struct snd_akm4xxx s@p={...};

    @good1@
    identifier match.s;
    position p;
    @@
    snd_ice1712_akm4xxx_init(...,&s@p,...)

    @bad@
    identifier match.s;
    position p!={match.p,good1.p};
    @@
    s@p

    @depends on !bad disable optional_qualifier@
    identifier match.s;
    @@
    static
    +const
    struct snd_akm4xxx s={...};

    Signed-off-by: Bhumika Goyal
    Signed-off-by: Takashi Iwai

    Bhumika Goyal
     
  • Declare snd_ak4xxx_private structures as const as they are only passed
    to the function snd_ice1712_akm4xxx_init. This argument is of type const,
    so make the structures const.
    Done using Coccinelle:

    @match disable optional_qualifier@
    identifier s;
    position p;
    @@
    static struct snd_ak4xxx_private s@p={...};

    @good1@
    identifier match.s;
    position p;
    @@
    snd_ice1712_akm4xxx_init(...,&s@p,...)

    @bad@
    identifier match.s;
    position p!={match.p,good1.p};
    @@
    s@p

    @depends on !bad disable optional_qualifier@
    identifier match.s;
    @@
    static
    +const
    struct snd_ak4xxx_private s={...};

    Signed-off-by: Bhumika Goyal
    Signed-off-by: Takashi Iwai

    Bhumika Goyal
     

04 Aug, 2017

6 commits

  • User-defined element set registers own handler to get callbacks from TLV
    ioctl handler. In the handler, execution path bifurcates depending on
    requests from user space. At write request, container in given buffer is
    registered to the element set, or replaced old TLV data. At the read
    request, the registered data is copied to user space. The command request
    is not allowed. In current implementation, function of the handler
    includes codes for the two cases.

    This commit adds two helper functions for these cases so that readers can
    easily get the above design.

    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     
  • In a design of ALSA control core, execution path bifurcates depending on
    target element. When a set with the target element has a handler, it's
    called. Else, registered buffer is copied to user space. These two
    operations are apparently different. In current implementation, they're
    on the same function with a condition statement. This makes it a bit hard
    to understand conditions of each case.

    This commit splits codes for these two cases.

    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     
  • At a previous commit, concurrent requests for TLV data are maintained
    exclusively between read requests and write/command requests. TLV
    callback handlers in each driver has no risk from concurrent access for
    reference/change.

    In current implementation, 'struct snd_card' has a mutex to control
    concurrent accesses to user-defined element sets. This commit obsoletes it.

    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     
  • In ALSA control interface, applications can execute three types of request
    for Type-Length-Value (TLV) data to a set of elements; read, write and
    command. In ALSA control core, all of the requests are handled within read
    lock to a counting semaphore, therefore several processes can run to access
    to the data at the same time for any purposes. This has an issue because
    write and command requests have side effect to change state of a set of
    elements for the TLV data. Concurrent access should be controlled for each
    of reference/change case.

    This commit uses the counting semaphore as read lock for TLV read requests,
    while use it as write lock for TLV write/command requests. The state of a
    set of elements for the TLV data is maintained exclusively between read
    requests and write/command requests, or between write and command requests.

    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     
  • Any control event is queued by a call of snd_ctl_notify(). This function
    adds the event to each queue of opened file data corresponding to ALSA
    control character devices. This function acquired two types of lock; a
    counting semaphore for a list of the opened file data and a spinlock for
    card data opened by the file. Typically, this function is called after
    acquiring a counting semaphore for a list of elements in the card data.

    In current implementation of TLV request handler, the function is called
    after releasing the semaphore for a list of elements in the card data.
    This release is not necessarily needed.

    This commit removes the release to call the function within the critical
    section so that later commits are simple.

    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     
  • Back-merge 4.13-rc devel branch for later development.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

02 Aug, 2017

2 commits


01 Aug, 2017

5 commits


31 Jul, 2017

5 commits


29 Jul, 2017

10 commits

  • Pull DeviceTree fixes from Rob Herring:
    "Two small DT fixes:

    - Fix error handling in of_irq_to_resource_table() due to
    of_irq_to_resource() error return changes.

    - Fix dtx_diff script due to dts include path changes"

    * tag 'devicetree-fixes-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
    of: irq: fix of_irq_to_resource() error check
    scripts/dtc: dtx_diff - update include dts paths to match build

    Linus Torvalds
     
  • Pull NFS client fixes from Anna Schumaker:
    "More NFS client bugfixes for 4.13.

    Most of these fix locking bugs that Ben and Neil noticed, but I also
    have a patch to fix one more access bug that was reported after last
    week.

    Stable fixes:
    - Fix a race where CB_NOTIFY_LOCK fails to wake a waiter
    - Invalidate file size when taking a lock to prevent corruption

    Other fixes:
    - Don't excessively generate tiny writes with fallocate
    - Use the raw NFS access mask in nfs4_opendata_access()"

    * tag 'nfs-for-4.13-3' of git://git.linux-nfs.org/projects/anna/linux-nfs:
    NFSv4.1: Fix a race where CB_NOTIFY_LOCK fails to wake a waiter
    NFS: Optimize fallocate by refreshing mapping when needed.
    NFS: invalidate file size when taking a lock.
    NFS: Use raw NFS access mask in nfs4_opendata_access()

    Linus Torvalds
     
  • Pull xfs fixes from Darrick Wong:

    - fix firstfsb variables that we left uninitialized, which could lead
    to locking problems.

    - check for NULL metadata buffer pointers before using them.

    - don't allow btree cursor manipulation if the btree block is corrupt.
    Better to just shut down.

    - fix infinite loop problems in quotacheck.

    - fix buffer overrun when validating directory blocks.

    - fix deadlock problem in bunmapi.

    * tag 'xfs-4.13-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
    xfs: fix multi-AG deadlock in xfs_bunmapi
    xfs: check that dir block entries don't off the end of the buffer
    xfs: fix quotacheck dquot id overflow infinite loop
    xfs: check _alloc_read_agf buffer pointer before using
    xfs: set firstfsb to NULLFSBLOCK before feeding it to _bmapi_write
    xfs: check _btree_check_block value

    Linus Torvalds
     
  • Pull KVM fixes from Paolo Bonzini:
    "s390:
    - SRCU fix

    PPC:
    - host crash fixes

    x86:
    - bugfixes, including making nested posted interrupts really work

    Generic:
    - tweaks to kvm_stat and to uevents"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
    KVM: LAPIC: Fix reentrancy issues with preempt notifiers
    tools/kvm_stat: add '-f help' to get the available event list
    tools/kvm_stat: use variables instead of hard paths in help output
    KVM: nVMX: Fix loss of L2's NMI blocking state
    KVM: nVMX: Fix posted intr delivery when vcpu is in guest mode
    x86: irq: Define a global vector for nested posted interrupts
    KVM: x86: do mask out upper bits of PAE CR3
    KVM: make pid available for uevents without debugfs
    KVM: s390: take srcu lock when getting/setting storage keys
    KVM: VMX: remove unused field
    KVM: PPC: Book3S HV: Fix host crash on changing HPT size
    KVM: PPC: Book3S HV: Enable TM before accessing TM registers

    Linus Torvalds
     
  • Pull xen fixes from Juergen Gross:
    "Three minor cleanups for xen related drivers"

    * tag 'for-linus-4.13b-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
    xen: dont fiddle with event channel masking in suspend/resume
    xen: selfballoon: remove unnecessary static in frontswap_selfshrink()
    xen: Drop un-informative message during boot

    Linus Torvalds
     
  • Pull arm64 fixes from Will Deacon:
    "I'd been collecting these whilst we debugged a CPU hotplug failure,
    but we ended up diagnosing that one to tglx, who has taken a fix via
    the -tip tree separately.

    We're seeing some NFS issues that we haven't gotten to the bottom of
    yet, and we've uncovered some issues with our backtracing too so there
    might be another fixes pull before we're done.

    Summary:

    - Ensure we have a guard page after the kernel image in vmalloc

    - Fix incorrect prefetch stride in copy_page

    - Ensure irqs are disabled in die()

    - Fix for event group validation in QCOM L2 PMU driver

    - Fix requesting of PMU IRQs on AMD Seattle

    - Minor cleanups and fixes"

    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
    arm64: mmu: Place guard page after mapping of kernel image
    drivers/perf: arm_pmu: Request PMU SPIs with IRQF_PER_CPU
    arm64: sysreg: Fix unprotected macro argmuent in write_sysreg
    perf: qcom_l2: fix column exclusion check
    arm64/lib: copy_page: use consistent prefetch stride
    arm64/numa: Drop duplicate message
    perf: Convert to using %pOF instead of full_name
    arm64: Convert to using %pOF instead of full_name
    arm64: traps: disable irq in die()
    arm64: atomics: Remove '&' from '+&' asm constraint in lse atomics
    arm64: uaccess: Remove redundant __force from addr cast in __range_ok

    Linus Torvalds
     
  • Pull powerpc fixes from Michael Ellerman:
    "The highlight is Ben's patch to work around a host killing bug when
    running KVM guests with the Radix MMU on Power9. See the long change
    log of that commit for more detail.

    And then three fairly minor fixes:

    - fix of_node_put() underflow during reconfig remove, using old DLPAR
    tools.

    - fix recently introduced ld version check with 64-bit LE-only
    toolchain.

    - free the subpage_prot_table correctly, avoiding a memory leak.

    Thanks to: Aneesh Kumar K.V, Benjamin Herrenschmidt, Laurent Vivier"

    * tag 'powerpc-4.13-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
    powerpc/mm/hash: Free the subpage_prot_table correctly
    powerpc/Makefile: Fix ld version check with 64-bit LE-only toolchain
    powerpc/pseries: Fix of_node_put() underflow during reconfig remove
    powerpc/mm/radix: Workaround prefetch issue with KVM

    Linus Torvalds
     
  • nfs4_retry_setlk() sets the task's state to TASK_INTERRUPTIBLE within the
    same region protected by the wait_queue's lock after checking for a
    notification from CB_NOTIFY_LOCK callback. However, after releasing that
    lock, a wakeup for that task may race in before the call to
    freezable_schedule_timeout_interruptible() and set TASK_WAKING, then
    freezable_schedule_timeout_interruptible() will set the state back to
    TASK_INTERRUPTIBLE before the task will sleep. The result is that the task
    will sleep for the entire duration of the timeout.

    Since we've already set TASK_INTERRUPTIBLE in the locked section, just use
    freezable_schedule_timout() instead.

    Fixes: a1d617d8f134 ("nfs: allow blocking locks to be awoken by lock callbacks")
    Signed-off-by: Benjamin Coddington
    Reviewed-by: Jeff Layton
    Cc: stable@vger.kernel.org # v4.9+
    Signed-off-by: Anna Schumaker

    Benjamin Coddington
     
  • Pull crypto fixes from Herbert Xu:

    - remove broken dt bindings in inside-secure

    - fix authencesn crash when used with digest_null

    - fix cavium/nitrox firmware path

    - fix SHA3 failure in brcm

    - fix Kconfig dependency for brcm

    * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
    crypto: authencesn - Fix digest_null crash
    crypto: brcm - remove BCM_PDC_MBOX dependency in Kconfig
    Documentation/bindings: crypto: remove the dma-mask property
    crypto: inside-secure - do not parse the dma mask from dt
    crypto: cavium/nitrox - Change in firmware path.
    crypto: brcm - Fix SHA3-512 algorithm failure

    Linus Torvalds
     
  • Pull btrfs fixes from David Sterba:
    "Fixes addressing problems reported by users, and there's one more
    regression fix"

    * 'for-4.13-part3' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
    btrfs: round down size diff when shrinking/growing device
    Btrfs: fix early ENOSPC due to delalloc
    btrfs: fix lockup in find_free_extent with read-only block groups
    Btrfs: fix dir item validation when replaying xattr deletes

    Linus Torvalds