15 Jul, 2008

2 commits

  • * 'for-linus' of git://git.kernel.dk/linux-2.6-block: (37 commits)
    splice: fix generic_file_splice_read() race with page invalidation
    ramfs: enable splice write
    drivers/block/pktcdvd.c: avoid useless memset
    cdrom: revert commit 22a9189 (cdrom: use kmalloced buffers instead of buffers on stack)
    scsi: sr avoids useless buffer allocation
    block: blk_rq_map_kern uses the bounce buffers for stack buffers
    block: add blk_queue_update_dma_pad
    DAC960: push down BKL
    pktcdvd: push BKL down into driver
    paride: push ioctl down into driver
    block: use get_unaligned_* helpers
    block: extend queue_flag bitops
    block: request_module(): use format string
    Add bvec_merge_data to handle stacked devices and ->merge_bvec()
    block: integrity flags can't use bit ops on unsigned short
    cmdfilter: extend default read filter
    sg: fix odd style (extra parenthesis) introduced by cmd filter patch
    block: add bounce support to blk_rq_map_user_iov
    cfq-iosched: get rid of enable_idle being unused warning
    allow userspace to modify scsi command filter on per device basis
    ...

    Linus Torvalds
     
  • This simplifies the code significantly, and was the whole point of the
    exercise.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

14 Jul, 2008

5 commits


13 Jul, 2008

14 commits

  • Commit f18f982ab ("sched: CPU hotplug events must not destroy scheduler
    domains created by the cpusets") introduced a hotplug-related problem as
    described below:

    Upon CPU_DOWN_PREPARE,

    update_sched_domains() -> detach_destroy_domains(&cpu_online_map)

    does the following:

    /*
    * Force a reinitialization of the sched domains hierarchy. The domains
    * and groups cannot be updated in place without racing with the balancing
    * code, so we temporarily attach all running cpus to the NULL domain
    * which will prevent rebalancing while the sched domains are recalculated.
    */

    The sched-domains should be rebuilt when a CPU_DOWN ops. has been
    completed, effectively either upon CPU_DEAD{_FROZEN} (upon success) or
    CPU_DOWN_FAILED{_FROZEN} (upon failure -- restore the things to their
    initial state). That's what update_sched_domains() also does but only
    for !CPUSETS case.

    With f18f982ab, sched-domains' reinitialization is delegated to
    CPUSETS code:

    cpuset_handle_cpuhp() -> common_cpu_mem_hotplug_unplug() ->
    rebuild_sched_domains()

    Being called for CPU_UP_PREPARE and if its callback is called after
    update_sched_domains()), it just negates all the work done by
    update_sched_domains() -- i.e. a soon-to-be-offline cpu is included in
    the sched-domains and that makes it visible for the load-balancer
    while the CPU_DOWN ops. is in progress.

    __migrate_live_tasks() moves the tasks off a 'dead' cpu (it's already
    "offline" when this function is called).

    try_to_wake_up() is called for one of these tasks from another CPU ->
    the load-balancer (wake_idle()) picks up a "dead" CPU and places the
    task on it. Then e.g. BUG_ON(rq->nr_running) detects this a bit later
    -> oops.

    Signed-off-by: Dmitry Adamushko
    Tested-by: Vegard Nossum
    Cc: Paul Menage
    Cc: Max Krasnyansky
    Cc: Paul Jackson
    Cc: Peter Zijlstra
    Cc: miaox@cn.fujitsu.com
    Cc: rostedt@goodmis.org
    Cc: Linus Torvalds
    Signed-off-by: Ingo Molnar

    Dmitry Adamushko
     
  • …git/tip/linux-2.6-tip

    * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86: fix ldt limit for 64 bit

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
    [SCSI] bsg: fix oops on remove
    [SCSI] fusion: default MSI to disabled for SPI and FC controllers
    [SCSI] ipr: Fix HDIO_GET_IDENTITY oops for SATA devices
    [SCSI] mptspi: fix oops in mptspi_dv_renegotiate_work()
    [SCSI] erase invalid data returned by device

    Linus Torvalds
     
  • The current definition of wksidarr works fine on little endian arches
    (since cpu_to_le32 is a no-op there), but on big-endian arches, it fails
    to compile with this error:

    error: braced-group within expression allowed only inside a function

    The problem is that this static declaration has cpu_to_le32 embedded
    within it, and that expands into a function macro. We need to use
    __constant_cpu_to_le32() instead.

    Signed-off-by: Jeff Layton
    Cc: Steven French
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Layton
     
  • Try this:

    mount a share with unix extensions
    create a file on it
    umount the share

    You'll get the following message in the ring buffer:

    VFS: Busy inodes after unmount of cifs. Self-destruct in 5 seconds. Have a
    nice day...

    ...the problem is that cifs_get_inode_info_unix is creating and hashing
    a new inode even when it's going to return error anyway. The first
    lookup when creating a file returns an error so we end up leaking this
    inode before we do the actual create. This appears to be a regression
    caused by commit 0e4bbde94fdc33f5b3d793166b21bf768ca3e098.

    The following patch seems to fix it for me, and fixes a minor
    formatting nit as well.

    Signed-off-by: Jeff Layton
    Acked-by: Steven French
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Layton
     
  • Fix FRV irqs_disabled() to return an int, not an unsigned long to avoid
    this warning:

    kernel/sched.c: In function '__might_sleep':
    kernel/sched.c:8198: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'

    Signed-off-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     
  • Cc: Philippe Elie
    Cc: John Levon
    Cc: Maynard Johnson
    Cc: Richard Purdie
    Cc: Daniel Hansel
    Cc: Jason Yeh
    Cc: Andrew Morton
    Signed-off-by: Robert Richter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert Richter
     
  • Add the rtc8564 chip entry

    Signed-off-by: Jon Smirl
    Signed-off-by: Alessandro Zummo
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jon Smirl
     
  • Fix chip naming from fm3031-rtc to fm3031

    Signed-off-by: Alessandro Zummo
    Cc: Sergey Lapin
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alessandro Zummo
     
  • Cortland Setlow pointed out a bug in ov7670.c where the result from
    ov7670_read() was just being checked for !0, rather than
    Signed-off-by: Andres Salomon
    Acked-by: Jonathan Corbet
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andres Salomon
     
  • I had 8250.nr_uarts=16 in the boot line of a test kernel and I had a weird
    mysterious crash in sysfs. After taking an in-depth look I realized that
    CONFIG_SERIAL_8250_NR_UARTS was set to 4 and I was walking off the end of
    the serial8250_ports array.

    Ouch!!!

    Don't let this happen to someone else.

    Signed-off-by: Eric W. Biederman
    Acked-by: Alan Cox
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • This patch is a bugfix for how defio handles multiple processes manipulating
    the same framebuffer.

    Thanks to Bernard Blackham for identifying this bug.

    It occurs when two applications mmap the same framebuffer and concurrently
    write to the same page. Normally, this doesn't occur since only a single
    process mmaps the framebuffer. The symptom of the bug is that the mapping
    applications will hang. The cause is that defio incorrectly tries to add the
    same page twice to the pagelist. The solution I have is to walk the pagelist
    and check for a duplicate before adding. Since I needed to walk the pagelist,
    I now also keep the pagelist in sorted order.

    Signed-off-by: Jaya Kumar
    Cc: Bernard Blackham
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jaya Kumar
     
  • Coverity CID: 1356 RESOURCE_LEAK

    I found a very old patch for this that was Acked but did not get applied
    https://lists.linux-foundation.org/pipermail/kernel-janitors/2006-September/016362.html

    There looks to be a small leak in isdn_writebuf_stub() in isdn_common.c, when
    copy_from_user() returns an un-copied data length (length != 0). The below
    patch should be a minimally invasive fix.

    Signed-off-by: Darren Jenkins
    Acked-by: Karsten Keil
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Darren Jenkins
     
  • Coverity CID: 2172 RESOURCE_LEAK

    When pool_allocate() tries to enlarge a packet, if it can not allocate enough
    memory, it returns NULL without first freeing the old packet.

    This patch just frees the packet first.

    Signed-off-by: Darren Jenkins
    Acked-by: Jiri Kosina
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Darren Jenkins
     

12 Jul, 2008

8 commits

  • If you do a modremove of any sas driver, you run into an oops on
    shutdown when the host is removed (coming from the host bsg device).
    The root cause seems to be that there's a use after free of the
    bsg_class_device: In bsg_kref_release_function, this is used (to do a
    put_device(bcg->parent) after bcg->release has been called. In sas (and
    possibly many other things) bcd->release frees the queue which contains
    the bsg_class_device, so we get a put_device on unreferenced memory.
    Fix this by taking a copy of the pointer to the parent before releasing
    bsg.

    Acked-by: FUJITA Tomonori
    Signed-off-by: James Bottomley

    James Bottomley
     
  • There's a fault on the FC controllers that makes them not respond
    correctly to MSI. The SPI controllers are fine, but are likely to be
    onboard on older motherboards which don't handle MSI correctly, so
    default both these cases to disabled. Enable by setting the module
    parameter mpt_msi_enable=1.

    For the SAS case, enable MSI by default, but it can be disabled by
    setting the module parameter mpt_msi_enable=0.

    Cc: "Prakash, Sathya"
    Signed-off-by: James Bottomley

    James Bottomley
     
  • Fix size of LDT entries. On x86-64, ldt_desc is a double-sized descriptor.

    Signed-off-by: Michael Karcher
    Signed-off-by: Ingo Molnar

    Michael Karcher
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
    [PATCH] IPMI: return correct value from ipmi_write

    Linus Torvalds
     
  • This patch corrects the handling of write operations to the IPMI watchdog
    to work as intended by returning the number of characters actually
    processed. Without this patch, an "echo V >/dev/watchdog" enables the
    watchdog if IPMI is providing the watchdog function.

    Signed-off-by: Mark Rustad
    Signed-off-by: Corey Minyard
    Signed-off-by: Wim Van Sebroeck

    Mark Rustad
     
  • Currently, ipr does not support HDIO_GET_IDENTITY to SATA devices.
    An oops occurs if userspace attempts to send the command. Since hald
    issues the command, ensure we fail the ioctl in ipr. This is a
    temporary solution to the oops. Once the ipr libata EH conversion
    is upstream, ipr will fully support HDIO_GET_IDENTITY.

    Tested-by: Milton Miller
    Signed-off-by: Brian King
    Signed-off-by: James Bottomley

    Brian King
     
  • * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
    libata-acpi: don't call sleeping function from invalid context
    Added Targa Visionary 1000 IDE adapter to pata_sis.c
    libata-acpi: filter out DIPM enable

    Linus Torvalds
     
  • When we release the iclog, we do an atomic_dec_and_lock to determine if
    we are the last reference and need to trigger update of log headers and
    writeout. However, in xlog_state_get_iclog_space() we also need to
    check if we have the last reference count there. If we do, we release
    the log buffer, otherwise we decrement the reference count.

    But the compare and decrement in xlog_state_get_iclog_space() is not
    atomic, so both places can see a reference count of 2 and neither will
    release the iclog. That leads to a filesystem hang.

    Close the race by replacing the atomic_read() and atomic_dec() pair with
    atomic_add_unless() to ensure that they are executed atomically.

    Signed-off-by: Dave Chinner
    Reviewed-by: Tim Shimmin
    Tested-by: Eric Sandeen
    Signed-off-by: Linus Torvalds

    Dave Chinner
     

11 Jul, 2008

11 commits

  • The problem is introduced by commit
    664d080c41463570b95717b5ad86e79dc1be0877.

    acpi_evaluate_integer is a sleeping function,
    and it should not be called with spin_lock_irqsave.
    https://bugzilla.redhat.com/show_bug.cgi?id=451399

    Signed-off-by: Zhang Rui
    Signed-off-by: Jeff Garzik

    Zhang Rui
     
  • This enables short 40-wire detection for my laptop thus
    enabling UDMA/100.

    Signed-off-by: Jeff Garzik

    Kai Krakow
     
  • Some BIOSen enable DIPM via _GTF which causes command timeouts under
    certain configuration. This didn't occur on 2.6.25 because 2.6.25
    defaulted to SRST, so _GTF wasn't executed during boot probe, so ahci
    host reset disabled DIPM and as _GTF wasn't executed after SRST, DIPM
    wasn't enabled. On 2.6.26, hardreset is used during probe and after
    probe _GTF is executed enabling DIPM and thus the failures.

    This patch could theoretically disable DIPM on machines which used to
    have it enabled on 2.6.25 but AFAIK ahci is currently the only driver
    which uses SATA ACPI hierarchy (_SDD) and as the host reset would have
    always disabled DIPM, this shouldn't happen.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • The IRQ rate reported back by the RTC is incorrect when HPET is enabled.

    Newer hardware that has HPET to emulate the legacy RTC device gets this value
    wrong since after it sets the rate, it returns before setting the variable
    used to report the IRQ rate back to users of the device -- so the set rate and
    the reported rate get out of sync.

    Signed-off-by: Paul Gortmaker
    Cc: Ingo Molnar
    Cc: David Brownell
    Cc: Thomas Gleixner
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Gortmaker
     
  • This patch was created by

    git grep -E -l 'Rus(el|s?e)l King' | xargs -r -t perl -p -i -e 's/Rus(el|s?e)l King/Russell King/g'

    Signed-off-by: Uwe Kleine-König
    Most-Definitely-Acked-by: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Uwe Kleine-König
     
  • Fix RapidIO device reference counting.

    Signed-of-by: Eugene Surovegin
    Cc: Matt Porter
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eugene Surovegin
     
  • This patch adds Intel TPM TIS device HID: ICO0102

    Signed-off-by: Marcin Obara
    Acked-by: Marcel Selhorst
    Acked-by: Rajiv Andrade
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Marcin Obara
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (27 commits)
    tun: Persistent devices can get stuck in xoff state
    xfrm: Add a XFRM_STATE_AF_UNSPEC flag to xfrm_usersa_info
    ipv6: missed namespace context in ipv6_rthdr_rcv
    netlabel: netlink_unicast calls kfree_skb on error path by itself
    ipv4: fib_trie: Fix lookup error return
    tcp: correct kcalloc usage
    ip: sysctl documentation cleanup
    Documentation: clarify tcp_{r,w}mem sysctl docs
    netfilter: nf_nat_snmp_basic: fix a range check in NAT for SNMP
    netfilter: nf_conntrack_tcp: fix endless loop
    libertas: fix memory alignment problems on the blackfin
    zd1211rw: stop beacons on remove_interface
    rt2x00: Disable synchronization during initialization
    rc80211_pid: Fix fast_start parameter handling
    sctp: Add documentation for sctp sysctl variable
    ipv6: fix race between ipv6_del_addr and DAD timer
    irda: Fix netlink error path return value
    irda: New device ID for nsc-ircc
    irda: via-ircc proper dma freeing
    sctp: Mark the tsn as received after all allocations finish
    ...

    Linus Torvalds
     
  • The scenario goes like this. App stops reading from tun/tap.
    TX queue gets full and driver does netif_stop_queue().
    App closes fd and TX queue gets flushed as part of the cleanup.
    Next time the app opens tun/tap and starts reading from it but
    the xoff state is not cleared. We're stuck.
    Normally xoff state is cleared when netdev is brought up. But
    in the case of persistent devices this happens only during
    initial setup.

    The fix is trivial. If device is already up when an app opens
    it we clear xoff state and that gets things moving again.

    Signed-off-by: Max Krasnyansky
    Tested-by: Christian Borntraeger
    Signed-off-by: David S. Miller

    Max Krasnyansky
     
  • Add a XFRM_STATE_AF_UNSPEC flag to handle the AF_UNSPEC behavior for
    the selector family. Userspace applications can set this flag to leave
    the selector family of the xfrm_state unspecified. This can be used
    to to handle inter family tunnels if the selector is not set from
    userspace.

    Signed-off-by: Steffen Klassert
    Acked-by: Herbert Xu
    Signed-off-by: David S. Miller

    Steffen Klassert
     
  • Signed-off-by: Denis V. Lunev
    Signed-off-by: David S. Miller

    Denis V. Lunev