24 Jun, 2014

1 commit


23 Jun, 2014

3 commits


18 Jun, 2014

7 commits

  • Takashi Iwai
     
  • …nie/sound into for-linus

    ASoC: Fixes for v3.16

    Quite a few build coverage fixes in here among the usual small driver
    fixes includling the sigmadsp change from Lars - moving the driver to
    separate modules per bus (which is basically just code motion) avoids
    issues with some combinations of buses being enabled.

    Takashi Iwai
     
  • The ALSA control code expects that the range of assigned indices to a control is
    continuous and does not overflow. Currently there are no checks to enforce this.
    If a control with a overflowing index range is created that control becomes
    effectively inaccessible and unremovable since snd_ctl_find_id() will not be
    able to find it. This patch adds a check that makes sure that controls with a
    overflowing index range can not be created.

    Signed-off-by: Lars-Peter Clausen
    Acked-by: Jaroslav Kysela
    Cc:
    Signed-off-by: Takashi Iwai

    Lars-Peter Clausen
     
  • Each control gets automatically assigned its numids when the control is created.
    The allocation is done by incrementing the numid by the amount of allocated
    numids per allocation. This means that excessive creation and destruction of
    controls (e.g. via SNDRV_CTL_IOCTL_ELEM_ADD/REMOVE) can cause the id to
    eventually overflow. Currently when this happens for the control that caused the
    overflow kctl->id.numid + kctl->count will also over flow causing it to be
    smaller than kctl->id.numid. Most of the code assumes that this is something
    that can not happen, so we need to make sure that it won't happen

    Signed-off-by: Lars-Peter Clausen
    Acked-by: Jaroslav Kysela
    Cc:
    Signed-off-by: Takashi Iwai

    Lars-Peter Clausen
     
  • A control that is visible on the card->controls list can be freed at any time.
    This means we must not access any of its memory while not holding the
    controls_rw_lock. Otherwise we risk a use after free access.

    Signed-off-by: Lars-Peter Clausen
    Acked-by: Jaroslav Kysela
    Cc:
    Signed-off-by: Takashi Iwai

    Lars-Peter Clausen
     
  • There are two issues with the current implementation for replacing user
    controls. The first is that the code does not check if the control is actually a
    user control and neither does it check if the control is owned by the process
    that tries to remove it. That allows userspace applications to remove arbitrary
    controls, which can cause a user after free if a for example a driver does not
    expect a control to be removed from under its feed.

    The second issue is that on one hand when a control is replaced the
    user_ctl_count limit is not checked and on the other hand the user_ctl_count is
    increased (even though the number of user controls does not change). This allows
    userspace, once the user_ctl_count limit as been reached, to repeatedly replace
    a control until user_ctl_count overflows. Once that happens new controls can be
    added effectively bypassing the user_ctl_count limit.

    Both issues can be fixed by instead of open-coding the removal of the control
    that is to be replaced to use snd_ctl_remove_user_ctl(). This function does
    proper permission checks as well as decrements user_ctl_count after the control
    has been removed.

    Note that by using snd_ctl_remove_user_ctl() the check which returns -EBUSY at
    beginning of the function if the control already exists is removed. This is not
    a problem though since the check is quite useless, because the lock that is
    protecting the control list is released between the check and before adding the
    new control to the list, which means that it is possible that a different
    control with the same settings is added to the list after the check. Luckily
    there is another check that is done while holding the lock in snd_ctl_add(), so
    we'll rely on that to make sure that the same control is not added twice.

    Signed-off-by: Lars-Peter Clausen
    Acked-by: Jaroslav Kysela
    Cc:
    Signed-off-by: Takashi Iwai

    Lars-Peter Clausen
     
  • The user-control put and get handlers as well as the tlv do not protect against
    concurrent access from multiple threads. Since the state of the control is not
    updated atomically it is possible that either two write operations or a write
    and a read operation race against each other. Both can lead to arbitrary memory
    disclosure. This patch introduces a new lock that protects user-controls from
    concurrent access. Since applications typically access controls sequentially
    than in parallel a single lock per card should be fine.

    Signed-off-by: Lars-Peter Clausen
    Acked-by: Jaroslav Kysela
    Cc:
    Signed-off-by: Takashi Iwai

    Lars-Peter Clausen
     

16 Jun, 2014

8 commits

  • …ix/pxa', 'asoc/fix/rcar' and 'asoc/fix/sigmadsp' into asoc-linus

    Mark Brown
     
  • Mark Brown
     
  • Use the zeroing function instead of dma_alloc_coherent & memset(,0,)

    Signed-off-by: Joe Perches
    Signed-off-by: Takashi Iwai

    Joe Perches
     
  • When a machine is booted with nomodeset option, i915 driver skips the
    whole initialization. Meanwhile, HD-audio tries to bind wth i915 just
    by request_symbol() without knowing that the initialization was
    skipped, and eventually it hits WARN_ON() in i915_request_power_well()
    and i915_release_power_well() wrongly but still continues probing,
    even though it doesn't work at all.

    In this patch, both functions are changed to return an error in case
    of uninitialized state instead of WARN_ON(), so that HD-audio driver
    can give up HDMI controller initialization at the right time.

    Acked-by: Daniel Vetter
    Cc: [3.15]
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Linus Torvalds
     
  • Pull networking fixes from David Miller:

    1) Fix checksumming regressions, from Tom Herbert.

    2) Undo unintentional permissions changes for SCTP rto_alpha and
    rto_beta sysfs knobs, from Denial Borkmann.

    3) VXLAN, like other IP tunnels, should advertize it's encapsulation
    size using dev->needed_headroom instead of dev->hard_header_len.
    From Cong Wang.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
    net: sctp: fix permissions for rto_alpha and rto_beta knobs
    vxlan: Checksum fixes
    net: add skb_pop_rcv_encapsulation
    udp: call __skb_checksum_complete when doing full checksum
    net: Fix save software checksum complete
    net: Fix GSO constants to match NETIF flags
    udp: ipv4: do not waste time in __udp4_lib_mcast_demux_lookup
    vxlan: use dev->needed_headroom instead of dev->hard_header_len
    MAINTAINERS: update cxgb4 maintainer

    Linus Torvalds
     
  • Pull more clock framework updates from Mike Turquette:
    "This contains the second half the of the clk changes for 3.16.

    They are simply fixes and code refactoring for the OMAP clock drivers.
    The sunxi clock driver changes include splitting out the one
    mega-driver into several smaller pieces and adding support for the A31
    SoC clocks"

    * tag 'clk-for-linus-3.16-part2' of git://git.linaro.org/people/mike.turquette/linux: (25 commits)
    clk: sunxi: document PRCM clock compatible strings
    clk: sunxi: add PRCM (Power/Reset/Clock Management) clks support
    clk: sun6i: Protect SDRAM gating bit
    clk: sun6i: Protect CPU clock
    clk: sunxi: Rework clock protection code
    clk: sunxi: Move the GMAC clock to a file of its own
    clk: sunxi: Move the 24M oscillator to a file of its own
    clk: sunxi: Remove calls to clk_put
    clk: sunxi: document new A31 USB clock compatible
    clk: sunxi: Implement A31 USB clock
    ARM: dts: OMAP5/DRA7: use omap5-mpu-dpll-clock capable of dealing with higher frequencies
    CLK: TI: dpll: support OMAP5 MPU DPLL that need special handling for higher frequencies
    ARM: OMAP5+: dpll: support Duty Cycle Correction(DCC)
    CLK: TI: clk-54xx: Set the rate for dpll_abe_m2x2_ck
    CLK: TI: Driver for DRA7 ATL (Audio Tracking Logic)
    dt:/bindings: DRA7 ATL (Audio Tracking Logic) clock bindings
    ARM: dts: dra7xx-clocks: Correct name for atl clkin3 clock
    CLK: TI: gate: add composite interface clock to OMAP2 only build
    ARM: OMAP2: clock: add DT boot support for cpufreq_ck
    CLK: TI: OMAP2: add clock init support
    ...

    Linus Torvalds
     
  • Pull NVMe update from Matthew Wilcox:
    "Mostly bugfixes again for the NVMe driver. I'd like to call out the
    exported tracepoint in the block layer; I believe Keith has cleared
    this with Jens.

    We've had a few reports from people who're really pounding on NVMe
    devices at scale, hence the timeout changes (and new module
    parameters), hotplug cpu deadlock, tracepoints, and minor performance
    tweaks"

    [ Jens hadn't seen that tracepoint thing, but is ok with it - it will
    end up going away when mq conversion happens ]

    * git://git.infradead.org/users/willy/linux-nvme: (22 commits)
    NVMe: Fix START_STOP_UNIT Scsi->NVMe translation.
    NVMe: Use Log Page constants in SCSI emulation
    NVMe: Define Log Page constants
    NVMe: Fix hot cpu notification dead lock
    NVMe: Rename io_timeout to nvme_io_timeout
    NVMe: Use last bytes of f/w rev SCSI Inquiry
    NVMe: Adhere to request queue block accounting enable/disable
    NVMe: Fix nvme get/put queue semantics
    NVMe: Delete NVME_GET_FEAT_TEMP_THRESH
    NVMe: Make admin timeout a module parameter
    NVMe: Make iod bio timeout a parameter
    NVMe: Prevent possible NULL pointer dereference
    NVMe: Fix the buffer size passed in GetLogPage(CDW10.NUMD)
    NVMe: Update data structures for NVMe 1.2
    NVMe: Enable BUILD_BUG_ON checks
    NVMe: Update namespace and controller identify structures to the 1.1a spec
    NVMe: Flush with data support
    NVMe: Configure support for block flush
    NVMe: Add tracepoints
    NVMe: Protect against badly formatted CQEs
    ...

    Linus Torvalds
     

15 Jun, 2014

15 commits

  • Commit 3fd091e73b81 ("[SCTP]: Remove multiple levels of msecs
    to jiffies conversions.") has silently changed permissions for
    rto_alpha and rto_beta knobs from 0644 to 0444. The purpose of
    this was to discourage users from tweaking rto_alpha and
    rto_beta knobs in production environments since they are key
    to correctly compute rtt/srtt.

    RFC4960 under section 6.3.1. RTO Calculation says regarding
    rto_alpha and rto_beta under rule C3 and C4:

    [...]
    C3) When a new RTT measurement R' is made, set

    RTTVAR
    Cc: Vlad Yasevich
    Signed-off-by: David S. Miller

    Daniel Borkmann
     
  • Tom Herbert says:

    ====================
    Fixes related to some recent checksum modifications.

    - Fix GSO constants to match NETIF flags
    - Fix logic in saving checksum complete in __skb_checksum_complete
    - Call __skb_checksum_complete from UDP if we are checksumming over
    whole packet in order to save checksum.
    - Fixes to VXLAN to work correctly with checksum complete
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Call skb_pop_rcv_encapsulation and postpull_rcsum for the Ethernet
    header to work properly with checksum complete.

    Signed-off-by: Tom Herbert
    Signed-off-by: David S. Miller

    Tom Herbert
     
  • This function is used by UDP encapsulation protocols in RX when
    crossing encapsulation boundary. If ip_summed is set to
    CHECKSUM_UNNECESSARY and encapsulation is not set, change to
    CHECKSUM_NONE since the checksum has not been validated within the
    encapsulation. Clears csum_valid by the same rationale.

    Signed-off-by: Tom Herbert
    Signed-off-by: David S. Miller

    Tom Herbert
     
  • In __udp_lib_checksum_complete check if checksum is being done over all
    the data (len is equal to skb->len) and if it is call
    __skb_checksum_complete instead of __skb_checksum_complete_head. This
    allows checksum to be saved in checksum complete.

    Signed-off-by: Tom Herbert
    Signed-off-by: David S. Miller

    Tom Herbert
     
  • Geert reported issues regarding checksum complete and UDP.
    The logic introduced in commit 7e3cead5172927732f51fde
    ("net: Save software checksum complete") is not correct.

    This patch:
    1) Restores code in __skb_checksum_complete_header except for setting
    CHECKSUM_UNNECESSARY. This function may be calculating checksum on
    something less than skb->len.
    2) Adds saving checksum to __skb_checksum_complete. The full packet
    checksum 0..skb->len is calculated without adding in pseudo header.
    This value is saved in skb->csum and then the pseudo header is added
    to that to derive the checksum for validation.
    3) In both __skb_checksum_complete_header and __skb_checksum_complete,
    set skb->csum_valid to whether checksum of zero was computed. This
    allows skb_csum_unnecessary to return true without changing to
    CHECKSUM_UNNECESSARY which was done previously.
    4) Copy new csum related bits in __copy_skb_header.

    Reported-by: Geert Uytterhoeven
    Signed-off-by: Tom Herbert
    Signed-off-by: David S. Miller

    Tom Herbert
     
  • Joseph Gasparakis reported that VXLAN GSO offload stopped working with
    i40e device after recent UDP changes. The problem is that the
    SKB_GSO_* bits are out of sync with the corresponding NETIF flags. This
    patch fixes that. Also, we add BUILD_BUG_ONs in net_gso_ok for several
    GSO constants that were missing to avoid the problem in the future.

    Reported-by: Joseph Gasparakis
    Signed-off-by: Tom Herbert
    Signed-off-by: David S. Miller

    Tom Herbert
     
  • Pull more SCSI updates from James Bottomley:
    "This is just a couple of drivers (hpsa and lpfc) that got left out for
    further testing in linux-next. We also have one fix to a prior
    submission (qla2xxx sparse)"

    * tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (36 commits)
    qla2xxx: fix sparse warnings introduced by previous target mode t10-dif patch
    lpfc: Update lpfc version to driver version 10.2.8001.0
    lpfc: Fix ExpressLane priority setup
    lpfc: mark old devices as obsolete
    lpfc: Fix for initializing RRQ bitmap
    lpfc: Fix for cleaning up stale ring flag and sp_queue_event entries
    lpfc: Update lpfc version to driver version 10.2.8000.0
    lpfc: Update Copyright on changed files from 8.3.45 patches
    lpfc: Update Copyright on changed files
    lpfc: Fixed locking for scsi task management commands
    lpfc: Convert runtime references to old xlane cfg param to fof cfg param
    lpfc: Fix FW dump using sysfs
    lpfc: Fix SLI4 s abort loop to process all FCP rings and under ring_lock
    lpfc: Fixed kernel panic in lpfc_abort_handler
    lpfc: Fix locking for postbufq when freeing
    lpfc: Fix locking for lpfc_hba_down_post
    lpfc: Fix dynamic transitions of FirstBurst from on to off
    hpsa: fix handling of hpsa_volume_offline return value
    hpsa: return -ENOMEM not -1 on kzalloc failure in hpsa_get_device_id
    hpsa: remove messages about volume status VPD inquiry page not supported
    ...

    Linus Torvalds
     
  • Pull more btrfs updates from Chris Mason:
    "This has a few fixes since our last pull and a new ioctl for doing
    btree searches from userland. It's very similar to the existing
    ioctl, but lets us return larger items back down to the app"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
    btrfs: fix error handling in create_pending_snapshot
    btrfs: fix use of uninit "ret" in end_extent_writepage()
    btrfs: free ulist in qgroup_shared_accounting() error path
    Btrfs: fix qgroups sanity test crash or hang
    btrfs: prevent RCU warning when dereferencing radix tree slot
    Btrfs: fix unfinished readahead thread for raid5/6 degraded mounting
    btrfs: new ioctl TREE_SEARCH_V2
    btrfs: tree_search, search_ioctl: direct copy to userspace
    btrfs: new function read_extent_buffer_to_user
    btrfs: tree_search, copy_to_sk: return needed size on EOVERFLOW
    btrfs: tree_search, copy_to_sk: return EOVERFLOW for too small buffer
    btrfs: tree_search, search_ioctl: accept varying buffer
    btrfs: tree_search: eliminate redundant nr_items check

    Linus Torvalds
     
  • Pull aio fix and cleanups from Ben LaHaise:
    "This consists of a couple of code cleanups plus a minor bug fix"

    * git://git.kvack.org/~bcrl/aio-next:
    aio: cleanup: flatten kill_ioctx()
    aio: report error from io_destroy() when threads race in io_destroy()
    fs/aio.c: Remove ctx parameter in kiocb_cancel

    Linus Torvalds
     
  • Tetsuo Handa wrote:
    "Commit 62a8067a7f35 ("bio_vec-backed iov_iter") introduced an unnamed
    union inside a struct which gcc-4.4.7 cannot handle. Name the unnamed
    union as u in order to fix build failure"

    Let's do this instead: there is only one place in the entire tree that
    steps into this breakage. Anon structs and unions work in older gcc
    versions; as the matter of fact, we have those in the tree - see e.g.
    struct ieee80211_tx_info in include/net/mac80211.h

    What doesn't work is handling their initializers:

    struct {
    int a;
    union {
    int b;
    char c;
    };
    } x[2] = {{.a = 1, .c = 'a'}, {.a = 0, .b = 1}};

    is the obvious syntax for initializer, perfectly fine for C11 and
    handled correctly by gcc-4.7 or later.

    Earlier versions, though, break on it - declaration is fine and so's
    access to fields (i.e. x[0].c = 'a'; would produce the right code), but
    members of the anon structs and unions are not inserted into the right
    namespace. Tellingly, those older versions will not barf on struct {int
    a; struct {int a;};}; - looks like they just have it hacked up somewhere
    around the handling of . and -> instead of doing the right thing.

    The easiest way to deal with that crap is to turn initialization of
    those fields (in the only place where we have such initializer of
    iov_iter) into plain assignment.

    Reported-by: Tetsuo Handa
    Reported-by: Russell King
    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Pull HSI build fixes from Sebastian Reichel:
    - tighten dependency between ssi-protocol and omap-ssi to fix build
    failures with randconfig.
    - use normal module refcounting in omap driver to fix build with
    disabled module support

    * tag 'hsi-for-3.16-fixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi:
    hsi: omap_ssi_port: use normal module refcounting
    HSI: fix omap ssi driver dependency

    Linus Torvalds
     
  • Pull GPIO fix from Linus Walleij:
    "A first GPIO fix for the v3.16 series, this was serious since it
    blocks the OMAP boot.

    Sending you this vital fix before leaving for a short vacation so it
    does not sit collecting dust in my tree for no good reason.

    Apart from this, our v3.16 cycle looks like a good start"

    * tag 'gpio-v3.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
    gpio: of: Fix handling for deferred probe for -gpio suffix

    Linus Torvalds
     
  • Pull x86 vdso fixes from Peter Anvin:
    "Fixes for x86/vdso.

    One is a simple build fix for bigendian hosts, one is to make "make
    vdso_install" work again, and the rest is about working around a bug
    in Google's Go language -- two are documentation patches that improves
    the sample code that the Go coders took, modified, and broke; the
    other two implements a workaround that keeps existing Go binaries from
    segfaulting at least"

    * 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/vdso: Fix vdso_install
    x86/vdso: Hack to keep 64-bit Go programs working
    x86/vdso: Add PUT_LE to store little-endian values
    x86/vdso/doc: Make vDSO examples more portable
    x86/vdso/doc: Rename vdso_test.c to vdso_standalone_test_x86.c
    x86, vdso: Remove one final use of htole16()

    Linus Torvalds
     
  • Pull hwmon updates from Guenter Roeck:
    - new driver for Sensirion SHTC1 humidity / temperature sensor
    - convert ltc4151 and vexpress drivers to use devm functions
    - drop generic chip detection from lm85 driver
    - avoid forward declarations in atxp1 driver
    - fix sign extensions in ina2xx driver

    * tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
    hwmon: vexpress: Use devm helper for hwmon device registration
    hwmon: (atxp1) Avoid forward declaration
    hwmon: add support for Sensirion SHTC1 sensor
    hwmon: (ltc4151) Convert to devm_hwmon_device_register_with_groups
    hwmon: (lm85) Drop generic detection
    hwmon: (ina2xx) Cast to s16 on shunt and current regs

    Linus Torvalds
     

14 Jun, 2014

6 commits

  • Its too easy to add thousand of UDP sockets on a particular bucket,
    and slow down an innocent multicast receiver.

    Early demux is supposed to be an optimization, we should avoid spending
    too much time in it.

    It is interesting to note __udp4_lib_demux_lookup() only tries to
    match first socket in the chain.

    10 is the threshold we already have in __udp4_lib_lookup() to switch
    to secondary hash.

    Fixes: 421b3885bf6d5 ("udp: ipv4: Add udp early demux")
    Signed-off-by: Eric Dumazet
    Reported-by: David Held
    Cc: Shawn Bohrer
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • When we mirror packets from a vxlan tunnel to other device,
    the mirror device should see the same packets (that is, without
    outer header). Because vxlan tunnel sets dev->hard_header_len,
    tcf_mirred() resets mac header back to outer mac, the mirror device
    actually sees packets with outer headers

    Vxlan tunnel should set dev->needed_headroom instead of
    dev->hard_header_len, like what other ip tunnels do. This fixes
    the above problem.

    Cc: "David S. Miller"
    Cc: stephen hemminger
    Cc: Pravin B Shelar
    Signed-off-by: Cong Wang
    Signed-off-by: Cong Wang
    Signed-off-by: David S. Miller

    Cong Wang
     
  • Hari's been doing the patch submissions for a while now and he'll be
    taking over as maintainer.

    Signed-off-by: Dimitris Michailidis
    Signed-off-by: David S. Miller

    Dimitris Michailidis
     
  • "make vdso_install" installs unstripped versions of the vdso objects
    for the benefit of the debugger. This was broken by checkin:

    6f121e548f83 x86, vdso: Reimplement vdso.so preparation in build-time C

    The filenames are different now, so update the Makefile to cope.

    This still installs the 64-bit vdso as vdso64.so. We believe this
    will be okay, as the only known user is a patched gdb which is known
    to use build-ids, but if it turns out to be a problem we may have to
    add a link.

    Inspired by a patch from Sam Ravnborg.

    Acked-by: Sam Ravnborg
    Reported-by: Josh Boyer
    Tested-by: Josh Boyer
    Signed-off-by: Andy Lutomirski
    Link: http://lkml.kernel.org/r/b10299edd8ba98d17e07dafcd895b8ecf4d99eff.1402586707.git.luto@amacapital.net
    Signed-off-by: H. Peter Anvin

    Andy Lutomirski
     
  • This patch contains several fixes for Scsi START_STOP_UNIT. The previous
    code did not account for signed vs. unsigned arithmetic which resulted
    in an invalid lowest power state caculation when the device only supports
    1 power state.

    The code for Power Condition == 2 (Idle) was not following the spec. The
    spec calls for setting the device to specific power states, depending
    upon Power Condition Modifier, without accounting for the number of
    power states supported by the device.

    The code for Power Condition == 3 (Standby) was using a hard-coded '0'
    which is replaced with the macro POWER_STATE_0.

    Signed-off-by: Dan McLeran
    Reviewed-by: Vishal Verma
    Signed-off-by: Matthew Wilcox

    Dan McLeran
     
  • fcebe456 cut and pasted some code to a later point
    in create_pending_snapshot(), but didn't switch
    to the appropriate error handling for this stage
    of the function.

    Signed-off-by: Eric Sandeen
    Signed-off-by: Chris Mason

    Eric Sandeen