03 Apr, 2012

40 commits

  • Greg Kroah-Hartman
     
  • commit c9651e70ad0aa499814817cbf3cc1d0b806ed3a1 upstream.

    Since 3.2.12 and 3.3, some systems are failing to boot with a BUG_ON.
    Some other systems using the pata_jmicron driver fail to boot because no
    disks are detected. Passing pcie_aspm=force on the kernel command line
    works around it.

    The cause: commit 4949be16822e ("PCI: ignore pre-1.1 ASPM quirking when
    ASPM is disabled") changed the behaviour of pcie_aspm_sanity_check() to
    always return 0 if aspm is disabled, in order to avoid cases where we
    changed ASPM state on pre-PCIe 1.1 devices.

    This skipped the secondary function of pcie_aspm_sanity_check which was
    to avoid us enabling ASPM on devices that had non-PCIe children, causing
    trouble later on. Move the aspm_disabled check so we continue to honour
    that scenario.

    Addresses https://bugzilla.kernel.org/show_bug.cgi?id=42979 and
    http://bugs.debian.org/665420

    Reported-by: Romain Francoise # kernel panic
    Reported-by: Chris Holland # disk detection trouble
    Signed-off-by: Matthew Garrett
    Tested-by: Hatem Masmoudi # Dell Latitude E5520
    Tested-by: janek # pata_jmicron with JMB362/JMB363
    [jn: with more symptoms in log message]
    Signed-off-by: Jonathan Nieder
    Signed-off-by: Linus Torvalds
    Signed-off-by: Greg Kroah-Hartman

    Matthew Garrett
     
  • commit 49d4bcaddca977fffdea8b0b71f6e5da96dac78e upstream.

    When DMA is enabled, sh-sci transfer begins with
    uart_start()
    sci_start_tx()
    if (cookie_tx < 0) schedule_work()
    Then, starts DMA when wq scheduled, -- (A)
    process_one_work()
    work_fn_rx()
    cookie_tx = desc->submit_tx()
    And finishes when DMA transfer ends, -- (B)
    sci_dma_tx_complete()
    async_tx_ack()
    cookie_tx = -EINVAL
    (possible another schedule_work())

    This A to B sequence is not reentrant, since controlling variables
    (for example, cookie_tx above) are not queues nor lists. So, they
    must be invoked as A B A B..., otherwise results in kernel crash.

    To ensure the sequence, sci_start_tx() seems to test if cookie_tx < 0
    (represents "not used") to call schedule_work().
    But cookie_tx will not be set (to a cookie, also means "used") until
    in the middle of work queue scheduled function work_fn_tx().

    This gap between the test and set allows the breakage of the sequence
    under the very frequently call of uart_start().
    Another gap between async_tx_ack() and another schedule_work() results
    in the same issue, too.

    This patch introduces a new condition "cookie_tx == 0" just to mark
    it is "busy" and assign it within spin-locked region to fill the gaps.

    Signed-off-by: Takashi Yoshii
    Reviewed-by: Guennadi Liakhovetski
    Signed-off-by: Paul Mundt
    Signed-off-by: Greg Kroah-Hartman

    Yoshii Takashi
     
  • commit 8c3ec84102d171a24f050a086bfc546e9de93f9f upstream.

    Commit 4a53f4e "USB: ehci-tegra: add probing through device tree" added
    AUXDATA for Tegra's USB/EHCI controller. However, it pointed the platform
    data at a location containing the address of the intended platform data,
    rather than the platform data itself. This change fixes that.

    Signed-off-by: Stephen Warren
    Signed-off-by: Greg Kroah-Hartman

    Stephen Warren
     
  • commit 6d8d17499810479eabd10731179c04b2ca22152f upstream.

    There is no point in passing a zero length string here and quite a
    few of that cache_parse() implementations will Oops if count is
    zero.

    Signed-off-by: Dan Carpenter
    Signed-off-by: J. Bruce Fields
    Signed-off-by: Greg Kroah-Hartman

    Dan Carpenter
     
  • commit 4a649903f91232d02284d53724b0a45728111767 upstream.

    Richard Weinberger noticed that on some RTC hardware that
    doesn't support UIE mode, due to coarse granular alarms
    (like 1minute resolution), the current virtualized RTC
    support doesn't properly error out when UIE is enabled.

    Instead the current code queues an alarm for the next second,
    but it won't fire until up to a miniute later.

    This patch provides a generic way to flag this sort of hardware
    and fixes the issue on the mpc5121 where Richard noticed the
    problem.

    Reported-by: Richard Weinberger
    Tested-by: Richard Weinberger
    Signed-off-by: John Stultz
    Signed-off-by: Greg Kroah-Hartman

    John Stultz
     
  • commit 1631fcea8399da5e80a80084b3b8c5bfd99d21e7 upstream.

    was set up to use sys_sendfile() for the 32-bit
    compat API instead of sys_sendfile64(), but in fact the right thing to
    do is to use sys_sendfile64() in all cases. The 32-bit sendfile64() API
    in glibc uses the sendfile64 syscall, so it has to be capable of doing
    full 64-bit operations. But the sys_sendfile() kernel implementation
    has a MAX_NON_LFS test in it which explicitly limits the offset to 2^32.
    So, we need to use the sys_sendfile64() implementation in the kernel
    for this case.

    Acked-by: Arnd Bergmann
    Signed-off-by: Chris Metcalf
    Signed-off-by: Greg Kroah-Hartman

    Chris Metcalf
     
  • commit 8f0750f19789cf352d7e24a6cc50f2ab1b4f1372 upstream.

    These are used as offsets into an array of GDT_ENTRY_TLS_ENTRIES members
    so GDT_ENTRY_TLS_ENTRIES is one past the end of the array.

    Signed-off-by: Dan Carpenter
    Link: http://lkml.kernel.org/r/20120324075250.GA28258@elgon.mountain
    Signed-off-by: H. Peter Anvin
    Signed-off-by: Greg Kroah-Hartman

    Dan Carpenter
     
  • commit 57779dc2b3b75bee05ef5d1ada47f615f7a13932 upstream.

    While running the latest Linux as guest under VMware in highly
    over-committed situations, we have seen cases when the refined TSC
    algorithm fails to get a valid tsc_start value in
    tsc_refine_calibration_work from multiple attempts. As a result the
    kernel keeps on scheduling the tsc_irqwork task for later. Subsequently
    after several attempts when it gets a valid start value it goes through
    the refined calibration and either bails out or uses the new results.
    Given that the kernel originally read the TSC frequency from the
    platform, which is the best it can get, I don't think there is much
    value in refining it.

    So for systems which get the TSC frequency from the platform we
    should skip the refined tsc algorithm.

    We can use the TSC_RELIABLE cpu cap flag to detect this, right now it is
    set only on VMware and for Moorestown Penwell both of which have there
    own TSC calibration methods.

    Signed-off-by: Alok N Kataria
    Cc: John Stultz
    Cc: Dirk Brandewie
    Cc: Alan Cox
    [jstultz: Reworked to simply not schedule the refining work,
    rather then scheduling the work and bombing out later]
    Signed-off-by: John Stultz
    Signed-off-by: Greg Kroah-Hartman

    Alok Kataria
     
  • commit de5b8e8e047534aac6bc9803f96e7257436aef9c upstream.

    If you try to set grace_period or timeout via a module parameter
    to lockd, and do this on a big-endian machine where

    sizeof(int) != sizeof(unsigned long)

    it won't work. This number given will be effectively shifted right
    by the difference in those two sizes.

    So cast kp->arg properly to get correct result.

    Signed-off-by: NeilBrown
    Signed-off-by: J. Bruce Fields
    Signed-off-by: Greg Kroah-Hartman

    NeilBrown
     
  • [ Upstream commit 94f826b8076e2cb92242061e92f21b5baa3eccc2 ]

    Commit f2c31e32b378 (net: fix NULL dereferences in check_peer_redir() )
    added a regression in rt6_fill_node(), leading to rcu_read_lock()
    imbalance.

    Thats because NLA_PUT() can make a jump to nla_put_failure label.

    Fix this by using nla_put()

    Many thanks to Ben Greear for his help

    Reported-by: Ben Greear
    Reported-by: Dave Jones
    Signed-off-by: Eric Dumazet
    Tested-by: Ben Greear
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Eric Dumazet
     
  • [ Upstream commit 1265fd616782ef03b98fd19f65c2b47fcd4ea11f ]

    We call the wrong replay notify function when we use ESN replay
    handling. This leads to the fact that we don't send notifications
    if we use ESN. Fix this by calling the registered callbacks instead
    of xfrm_replay_notify().

    Signed-off-by: Steffen Klassert
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Steffen Klassert
     
  • [ Upstream commit 5676cc7bfe1e388e87843f71daa229610385b41e ]

    Some BIOS's don't setup power management correctly (what else is
    new) and don't allow use of PCI Express power control. Add a special
    exception module parameter to allow working around this issue.
    Based on slightly different patch by Knut Petersen.

    Reported-by: Arkadiusz Miskiewicz
    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    stephen hemminger
     
  • [ Upstream commit 2a2a459eeeff48640dc557548ce576d666ab06ed ]

    napi->skb is allocated in napi_get_frags() using
    netdev_alloc_skb_ip_align(), with a reserve of NET_SKB_PAD +
    NET_IP_ALIGN bytes.

    However, when such skb is recycled in napi_reuse_skb(), it ends with a
    reserve of NET_IP_ALIGN which is suboptimal.

    Signed-off-by: Eric Dumazet
    Cc: Herbert Xu
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Eric Dumazet
     
  • [ Upstream commit bbdb32cb5b73597386913d052165423b9d736145 ]

    While testing L2TP functionality, I came across a bug in getsockname(). The
    IP address returned within the pppol2tp_addr's addr memember was not being
    set to the IP address in use. This bug is caused by using inet_sk() on the
    wrong socket (the L2TP socket rather than the underlying UDP socket), and was
    likely introduced during the addition of L2TPv3 support.

    Signed-off-by: Benjamin LaHaise
    Signed-off-by: James Chapman
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Benjamin LaHaise
     
  • [ Upstream commit a6506e1486181975d318344143aca722b2b91621 ]

    no socket layer outputs a message for this error and neither should rds.

    Signed-off-by: Dave Jones
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Dave Jones
     
  • [ Upstream commit 1f85851e17b64cabd089a8a8839dddebc627948c ]

    Since commit 299b0767(ipv6: Fix IPsec slowpath fragmentation problem)
    In func ip6_append_data,after call skb_put(skb, fraglen + dst_exthdrlen)
    the skb->len contains dst_exthdrlen,and we don't reduce dst_exthdrlen at last
    This will make fraggap>0 in next "while cycle",and cause the size of skb incorrent

    Fix this by reserve headroom for dst_exthdrlen.

    Signed-off-by: Gao feng
    Acked-by: Steffen Klassert
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Gao feng
     
  • [ Upstream commit dc72d99dabb870ca5bd6d9fff674be853bb4a88d ]

    Matt Evans spotted that x86 bpf_jit was incorrectly handling negative
    constant offsets in BPF_S_LDX_B_MSH instruction.

    We need to abort JIT compilation like we do in common_load so that
    filter uses the interpreter code and can call __load_pointer()

    Reference: http://lists.openwall.net/netdev/2011/07/19/11

    Thanks to Indan Zupancic to bring back this issue.

    Reported-by: Matt Evans
    Reported-by: Indan Zupancic
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Eric Dumazet
     
  • commit 3fa016a0b5c5237e9c387fc3249592b2cb5391c6 upstream.

    Looking at hibernate overwriting I though it looked like a cursor,
    so I tracked down this missing piece to stop the cursor blink
    timer. I've no idea if this is sufficient to fix the hibernate
    problems people are seeing, but please test it.

    Both radeon and nouveau have done this for a long time.

    I've run this personally all night hib/resume cycles with no fails.

    Reviewed-by: Keith Packard
    Reported-by: Petr Tesarik
    Reported-by: Stanislaw Gruszka
    Reported-by: Lots of misc segfaults after hibernate across the world.
    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=37142
    Tested-by: Dave Airlie
    Tested-by: Bojan Smojver
    Tested-by: Andreas Hartmann
    Signed-off-by: Dave Airlie
    Signed-off-by: Greg Kroah-Hartman

    Dave Airlie
     
  • commit f946eeb9313ff1470758e171a60fe7438a2ded3f upstream.

    Module size was limited to 64MB, this was legacy limitation due to vmalloc()
    which was removed a while ago.

    Limiting module size to 64MB is both pointless and affects real world use
    cases.

    Cc: Tim Abbott
    Signed-off-by: Sasha Levin
    Signed-off-by: Rusty Russell
    Signed-off-by: Greg Kroah-Hartman

    Sasha Levin
     
  • commit e59d27e05a6435f8c04d5ad843f37fa795f2eaaa upstream.

    Firstly, task->tk_status will always return negative error values,
    so the current tests for 'NFS4ERR_DELEG_REVOKED' etc. are all being
    ignored.
    Secondly, clean up the code so that we only need to test
    task->tk_status once!

    Signed-off-by: Trond Myklebust
    Signed-off-by: Greg Kroah-Hartman

    Trond Myklebust
     
  • commit 05e9cfb408b24debb3a85fd98edbfd09dd148881 upstream.

    We can currently loop forever in nfs4_lookup_root() and in
    nfs41_proc_secinfo_no_name(), if the first iteration returns a
    NFS4ERR_DELAY or something else that causes exception.retry to get
    set.

    Reported-by: Weston Andros Adamson
    Signed-off-by: Trond Myklebust
    Signed-off-by: Greg Kroah-Hartman

    Trond Myklebust
     
  • commit 66c4c35c6bc5a1a452b024cf0364635b28fd94e4 upstream.

    sysfs_slab_add() calls various sysfs functions that actually may
    end up in userspace doing all sorts of things.

    Release the slub_lock after adding the kmem_cache structure to the list.
    At that point the address of the kmem_cache is not known so we are
    guaranteed exlusive access to the following modifications to the
    kmem_cache structure.

    If the sysfs_slab_add fails then reacquire the slub_lock to
    remove the kmem_cache structure from the list.

    Reported-by: Sasha Levin
    Acked-by: Eric Dumazet
    Signed-off-by: Christoph Lameter
    Signed-off-by: Pekka Enberg
    Signed-off-by: Greg Kroah-Hartman

    Christoph Lameter
     
  • commit d97d32edcd732110758799ae60af725e5110b3dc upstream.

    When an IO error happens during inode deletion run from
    xlog_recover_process_iunlinks() filesystem gets shutdown. Thus any subsequent
    attempt to read buffers fails. Code in xlog_recover_process_iunlinks() does not
    count with the fact that read of a buffer which was read a while ago can
    really fail which results in the oops on
    agi = XFS_BUF_TO_AGI(agibp);

    Fix the problem by cleaning up the buffer handling in
    xlog_recover_process_iunlinks() as suggested by Dave Chinner. We release buffer
    lock but keep buffer reference to AG buffer. That is enough for buffer to stay
    pinned in memory and we don't have to call xfs_read_agi() all the time.

    Signed-off-by: Jan Kara
    Reviewed-by: Dave Chinner
    Signed-off-by: Ben Myers
    Signed-off-by: Greg Kroah-Hartman

    Jan Kara
     
  • commit 8da00edc1069f01c34510fa405dc15d96c090a3f upstream.

    Fix typo in drivers/video/backlight/tosa_lcd.c
    "tosa_lcd_reume" should be "tosa_lcd_resume".

    Signed-off-by: Masanari Iida
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds
    Signed-off-by: Greg Kroah-Hartman

    Masanari Iida
     
  • commit 6f94a4c45a6f744383f9f695dde019998db3df55 upstream.

    Avoid using the bi_next field for the holder of a cell when deferring
    bios because a stacked device below might change it. Store the
    holder in a new field in struct cell instead.

    When a cell is created, the bio that triggered creation (the holder) was
    added to the same bio list as subsequent bios. In some cases we pass
    this holder bio directly to devices underneath. If those devices use
    the bi_next field there will be trouble...

    This also simplifies some code that had to work out which bio was the
    holder.

    Signed-off-by: Joe Thornber
    Signed-off-by: Mike Snitzer
    Signed-off-by: Alasdair G Kergon
    Signed-off-by: Greg Kroah-Hartman

    Joe Thornber
     
  • commit b0988900bae9ecf968a8a8d086a9eec671a9517a upstream.

    When we remove an entry from a node we sometimes rebalance with it's
    two neighbours. This wasn't being done correctly; in some cases
    entries have to move all the way from the right neighbour to the left
    neighbour, or vice versa. This patch pretty much re-writes the
    balancing code to fix it.

    This code is barely used currently; only when you delete a thin
    device, and then only if you have hundreds of them in the same pool.
    Once we have discard support, which removes mappings, this will be used
    much more heavily.

    Signed-off-by: Joe Thornber
    Signed-off-by: Mike Snitzer
    Signed-off-by: Alasdair G Kergon
    Signed-off-by: Greg Kroah-Hartman

    Joe Thornber
     
  • commit aadbe266f2f89ccc68b52f4effc7b3a8b29521ef upstream.

    Call the correct exit function on failure in dm_exception_store_init.

    Signed-off-by: Andrei Warkentin
    Acked-by: Mike Snitzer
    Signed-off-by: Alasdair G Kergon
    Signed-off-by: Greg Kroah-Hartman

    Andrei Warkentin
     
  • commit 72c6e7afc43e19f68a31dea204fc366624d6eee9 upstream.

    Always set io->error to -EIO when an error is detected in dm-crypt.

    There were cases where an error code would be set only if we finish
    processing the last sector. If there were other encryption operations in
    flight, the error would be ignored and bio would be returned with
    success as if no error happened.

    This bug is present in kcryptd_crypt_write_convert, kcryptd_crypt_read_convert
    and kcryptd_async_done.

    Signed-off-by: Mikulas Patocka
    Reviewed-by: Milan Broz
    Signed-off-by: Alasdair G Kergon
    Signed-off-by: Greg Kroah-Hartman

    Mikulas Patocka
     
  • commit aeb2deae2660a1773c83d3c6e9e6575daa3855d6 upstream.

    This patch fixes a possible deadlock in dm-crypt's mempool use.

    Currently, dm-crypt reserves a mempool of MIN_BIO_PAGES reserved pages.
    It allocates first MIN_BIO_PAGES with non-failing allocation (the allocation
    cannot fail and waits until the mempool is refilled). Further pages are
    allocated with different gfp flags that allow failing.

    Because allocations may be done in parallel, this code can deadlock. Example:
    There are two processes, each tries to allocate MIN_BIO_PAGES and the processes
    run simultaneously.
    It may end up in a situation where each process allocates (MIN_BIO_PAGES / 2)
    pages. The mempool is exhausted. Each process waits for more pages to be freed
    to the mempool, which never happens.

    To avoid this deadlock scenario, this patch changes the code so that only
    the first page is allocated with non-failing gfp mask. Allocation of further
    pages may fail.

    Signed-off-by: Mikulas Patocka
    Signed-off-by: Milan Broz
    Signed-off-by: Alasdair G Kergon
    Signed-off-by: Greg Kroah-Hartman

    Mikulas Patocka
     
  • commit 017d213f649c6775e4a4349e50a5631a4e4c7308 upstream.

    Using the bpc (bits per color) specified by the monitor
    can cause problems in some cases. Until we get a better
    handle on how to deal with those cases, just use a bpc of 8.

    Reported-by: Lennert Buytenhek
    Signed-off-by: Alex Deucher
    Signed-off-by: Dave Airlie
    Signed-off-by: Greg Kroah-Hartman

    Alex Deucher
     
  • commit d2cb87c23e8514ca49c85adc5924999927bb9494 upstream.

    The jack detection on WM1811 is often required during system suspend, add
    it as another check when deciding if we should suspend.

    Signed-off-by: Mark Brown
    Signed-off-by: Samuel Ortiz
    Signed-off-by: Greg Kroah-Hartman

    Mark Brown
     
  • commit 81b279d80a63628e580c71a31d30a8c3b3047ad4 upstream.

    Unbanked GPIO IRQ handling code made a copy of just
    the irq_chip structure for GPIO IRQ lines which caused
    problems after the generic IRQ chip conversion because
    there was no valid irq_chip_type structure with the
    right "regs" populated. irq_gc_mask_set_bit() was
    therefore accessing random addresses.

    Fix it by making a copy of irq_chip_type structure
    instead. This will ensure sane register offsets.

    Reported-by: Jon Povey
    Tested-by: Jon Povey
    Signed-off-by: Sekhar Nori
    Signed-off-by: Grant Likely
    Signed-off-by: Greg Kroah-Hartman

    Sekhar Nori
     
  • commit ab2dde9924dd1ddb791fa8b14aa52e1df681e20c upstream.

    Unbanked GPIO irq setup code was overwriting chip_data leading
    to the following oops on request_irq()

    Unable to handle kernel paging request at virtual address febfffff
    pgd = c22dc000
    [febfffff] *pgd=00000000
    Internal error: Oops: 801 [#1] PREEMPT
    Modules linked in: mcu(+) edmak irqk cmemk
    CPU: 0 Not tainted (3.0.0-rc7+ #93)
    PC is at irq_gc_mask_set_bit+0x68/0x7c
    LR is at vprintk+0x22c/0x484
    pc : [] lr : [] psr: 60000093
    sp : c33e3ba0 ip : c33e3af0 fp : c33e3bc4
    r10: c04555bc r9 : c33d4340 r8 : 60000013
    r7 : 0000002d r6 : c04555bc r5 : fec67010 r4 : 00000000
    r3 : c04734c8 r2 : fec00000 r1 : ffffffff r0 : 00000026
    Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment user
    Control: 0005317f Table: 822dc000 DAC: 00000015
    Process modprobe (pid: 526, stack limit = 0xc33e2270)
    Stack: (0xc33e3ba0 to 0xc33e4000)
    3ba0: 00000000 c007d3d4 c33e3bcc c04555bc c04555bc c33d4340 c33e3bdc c33e3bc8
    3bc0: c007f5f8 c0080bb4 00000000 c04555bc c33e3bf4 c33e3be0 c007f654 c007f5c0
    3be0: 00000000 c04555bc c33e3c24 c33e3bf8 c007e6e8 c007f618 c01f2284 c0350af8
    3c00: c0405214 bf016c98 00000001 00000000 c33dc008 0000002d c33e3c54 c33e3c28
    3c20: c007e888 c007e408 00000001 c23ef880 c33dc000 00000000 c33dc080 c25caa00
    3c40: c0487498 bf017078 c33e3c94 c33e3c58 bf016b44 c007e7d4 bf017078 c33dc008
    3c60: c25caa08 c33dc008 c33e3c84 bf017484 c25caa00 c25caa00 c01f5f48 c25caa08
    3c80: c0496d60 bf017484 c33e3ca4 c33e3c98 c022a698 bf01692c c33e3cd4 c33e3ca8
    3ca0: c01f5d88 c022a688 00000000 bf017484 c25caa00 c25caa00 c01f5f48 c25caa08
    3cc0: c0496d60 00000000 c33e3cec c33e3cd8 c01f5f8c c01f5d10 00000000 c33e3cf0
    3ce0: c33e3d14 c33e3cf0 c01f5210 c01f5f58 c303cb48 c25ecf94 c25caa00 c25caa00
    3d00: c25caa34 c33e3dd8 c33e3d34 c33e3d18 c01f6044 c01f51b8 c0496d3c c25caa00
    3d20: c044e918 c33e3dd8 c33e3d44 c33e3d38 c01f4ff4 c01f5fcc c33e3d94 c33e3d48
    3d40: c01f3d10 c01f4fd8 00000000 c044e918 00000000 00000000 c01f52c0 c034d570
    3d60: c33e3d84 c33e3d70 c022bf84 c25caa00 00000000 c044e918 c33e3dd8 c25c2e00
    3d80: c0496d60 bf01763c c33e3db4 c33e3d98 c022b1a0 c01f384c c25caa00 c33e3dd8
    3da0: 00000000 c33e3dd8 c33e3dd4 c33e3db8 c022b27c c022b0e8 00000000 bf01763c
    3dc0: c0451c80 c33e3dd8 c33e3e34 c33e3dd8 bf016f60 c022b210 5f75636d 746e6f63
    3de0: 006c6f72 00000000 00000000 00000000 00000000 00000000 00000000 bf0174bc
    3e00: 00000000 00989680 00000000 00000020 c0451c80 c0451c80 bf0174dc c01f5eb0
    3e20: c33f0f00 bf0174dc c33e3e44 c33e3e38 c01f72f4 bf016e2c c33e3e74 c33e3e48
    3e40: c01f5d88 c01f72e4 00000000 c0451c80 c0451cb4 bf0174dc c01f5eb0 c33f0f00
    3e60: c0473100 00000000 c33e3e94 c33e3e78 c01f5f44 c01f5d10 00000000 c33e3e98
    3e80: bf0174dc c01f5eb0 c33e3ebc c33e3e98 c01f5534 c01f5ec0 c303c038 c3061c30
    3ea0: 00003cd8 00098258 bf0174dc c0462ac8 c33e3ecc c33e3ec0 c01f5bec c01f54dc
    3ec0: c33e3efc c33e3ed0 c01f4d30 c01f5bdc bf0173a0 c33e2000 00003cd8 00098258
    3ee0: bf0174dc c33e2000 c00301a4 bf019000 c33e3f1c c33e3f00 c01f6588 c01f4c8c
    3f00: 00003cd8 00098258 00000000 c33e2000 c33e3f2c c33e3f20 c01f777c c01f6524
    3f20: c33e3f3c c33e3f30 bf019014 c01f7740 c33e3f7c c33e3f40 c002f3ec bf019010
    3f40: 00000000 00003cd8 00098258 bf017518 00000000 00003cd8 00098258 bf017518
    3f60: 00000000 c00301a4 c33e2000 00000000 c33e3fa4 c33e3f80 c007b934 c002f3c4
    3f80: c00b307c c00b2f48 00003cd8 00000000 00000003 00000080 00000000 c33e3fa8
    3fa0: c0030020 c007b8b8 00003cd8 00000000 00098288 00003cd8 00098258 00098240
    3fc0: 00003cd8 00000000 00000003 00000080 00098008 00098028 00098288 00000001
    3fe0: be892998 be892988 00013d7c 40178740 60000010 00098288 09089041 00200845
    Backtrace:
    [] (irq_gc_mask_set_bit+0x0/0x7c) from [] (irq_enable+0x48/0x58)
    r6:c33d4340 r5:c04555bc r4:c04555bc
    [] (irq_enable+0x0/0x58) from [] (irq_startup+0x4c/0x54)
    r5:c04555bc r4:00000000
    [] (irq_startup+0x0/0x54) from [] (__setup_irq+0x2f0/0x3cc)
    r5:c04555bc r4:00000000
    [] (__setup_irq+0x0/0x3cc) from [] (request_threaded_irq+0xc4/0x110)
    r8:0000002d r7:c33dc008 r6:00000000 r5:00000001 r4:bf016c98
    [] (request_threaded_irq+0x0/0x110) from [] (mcu_spi_probe+0x228/0x37c [mcu])
    [] (mcu_spi_probe+0x0/0x37c [mcu]) from [] (spi_drv_probe+0x20/0x24)
    [] (spi_drv_probe+0x0/0x24) from [] (driver_probe_device+0x88/0x1b0)
    [] (driver_probe_device+0x0/0x1b0) from [] (__device_attach+0x44/0x48)
    [] (__device_attach+0x0/0x48) from [] (bus_for_each_drv+0x68/0x94)
    r5:c33e3cf0 r4:00000000
    [] (bus_for_each_drv+0x0/0x94) from [] (device_attach+0x88/0xa0)
    r7:c33e3dd8 r6:c25caa34 r5:c25caa00 r4:c25caa00
    [] (device_attach+0x0/0xa0) from [] (bus_probe_device+0x2c/0x4c)
    r7:c33e3dd8 r6:c044e918 r5:c25caa00 r4:c0496d3c
    [] (bus_probe_device+0x0/0x4c) from [] (device_add+0x4d4/0x648)
    [] (device_add+0x0/0x648) from [] (spi_add_device+0xc8/0x128)
    [] (spi_add_device+0x0/0x128) from [] (spi_new_device+0x7c/0xb4)
    r7:c33e3dd8 r6:00000000 r5:c33e3dd8 r4:c25caa00
    [] (spi_new_device+0x0/0xb4) from [] (mcu_probe+0x144/0x224 [mcu])
    r7:c33e3dd8 r6:c0451c80 r5:bf01763c r4:00000000
    [] (mcu_probe+0x0/0x224 [mcu]) from [] (platform_drv_probe+0x20/0x24)
    [] (platform_drv_probe+0x0/0x24) from [] (driver_probe_device+0x88/0x1b0)
    [] (driver_probe_device+0x0/0x1b0) from [] (__driver_attach+0x94/0x98)
    [] (__driver_attach+0x0/0x98) from [] (bus_for_each_dev+0x68/0x94)
    r7:c01f5eb0 r6:bf0174dc r5:c33e3e98 r4:00000000
    [] (bus_for_each_dev+0x0/0x94) from [] (driver_attach+0x20/0x28)
    r7:c0462ac8 r6:bf0174dc r5:00098258 r4:00003cd8
    [] (driver_attach+0x0/0x28) from [] (bus_add_driver+0xb4/0x258)
    [] (bus_add_driver+0x0/0x258) from [] (driver_register+0x74/0x158)
    [] (driver_register+0x0/0x158) from [] (platform_driver_register+0x4c/0x60)
    r7:c33e2000 r6:00000000 r5:00098258 r4:00003cd8
    [] (platform_driver_register+0x0/0x60) from [] (mcu_init+0x14/0x20 [mcu])
    [] (mcu_init+0x0/0x20 [mcu]) from [] (do_one_initcall+0x38/0x170)
    [] (do_one_initcall+0x0/0x170) from [] (sys_init_module+0x8c/0x1a4)
    [] (sys_init_module+0x0/0x1a4) from [] (ret_fast_syscall+0x0/0x2c)
    r7:00000080 r6:00000003 r5:00000000 r4:00003cd8
    Code: e1844003 e585400c e596300c e5932064 (e7814002)

    Fix the issue.

    Reported-by: Jon Povey
    Signed-off-by: Sekhar Nori
    Signed-off-by: Grant Likely
    Signed-off-by: Greg Kroah-Hartman

    Sekhar Nori
     
  • commit 8276536cec38bc6bde30d0aa67716f22b9b9705a upstream.

    This function should be capable of both enabling and disabling interrupts
    based upon the *enable* parameter. Right now the function only enables
    the interrupt and *enable* is not used at all. So add the interrupt
    disable capability also using the parameter.

    Signed-off-by: Tarun Kanti DebBarma
    Reviewed-by: Santosh Shilimkar
    Acked-by: Felipe Balbi
    Reviewed-by: Kevin Hilman
    Signed-off-by: Kevin Hilman
    Signed-off-by: Greg Kroah-Hartman

    Tarun Kanti DebBarma
     
  • commit f35b431dde39fb40944d1024f08d88fbf04a3193 upstream.

    The ARM IP revisions in Tegra are:
    Tegra20: CPU r1p1, PL310 r2p0
    Tegra30: CPU A01=r2p7/>=A02=r2p9, NEON r2p3-50, PL310 r3p1-50

    Based on work by Olof Johansson, although the actual list of errata is
    somewhat different here, since I added a bunch more and removed one PL310
    erratum that doesn't seem applicable.

    Signed-off-by: Stephen Warren
    Signed-off-by: Olof Johansson
    Signed-off-by: Greg Kroah-Hartman

    Stephen Warren
     
  • commit b18dafc86bb879d2f38a1743985d7ceb283c2f4d upstream.

    In d_materialise_unique() there are 3 subcases to the 'aliased dentry'
    case; in two subcases the inode i_lock is properly released but this
    does not occur in the -ELOOP subcase.

    This seems to have been introduced by commit 1836750115f2 ("fix loop
    checks in d_materialise_unique()").

    Signed-off-by: Michel Lespinasse
    [ Added a comment, and moved the unlock to where we generate the -ELOOP,
    which seems to be more natural.

    You probably can't actually trigger this without a buggy network file
    server - d_materialize_unique() is for finding aliases on non-local
    filesystems, and the d_ancestor() case is for a hardlinked directory
    loop.

    But we should be robust in the case of such buggy servers anyway. ]
    Signed-off-by: Linus Torvalds
    Signed-off-by: Greg Kroah-Hartman

    Michel Lespinasse
     
  • commit 31d4f3a2f3c73f279ff96a7135d7202ef6833f12 upstream.

    Explicitly test for an extent whose length is zero, and flag that as a
    corrupted extent.

    This avoids a kernel BUG_ON assertion failure.

    Tested: Without this patch, the file system image found in
    tests/f_ext_zero_len/image.gz in the latest e2fsprogs sources causes a
    kernel panic. With this patch, an ext4 file system error is noted
    instead, and the file system is marked as being corrupted.

    https://bugzilla.kernel.org/show_bug.cgi?id=42859

    Signed-off-by: "Theodore Ts'o"
    Signed-off-by: Greg Kroah-Hartman

    Theodore Ts'o
     
  • commit 491caa43639abcffaa645fbab372a7ef4ce2975c upstream.

    The following command line will leave the aio-stress process unkillable
    on an ext4 file system (in my case, mounted on /mnt/test):

    aio-stress -t 20 -s 10 -O -S -o 2 -I 1000 /mnt/test/aiostress.3561.4 /mnt/test/aiostress.3561.4.20 /mnt/test/aiostress.3561.4.19 /mnt/test/aiostress.3561.4.18 /mnt/test/aiostress.3561.4.17 /mnt/test/aiostress.3561.4.16 /mnt/test/aiostress.3561.4.15 /mnt/test/aiostress.3561.4.14 /mnt/test/aiostress.3561.4.13 /mnt/test/aiostress.3561.4.12 /mnt/test/aiostress.3561.4.11 /mnt/test/aiostress.3561.4.10 /mnt/test/aiostress.3561.4.9 /mnt/test/aiostress.3561.4.8 /mnt/test/aiostress.3561.4.7 /mnt/test/aiostress.3561.4.6 /mnt/test/aiostress.3561.4.5 /mnt/test/aiostress.3561.4.4 /mnt/test/aiostress.3561.4.3 /mnt/test/aiostress.3561.4.2

    This is using the aio-stress program from the xfstests test suite.
    That particular command line tells aio-stress to do random writes to
    20 files from 20 threads (one thread per file). The files are NOT
    preallocated, so you will get writes to random offsets within the
    file, thus creating holes and extending i_size. It also opens the
    file with O_DIRECT and O_SYNC.

    On to the problem. When an I/O requires unwritten extent conversion,
    it is queued onto the completed_io_list for the ext4 inode. Two code
    paths will pull work items from this list. The first is the
    ext4_end_io_work routine, and the second is ext4_flush_completed_IO,
    which is called via the fsync path (and O_SYNC handling, as well).
    There are two issues I've found in these code paths. First, if the
    fsync path beats the work routine to a particular I/O, the work
    routine will free the io_end structure! It does not take into account
    the fact that the io_end may still be in use by the fsync path. I've
    fixed this issue by adding yet another IO_END flag, indicating that
    the io_end is being processed by the fsync path.

    The second problem is that the work routine will make an assignment to
    io->flag outside of the lock. I have witnessed this result in a hang
    at umount. Moving the flag setting inside the lock resolved that
    problem.

    The problem was introduced by commit b82e384c7b ("ext4: optimize
    locking for end_io extent conversion"), which first appeared in 3.2.
    As such, the fix should be backported to that release (probably along
    with the unwritten extent conversion race fix).

    Signed-off-by: Jeff Moyer
    Signed-off-by: "Theodore Ts'o"
    Signed-off-by: Greg Kroah-Hartman

    Jeff Moyer
     
  • commit 266991b13890049ee1a6bb95b9817f06339ee3d7 upstream.

    The following comment in ext4_end_io_dio caught my attention:

    /* XXX: probably should move into the real I/O completion handler */
    inode_dio_done(inode);

    The truncate code takes i_mutex, then calls inode_dio_wait. Because the
    ext4 code path above will end up dropping the mutex before it is
    reacquired by the worker thread that does the extent conversion, it
    seems to me that the truncate can happen out of order. Jan Kara
    mentioned that this might result in error messages in the system logs,
    but that should be the extent of the "damage."

    The fix is pretty straight-forward: don't call inode_dio_done until the
    extent conversion is complete.

    Reviewed-by: Jan Kara
    Signed-off-by: Jeff Moyer
    Signed-off-by: "Theodore Ts'o"
    Signed-off-by: Greg Kroah-Hartman

    Jeff Moyer