04 Sep, 2008

1 commit


03 Sep, 2008

31 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    ipsec: Fix deadlock in xfrm_state management.
    ipv: Re-enable IP when MTU > 68
    net/xfrm: Use an IS_ERR test rather than a NULL test
    ath9: Fix ath_rx_flush_tid() for IRQs disabled kernel warning message.
    ath9k: Incorrect key used when group and pairwise ciphers are different.
    rt2x00: Compiler warning unmasked by fix of BUILD_BUG_ON
    mac80211: Fix debugfs union misuse and pointer corruption
    wireless/libertas/if_cs.c: fix memory leaks
    orinoco: Multicast to the specified addresses
    iwlwifi: fix 64bit platform firmware loading
    iwlwifi: fix apm_stop (wrong bit polarity for FLAG_INIT_DONE)
    iwlwifi: workaround interrupt handling no some platforms
    iwlwifi: do not use GFP_DMA in iwl_tx_queue_init
    net/wireless/Kconfig: clarify the description for CONFIG_WIRELESS_EXT_SYSFS
    net: Unbreak userspace usage of linux/mroute.h
    pkt_sched: Fix locking of qdisc_root with qdisc_root_sleeping_lock()
    ipv6: When we droped a packet, we should return NET_RX_DROP instead of 0

    Linus Torvalds
     
  • Fix a bug reported by and diagnosed by Aaron Straus.

    This is a regression intruduced into 2.6.26 by

    commit adc782dae6c4c0f6fb679a48a544cfbcd79ae3dc
    Author: Matt Mackall
    Date: Tue Apr 29 01:03:07 2008 -0700

    random: simplify and rename credit_entropy_store

    credit_entropy_bits() does:

    spin_lock_irqsave(&r->lock, flags);
    ...
    if (r->entropy_count > r->poolinfo->POOLBITS)
    r->entropy_count = r->poolinfo->POOLBITS;

    so there is a time window in which this BUG_ON():

    static size_t account(struct entropy_store *r, size_t nbytes, int min,
    int reserved)
    {
    unsigned long flags;

    BUG_ON(r->entropy_count > r->poolinfo->POOLBITS);

    /* Hold lock while accounting */
    spin_lock_irqsave(&r->lock, flags);

    can trigger.

    We could fix this by moving the assertion inside the lock, but it seems
    safer and saner to revert to the old behaviour wherein
    entropy_store.entropy_count at no time exceeds
    entropy_store.poolinfo->POOLBITS.

    Reported-by: Aaron Straus
    Cc: Matt Mackall
    Cc: Theodore Ts'o
    Cc: [2.6.26.x]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Update rtc-cmos shutdown handling to leave RTC alarms active, resolving
    http://bugzilla.kernel.org/show_bug.cgi?id=11411 on several boards. There
    are still some systems where the ACPI event handling doesn't cooperate.
    (Possibly related to bugid 11312, reporting the spontaneous disabling of
    RTC events.)

    Bug 11411 reported that changes to work around some ACPI event issues
    broke wake-from-S5 handling, as used for DVR applications. (They like to
    power off, then wake later to record programs.)

    [yakui.zhao@intel.com: add shutdown for PNP devices]
    [dbrownell@users.sourceforge.net: update comments]
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Zhao Yakui
    Signed-off-by: Zhang Rui
    Signed-off-by: David Brownell
    Cc: Stefan Bauer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • I got this patch through Red Hat's bugzilla from the bug submitter and
    patch creator. I have just fixed it up so it applies without fuzz to
    upstream kernels.

    Original patch and description from Shyam kumar Iyer:

    The issue [ibft module not displaying targets with short names] is because
    of an offset calculatation error in the iscsi_ibft.c code. Due to this
    error directory structure for the target in /sys/firmware/ibft does not
    get created and so the initiator is unable to connect to the target.

    Note that this bug surfaced only with an name that had a short section at
    the end. eg: "iqn.1984-05.com.dell:dell". It did not surface when the
    iqn's had a longer section at the end. eg:
    "iqn.2001-04.com.example:storage.disk2.sys1.xyz"

    So, the eot_offset was calculated such that an extra 48 bytes i.e. the
    size of the ibft_header which has already been accounted was subtracted
    twice.

    This was not evident with longer iqn names because they would overshoot
    the total ibft length more than 48 bytes and thus would escape the bug.

    Signed-off-by: Shyam Kumar Iyer
    Signed-off-by: Mike Christie
    Cc: Konrad Rzeszutek
    Cc: Peter Jones
    Cc: James Bottomley
    Cc: Greg Kroah-Hartman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Christie
     
  • commit 945185a69daa457c4c5e46e47f4afad7dcea734f ("rtc: rtc_time_to_tm: use
    unsigned arithmetic") changed the some types in rtc_time_to_tm() to
    unsigned:

    void rtc_time_to_tm(unsigned long time, struct rtc_time *tm)
    {
    - register int days, month, year;
    + unsigned int days, month, year;

    This doesn't work for all cases, because days is checked for < 0 later
    on:

    if (days < 0) {
    year -= 1;
    days += 365 + LEAP_YEAR(year);
    }

    I think the correct fix would be to keep days signed and do an appropriate
    cast later on.

    Signed-off-by: Jan Altenberg
    Cc: Maciej W. Rozycki
    Cc: Alessandro Zummo
    Cc: David Brownell
    Cc: Dmitri Vorobiev
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Altenberg
     
  • If there are more then one graphics card handled by the tdfxfb driver the
    name of the frame buffer overruns reserved size.

    Signed-off-by: Krzysztof Helt
    Cc: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Helt
     
  • Fix memory detection on Voodoo3 cards with SDRAM memory.

    Signed-off-by: Krzysztof Helt
    Cc: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Helt
     
  • It turns out that event 0x4 merely indcates that a hotkey has been
    pressed, not which one. A further query is required in order to determine
    the actual keypress. The following patch adds support for that along with
    the known keycodes.

    Signed-off-by: Matthew Garrett
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matthew Garrett
     
  • hp-wmi currently changes the RFKill state by altering the struct members
    rather than using the dedicated interface, meaning that update events
    won't be pushed to userspace. This patch fixes that, along with fixing
    the declared type of the WWAN kill switch. It also ensures that rfkill
    interfaces are only registered for hardware that exists.

    Signed-off-by: Matthew Garrett
    Acked-by: Henrique de Moraes Holschuh
    Cc: Ivo van Doorn
    Cc: Dave Young
    Cc: Marcel Holtmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matthew Garrett
     
  • 1. Check if virtual resolution fits into memory.
    Otherwise, Linux hangs during panning.
    2. When selected use all available memory to
    maximize yres_virtual to speed up panning
    (previously also xres_virtual was increased).
    3. Simplify memory restriction calculations.

    Signed-off-by: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Helt
     
  • At91_mci is abusing dma_free_coherent(), which may not be called with IRQs
    disabled. I saw "mkfs.ext3" on an MMC card objecting voluminously as each
    write completed:

    WARNING: at arch/arm/mm/consistent.c:368 dma_free_coherent+0x2c/0x224()
    [] (dump_stack+0x0/0x14) from [] (warn_on_slowpath+0x4c/0x68)
    [] (warn_on_slowpath+0x0/0x68) from [] (dma_free_coherent+0x2c/0x224)
    r6:00008008 r5:ffc06000 r4:00000000
    [] (dma_free_coherent+0x0/0x224) from [] (at91_mci_irq+0x374/0x420)
    [] (at91_mci_irq+0x0/0x420) from [] (handle_IRQ_event+0x2c/0x6c)
    ...

    This bug has been around for a LONG time. The MM warning is from late
    2005, but the driver merged a year later ... so I'm puzzled why nobody
    noticed this before now.

    The fix involves noting that this buffer shouldn't be DMA-coherent; it's
    just used for normal DMA writes. So replace it with standard kmalloc()
    buffering and DMA mapping calls.

    This is the quickie fix. A better one would not rely on allocating large
    bounce buffers. (Note that dma_alloc_coherent could have failed too, but
    that case was ignored... kmalloc is a bit more likely to fail though.)

    Signed-off-by: David Brownell
    Acked-by: Pierre Ossman
    Cc: Andrew Victor
    Acked-by: Nicolas Ferre
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • Recent changes to tighten the check for UARTs that don't correctly
    re-assert THRE (01c194d9278efc15d4785ff205643e9c0bdcef53: "serial 8250:
    tighten test for using backup timer") caused problems when such a UART was
    opened for the second time - the bug could only successfully be detected
    at first initialization. For users of this version of this particular
    UART IP it is fatal.

    This patch stores the information about the bug in the bugs field of the
    port structure when the port is first started up so subsequent opens can
    check this bit even if the test for the bug fails.

    David Brownell: "My own exposure to this is that the UART on DaVinci
    hardware, which TI allegedly derived from its original 16550 logic, has
    periodically gone from working to unusable with the mainline 8250.c ...
    and back and forth a bunch. Currently it's "unusable", a regression from
    some previous versions. With this patch from Will, it's usable."

    Signed-off-by: Will Newton
    Acked-by: Alex Williamson
    Cc: Alan Cox
    Cc: David Brownell
    Cc: [2.6.26.x]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Will Newton
     
  • The exit function neglects to remove debugfs entries, leading to a BUG
    on reload.

    [akpm@linux-foundation.org: cleanups]
    Signed-off-by: Russ Dill
    Acked-by: Carlos Corbacho
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Russ Dill
     
  • This patch addresses an issue with the locking order. ath_rx_flush_tid()
    uses spin_lock/unlock_bh when IRQs are disabled in sta_notify by mac80211.

    As node clean up is still pending with ath9k and this problematic portion
    of the code is expected to change anyway, thinking of a proper fix may not
    be worthwhile. So having this interim fix helps the users to get rid of the
    kernel warning message.

    Pasted the kernel warning message for reference.

    kernel: ath0: No ProbeResp from current AP 00:1b:11:60:7a:3d - assume out of range
    kernel: ------------[ cut here ]------------
    kernel: WARNING: at kernel/softirq.c:136 local_bh_enable+0x3c/0xab()
    kernel: Pid: 1029, comm: ath9k Not tainted 2.6.27-rc4-wt-w1fi-wl
    kernel:
    kernel: Call Trace:
    kernel: [] warn_on_slowpath+0x51/0x77
    kernel: [] check_preempt_wakeup+0xf3/0x123
    kernel: [] autoremove_wake_function+0x9/0x2e
    kernel: [] local_bh_enable+0x3c/0xab
    kernel: [] ath_rx_node_cleanup+0x38/0x6e [ath9k]
    kernel: [] ath_node_detach+0x3b/0xb6 [ath9k]
    kernel: [] ath9k_sta_notify+0x12b/0x165 [ath9k]
    kernel: [] queue_work+0x1d/0x49
    kernel: [] add_todo+0x70/0x99 [mac80211]
    kernel: [] __sta_info_unlink+0x16b/0x19e [mac80211]
    kernel: [] sta_info_unlink+0x18/0x43 [mac80211]
    kernel: [] ieee80211_associated+0xaa/0x16d [mac80211]
    kernel: [] ieee80211_sta_work+0x4fb/0x6b4 [mac80211]
    kernel: [] thread_return+0x30/0xa9
    kernel: [] ieee80211_sta_work+0x0/0x6b4 [mac80211]
    kernel: [] run_workqueue+0xb1/0x17a
    kernel: [] worker_thread+0xd0/0xdb
    kernel: [] autoremove_wake_function+0x0/0x2e
    kernel: [] worker_thread+0x0/0xdb
    kernel: [] kthread+0x47/0x75
    kernel: [] schedule_tail+0x18/0x50
    kernel: [] child_rip+0xa/0x11
    kernel: [] kthread+0x0/0x75
    kernel: [] child_rip+0x0/0x11
    kernel:
    kernel: ---[ end trace e9bb5da661055827 ]---

    Signed-off-by: Senthil Balasubramanian
    Signed-off-by: John W. Linville

    Senthil Balasubramanian
     
  • Updating sc_keytype multiple times when groupwise and pairwise
    ciphers are different results in incorrect pairwise key type
    assumed for TX control and normal ping fails. This works fine
    for cases where both groupwise and pairwise ciphers are same.

    Also use mac80211 provided enums for key length calculation.

    Signed-off-by: Senthil Balasubramanian
    Signed-off-by: John W. Linville

    Senthil Balasubramanian
     
  • A "Set" to a sign-bit in an "&" operation causes a compiler warning.
    Make calculations unsigned.

    [ The warning was masked by the old definition of BUILD_BUG_ON() ]

    Also remove __builtin_constant_p from FIELD_CHECK since BUILD_BUG_ON
    no longer permits non-const values.

    Signed-off-by: Boaz Harrosh
    CC: Ingo Molnar
    CC: Rusty Russell
    Acked-by: Ivo van Doorn
    Signed-off-by: John W. Linville

    Boaz Harrosh
     
  • The leak in if_cs_prog_helper() is obvious.

    It looks a bit as if not freeing "fw" in if_cs_prog_real() was done
    intentionally, but I'm not seeing why it shouldn't be freed.

    Reported-by: Adrian Bunk
    Signed-off-by: Adrian Bunk
    Acked-by: Holger Schurig
    Signed-off-by: John W. Linville

    Adrian Bunk
     
  • When multicasting the driver sets the number of group addresses using
    the count from the previous set multicast command. In general this means
    you have to set the multicast addresses twice to get the behaviour you
    want.

    If we were multicasting, and reduce the number of addresses we are
    multicasting to, then the driver would write uninitialised data from the
    stack into the group addresses to multicast to.

    Only write the multicast addresses we have specifically set.

    Signed-off-by: David Kilroy
    Signed-off-by: John W. Linville

    David Kilroy
     
  • This patch fixes loading firmware from memory above 32bit.

    Signed-off-by: Tomas Winkler
    Signed-off-by: Emmanuel Grumbach
    Signed-off-by: Zhu Yi
    Acked-by: Marcel Holtmann
    Signed-off-by: John W. Linville

    Tomas Winkler
     
  • The patch fixes CSR_GP_CNTRL_REG_FLAG_INIT_DONE was set instead of
    cleared which disabled moving device to D0U state.

    Signed-off-by: Mohamed Abbas
    Signed-off-by: Tomas Winkler
    Signed-off-by: Zhu Yi
    Signed-off-by: John W. Linville

    Mohamed Abbas
     
  • This patch adds workaround for an interrupt related hardware bug on
    some platforms. (Apparently these platforms boot-up w/ INTX_DISABLED
    set. -- JWL)

    Signed-off-by: Tomas Winkler
    Signed-off-by: Zhu Yi
    Signed-off-by: John W. Linville

    Tomas Winkler
     
  • GFP_DMA is not necessary for the iwlwifi hardware and it can cause
    allocation failures and/or invoke the OOM killer on lots of systems.

    For reference:

    https://bugzilla.redhat.com/show_bug.cgi?id=459709

    Signed-off-by: John W. Linville

    John W. Linville
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
    ide/Kconfig: mark ide-scsi as deprecated
    ide-disk: remove stale init_idedisk_capacity() documentation
    palm_bk3710: improve IDE registration
    ide: fix hwif_to_node()
    IDE: palm_bk3710: fix compile warning for unused variable
    IDE: compile fix for sff_dma_ops

    Linus Torvalds
     
  • Mark ide-scsi as deprecated and remove stale/bogus documentation.

    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Acked-by: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • * fix device tree ... don't forget to set the parent device

    * let init/exit code be removed where practical

    Signed-off-by: David Brownell
    [bart: splitted it from bigger DaVinci patch, s/hw.parent/hw.dev/]
    Signed-off-by: Bartlomiej Zolnierkiewicz

    David Brownell
     
  • Signed-off-by: Kevin Hilman
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Kevin Hilman
     
  • * 'for-linus' of git://neil.brown.name/md:
    Fix problem with waiting while holding rcu read lock in md/bitmap.c
    Remove invalidate_partition call from do_md_stop.

    Linus Torvalds
     
  • This fixes a typo in commit 2a2a64714d9c40f7705c4de1e79a5b855c7211a9 "Disable MWAIT via DMI on broken Compal board".

    It allows the nomwait dmi check to actually detect the Acer 5220.

    Signed-off-by: Dennis Jansen
    Tested-by: Dennis Jansen
    Acked-by: Zhao Yakui
    Signed-off-by: Linus Torvalds

    Dennis Jansen
     
  • * git://git.infradead.org/users/dwmw2/random-2.6:
    [MTD] mtdchar.c: Fix regression in MEMGETREGIONINFO ioctl()
    dabusb_fpga_download(): fix a memory leak
    Remove '#include ' from mm/page_isolation.c
    Fix modules_install on RO nfs-exported trees.

    Linus Torvalds
     
  • * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
    drm/radeon: downgrade debug message from info to debug.

    Linus Torvalds
     

02 Sep, 2008

2 commits

  • The MEMGETREGIONINFO ioctl() in mtdchar.c was clobbering user memory by
    overwriting more than intended, due the size of struct mtd_erase_region_info
    changing in commit 0ecbc81adfcb9f15f86b05ff576b342ce81bbef8 ('Support
    for auto locking flash on power up').

    Fix avoids this by copying struct members one by one with put_user(), as there
    is no longer a convenient struct to use the size of as the length argument to
    copy_to_user().

    Signed-off-by: Zev Weiss
    Signed-off-by: David Woodhouse

    Zev Weiss
     
  • This patch fixes a memory leak in an error path.

    Reported-by: Adrian Bunk
    Signed-off-by: Adrian Bunk
    Signed-off-by: David Woodhouse

    Adrian Bunk
     

01 Sep, 2008

3 commits

  • A recent patch to protect the rdev list with rcu locking leaves us
    with a problem because we can sleep on memalloc while holding the
    rcu lock.

    The rcu lock is only needed while walking the linked list as
    uninteresting devices (failed or spares) can be removed at any time.

    So only take the rcu lock while actually walking the linked list.
    Take a refcount on the rdev during the time when we drop the lock
    and do the memalloc to start IO.
    When we return to the locked code, all the interesting devices
    on the list will not have moved, so we can simply use
    list_for_each_continue_rcu to pick up where we left off.

    Signed-off-by: NeilBrown

    NeilBrown
     
  • When stopping an md array, or just switching to read-only, we
    currently call invalidate_partition while holding the mddev lock.
    The main reason for this is probably to ensure all dirty buffers
    are flushed (invalidate_partition calls fsync_bdev).

    However if any dirty buffers are found, it will almost certainly cause
    a deadlock as starting writeout will require an update to the
    superblock, and performing that updates requires taking the mddev
    lock - which is already held.

    This deadlock can be demonstrated by running "reboot -f -n" with
    a root filesystem on md/raid, and some dirty buffers in memory.

    All other calls to stop an array should already happen after a flush.
    The normal sequence is to stop using the array (e.g. umount) which
    will cause __blkdev_put to call sync_blockdev. Then open the
    array and issue the STOP_ARRAY ioctl while the buffers are all still
    clean.

    So this invalidate_partition is normally a no-op, except for one case
    where it will cause a deadlock.

    So remove it.

    This patch possibly addresses the regression recored in
    http://bugzilla.kernel.org/show_bug.cgi?id=11460
    and
    http://bugzilla.kernel.org/show_bug.cgi?id=11452

    though it isn't yet clear how it ever worked.

    Signed-off-by: NeilBrown

    NeilBrown
     
  • If this triggers its bad, however some machines seem to have been
    triggering it for ages and we didn't know until we added the debug.

    So downgrade the debug now so people don't call this a regression.

    Signed-off-by: Dave Airlie

    Dave Airlie
     

29 Aug, 2008

3 commits

  • This patch remove blk_register_filter and blk_unregister_filter in
    gendisk, and adds them to sd.c, sr.c. and ide-cd.c

    The commit abf5439370491dd6fbb4fe1a7939680d2a9bc9d4 moved cmdfilter
    from gendisk to request_queue. It turned out that in some subsystems
    multiple gendisks share a single request_queue. So we get:

    Using physmap partition information
    Creating 3 MTD partitions on "physmap-flash":
    0x00000000-0x01c00000 : "User FS"
    0x01c00000-0x01c40000 : "booter"
    kobject (8511c410): tried to init an initialized object, something is seriously wrong.
    Call Trace:
    [] dump_stack+0x8/0x34
    [] kobject_init+0x50/0xcc
    [] kobject_init_and_add+0x24/0x58
    [] blk_register_filter+0x4c/0x64
    [] add_disk+0x78/0xe0
    [] add_mtd_blktrans_dev+0x254/0x278
    [] blktrans_notify_add+0x40/0x78
    [] add_mtd_device+0xd0/0x150
    [] add_mtd_partitions+0x568/0x5d8
    [] physmap_flash_probe+0x2ac/0x334
    [] driver_probe_device+0x12c/0x244
    [] __driver_attach+0x4c/0x84
    [] bus_for_each_dev+0x58/0xac
    [] bus_add_driver+0xc4/0x24c
    [] driver_register+0xcc/0x184
    [] _stext+0x60/0x1bc

    In the long term, we need to fix such subsystems but we need a quick
    fix now. This patch add the command filter support to only sd and sr
    though it might be useful for other SG_IO users (such as cciss).

    Signed-off-by: FUJITA Tomonori
    Reported-by: Manuel Lauss
    Signed-off-by: Jens Axboe

    FUJITA Tomonori
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6:
    Blackfin arch: Fix PM building on BF52x: No ROTWE on BF52x, add USBWE
    Blackfin arch: sram: use 'unsigned long' for irqflags
    Blackfin arch: let PCI depend on BROKEN
    Blackfin arch: move include/asm-blackfin header files to arch/blackfin
    Blackfin arch: fix bug - MPU crashes under stress
    Blackfin arch: Fix bug - when to rmmod the L1_module, it stucks and then reboot the board.
    Blackfin arch: dont actually need to muck with EMAC_SYSTAT for BF52x for demuxing
    Blackfin arch: Add MTD Partitions for MTD_DATAFLASH, increase max SPI SCLK

    Linus Torvalds
     
  • * 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
    i2c: Prevent log spam on some DVB adapters
    i2c: Add missing kerneldoc descriptions
    i2c: Fix device_init_wakeup place

    Linus Torvalds