19 Dec, 2013

1 commit

  • Commit 1b3a5d02ee07 ("reboot: move arch/x86 reboot= handling to generic
    kernel") moved reboot= handling to generic code. In the process it also
    removed the code in native_machine_shutdown() which are moving reboot
    process to reboot_cpu/cpu0.

    I guess that thought must have been that all reboot paths are calling
    migrate_to_reboot_cpu(), so we don't need this special handling. But
    kexec reboot path (kernel_kexec()) is not calling
    migrate_to_reboot_cpu() so above change broke kexec. Now reboot can
    happen on non-boot cpu and when INIT is sent in second kerneo to bring
    up BP, it brings down the machine.

    So start calling migrate_to_reboot_cpu() in kexec reboot path to avoid
    this problem.

    Bisected by WANG Chao.

    Reported-by: Matthew Whitehead
    Reported-by: Dave Young
    Signed-off-by: Vivek Goyal
    Tested-by: Baoquan He
    Tested-by: WANG Chao
    Acked-by: H. Peter Anvin
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vivek Goyal
     

18 Dec, 2013

1 commit


16 Dec, 2013

3 commits

  • Pull networking fixes from David Miller:

    1) Revert CHECKSUM_COMPLETE optimization in pskb_trim_rcsum(), I can't
    figure out why it breaks things.

    2) Fix comparison in netfilter ipset's hash_netnet4_data_equal(), it
    was basically doing "x == x", from Dave Jones.

    3) Freescale FEC driver was DMA mapping the wrong number of bytes, from
    Sebastian Siewior.

    4) Blackhole and prohibit routes in ipv6 were not doing the right thing
    because their ->input and ->output methods were not being assigned
    correctly. Now they behave properly like their ipv4 counterparts.
    From Kamala R.

    5) Several drivers advertise the NETIF_F_FRAGLIST capability, but
    really do not support this feature and will send garbage packets if
    fed fraglist SKBs. From Eric Dumazet.

    6) Fix long standing user triggerable BUG_ON over loopback in RDS
    protocol stack, from Venkat Venkatsubra.

    7) Several not so common code paths can potentially try to invoke
    packet scheduler actions that might be NULL without checking. Shore
    things up by either 1) defining a method as mandatory and erroring
    on registration if that method is NULL 2) defininig a method as
    optional and the registration function hooks up a default
    implementation when NULL is seen. From Jamal Hadi Salim.

    8) Fix fragment detection in xen-natback driver, from Paul Durrant.

    9) Kill dangling enter_memory_pressure method in cg_proto ops, from
    Eric W Biederman.

    10) SKBs that traverse namespaces should have their local_df cleared,
    from Hannes Frederic Sowa.

    11) IOCB file position is not being updated by macvtap_aio_read() and
    tun_chr_aio_read(). From Zhi Yong Wu.

    12) Don't free virtio_net netdev before releasing all of the NAPI
    instances. From Andrey Vagin.

    13) Procfs entry leak in xt_hashlimit, from Sergey Popovich.

    14) IPv6 routes that are no cached routes should not count against the
    garbage collection limits. We had this almost right, but were
    missing handling addrconf generated routes properly. From Hannes
    Frederic Sowa.

    15) fib{4,6}_rule_suppress() have to consider potentially seeing NULL
    route info when they are called, from Stefan Tomanek.

    16) TUN and MACVTAP have had truncated packet signalling for some time,
    fix from Jason Wang.

    17) Fix use after frrr in __udp4_lib_rcv(), from Eric Dumazet.

    18) xen-netback does not interpret the NAPI budget properly for TX work,
    fix from Paul Durrant.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (132 commits)
    igb: Fix for issue where values could be too high for udelay function.
    i40e: fix null dereference
    xen-netback: fix gso_prefix check
    net: make neigh_priv_len in struct net_device 16bit instead of 8bit
    drivers: net: cpsw: fix for cpsw crash when build as modules
    xen-netback: napi: don't prematurely request a tx event
    xen-netback: napi: fix abuse of budget
    sch_tbf: use do_div() for 64-bit divide
    udp: ipv4: must add synchronization in udp_sk_rx_dst_set()
    net:fec: remove duplicate lines in comment about errata ERR006358
    Revert "8390 : Replace ei_debug with msg_enable/NETIF_MSG_* feature"
    8390 : Replace ei_debug with msg_enable/NETIF_MSG_* feature
    xen-netback: make sure skb linear area covers checksum field
    net: smc91x: Fix device tree based configuration so it's usable
    udp: ipv4: fix potential use after free in udp_v4_early_demux()
    macvtap: signal truncated packets
    tun: unbreak truncated packet signalling
    net: sched: htb: fix the calculation of quantum
    net: sched: tbf: fix the calculation of max_size
    micrel: add support for KSZ8041RNLI
    ...

    Linus Torvalds
     
  • Pull x86 fixes from Peter Anvin:
    "This is a pretty small batch:

    The biggest single change is to stop using EFI time services on 32-bit
    platforms. This matches our current behavior on 64-bit platforms as
    we already had ruled them out there as being too unreliable. Turns
    out that affects 32-bit platforms, too.

    One NULL pointer fix for SGI UV.

    Two minor build fixes, one of which only affects icc and the other
    which affects icc and future versions or nonstandard default settings
    of gcc"

    * 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86, efi: Don't use (U)EFI time services on 32 bit
    x86, build, icc: Remove uninitialized_var() from compiler-intel.h
    x86/UV: Fix NULL pointer dereference in uv_flush_tlb_others() if the 'nobau' boot option is used
    x86, build: Pass in additional -mno-mmx, -mno-sse options

    Linus Torvalds
     
  • Pull PCI updates from Bjorn Helgaas:
    "PCI device hotplug
    - Move device_del() from pci_stop_dev() to pci_destroy_dev() (Rafael
    Wysocki)

    Host bridge drivers
    - Update maintainers for DesignWare, i.MX6, Armada, R-Car (Bjorn
    Helgaas)
    - mvebu: Return 'unsupported' for Interrupt Line and Interrupt Pin
    (Jason Gunthorpe)

    Miscellaneous
    - Avoid unnecessary CPU switch when calling .probe() (Alexander
    Duyck)
    - Revert "workqueue: allow work_on_cpu() to be called recursively"
    (Bjorn Helgaas)
    - Disable Bus Master only on kexec reboot (Khalid Aziz)
    - Omit PCI ID macro strings to shorten quirk names for LTO (Michal
    Marek)"

    * tag 'pci-v3.13-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
    MAINTAINERS: Add DesignWare, i.MX6, Armada, R-Car PCI host maintainers
    PCI: Disable Bus Master only on kexec reboot
    PCI: mvebu: Return 'unsupported' for Interrupt Line and Interrupt Pin
    PCI: Omit PCI ID macro strings to shorten quirk names
    PCI: Move device_del() from pci_stop_dev() to pci_destroy_dev()
    Revert "workqueue: allow work_on_cpu() to be called recursively"
    PCI: Avoid unnecessary CPU switch when calling driver .probe() method

    Linus Torvalds
     

13 Dec, 2013

10 commits

  • Merge patches from Andrew Morton:
    "13 fixes"

    * emailed patches from Andrew Morton :
    mm: memcg: do not allow task about to OOM kill to bypass the limit
    mm: memcg: fix race condition between memcg teardown and swapin
    thp: move preallocated PTE page table on move_huge_pmd()
    mfd/rtc: s5m: fix register updating by adding regmap for RTC
    rtc: s5m: enable IRQ wake during suspend
    rtc: s5m: limit endless loop waiting for register update
    rtc: s5m: fix unsuccesful IRQ request during probe
    drivers/rtc/rtc-s5m.c: fix info->rtc assignment
    include/linux/kernel.h: make might_fault() a nop for !MMU
    drivers/rtc/rtc-at91rm9200.c: correct alarm over day/month wrap
    procfs: also fix proc_reg_get_unmapped_area() for !MMU case
    mm: memcg: do not declare OOM from __GFP_NOFAIL allocations
    include/linux/hugetlb.h: make isolate_huge_page() an inline

    Linus Torvalds
     
  • Rename old regmap field of "struct sec_pmic_dev" to "regmap_pmic" and
    add new regmap for RTC.

    On S5M8767A registers were not properly updated and read due to usage of
    the same regmap as the PMIC. This could be observed in various hangs,
    e.g. in infinite loop during waiting for UDR field change.

    On this chip family the RTC has different I2C address than PMIC so
    additional regmap is needed.

    Signed-off-by: Krzysztof Kozlowski
    Signed-off-by: Kyungmin Park
    Reviewed-by: Mark Brown
    Acked-by: Sangbeom Kim
    Cc: Samuel Ortiz
    Cc: Lee Jones
    Cc: Liam Girdwood
    Cc: Alessandro Zummo
    Cc: Marek Szyprowski
    Cc: Geert Uytterhoeven
    Cc: Kyungmin Park
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Kozlowski
     
  • The machine cannot fault if !MUU, so make might_fault() a nop for !MMU.

    This fixes below build error if
    !CONFIG_MMU && (CONFIG_PROVE_LOCKING=y || CONFIG_DEBUG_ATOMIC_SLEEP=y):

    arch/arm/kernel/built-in.o: In function `arch_ptrace':
    arch/arm/kernel/ptrace.c:852: undefined reference to `might_fault'
    arch/arm/kernel/built-in.o: In function `restore_sigframe':
    arch/arm/kernel/signal.c:173: undefined reference to `might_fault'
    ...
    arch/arm/kernel/built-in.o:arch/arm/kernel/signal.c:177: more undefined references to `might_fault' follow
    make: *** [vmlinux] Error 1

    Signed-off-by: Axel Lin
    Acked-by: Michael S. Tsirkin
    Cc: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     
  • With CONFIG_HUGETLBFS=n:

    mm/migrate.c: In function `do_move_page_to_node_array':
    include/linux/hugetlb.h:140:33: warning: statement with no effect [-Wunused-value]
    #define isolate_huge_page(p, l) false
    ^
    mm/migrate.c:1170:4: note: in expansion of macro `isolate_huge_page'
    isolate_huge_page(page, &pagelist);

    Reported-by: Borislav Petkov
    Tested-by: Borislav Petkov
    Signed-off-by: Naoya Horiguchi
    Acked-by: David Rientjes
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Naoya Horiguchi
     
  • Pull sound fixes from Takashi Iwai:
    "Still a slightly high amount of changes than wished, but they are all
    good regression and/or device-specific fixes. Majority of commits are
    for HD-audio, an HDMI ctl index fix that hits old graphics boards,
    regression fixes for AD codecs and a few quirks.

    Other than that, two major fixes are included: a 64bit ABI fix for
    compress offload, and 64bit dma_addr_t truncation fix, which had hit
    on PAE kernels"

    * tag 'sound-3.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
    ALSA: hda - Add static DAC/pin mapping for AD1986A codec
    ALSA: hda - One more Dell headset detection quirk
    ALSA: hda - hdmi: Fix IEC958 ctl indexes for some simple HDMI devices
    ALSA: hda - Mute all aamix inputs as default
    ALSA: compress: Fix 64bit ABI incompatibility
    ALSA: memalloc.h - fix wrong truncation of dma_addr_t
    ALSA: hda - Another Dell headset detection quirk
    ALSA: hda - A Dell headset detection quirk
    ALSA: hda - Remove quirk for Dell Vostro 131
    ALSA: usb-audio: fix uninitialized variable compile warning
    ALSA: hda - fix mic issues on Acer Aspire E-572

    Linus Torvalds
     
  • neigh_priv_len is defined as u8. With all debug enabled struct
    ipoib_neigh has 200 bytes. The largest part is sk_buff_head with 96
    bytes and here the spinlock with 72 bytes.
    The size value still fits in this u8 leaving some room for more.

    On -RT struct ipoib_neigh put on weight and has 392 bytes. The main
    reason is sk_buff_head with 288 and the fatty here is spinlock with 192
    bytes. This does no longer fit into into neigh_priv_len and gcc
    complains.

    This patch changes neigh_priv_len from being 8bit to 16bit. Since the
    following element (dev_id) is 16bit followed by a spinlock which is
    aligned, the struct remains with a total size of 3200 (allmodconfig) /
    2048 (with as much debug off as possible) bytes on x86-64.
    On x86-32 the struct is 1856 (allmodconfig) / 1216 (with as much debug
    off as possible) bytes long. The numbers were gained with and without
    the patch to prove that this change does not increase the size of the
    struct.

    Cc: Steven Rostedt
    Cc: Thomas Gleixner
    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: David S. Miller

    Sebastian Siewior
     
  • Pull media fixes from Mauro Carvalho Chehab:
    "A dvb core deadlock fix, a couple videobuf2 fixes an a series of media
    driver fixes"

    * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (30 commits)
    [media] videobuf2-dma-sg: fix possible memory leak
    [media] vb2: regression fix: always set length field.
    [media] mt9p031: Include linux/of.h header
    [media] rtl2830: add parent for I2C adapter
    [media] media: marvell-ccic: use devm to release clk
    [media] ths7303: Declare as static a private function
    [media] em28xx-video: Swap release order to avoid lock nesting
    [media] usbtv: Add support for PAL video source
    [media] media_tree: Fix spelling errors
    [media] videobuf2: Add support for file access mode flags for DMABUF exporting
    [media] radio-shark2: Mark shark_resume_leds() inline to kill compiler warning
    [media] radio-shark: Mark shark_resume_leds() inline to kill compiler warning
    [media] af9035: unlock on error in af9035_i2c_master_xfer()
    [media] af9033: fix broken I2C
    [media] v4l: omap3isp: Don't check for missing get_fmt op on remote subdev
    [media] af9035: fix broken I2C and USB I/O
    [media] wm8775: fix broken audio routing
    [media] marvell-ccic: drop resource free in driver remove
    [media] tef6862/radio-tea5764: actually assign clamp result
    [media] cx231xx: use after free on error path in probe
    ...

    Linus Torvalds
     
  • Whilst architectures may be able to do better than this (which they can,
    by simply defining their own macro), this is a generic stab at a
    zero_bytemask implementation for the asm-generic, big-endian
    word-at-a-time implementation.

    On arm64, a clz instruction is used to implement the fls efficiently.

    Signed-off-by: Will Deacon
    Signed-off-by: Linus Torvalds

    Will Deacon
     
  • When explicitly hashing the end of a string with the word-at-a-time
    interface, we have to be careful which end of the word we pick up.

    On big-endian CPUs, the upper-bits will contain the data we're after, so
    ensure we generate our masks accordingly (and avoid hashing whatever
    random junk may have been sitting after the string).

    This patch adds a new dcache helper, bytemask_from_count, which creates
    a mask appropriate for the CPU endianness.

    Cc: Al Viro
    Signed-off-by: Will Deacon
    Signed-off-by: Linus Torvalds

    Will Deacon
     
  • Pull misc keyrings fixes from David Howells:
    "These break down into five sets:

    - A patch to error handling in the big_key type for huge payloads.
    If the payload is larger than the "low limit" and the backing store
    allocation fails, then big_key_instantiate() doesn't clear the
    payload pointers in the key, assuming them to have been previously
    cleared - but only one of them is.

    Unfortunately, the garbage collector still calls big_key_destroy()
    when sees one of the pointers with a weird value in it (and not
    NULL) which it then tries to clean up.

    - Three patches to fix the keyring type:

    * A patch to fix the hash function to correctly divide keyrings off
    from keys in the topology of the tree inside the associative
    array. This is only a problem if searching through nested
    keyrings - and only if the hash function incorrectly puts the a
    keyring outside of the 0 branch of the root node.

    * A patch to fix keyrings' use of the associative array. The
    __key_link_begin() function initially passes a NULL key pointer
    to assoc_array_insert() on the basis that it's holding a place in
    the tree whilst it does more allocation and stuff.

    This is only a problem when a node contains 16 keys that match at
    that level and we want to add an also matching 17th. This should
    easily be manufactured with a keyring full of keyrings (without
    chucking any other sort of key into the mix) - except for (a)
    above which makes it on average adding the 65th keyring.

    * A patch to fix searching down through nested keyrings, where any
    keyring in the set has more than 16 keyrings and none of the
    first keyrings we look through has a match (before the tree
    iteration needs to step to a more distal node).

    Test in keyutils test suite:

    http://git.kernel.org/cgit/linux/kernel/git/dhowells/keyutils.git/commit/?id=8b4ae963ed92523aea18dfbb8cab3f4979e13bd1

    - A patch to fix the big_key type's use of a shmem file as its
    backing store causing audit messages and LSM check failures. This
    is done by setting S_PRIVATE on the file to avoid LSM checks on the
    file (access to the shmem file goes through the keyctl() interface
    and so is gated by the LSM that way).

    This isn't normally a problem if a key is used by the context that
    generated it - and it's currently only used by libkrb5.

    Test in keyutils test suite:

    http://git.kernel.org/cgit/linux/kernel/git/dhowells/keyutils.git/commit/?id=d9a53cbab42c293962f2f78f7190253fc73bd32e

    - A patch to add a generated file to .gitignore.

    - A patch to fix the alignment of the system certificate data such
    that it it works on s390. As I understand it, on the S390 arch,
    symbols must be 2-byte aligned because loading the address discards
    the least-significant bit"

    * tag 'keys-devel-20131210' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs:
    KEYS: correct alignment of system_certificate_list content in assembly file
    Ignore generated file kernel/x509_certificate_list
    security: shmem: implement kernel private shmem inodes
    KEYS: Fix searching of nested keyrings
    KEYS: Fix multiple key add into associative array
    KEYS: Fix the keyring hash function
    KEYS: Pre-clear struct key on allocation

    Linus Torvalds
     

12 Dec, 2013

1 commit

  • Renesas R-Car development boards use KSZ8041RNLI PHY which for some reason has
    ID of 0x00221537 that is not documented for KSZ8041-family PHYs and does not
    match the documented ID of 0x0022151x (where 'x' is the revision). We have
    to add the new #define PHY_ID_* and new ksphy_driver[] entry, almost the same
    as KSZ8041 one, differing only in the 'phy_id' and 'name' fields.

    Signed-off-by: Sergei Shtylyov
    Tested-by: Geert Uytterhoeven
    Signed-off-by: David S. Miller

    Sergei Shtylyov
     

11 Dec, 2013

6 commits

  • Christian suffers from a bad BIOS that wrecks his i5's TSC sync. This
    results in him occasionally seeing time going backwards - which
    crashes the scheduler ...

    Most of our time accounting can actually handle that except the most
    common one; the tick time update of sched_fair.

    There is a further problem with that code; previously we assumed that
    because we get a tick every TICK_NSEC our time delta could never
    exceed 32bits and math was simpler.

    However, ever since Frederic managed to get NO_HZ_FULL merged; this is
    no longer the case since now a task can run for a long time indeed
    without getting a tick. It only takes about ~4.2 seconds to overflow
    our u32 in nanoseconds.

    This means we not only need to better deal with time going backwards;
    but also means we need to be able to deal with large deltas.

    This patch reworks the entire code and uses mul_u64_u32_shr() as
    proposed by Andy a long while ago.

    We express our virtual time scale factor in a u32 multiplier and shift
    right and the 32bit mul_u64_u32_shr() implementation reduces to a
    single 32x32->64 multiply if the time delta is still short (common
    case).

    For 64bit a 64x64->128 multiply can be used if ARCH_SUPPORTS_INT128.

    Reported-and-Tested-by: Christian Engelmayer
    Signed-off-by: Peter Zijlstra
    Cc: fweisbec@gmail.com
    Cc: Paul Turner
    Cc: Stanislaw Gruszka
    Cc: Andy Lutomirski
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Link: http://lkml.kernel.org/r/20131118172706.GI3866@twins.programming.kicks-ass.net
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Introduce mul_u64_u32_shr() as proposed by Andy a while back; it
    allows using 64x64->128 muls on 64bit archs and recent GCC
    which defines __SIZEOF_INT128__ and __int128.

    (This new method will be used by the scheduler.)

    Signed-off-by: Peter Zijlstra
    Cc: fweisbec@gmail.com
    Cc: Andy Lutomirski
    Cc: Linus Torvalds
    Link: http://lkml.kernel.org/n/tip-hxjoeuzmrcaumR0uZwjpe2pv@git.kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • While hunting a preemption issue with Alexander, Ben noticed that the
    currently generic PREEMPT_NEED_RESCHED stuff is horribly broken for
    load-store architectures.

    We currently rely on the IPI to fold TIF_NEED_RESCHED into
    PREEMPT_NEED_RESCHED, but when this IPI lands while we already have
    a load for the preempt-count but before the store, the store will erase
    the PREEMPT_NEED_RESCHED change.

    The current preempt-count only works on load-store archs because
    interrupts are assumed to be completely balanced wrt their preempt_count
    fiddling; the previous preempt_count load will match the preempt_count
    state after the interrupt and therefore nothing gets lost.

    This patch removes the PREEMPT_NEED_RESCHED usage from generic code and
    pushes it into x86 arch code; the generic code goes back to relying on
    TIF_NEED_RESCHED.

    Boot tested on x86_64 and compile tested on ppc64.

    Reported-by: Benjamin Herrenschmidt
    Reported-and-Tested-by: Alexander Graf
    Signed-off-by: Peter Zijlstra
    Cc: Linus Torvalds
    Link: http://lkml.kernel.org/r/20131128132641.GP10022@twins.programming.kicks-ass.net
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Currently, sctp associations latch a sockets autoclose value to an association
    at association init time, subject to capping constraints from the max_autoclose
    sysctl value. This leads to an odd situation where an application may set a
    socket level autoclose timeout, but sliently sctp will limit the autoclose
    timeout to something less than that.

    Fix this by modifying the autoclose setsockopt function to check the limit, cap
    it and warn the user via syslog that the timeout is capped. This will allow
    getsockopt to return valid autoclose timeout values that reflect what subsequent
    associations actually use.

    While were at it, also elimintate the assoc->autoclose variable, it duplicates
    whats in the timeout array, which leads to multiple sources for the same
    information, that may differ (as the former isn't subject to any capping). This
    gives us the timeout information in a canonical place and saves some space in
    the association structure as well.

    Signed-off-by: Neil Horman
    Acked-by: Vlad Yasevich
    CC: Wang Weidong
    CC: David Miller
    CC: Vlad Yasevich
    CC: netdev@vger.kernel.org
    Signed-off-by: David S. Miller

    Neil Horman
     
  • unix_dgram_recvmsg() will hold the readlock of the socket until recv
    is complete.

    In the same time, we may try to setsockopt(SO_PEEK_OFF) which will hang until
    unix_dgram_recvmsg() will complete (which can take a while) without allowing
    us to break out of it, triggering a hung task spew.

    Instead, allow set_peek_off to fail, this way userspace will not hang.

    Signed-off-by: Sasha Levin
    Acked-by: Pavel Emelyanov
    Signed-off-by: David S. Miller

    Sasha Levin
     
  • When compiling with icc, ends up included
    because the icc environment defines __GNUC__. Thus, we neither need
    nor want to have this macro defined in both compiler-gcc.h and
    compiler-intel.h, and the fact that they are inconsistent just makes
    the compiler spew warnings.

    Reported-by: Sunil K. Pandey
    Cc: Kevin B. Smith
    Signed-off-by: H. Peter Anvin
    Link: http://lkml.kernel.org/n/tip-0mbwou1zt7pafij09b897lg3@git.kernel.org
    Cc:

    H. Peter Anvin
     

10 Dec, 2013

6 commits

  • snd_pcm_uframes_t is defined as unsigned long so it would take
    different sizes depending on 32 or 64bit architectures. As we don't
    want this ABI incompatibility, and there is no real 64bit user yet,
    let's make it the fixed size with __u32.

    Also bump the protocol version number to 0.1.2.

    Acked-by: Vinod Koul
    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • When running a 32bit kernel the hda_intel driver is still reporting
    a 64bit dma_mask if the HW supports it.

    From sound/pci/hda/hda_intel.c:

    /* allow 64bit DMA address if supported by H/W */
    if ((gcap & ICH6_GCAP_64OK) && !pci_set_dma_mask(pci, DMA_BIT_MASK(64)))
    pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(64));
    else {
    pci_set_dma_mask(pci, DMA_BIT_MASK(32));
    pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32));
    }

    which means when there is a call to dma_alloc_coherent from
    snd_malloc_dev_pages a machine address bigger than 32bit can be returned.
    This can be true in particular if running the 32bit kernel as a pv dom0
    under the Xen Hypervisor or PAE on bare metal.

    The problem is that when calling setup_bdle to program the BLE the
    dma_addr_t returned from the dma_alloc_coherent is wrongly truncated
    from snd_sgbuf_get_addr if running a 32bit kernel:

    static inline dma_addr_t snd_sgbuf_get_addr(struct snd_dma_buffer *dmab,
    size_t offset)
    {
    struct snd_sg_buf *sgbuf = dmab->private_data;
    dma_addr_t addr = sgbuf->table[offset >> PAGE_SHIFT].addr;
    addr &= PAGE_MASK;
    return addr + offset % PAGE_SIZE;
    }

    where PAGE_MASK in a 32bit kernel is zeroing the upper 32bit af addr.

    Without this patch the HW will fetch the 32bit truncated address,
    which is not the one obtained from dma_alloc_coherent and will result
    to a non working audio but can corrupt host memory at a random location.

    The current patch apply to v3.13-rc3-74-g6c843f5

    Signed-off-by: Stefano Panella
    Reviewed-by: Frediano Ziglio
    Cc:
    Signed-off-by: Takashi Iwai

    Stefano Panella
     
  • Pull power management fixup from Rafael Wysocki:
    "This reverts two cpufreq commits that fixed issues for some people,
    but broke things for others, so revert them and we'll need to fix the
    original problems differently"

    * tag 'pm-3.13-rc3-fixup' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    Revert "cpufreq: fix garbage kobjects on errors during suspend/resume"
    Revert "cpufreq: suspend governors on system suspend/hibernate"

    Linus Torvalds
     
  • Pull input updates from Dmitry Torokhov:
    "An update to ALPS to support devices on Dell XT2 (hopefully working
    better this time around and although it is largish it should not
    affect any other ALPS devices) and a tiny update to Elantech driver to
    support newer devices as well.

    Also a coupe of new input event codes have been defined"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: ALPS - add support for DualPoint device on Dell XT2 model
    Input: elantech - add support for newer (August 2013) devices
    Input: add SW_MUTE_DEVICE switch definition
    Input: usbtouchscreen - separate report and transmit buffer size handling
    Input: sur40 - suppress false uninitialized variable warning
    Input: add key code for ambient light sensor button
    Input: keyboard - "keycode & KEY_MAX" changes some keycode values

    Linus Torvalds
     
  • Pull crypto fix from Herbert Xu:
    "Unfortunately the last push that fixed a crash in the crypto
    scatterwalk code introduced a new crash when SG debugging is enabled.
    This fixes that"

    * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
    crypto: scatterwalk - Use sg_chain_ptr on chain entries

    Linus Torvalds
     
  • Currently it is not possible for userspace to map a DMABUF exported buffer
    with write permissions. This patch allows to also pass O_RDONLY/O_RDWR when
    exporting the buffer, so that userspace may map it with write permissions.

    Signed-off-by: Philipp Zabel
    Signed-off-by: Sylwester Nawrocki
    Signed-off-by: Mauro Carvalho Chehab

    Philipp Zabel
     

09 Dec, 2013

4 commits

  • Now that scatterwalk_sg_chain sets the chain pointer bit the sg_page
    call in scatterwalk_sg_next hits a BUG_ON when CONFIG_DEBUG_SG is
    enabled. Use sg_chain_ptr instead of sg_page on a chain entry.

    Cc: stable@vger.kernel.org
    Signed-off-by: Tom Lendacky
    Signed-off-by: Herbert Xu

    Tom Lendacky
     
  • Pull staging driver fixes from Greg KH:
    "Here are some bugfixes for the staging and IIO drivers for 3.13-rc3.

    The resolve the vm memory issue in the tidspbridge driver, fix a
    much-reported build failure in an ARM driver, and some other IIO
    bugfixes that have been reported"

    * tag 'staging-3.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
    Staging: TIDSPBRIDGE: Use vm_iomap_memory for mmap-ing instead of remap_pfn_range
    Fix build failure for gp2ap020a00f.c
    iio: hid-sensors: Fix power and report state
    HID: hid-sensor-hub: Add logical min and max

    Linus Torvalds
     
  • Pull char/misc driver fixes from Greg KH:
    "Nothing huge, just a few small bugfixes for problems reported, and a
    device id update"

    * tag 'char-misc-3.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
    mei: add 9 series PCH mei device ids
    drivers/char/i8k.c: add Dell XPLS L421X
    MAINTAINERS: add HSI subsystem
    misc: mic: Suppress memory space sparse warnings
    misc: mic: Fix endianness issues.
    misc: mic: Fix user space namespace pollution from mic_common.h.
    misc: mic: Bug fix for sysfs poll usage.
    misc: mic: Minor bug fix in 'retry' loops.
    misc: mic: Change mic_notify(...) to return true.
    extcon: remove freed groups caused the panic or warning in unregister flow
    extcon: arizona: Get pdata from arizona structure not device

    Linus Torvalds
     
  • Pull USB fixes from Greg KH:
    "Here are a bunch of USB fixes for 3.13-rc3.

    Nothing major, but we seem to have an argument about a XHCI fix, so
    I'm not including a revert that Sarah requested, because that breaks a
    USB network driver, and I can't revert the USB network driver fix
    without reintroducing other bugs that it fixed. So as it is,
    everything should now be working. Worse case, I can revert the XHCI
    fix before 3.13-final is out, but it seems to work well here with my
    testing, so all should be good.

    Other than that, some driver updates based on reports"

    * tag 'usb-3.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (40 commits)
    usb: hub: Use correct reset for wedged USB3 devices that are NOTATTACHED
    usb: ohci-pxa27x: include linux/dma-mapping.h
    USB: cdc-acm: Added support for the Lenovo RD02-D400 USB Modem
    usb: tools: fix a regression issue that gcc can't link to pthread
    USB: switch maintainership of chipidea to Peter
    USB: pl2303: fixed handling of CS5 setting
    USB: ftdi_sio: fixed handling of unsupported CSIZE setting
    USB: mos7840: correct handling of CS5 setting
    USB: spcp8x5: correct handling of CS5 setting
    usb: wusbcore: fix deadlock in wusbhc_gtk_rekey
    usb: wusbcore: do device lookup while holding the hc mutex
    usb: wusbcore: send keepalives to unauthenticated devices
    USB: option: support new huawei devices
    USB: serial: option: blacklist interface 1 for Huawei E173s-6
    usb: xhci: Link TRB must not occur within a USB payload burst
    usb: gadget: f_mass_storage: call try_to_freeze only when its safe
    usb: gadget: tcm_usb_gadget: mark bot_cleanup_old_alt static
    usb: gadget: ffs: fix sparse warning
    usb: gadget: zero: module parameters can be static
    usb: gadget: storage: fix sparse warning
    ...

    Linus Torvalds
     

08 Dec, 2013

2 commits

  • Commit 5a87182aa21d (cpufreq: suspend governors on system
    suspend/hibernate) causes hibernation problems to happen on
    Bjørn Mork's and Paul Bolle's systems, so revert it.

    Fixes: 5a87182aa21d (cpufreq: suspend governors on system suspend/hibernate)
    Reported-by: Bjørn Mork
    Reported-by: Paul Bolle
    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     
  • Add a flag to tell the PCI subsystem that kernel is shutting down in
    preparation to kexec a kernel. Add code in PCI subsystem to use this flag
    to clear Bus Master bit on PCI devices only in case of kexec reboot.

    This fixes a power-off problem on Acer Aspire V5-573G and likely other
    machines and avoids any other issues caused by clearing Bus Master bit on
    PCI devices in normal shutdown path. The problem was introduced by
    b566a22c2332 ("PCI: disable Bus Master on PCI device shutdown").

    This patch is based on discussion at
    http://marc.info/?l=linux-pci&m=138425645204355&w=2

    Link: https://bugzilla.kernel.org/show_bug.cgi?id=63861
    Reported-by: Chang Liu
    Signed-off-by: Khalid Aziz
    Signed-off-by: Bjorn Helgaas
    Acked-by: Konstantin Khlebnikov
    Cc: stable@vger.kernel.org # v3.5+

    Khalid Aziz
     

07 Dec, 2013

1 commit

  • Pull SCSI fixes from James Bottomley:
    "This is a set of nine fixes (and one author update).

    The libsas one should fix discovery in eSATA devices, the WRITE_SAME
    one is the largest, but it should fix a lot of problems we've been
    getting with the emulated RAID devices (they've been effectively lying
    about support and then firmware has been choking on the commands).

    The rest are various crash, hang or warn driver fixes"

    * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
    [SCSI] bfa: Fix crash when symb name set for offline vport
    [SCSI] enclosure: fix WARN_ON in dual path device removing
    [SCSI] pm80xx: Tasklets synchronization fix.
    [SCSI] pm80xx: Resetting the phy state.
    [SCSI] pm80xx: Fix for direct attached device.
    [SCSI] pm80xx: Module author addition
    [SCSI] hpsa: return 0 from driver probe function on success, not 1
    [SCSI] hpsa: do not discard scsi status on aborted commands
    [SCSI] Disable WRITE SAME for RAID and virtual host adapter drivers
    [SCSI] libsas: fix usage of ata_tf_to_fis

    Linus Torvalds
     

06 Dec, 2013

5 commits

  • Pull power management fixes from Rafael Wysocki:

    - cpufreq regression fix from Bjørn Mork restoring the pre-3.12
    behavior of the framework during system suspend/hibernation to avoid
    garbage sysfs files from being left behind in case of a suspend error

    - PNP regression fix to restore the correct states of devices after
    resume from hibernation broken in 3.12. From Dmitry Torokhov.

    - cpuidle fix to prevent cpuidle device unregistration from crashing
    due to a NULL pointer dereference if cpuidle has been disabled from
    the kernel command line. From Konrad Rzeszutek Wilk.

    - intel_idle fix for the C6 state definition on Intel Avoton/Rangeley
    processors from Arne Bockholdt.

    - Power capping framework fix to make the energy_uj sysfs attribute
    work in accordance with the documentation. From Srinivas Pandruvada.

    - epoll fix to make it ignore the EPOLLWAKEUP flag if the kernel has
    been compiled with CONFIG_PM_SLEEP unset (in which case that flag
    should not have any effect). From Amit Pundir.

    - cpufreq fix to prevent governor sysfs files from being lost over
    system suspend/resume in some (arguably unusual) situations. From
    Viresh Kumar.

    * tag 'pm-3.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    PowerCap: Fix mode for energy counter
    PNP: fix restoring devices after hibernation
    cpuidle: Check for dev before deregistering it.
    epoll: drop EPOLLWAKEUP if PM_SLEEP is disabled
    cpufreq: fix garbage kobjects on errors during suspend/resume
    cpufreq: suspend governors on system suspend/hibernate
    intel_idle: Fixed C6 state on Avoton/Rangeley processors

    Linus Torvalds
     
  • kill memcg_tcp_enter_memory_pressure. The only function of
    memcg_tcp_enter_memory_pressure was to reduce deal with the
    unnecessary abstraction that was tcp_memcontrol. Now that struct
    tcp_memcontrol is gone remove this unnecessary function, the
    unnecessary function pointer, and modify sk_enter_memory_pressure to
    set this field directly, just as sk_leave_memory_pressure cleas this
    field directly.

    This fixes a small bug I intruduced when killing struct tcp_memcontrol
    that caused memcg_tcp_enter_memory_pressure to never be called and
    thus failed to ever set cg_proto->memory_pressure.

    Remove the cg_proto enter_memory_pressure function as it now serves
    no useful purpose.

    Don't test cg_proto->memory_presser in sk_leave_memory_pressure before
    clearing it. The test was originally there to ensure that the pointer
    was non-NULL. Now that cg_proto is not a pointer the pointer does not
    matter.

    Signed-off-by: "Eric W. Biederman"
    Signed-off-by: David S. Miller

    Eric W. Biederman
     
  • The code to detect fragments in checksum_setup() was missing for IPv4 and
    too eager for IPv6. (It transpires that Windows seems to send IPv6 packets
    with a fragment header even if they are not a fragment - i.e. offset is zero,
    and M bit is not set).

    This patch also incorporates a fix to callers of maybe_pull_tail() where
    skb->network_header was being erroneously added to the length argument.

    Signed-off-by: Paul Durrant
    Signed-off-by: Zoltan Kiss
    Cc: Wei Liu
    Cc: Ian Campbell
    Cc: David Vrabel
    cc: David Miller
    Acked-by: Wei Liu
    Signed-off-by: David S. Miller

    Paul Durrant
     
  • * pm-epoll:
    epoll: drop EPOLLWAKEUP if PM_SLEEP is disabled

    * pnp:
    PNP: fix restoring devices after hibernation

    * powercap:
    PowerCap: Fix mode for energy counter

    Rafael J. Wysocki
     
  • * pm-cpuidle:
    cpuidle: Check for dev before deregistering it.
    intel_idle: Fixed C6 state on Avoton/Rangeley processors

    * pm-cpufreq:
    cpufreq: fix garbage kobjects on errors during suspend/resume
    cpufreq: suspend governors on system suspend/hibernate

    Rafael J. Wysocki