19 Jun, 2013

4 commits

  • Simplify the way fscache cache objects retain their cookie. The way I
    implemented the cookie storage handling made synchronisation a pain (ie. the
    object state machine can't rely on the cookie actually still being there).

    Instead of the the object being detached from the cookie and the cookie being
    freed in __fscache_relinquish_cookie(), we defer both operations:

    (*) The detachment of the object from the list in the cookie now takes place
    in fscache_drop_object() and is thus governed by the object state machine
    (fscache_detach_from_cookie() has been removed).

    (*) The release of the cookie is now in fscache_object_destroy() - which is
    called by the cache backend just before it frees the object.

    This means that the fscache_cookie struct is now available to the cache all the
    way through from ->alloc_object() to ->drop_object() and ->put_object() -
    meaning that it's no longer necessary to take object->lock to guarantee access.

    However, __fscache_relinquish_cookie() doesn't wait for the object to go all
    the way through to destruction before letting the netfs proceed. That would
    massively slow down the netfs. Since __fscache_relinquish_cookie() leaves the
    cookie around, in must therefore break all attachments to the netfs - which
    includes ->def, ->netfs_data and any outstanding page read/writes.

    To handle this, struct fscache_cookie now has an n_active counter:

    (1) This starts off initialised to 1.

    (2) Any time the cache needs to get at the netfs data, it calls
    fscache_use_cookie() to increment it - if it is not zero. If it was zero,
    then access is not permitted.

    (3) When the cache has finished with the data, it calls fscache_unuse_cookie()
    to decrement it. This does a wake-up on it if it reaches 0.

    (4) __fscache_relinquish_cookie() decrements n_active and then waits for it to
    reach 0. The initialisation to 1 in step (1) ensures that we only get
    wake ups when we're trying to get rid of the cookie.

    This leaves __fscache_relinquish_cookie() a lot simpler.

    ***
    This fixes a problem in the current code whereby if fscache_invalidate() is
    followed sufficiently quickly by fscache_relinquish_cookie() then it is
    possible for __fscache_relinquish_cookie() to have detached the cookie from the
    object and cleared the pointer before a thread is dispatched to process the
    invalidation state in the object state machine.

    Since the pending write clearance was deferred to the invalidation state to
    make it asynchronous, we need to either wait in relinquishment for the stores
    tree to be cleared in the invalidation state or we need to handle the clearance
    in relinquishment.

    Further, if the relinquishment code does clear the tree, then the invalidation
    state need to make the clearance contingent on still having the cookie to hand
    (since that's where the tree is rooted) and we have to prevent the cookie from
    disappearing for the duration.

    This can lead to an oops like the following:

    BUG: unable to handle kernel NULL pointer dereference at 000000000000000c
    ...
    RIP: 0010:[] _spin_lock+0xe/0x30
    ...
    CR2: 000000000000000c ...
    ...
    Process kslowd002 (...)
    ....
    Call Trace:
    [] fscache_invalidate_writes+0x38/0xd0 [fscache]
    [] ? __switch_to+0xd0/0x320
    [] ? find_busiest_queue+0x69/0x150
    [] ? slow_work_enqueue+0x104/0x180
    [] fscache_object_slow_work_execute+0x5e3/0x9d0 [fscache]
    [] ? bit_waitqueue+0x17/0xd0
    [] slow_work_execute+0x233/0x310
    [] slow_work_thread+0x205/0x360
    [] ? autoremove_wake_function+0x0/0x40
    [] ? slow_work_thread+0x0/0x360
    [] kthread+0x96/0xa0
    [] child_rip+0xa/0x20
    [] ? kthread+0x0/0xa0
    [] ? child_rip+0x0/0x20

    The parameter to fscache_invalidate_writes() was object->cookie which is NULL.

    Signed-off-by: David Howells
    Tested-By: Milosz Tanski
    Acked-by: Jeff Layton

    David Howells
     
  • Fix object state machine to have separate work and wait states as that makes
    it easier to envision.

    There are now three kinds of state:

    (1) Work state. This is an execution state. No event processing is performed
    by a work state. The function attached to a work state returns a pointer
    indicating the next state to which the OSM should transition. Returning
    NO_TRANSIT repeats the current state, but goes back to the scheduler
    first.

    (2) Wait state. This is an event processing state. No execution is
    performed by a wait state. Wait states are just tables of "if event X
    occurs, clear it and transition to state Y". The dispatcher returns to
    the scheduler if none of the events in which the wait state has an
    interest are currently pending.

    (3) Out-of-band state. This is a special work state. Transitions to normal
    states can be overridden when an unexpected event occurs (eg. I/O error).
    Instead the dispatcher disables and clears the OOB event and transits to
    the specified work state. This then acts as an ordinary work state,
    though object->state points to the overridden destination. Returning
    NO_TRANSIT resumes the overridden transition.

    In addition, the states have names in their definitions, so there's no need for
    tables of state names. Further, the EV_REQUEUE event is no longer necessary as
    that is automatic for work states.

    Since the states are now separate structs rather than values in an enum, it's
    not possible to use comparisons other than (non-)equality between them, so use
    some object->flags to indicate what phase an object is in.

    The EV_RELEASE, EV_RETIRE and EV_WITHDRAW events have been squished into one
    (EV_KILL). An object flag now carries the information about retirement.

    Similarly, the RELEASING, RECYCLING and WITHDRAWING states have been merged
    into an KILL_OBJECT state and additional states have been added for handling
    waiting dependent objects (JUMPSTART_DEPS and KILL_DEPENDENTS).

    A state has also been added for synchronising with parent object initialisation
    (WAIT_FOR_PARENT) and another for initiating look up (PARENT_READY).

    Signed-off-by: David Howells
    Tested-By: Milosz Tanski
    Acked-by: Jeff Layton

    David Howells
     
  • Wrap checks on object state (mostly outside of fs/fscache/object.c) with
    inline functions so that the mechanism can be replaced.

    Some of the state checks within object.c are left as-is as they will be
    replaced.

    Signed-off-by: David Howells
    Tested-By: Milosz Tanski
    Acked-by: Jeff Layton

    David Howells
     
  • Uninline fscache_object_init() so as not to expose some of the FS-Cache
    internals to the cache backend.

    Signed-off-by: David Howells
    Tested-By: Milosz Tanski
    Acked-by: Jeff Layton

    David Howells
     

15 May, 2013

2 commits

  • Add wait_on_atomic_t() and wake_up_atomic_t() to indicate became-zero events on
    atomic_t types. This uses the bit-wake waitqueue table. The key is set to a
    value outside of the number of bits in a long so that wait_on_bit() won't be
    woken up accidentally.

    What I'm using this for is: in a following patch I add a counter to struct
    fscache_cookie to count the number of outstanding operations that need access
    to netfs data. The way this works is:

    (1) When a cookie is allocated, the counter is initialised to 1.

    (2) When an operation wants to access netfs data, it calls atomic_inc_unless()
    to increment the counter before it does so. If it was 0, then the counter
    isn't incremented, the operation isn't permitted to access the netfs data
    (which might by this point no longer exist) and the operation aborts in
    some appropriate manner.

    (3) When an operation finishes with the netfs data, it decrements the counter
    and if it reaches 0, calls wake_up_atomic_t() on it - the assumption being
    that it was the last blocker.

    (4) When a cookie is released, the counter is decremented and the releaser
    uses wait_on_atomic_t() to wait for the counter to become 0 - which should
    indicate no one is using the netfs data any longer. The netfs data can
    then be destroyed.

    There are some alternatives that I have thought of and that have been suggested
    by Tejun Heo:

    (A) Using wait_on_bit() to wait on a bit in the counter. This doesn't work
    because if that bit happens to be 0 then the wait won't happen - even if
    the counter is non-zero.

    (B) Using wait_on_bit() to wait on a flag elsewhere which is cleared when the
    counter reaches 0. Such a flag would be redundant and would add
    complexity.

    (C) Adding a waitqueue to fscache_cookie - this would expand that struct by
    several words for an event that happens just once in each cookie's
    lifetime. Further, cookies are generally per-file so there are likely to
    be a lot of them.

    (D) Similar to (C), but add a pointer to a waitqueue in the cookie instead of
    a waitqueue. This would add single word per cookie and so would be less
    of an expansion - but still an expansion.

    (E) Adding a static waitqueue to the fscache module. Generally this would be
    fine, but under certain circumstances many cookies will all get added at
    the same time (eg. NFS umount, cache withdrawal) thereby presenting
    scaling issues. Note that the wait may be significant as disk I/O may be
    in progress.

    So, I think reusing the wait_on_bit() waitqueue set is reasonable. I don't
    make much use of the waitqueue I need on a per-cookie basis, but sometimes I
    have a huge flood of the cookies to deal with.

    I also don't want to add a whole new set of global waitqueue tables
    specifically for the dec-to-0 event if I can reuse the bit tables.

    Signed-off-by: David Howells
    Tested-By: Milosz Tanski
    Acked-by: Jeff Layton

    David Howells
     
  • Pull ext4 update from Ted Ts'o:
    "Fixed regressions (two stability regressions and a performance
    regression) introduced during the 3.10-rc1 merge window.

    Also included is a bug fix relating to allocating blocks after
    resizing an ext3 file system when using the ext4 file system driver"

    * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
    jbd,jbd2: fix oops in jbd2_journal_put_journal_head()
    ext4: revert "ext4: use io_end for multiple bios"
    ext4: limit group search loop for non-extent files
    ext4: fix fio regression

    Linus Torvalds
     

14 May, 2013

1 commit

  • Pull networking fixes from David Miller:
    "Several small bug fixes all over:

    1) be2net driver uses wrong payload length when submitting MAC list
    get requests to the chip. From Sathya Perla.

    2) Fix mwifiex memory leak on driver unload, from Amitkumar Karwar.

    3) Prevent random memory access in batman-adv, from Marek Lindner.

    4) batman-adv doesn't check for pskb_trim_rcsum() errors, also from
    Marek Lindner.

    5) Fix fec crashes on rapid link up/down, from Frank Li.

    6) Fix inner protocol grovelling in GSO, from Pravin B Shelar.

    7) Link event validation fix in qlcnic from Rajesh Borundia.

    8) Not all FEC chips can support checksum offload, fix from Shawn
    Guo.

    9) EXPORT_SYMBOL + inline doesn't make any sense, from Denis Efremov.

    10) Fix race in passthru mode during device removal in macvlan, from
    Jiri Pirko.

    11) Fix RCU hash table lookup socket state race in ipv6, leading to
    NULL pointer derefs, from Eric Dumazet.

    12) Add several missing HAS_DMA kconfig dependencies, from Geert
    Uyttterhoeven.

    13) Fix bogus PCI resource management in 3c59x driver, from Sergei
    Shtylyov.

    14) Fix info leak in ipv6 GRE tunnel driver, from Amerigo Wang.

    15) Fix device leak in ipv6 IPSEC policy layer, from Cong Wang.

    16) DMA mapping leak fix in qlge from Thadeu Lima de Souza Cascardo.

    17) Missing iounmap on probe failure in bna driver, from Wei Yongjun."

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (40 commits)
    bna: add missing iounmap() on error in bnad_init()
    qlge: fix dma map leak when the last chunk is not allocated
    xfrm6: release dev before returning error
    ipv6,gre: do not leak info to user-space
    virtio_net: use default napi weight by default
    emac: Fix EMAC soft reset on 460EX/GT
    3c59x: fix PCI resource management
    caif: CAIF_VIRTIO should depend on HAS_DMA
    net/ethernet: MACB should depend on HAS_DMA
    net/ethernet: ARM_AT91_ETHER should depend on HAS_DMA
    net/wireless: ATH9K should depend on HAS_DMA
    net/ethernet: STMMAC_ETH should depend on HAS_DMA
    net/ethernet: NET_CALXEDA_XGMAC should depend on HAS_DMA
    ipv6: do not clear pinet6 field
    macvlan: fix passthru mode race between dev removal and rx path
    ipv4: ip_output: remove inline marking of EXPORT_SYMBOL functions
    net/mlx4: Strengthen VLAN tags/priorities enforcement in VST mode
    net/mlx4_core: Add missing report on VST and spoof-checking dev caps
    net: fec: enable hardware checksum only on imx6q-fec
    qlcnic: Fix validation of link event command.
    ...

    Linus Torvalds
     

13 May, 2013

4 commits

  • Pull spi updates from Mark Brown:
    "A few driver specific fixes plus improved error handling in the
    generic DT GPIO chipselect handling - not exciting but useful."

    * tag 'spi-v3.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
    spi/spi-atmel: BUG: fix doesn' support 16 bits transfers using PIO
    spi/davinci: fix module build error
    spi: Return error from of_spi_register_master on bad "cs-gpios" property
    spi: Initialize cs_gpio and cs_gpios with -ENOENT
    spi/atmel: fix speed_hz check in atmel_spi_transfer()

    Linus Torvalds
     
  • Pull drm fixes from Dave Airlie:
    "Just a few straggling fixes I hoovered up, and an intel fixes pull
    from Daniel which fixes some regressions, and some mgag200 fixes from
    Matrox."

    * 'drm-next' of git://people.freedesktop.org/~airlied/linux:
    drm/mgag200: Fix framebuffer base address programming
    drm/mgag200: Convert counter delays to jiffies
    drm/mgag200: Fix writes into MGA1064_PIX_CLK_CTL register
    drm/mgag200: Don't change unrelated registers during modeset
    drm: Only print a debug message when the polled connector has changed
    drm: Make the HPD status updates debug logs more readable
    drm: Use names of ioctls in debug traces
    drm: Remove pointless '-' characters from drm_fb_helper documentation
    drm: Add kernel-doc for drm_fb_helper_funcs->initial_config
    drm: refactor call to request_module
    drm: Don't prune modes loudly when a connector is disconnected
    drm: Add missing break in the command line mode parsing code
    drm/i915: clear the stolen fb before resuming
    Revert "drm/i915: Calculate correct stolen size for GEN7+"
    drm/i915: hsw: fix link training for eDP on port-A
    Revert "drm/i915: revert eDP bpp clamping code changes"
    drm: don't check modeset locks in panic handler
    drm/i915: Fix pipe enabled mask for pipe C in WM calculations
    drm/mm: fix dump table BUG
    drm/i915: Always normalize return timeout for wait_timeout_ioctl

    Linus Torvalds
     
  • Mark Brown
     
  • Commit ae4647fb (jbd2: reduce journal_head size) introduced a
    regression where we occasionally hit panic in
    jbd2_journal_put_journal_head() because of wrong b_jcount. The bug is
    caused by gcc making 64-bit access to 32-bit bitfield and thus
    clobbering b_jcount.

    At least for now, those 8 bytes saved in struct journal_head are not
    worth the trouble with gcc bitfield handling so revert that part of
    the patch.

    Reported-by: EUNBONG SONG
    Reported-by: Tony Luck
    Signed-off-by: Jan Kara
    Signed-off-by: "Theodore Ts'o"

    Jan Kara
     

12 May, 2013

6 commits

  • Pull tracing/kprobes update from Steven Rostedt:
    "The majority of these changes are from Masami Hiramatsu bringing
    kprobes up to par with the latest changes to ftrace (multi buffering
    and the new function probes).

    He also discovered and fixed some bugs in doing so. When pulling in
    his patches, I also found a few minor bugs as well and fixed them.

    This also includes a compile fix for some archs that select the ring
    buffer but not tracing.

    I based this off of the last patch you took from me that fixed the
    merge conflict error, as that was the commit that had all the changes
    I needed for this set of changes."

    * tag 'trace-fixes-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
    tracing/kprobes: Support soft-mode disabling
    tracing/kprobes: Support ftrace_event_file base multibuffer
    tracing/kprobes: Pass trace_probe directly from dispatcher
    tracing/kprobes: Increment probe hit-count even if it is used by perf
    tracing/kprobes: Use bool for retprobe checker
    ftrace: Fix function probe when more than one probe is added
    ftrace: Fix the output of enabled_functions debug file
    ftrace: Fix locking in register_ftrace_function_probe()
    tracing: Add helper function trace_create_new_event() to remove duplicate code
    tracing: Modify soft-mode only if there's no other referrer
    tracing: Indicate enabled soft-mode in enable file
    tracing/kprobes: Fix to increment return event probe hit-count
    ftrace: Cleanup regex_lock and ftrace_lock around hash updating
    ftrace, kprobes: Fix a deadlock on ftrace_regex_lock
    ftrace: Have ftrace_regex_write() return either read or error
    tracing: Return error if register_ftrace_function_probe() fails for event_enable_func()
    tracing: Don't succeed if event_enable_func did not register anything
    ring-buffer: Select IRQ_WORK

    Linus Torvalds
     
  • We have seen multiple NULL dereferences in __inet6_lookup_established()

    After analysis, I found that inet6_sk() could be NULL while the
    check for sk_family == AF_INET6 was true.

    Bug was added in linux-2.6.29 when RCU lookups were introduced in UDP
    and TCP stacks.

    Once an IPv6 socket, using SLAB_DESTROY_BY_RCU is inserted in a hash
    table, we no longer can clear pinet6 field.

    This patch extends logic used in commit fcbdf09d9652c891
    ("net: fix nulls list corruptions in sk_prot_alloc")

    TCP/UDP/UDPLite IPv6 protocols provide their own .clear_sk() method
    to make sure we do not clear pinet6 field.

    At socket clone phase, we do not really care, as cloning the parent (non
    NULL) pinet6 is not adding a fatal race.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Make sure that the following steps are taken:

    - drop packets sent by the VF with vlan tag
    - block packets with vlan tag which are steered to the VF
    - drop/block tagged packets when the policy is priority-tagged
    - make sure VLAN stripping for received packets is set
    - make sure force UP bit for the VF QP is set

    Use enum values for all the above instead of numerical bit offsets.

    Signed-off-by: Rony Efraim
    Signed-off-by: Or Gerlitz
    Signed-off-by: David S. Miller

    Rony Efraim
     
  • Pull second SCSI update from James "Jaj B" Bottomley:
    "This is the final round of SCSI patches for the merge window. It
    consists mostly of driver updates (bnx2fc, ibmfc, fnic, lpfc,
    be2iscsi, pm80xx, qla4x and ipr).

    There's also the power management updates that complete the patches in
    Jens' tree, an iscsi refcounting problem fix from the last pull, some
    dif handling in scsi_debug fixes, a few nice code cleanups and an
    error handling busy bug fix."

    * tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (92 commits)
    [SCSI] qla2xxx: Update firmware link in Kconfig file.
    [SCSI] iscsi class, qla4xxx: fix sess/conn refcounting when find fns are used
    [SCSI] sas: unify the pointlessly separated enums sas_dev_type and sas_device_type
    [SCSI] pm80xx: thermal, sas controller config and error handling update
    [SCSI] pm80xx: NCQ error handling changes
    [SCSI] pm80xx: WWN Modification for PM8081/88/89 controllers
    [SCSI] pm80xx: Changed module name and debug messages update
    [SCSI] pm80xx: Firmware flash memory free fix, with addition of new memory region for it
    [SCSI] pm80xx: SPC new firmware changes for device id 0x8081 alone
    [SCSI] pm80xx: Added SPCv/ve specific hardware functionalities and relevant changes in common files
    [SCSI] pm80xx: MSI-X implementation for using 64 interrupts
    [SCSI] pm80xx: Updated common functions common for SPC and SPCv/ve
    [SCSI] pm80xx: Multiple inbound/outbound queue configuration
    [SCSI] pm80xx: Added SPCv/ve specific ids, variables and modify for SPC
    [SCSI] lpfc: fix up Kconfig dependencies
    [SCSI] Handle MLQUEUE busy response in scsi_send_eh_cmnd
    [SCSI] sd: change to auto suspend mode
    [SCSI] sd: use REQ_PM in sd's runtime suspend operation
    [SCSI] qla4xxx: Fix iocb_cnt calculation in qla4xxx_send_mbox_iocb()
    [SCSI] ufs: Correct the expected data transfersize
    ...

    Linus Torvalds
     
  • Pull idle update from Len Brown:
    "Add support for new Haswell-ULT CPU idle power states"

    * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
    intel_idle: initial C8, C9, C10 support
    tools/power turbostat: display C8, C9, C10 residency

    Linus Torvalds
     
  • Pull audit changes from Eric Paris:
    "Al used to send pull requests every couple of years but he told me to
    just start pushing them to you directly.

    Our touching outside of core audit code is pretty straight forward. A
    couple of interface changes which hit net/. A simple argument bug
    calling audit functions in namei.c and the removal of some assembly
    branch prediction code on ppc"

    * git://git.infradead.org/users/eparis/audit: (31 commits)
    audit: fix message spacing printing auid
    Revert "audit: move kaudit thread start from auditd registration to kaudit init"
    audit: vfs: fix audit_inode call in O_CREAT case of do_last
    audit: Make testing for a valid loginuid explicit.
    audit: fix event coverage of AUDIT_ANOM_LINK
    audit: use spin_lock in audit_receive_msg to process tty logging
    audit: do not needlessly take a lock in tty_audit_exit
    audit: do not needlessly take a spinlock in copy_signal
    audit: add an option to control logging of passwords with pam_tty_audit
    audit: use spin_lock_irqsave/restore in audit tty code
    helper for some session id stuff
    audit: use a consistent audit helper to log lsm information
    audit: push loginuid and sessionid processing down
    audit: stop pushing loginid, uid, sessionid as arguments
    audit: remove the old depricated kernel interface
    audit: make validity checking generic
    audit: allow checking the type of audit message in the user filter
    audit: fix build break when AUDIT_DEBUG == 2
    audit: remove duplicate export of audit_enabled
    Audit: do not print error when LSMs disabled
    ...

    Linus Torvalds
     

11 May, 2013

3 commits

  • Pull stray syscall bits from Al Viro:
    "Several syscall-related commits that were missing from the original"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal:
    switch compat_sys_sysctl to COMPAT_SYSCALL_DEFINE
    unicore32: just use mmap_pgoff()...
    unify compat fanotify_mark(2), switch to COMPAT_SYSCALL_DEFINE
    x86, vm86: fix VM86 syscalls: use SYSCALL_DEFINEx(...)

    Linus Torvalds
     
  • Pull device-mapper updates from Alasdair Kergon:
    "Allow devices that hold metadata for the device-mapper thin
    provisioning target to be extended easily; allow WRITE SAME on
    multipath devices; an assortment of little fixes and clean-ups."

    * tag 'dm-3.10-changes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm: (21 commits)
    dm cache: set config value
    dm cache: move config fns
    dm thin: generate event when metadata threshold passed
    dm persistent metadata: add space map threshold callback
    dm persistent data: add threshold callback to space map
    dm thin: detect metadata device resizing
    dm persistent data: support space map resizing
    dm thin: open dev read only when possible
    dm thin: refactor data dev resize
    dm cache: replace memcpy with struct assignment
    dm cache: fix typos in comments
    dm cache policy: fix description of lookup fn
    dm: document iterate_devices
    dm persistent data: fix error message typos
    dm cache: tune migration throttling
    dm mpath: enable WRITE SAME support
    dm table: fix write same support
    dm bufio: avoid a possible __vmalloc deadlock
    dm snapshot: fix error return code in snapshot_ctr
    dm cache: fix error return code in cache_create
    ...

    Linus Torvalds
     
  • Pull HID fixes from Jiri Kosina:

    - fix usage of sleeping lock in atomic context from Jiri Kosina

    - build fix for hid-steelseries under certain .config setups by Simon Wood

    - simple mismerge fix from Fernando Luis Vázquez Cao

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
    HID: debug: fix RCU preemption issue
    HID: hid-steelseries fix led class build issue
    HID: reintroduce fix-up for certain Sony RF receivers

    Linus Torvalds
     

10 May, 2013

20 commits

  • Signed-off-by: James Bottomley

    James Bottomley
     
  • Signed-off-by: James Bottomley

    James Bottomley
     
  • Pull sound fixes from Takashi Iwai:
    "This contains small fixes since the previous pull request:

    - A few regression fixes and small updates of HD-audio

    - Yet another fix for Haswell HDMI audio

    - A copule of trivial fixes in ASoC McASP, DPAM and WM8994"

    * tag 'sound-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
    Revert "ALSA: hda - Don't set up active streams twice"
    ALSA: Add comment for control TLV API
    ALSA: hda - Apply pin-enablement workaround to all Haswell HDMI codecs
    ALSA: HDA: Fix Oops caused by dereference NULL pointer
    ALSA: mips/sgio2audio: Remove redundant platform_set_drvdata()
    ALSA: mips/hal2: Remove redundant platform_set_drvdata()
    ALSA: hda - Fix 3.9 regression of EAPD init on Conexant codecs
    sound: Fix make allmodconfig on MIPS
    ALSA: hda - Fix system panic when DMA > 40 bits for Nvidia audio controllers
    ALSA: atmel: Remove redundant platform_set_drvdata()
    ASoC: McASP: Fix receive clock polarity in DAIFMT_NB_NF mode.
    ASoC: wm8994: missing break in wm8994_aif3_hw_params()
    ASoC: McASP: Add pins output direction for rx clocks when configured in CBS_CFS format
    ASoC: dapm: use clk_prepare_enable and clk_disable_unprepare

    Linus Torvalds
     
  • This fixes a bug where the iscsi class/driver did not do a put_device
    when a sess/conn device was found. This also simplifies the interface
    by not having to pass in some arguments that were duplicated and did
    not need to be exported.

    Reported-by: Zhao Hongjiang
    Signed-off-by: Mike Christie
    Acked-by: Vikas Chaudhary
    Signed-off-by: James Bottomley

    Mike Christie
     
  • These enums have been separate since the dawn of SAS, mainly because the
    latter is a procotol only enum and the former includes additional state
    for libsas. The dichotomy causes endless confusion about which one you
    should use where and leads to pointless warnings like this:

    drivers/scsi/mvsas/mv_sas.c: In function 'mvs_update_phyinfo':
    drivers/scsi/mvsas/mv_sas.c:1162:34: warning: comparison between 'enum sas_device_type' and 'enum sas_dev_type' [-Wenum-compare]

    Fix by eliminating one of them. The one kept is effectively the sas.h
    one, but call it sas_device_type and make sure the enums are all
    properly namespaced with the SAS_ prefix.

    Signed-off-by: James Bottomley

    James Bottomley
     
  • Document iterate_devices in device-mapper.h.

    Signed-off-by: Alasdair G Kergon

    Alasdair G Kergon
     
  • The intention here is to make the output of dmesg with full verbosity a
    bit easier for a human to parse. This commit transforms:

    [drm:drm_ioctl], pid=699, cmd=0x6458, nr=0x58, dev 0xe200, auth=1
    [drm:drm_ioctl], pid=699, cmd=0xc010645b, nr=0x5b, dev 0xe200, auth=1
    [drm:drm_ioctl], pid=699, cmd=0xc0106461, nr=0x61, dev 0xe200, auth=1
    [drm:drm_ioctl], pid=699, cmd=0xc01c64ae, nr=0xae, dev 0xe200, auth=1
    [drm:drm_mode_addfb], [FB:32]
    [drm:drm_ioctl], pid=699, cmd=0xc0106464, nr=0x64, dev 0xe200, auth=1
    [drm:drm_vm_open_locked], 0x7fd9302fe000,0x00a00000
    [drm:drm_ioctl], pid=699, cmd=0x400c645f, nr=0x5f, dev 0xe200, auth=1
    [drm:drm_ioctl], pid=699, cmd=0xc00464af, nr=0xaf, dev 0xe200, auth=1
    [drm:intel_crtc_set_config], [CRTC:3] [NOFB]

    into:

    [drm:drm_ioctl], pid=699, dev=0xe200, auth=1, I915_GEM_THROTTLE
    [drm:drm_ioctl], pid=699, dev=0xe200, auth=1, I915_GEM_CREATE
    [drm:drm_ioctl], pid=699, dev=0xe200, auth=1, I915_GEM_SET_TILING
    [drm:drm_ioctl], pid=699, dev=0xe200, auth=1, IOCTL_MODE_ADDFB
    [drm:drm_mode_addfb], [FB:32]
    [drm:drm_ioctl], pid=699, dev=0xe200, auth=1, I915_GEM_MMAP_GTT
    [drm:drm_vm_open_locked], 0x7fd9302fe000,0x00a00000
    [drm:drm_ioctl], pid=699, dev=0xe200, auth=1, I915_GEM_SET_DOMAIN
    [drm:drm_ioctl], pid=699, dev=0xe200, auth=1, DRM_IOCTL_MODE_RMFB
    [drm:intel_crtc_set_config], [CRTC:3] [NOFB]

    v2: drm_ioctls is now a constant (Ville Syrjälä)

    Signed-off-by: Chris Cummins
    Signed-off-by: Dave Airlie

    Chris Cummins
     
  • Signed-off-by: Ville Syrjälä
    Signed-off-by: Dave Airlie

    Ville Syrjälä
     
  • Signed-off-by: Ville Syrjälä
    Signed-off-by: Dave Airlie

    Ville Syrjälä
     
  • Modify soft-mode flag only if no other soft-mode referrer
    (currently only the ftrace triggers) by using a reference
    counter in each ftrace_event_file.

    Without this fix, adding and removing several different
    enable/disable_event triggers on the same event clear
    soft-mode bit from the ftrace_event_file. This also
    happens with a typo of glob on setting triggers.

    e.g.

    # echo vfs_symlink:enable_event:net:netif_rx > set_ftrace_filter
    # cat events/net/netif_rx/enable
    0*
    # echo typo_func:enable_event:net:netif_rx > set_ftrace_filter
    # cat events/net/netif_rx/enable
    0
    # cat set_ftrace_filter
    #### all functions enabled ####
    vfs_symlink:enable_event:net:netif_rx:unlimited

    As above, we still have a trigger, but soft-mode is gone.

    Link: http://lkml.kernel.org/r/20130509054429.30398.7464.stgit@mhiramat-M0-7522

    Cc: Srikar Dronamraju
    Cc: Oleg Nesterov
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: David Sharp
    Cc: Hiraku Toyooka
    Cc: Tom Zanussi
    Signed-off-by: Masami Hiramatsu
    Signed-off-by: Steven Rostedt

    Masami Hiramatsu
     
  • Fix a deadlock on ftrace_regex_lock which happens when setting
    an enable_event trigger on dynamic kprobe event as below.

    ----
    sh-2.05b# echo p vfs_symlink > kprobe_events
    sh-2.05b# echo vfs_symlink:enable_event:kprobes:p_vfs_symlink_0 > set_ftrace_filter

    =============================================
    [ INFO: possible recursive locking detected ]
    3.9.0+ #35 Not tainted
    ---------------------------------------------
    sh/72 is trying to acquire lock:
    (ftrace_regex_lock){+.+.+.}, at: [] ftrace_set_hash+0x81/0x1f0

    but task is already holding lock:
    (ftrace_regex_lock){+.+.+.}, at: [] ftrace_regex_write.isra.29.part.30+0x3d/0x220

    other info that might help us debug this:
    Possible unsafe locking scenario:

    CPU0
    ----
    lock(ftrace_regex_lock);
    lock(ftrace_regex_lock);

    *** DEADLOCK ***
    ----

    To fix that, this introduces a finer regex_lock for each ftrace_ops.
    ftrace_regex_lock is too big of a lock which protects all
    filter/notrace_hash operations, but it doesn't need to be a global
    lock after supporting multiple ftrace_ops because each ftrace_ops
    has its own filter/notrace_hash.

    Link: http://lkml.kernel.org/r/20130509054417.30398.84254.stgit@mhiramat-M0-7522

    Cc: Srikar Dronamraju
    Cc: Oleg Nesterov
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Tom Zanussi
    Signed-off-by: Masami Hiramatsu
    [ Added initialization flag and automate mutex initialization for
    non ftrace.c ftrace_probes. ]
    Signed-off-by: Steven Rostedt

    Masami Hiramatsu
     
  • Pull NVMe driver update from Matthew Wilcox:
    "Lots of exciting new features in the NVM Express driver this time,
    including support for emulating SCSI commands, discard support and the
    ability to submit per-sector metadata with I/Os.

    It's still mostly bugfixes though!"

    * git://git.infradead.org/users/willy/linux-nvme: (27 commits)
    NVMe: Use user defined admin ioctl timeout
    NVMe: Simplify Firmware Activate code slightly
    NVMe: Only clear the enable bit when disabling controller
    NVMe: Wait for device to acknowledge shutdown
    NVMe: Schedule timeout for sync commands
    NVMe: Meta-data support in NVME_IOCTL_SUBMIT_IO
    NVMe: Device specific stripe size handling
    NVMe: Split non-mergeable bio requests
    NVMe: Remove dead code in nvme_dev_add
    NVMe: Check for NULL memory in nvme_dev_add
    NVMe: Fix error clean-up on nvme_alloc_queue
    NVMe: Free admin queue on request_irq error
    NVMe: Add scsi unmap to SG_IO
    NVMe: queue usage fixes in nvme-scsi
    NVMe: Set TASK_INTERRUPTIBLE before processing queues
    NVMe: Add a character device for each nvme device
    NVMe: Fix endian-related problems in user I/O submission path
    NVMe: Fix I/O cancellation status on big-endian machines
    NVMe: Fix sparse warnings in scsi emulation
    NVMe: Don't fail initialisation unnecessarily
    ...

    Linus Torvalds
     
  • Pull ARM SoC fixes and straggler patches from Olof Johansson:
    "A collection of fixes for fall out from 3.10 merge window, some build
    fixes and warning cleanups and a small handful of patches that were
    small and contained and made sense to still include in 3.10 (some of
    these have also been in -next since the merge window opened).

    Largest continous series is for OMAP, but there's a handful for other
    platforms.

    For i.MX, one of the patches are framebuffer fixups due to fallout
    during the merge window, and the other removes some stale and broken
    code."

    * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (34 commits)
    ARM: exynos: dts: Fixed vbus-gpios
    ARM: EXYNOS5: Fix kernel dump in AFTR idle mode
    ARM: ux500: Rid ignored return value of regulator_enable() compiler warning
    ARM: ux500: read the correct soc_id number
    ARM: exynos: dts: cros5250: add cyapa trackpad
    video: mxsfb: Adapt to new videomode API
    ARM: imx: Select GENERIC_ALLOCATOR
    ARM: imx: compile fix for hotplug.c
    ARM: dts: don't assume boards are using twl4030 for omap3
    ARM: OMAP2+: Remove bogus IS_ERR_OR_NULL checking from id.c
    ARM: dts: Configure and fix the McSPI pins for 4430sdp
    ARM: dts: AM33XX: Add GPMC node
    ARM: dts: OMAP4460: Fix CPU OPP voltages
    ARM: dts: OMAP36xx: Fix CPU OPP voltages
    ARM: OMAP4+: omap2plus_defconfig: Enable audio via TWL6040 as module
    ARM: OMAP2: AM33XX: id: Add support for new AM335x PG2.1 Si
    omap: mux: add AM/DM37x gpios
    ARM: OMAP1: DMA: fix error handling in omap1_system_dma_init()
    ARM: OMAP2+: omap_device: use late_initcall_sync
    ARM: OMAP: RX-51: change probe order of touchscreen and panel SPI devices
    ...

    Linus Torvalds
     
  • Pull btrfs update from Chris Mason:
    "These are mostly fixes. The biggest exceptions are Josef's skinny
    extents and Jan Schmidt's code to rebuild our quota indexes if they
    get out of sync (or you enable quotas on an existing filesystem).

    The skinny extents are off by default because they are a new variation
    on the extent allocation tree format. btrfstune -x enables them, and
    the new format makes the extent allocation tree about 30% smaller.

    I rebased this a few days ago to rework Dave Sterba's crc checks on
    the super block, but almost all of these go back to rc6, since I
    though 3.9 was due any minute.

    The biggest missing fix is the tracepoint bug that was hit late in
    3.9. I ran into problems with that in overnight testing and I'm still
    tracking it down. I'll definitely have that fixed for rc2."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (101 commits)
    Btrfs: allow superblock mismatch from older mkfs
    btrfs: enhance superblock checks
    btrfs: fix misleading variable name for flags
    btrfs: use unsigned long type for extent state bits
    Btrfs: improve the loop of scrub_stripe
    btrfs: read entire device info under lock
    btrfs: remove unused gfp mask parameter from release_extent_buffer callchain
    btrfs: handle errors returned from get_tree_block_key
    btrfs: make static code static & remove dead code
    Btrfs: deal with errors in write_dev_supers
    Btrfs: remove almost all of the BUG()'s from tree-log.c
    Btrfs: deal with free space cache errors while replaying log
    Btrfs: automatic rescan after "quota enable" command
    Btrfs: rescan for qgroups
    Btrfs: split btrfs_qgroup_account_ref into four functions
    Btrfs: allocate new chunks if the space is not enough for global rsv
    Btrfs: separate sequence numbers for delayed ref tracking and tree mod log
    btrfs: move leak debug code to functions
    Btrfs: return free space in cow error path
    Btrfs: set UUID in root_item for created trees
    ...

    Linus Torvalds
     
  • Since commit 657eee7 (media: coda: use genalloc API) the following build
    error happens with imx_v4_v5_defconfig:

    drivers/built-in.o: In function 'coda_remove':
    clk-composite.c:(.text+0x112180): undefined reference to 'gen_pool_free'
    drivers/built-in.o: In function 'coda_probe':
    clk-composite.c:(.text+0x112310): undefined reference to 'of_get_named_gen_pool'
    clk-composite.c:(.text+0x1123f4): undefined reference to 'gen_pool_alloc'
    clk-composite.c:(.text+0x11240c): undefined reference to 'gen_pool_virt_to_phys'
    clk-composite.c:(.text+0x112458): undefined reference to 'dev_get_gen_pool'

    Select GENERIC_ALLOCATOR and get rid of the custom IRAM_ALLOC.

    Signed-off-by: Fabio Estevam
    Signed-off-by: Shawn Guo
    Signed-off-by: Olof Johansson

    Fabio Estevam
     
  • Signed-off-by: Al Viro

    Al Viro
     
  • Pull more NFS client bugfixes from Trond Myklebust:

    - Ensure that we match the 'sec=' mount flavour against the server list

    - Fix the NFSv4 byte range locking in the presence of delegations

    - Ensure that we conform to the NFSv4.1 spec w.r.t. freeing lock
    stateids

    - Fix a pNFS data server connection race

    * tag 'nfs-for-3.10-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
    NFS4.1 Fix data server connection race
    NFSv3: match sec= flavor against server list
    NFSv4.1: Ensure that we free the lock stateid on the server
    NFSv4: Convert nfs41_free_stateid to use an asynchronous RPC call
    SUNRPC: Don't spam syslog with "Pseudoflavor not found" messages
    NFSv4.x: Fix handling of partially delegated locks

    Linus Torvalds
     
  • Pull networking update from David Miller:

    1) Propagate return error values properly in irda, spider_net, sfc, and
    bfin_mac. From Wei Yongjun.

    2) Fix fec driver OOPS on rapid link up/down, from Frank Li.

    3) FIX VF resource allocation and chip message payload length errors in
    be2net driver, from Sathya Perla.

    4) Fix inner protocol inspection during GSO from Pravin B Shelar.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
    if_cablemodem.h: Add parenthesis around ioctl macros
    gso: Handle Trans-Ether-Bridging protocol in skb_network_protocol()
    net: fec: fix kernel oops when plug/unplug cable many times
    bfin_mac: fix error return code in bfin_mac_probe()
    sfc: fix return value check in efx_ptp_probe_channel()
    net/spider_net: fix error return code in spider_net_open()
    net/irda: fix error return code in bfin_sir_open()
    net: of_mdio: fix behavior on missing phy device
    sierra_net: keep status interrupt URB active
    usbnet: allow status interrupt URB to always be active
    qmi_wwan/cdc_ether: add device IDs for Dell 5804 (Novatel E371) WWAN card
    be2net: disable TX in be_close()
    be2net: fix EQ from getting full while cleaning RX CQ
    be2net: fix payload_len value for GET_MAC_LIST cmd req
    be2net: provision VF resources before enabling SR-IOV

    Linus Torvalds
     
  • Pull MTD update from David Woodhouse:

    - Lots of cleanups from Artem, including deletion of some obsolete
    drivers

    - Support partitions larger than 4GiB in device tree

    - Support for new SPI chips

    * tag 'for-linus-20130509' of git://git.infradead.org/linux-mtd: (83 commits)
    mtd: omap2: Use module_platform_driver()
    mtd: bf5xx_nand: Use module_platform_driver()
    mtd: denali_dt: Remove redundant use of of_match_ptr
    mtd: denali_dt: Change return value to fix smatch warning
    mtd: denali_dt: Use module_platform_driver()
    mtd: denali_dt: Fix incorrect error check
    mtd: nand: subpage write support for hardware based ECC schemes
    mtd: omap2: use msecs_to_jiffies()
    mtd: nand_ids: use size macros
    mtd: nand_ids: improve LEGACY_ID_NAND macro a bit
    mtd: add 4 Toshiba nand chips for the full-id case
    mtd: add the support to parse out the full-id nand type
    mtd: add new fields to nand_flash_dev{}
    mtd: sh_flctl: Use of_match_ptr() macro
    mtd: gpio: Use of_match_ptr() macro
    mtd: gpio: Use devm_kzalloc()
    mtd: davinci_nand: Use of_match_ptr()
    mtd: dataflash: Use of_match_ptr() macro
    mtd: remove h720x flash support
    mtd: onenand: remove OneNAND simulator
    ...

    Linus Torvalds
     
  • Pull removal of GENERIC_GPIO from Grant Likely:
    "GENERIC_GPIO now synonymous with GPIOLIB. There are no longer any
    valid cases for enableing GENERIC_GPIO without GPIOLIB, even though it
    is possible to do so which has been causing confusion and breakage.
    This branch does the work to completely eliminate GENERIC_GPIO."

    * tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux:
    gpio: update gpio Chinese documentation
    Remove GENERIC_GPIO config option
    Convert selectors of GENERIC_GPIO to GPIOLIB
    blackfin: force use of gpiolib
    m68k: coldfire: use gpiolib
    mips: pnx833x: remove requirement for GENERIC_GPIO
    openrisc: default GENERIC_GPIO to false
    avr32: default GENERIC_GPIO to false
    xtensa: remove explicit selection of GENERIC_GPIO
    sh: replace CONFIG_GENERIC_GPIO by CONFIG_GPIOLIB
    powerpc: remove redundant GENERIC_GPIO selection
    unicore32: default GENERIC_GPIO to false
    unicore32: remove unneeded select GENERIC_GPIO
    arm: plat-orion: use GPIO driver on CONFIG_GPIOLIB
    arm: remove redundant GENERIC_GPIO selection
    mips: alchemy: require gpiolib
    mips: txx9: change GENERIC_GPIO to GPIOLIB
    mips: loongson: use GPIO driver on CONFIG_GPIOLIB
    mips: remove redundant GENERIC_GPIO select

    Linus Torvalds