08 Apr, 2007

1 commit

  • Soeren Sonnenburg reported that upon resume he is getting
    this backtrace:

    [] smp_apic_timer_interrupt+0x57/0x90
    [] retrigger_next_event+0x0/0xb0
    [] apic_timer_interrupt+0x28/0x30
    [] retrigger_next_event+0x0/0xb0
    [] __kfifo_put+0x8/0x90
    [] on_each_cpu+0x35/0x60
    [] clock_was_set+0x18/0x20
    [] timekeeping_resume+0x7c/0xa0
    [] __sysdev_resume+0x11/0x80
    [] sysdev_resume+0x47/0x80
    [] device_power_up+0x5/0x10

    it turns out that on resume we mistakenly re-enable interrupts too
    early. Do the timer retrigger only on the current CPU.

    Signed-off-by: Ingo Molnar
    Acked-by: Thomas Gleixner
    Acked-by: Soeren Sonnenburg
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     

07 Apr, 2007

3 commits


06 Apr, 2007

5 commits

  • .. perfect? Ahh, sure.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Beet mode looks for the beet pseudo header after the outer IP header,
    which is wrong since that is followed by the ESP header. Additionally
    it needs to adjust the packet length after removing the pseudo header
    and point the data pointer to the real data location.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • Beet mode decapsulation fails to properly set up the skb pointers, which
    only works by accident in combination with CONFIG_NETFILTER, since in that
    case the skb is fixed up in xfrm4_input before passing it to the netfilter
    hooks.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • draft-nikander-esp-beet-mode-07.txt states "The padding MUST be filled
    with NOP options as defined in Internet Protocol [1] section 3.1
    Internet header format.", so do that.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • Beet mode calculates an incorrect value for the transport header location
    when IP options are present, resulting in encapsulation errors.

    The correct location is 4 or 8 bytes before the end of the original IP
    header, depending on whether the pseudo header is padded.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     

05 Apr, 2007

13 commits

  • Up until this point we've accepted replay window settings greater than
    32 but our bit mask can only accomodate 32 packets. Thus any packet
    with a sequence number within the window but outside the bit mask would
    be accepted.

    This patch causes those packets to be rejected instead.

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

    Herbert Xu
     
  • Incoming trancated packets are counted as not only InTruncatedPkts but
    also InHdrErrors. They should be counted as InTruncatedPkts only.

    Signed-off-by: Mitsuru Chinen
    Acked-by: YOSHIFUJI Hideaki
    Signed-off-by: David S. Miller

    Mitsuru Chinen
     
  • When we receive an AppleTalk frame shorter than what its header says,
    we still attempt to verify its checksum, and trip on the BUG_ON() at
    the end of function atalk_sum_skb() because of the length mismatch.

    This has security implications because this can be triggered by simply
    sending a specially crafted ethernet frame to a target victim,
    effectively crashing that host. Thus this qualifies, I think, as a
    remote DoS. Here is the frame I used to trigger the crash, in npg
    format:

    {
    # Ethernet header -----

    XX XX XX XX XX XX # Destination MAC
    00 00 00 00 00 00 # Source MAC
    00 1D # Length

    # LLC header -----

    AA AA 03
    08 00 07 80 9B # Appletalk

    # Appletalk header -----

    00 1B # Packet length (invalid)
    00 01 # Fake checksum
    00 00 00 00 # Destination and source networks
    00 00 00 00 # Destination and source nodes and ports

    # Payload -----

    0C 0D 0E 0F 10 11 12 13
    14
    }

    The destination MAC address must be set to those of the victim.

    The severity is mitigated by two requirements:
    * The target host must have the appletalk kernel module loaded. I
    suspect this isn't so frequent.
    * AppleTalk frames are non-IP, thus I guess they can only travel on
    local networks. I am no network expert though, maybe it is possible
    to somehow encapsulate AppleTalk packets over IP.

    The bug has been reported back in June 2004:
    http://bugzilla.kernel.org/show_bug.cgi?id=2979
    But it wasn't investigated, and was closed in July 2006 as both
    reporters had vanished meanwhile.

    This code was new in kernel 2.6.0-test5:
    http://git.kernel.org/?p=linux/kernel/git/tglx/history.git;a=commitdiff;h=7ab442d7e0a76402c12553ee256f756097cae2d2
    And not modified since then, so we can assume that vanilla kernels
    2.6.0-test5 and later, and distribution kernels based thereon, are
    affected.

    Note that I still do not know for sure what triggered the bug in the
    real-world cases. The frame could have been corrupted by the kernel if
    we have a bug hiding somewhere. But more likely, we are receiving the
    faulty frame from the network.

    Signed-off-by: Jean Delvare
    Signed-off-by: David S. Miller

    Jean Delvare
     
  • Just a one-byter for an ia64 thinko/typo - already fixed for i386 and x86_64.

    Acked-by: Tony Luck
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Maciej Zenczykowski
     
  • drivers/tc/zs.c:73:24: error: asm/dec/tc.h: No such file or directory

    Signed-off-by: Yoichi Yuasa
    Acked-by: Maciej W. Rozycki
    Cc: Ralf Baechle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yoichi Yuasa
     
  • In debugging a problem w/ the -rt tree, I noticed that on systems that mark
    the tsc as unstable before it is registered, the TSC would still be
    selected and used for a short period of time. Digging in it looks to be a
    result of the mix of the clocksource list changes and my clocksource
    initialization changes.

    With the -rt tree, using a bad TSC, even for a short period of time can
    results in a hang at boot. I was not able to reproduce this hang w/
    mainline, but I'm not completely certain that someone won't trip on it.

    This patch resolves the issue by initializing the jiffies clocksource
    earlier so a bad TSC won't get selected just because nothing else is yet
    registered.

    Signed-off-by: John Stultz
    Acked-by: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    john stultz
     
  • This patch adds initialization of drv->cylinders back into the failing case in
    cciss_geometry_inquiry. I inadvertently removed it in one my 2TB updates.

    Signed-off-by: Mike Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Miller (OS Dev)
     
  • Revert all this. It can cause device-mapper to receive a different major from
    earlier kernels and it turns out that the Amanda backup program (via GNU tar,
    apparently) checks major numbers on files when performing incremental backups.

    Which is a bit broken of Amanda (or tar), but this feature isn't important
    enough to justify the churn.

    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Fix a bug in the swsusp's memory shrinker that causes some systems using
    highmem to refuse to suspend to disk if image_size is set above 1/2 of
    available RAM.

    Special thanks to Jiri Slaby for reporting the problem and assistance in
    debugging it.

    Signed-off-by: Rafael J. Wysocki
    Cc: Jiri Slaby
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • The return value of kernel_recvmsg() should be assigned to "err", not
    compared with the random value of a never initialized "err" (and the "< 0"
    check wrongly always returned false since == comparisons never have a
    result < 0).

    Spotted by the Coverity checker.

    Signed-off-by: Adrian Bunk
    Acked-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • A device can be removed from an md array via e.g.
    echo remove > /sys/block/md3/md/dev-sde/state

    This will try to remove the 'dev-sde' subtree which will deadlock
    since
    commit e7b0d26a86943370c04d6833c6edba2a72a6e240

    With this patch we run the kobject_del via schedule_work so as to
    avoid the deadlock.

    Cc: Alan Stern
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     
  • This patch adds 2 missing symbol exports: jiffies_to_timeval() and
    timeval_to_jiffies(). The (not yet merged) dm-raid4-5 module will need
    them, and they used to be indirectly exported by virtue of being inline
    functions.

    Commit 8b9365d753d9870bb6451504c13570b81923228f ("[PATCH] Uninline
    jiffies.h functions") uninlined them, and thus modules now need them
    explicitly exported to use them.

    Signed-off-by: Thomas Bittermann
    Acked-by: Andrew Morton
    Acked-by: Ingo Molnar
    Acked-by: Thomas Gleixner
    Acked-by: john stultz
    Signed-off-by: Linus Torvalds

    Thomas Bittermann
     
  • * 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
    [S390] cio: Fix handling of interrupt for csch().
    [S390] page_mkclean data corruption.

    Linus Torvalds
     

04 Apr, 2007

18 commits

  • The generic networking code ensures that no two networking devices
    have the same name, so there is no time except when sysfs has
    implementation bugs that device_rename when called from
    dev_change_name will fail.

    The current error handling for errors from device_rename in
    dev_change_name is wrong and results in an unusable and unrecoverable
    network device if device_rename is happens to return an error.

    This patch removes the buggy error handling. Which confines the mess
    when device_rename hits a problem to sysfs, instead of propagating it
    the rest of the network stack. Making linux a little more robust.

    Without this patch you can observe what happens when sysfs has a bug
    when CONFIG_SYSFS_DEPRECATED is not set and you attempt to rename
    a real network device to a name like (broken_parity_status, device,
    modalias, power, resource2, subsystem_vendor, class, driver, irq,
    msi_bus, resource, subsystem, uevent, config, enable, local_cpus,
    numa_node, resource0, subsystem_device, vendor)

    Greg has a patch that fixes the sysfs bugs but he doesn't trust it
    for a 2.6.21 timeframe. This patch which just ignores errors should
    be safe and it keeps the system from going completely wacky.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • Mention the slab name when listing corrupt objects. Although the function
    that released the memory is mentioned, that is frequently ambiguous as such
    functions often release several pieces of memory.

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

    David Howells
     
  • * 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
    libata: Limit ATAPI DMA to R/W commands only for TORiSAN DVD drives (take 3)
    libata: Limit max sector to 128 for TORiSAN DVD drives (take 3)
    libata: Clear tf before doing request sense (take 3)
    libata: reorder HSM_ST_FIRST for easier decoding (take 3)
    libata bugfix: preserve LBA bit for HDIO_DRIVE_TASK
    2.6.21 fix lba48 bug in libata fill_result_tf()

    Linus Torvalds
     
  • This adds some NCQ blacklist entries taken from the Silicon Image 3124/3132
    Windows driver .inf files. There are some confirming reports of problems
    with these drives under Linux (for example http://lkml.org/lkml/2007/3/4/178)
    so let's disable NCQ on these drives.

    [ I'm personally starting to wonder whether we shouldn't disable NCQ by
    default, and perhaps have a white-list. There seems to be a *lot* of
    drives that do this wrong.. - Linus ]

    Signed-off-by: Robert Hancock
    Acked-by: Tejun Heo
    Signed-off-by: Linus Torvalds

    Robert Hancock
     
  • * 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
    r8169: fix suspend/resume for down interface
    r8169: issue request_irq after the private data are completely initialized
    b44: fix IFF_ALLMULTI handling of CAM slots
    cxgb3 - Firwmare update
    cxgb3 - Tighten xgmac workaround
    cxgb3 - detect NIC only adapters
    cxgb3 - Safeguard TCAM size usage

    Linus Torvalds
     
  • Wipe internal irb if the clear function bit is set before accumulating
    bits from the irb in order to follow hardware behaviour.

    Signed-off-by: Cornelia Huck
    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Cornelia Huck
     
  • The git commit c2fda5fed81eea077363b285b66eafce20dfd45a which
    added the page_test_and_clear_dirty call to page_mkclean and the
    git commit 7658cc289288b8ae7dd2c2224549a048431222b3 which fixes
    the "nasty and subtle race in shared mmap'ed page writeback"
    problem in clear_page_dirty_for_io cause data corruption on s390.

    The effect of the two changes is that for every call to
    clear_page_dirty_for_io a page_test_and_clear_dirty is done. If
    the per page dirty bit is set set_page_dirty is called. Strangly
    clear_page_dirty_for_io is called for not-uptodate pages, e.g.
    over this call-chain:

    [] clear_page_dirty_for_io+0x12a/0x130
    [] generic_writepages+0x258/0x3e0
    [] do_writepages+0x76/0x7c
    [] __writeback_single_inode+0xba/0x3e4
    [] sync_sb_inodes+0x23e/0x398
    [] writeback_inodes+0x12e/0x140
    [] wb_kupdate+0xd2/0x178
    [] pdflush+0x162/0x23c

    The bad news now is that page_test_and_clear_dirty might claim
    that a not-uptodate page is dirty since SetPageUptodate which
    resets the per page dirty bit has not yet been called. The page
    writeback that follows clobbers the data on disk.

    The simplest solution to this problem is to move the call to
    page_test_and_clear_dirty under the "if (page_mapped(page))".
    If a file backed page is mapped it is uptodate.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • patch 4/4:

    Limit ATAPI DMA to R/W commands only for TORiSAN DRD-N216 DVD-ROM drives
    (http://bugzilla.kernel.org/show_bug.cgi?id=6710)

    Signed-off-by: Albert Lee
    Signed-off-by: Jeff Garzik

    Albert Lee
     
  • patch 3/4:
    The TORiSAN drive locks up when max sector == 256.
    Limit max sector to 128 for the TORiSAN DRD-N216 drives.
    (http://bugzilla.kernel.org/show_bug.cgi?id=6710)

    Signed-off-by: Albert Lee
    Signed-off-by: Jeff Garzik

    Albert Lee
     
  • patch 2/4:
    Clear tf before doing request sense.

    This fixes the AOpen 56X/AKH timeout problem.
    (http://bugzilla.kernel.org/show_bug.cgi?id=8244)

    Signed-off-by: Albert Lee
    Signed-off-by: Jeff Garzik

    Albert Lee
     
  • patch 1/4:
    Reorder HSM_ST_FIRST, such that the task state transition is easier decoded with human eyes.

    Signed-off-by: Albert Lee
    Signed-off-by: Jeff Garzik

    Albert Lee
     
  • Preserve the LBA bit in the DevSel/Head register for HDIO_DRIVE_TASK.

    Signed-off-by: Mark Lord
    Signed-off-by: Jeff Garzik

    Mark Lord
     
  • Current 2.6.21 libata does the following:

    void ata_tf_read(struct ata_port *ap, struct ata_taskfile *tf)
    {
    struct ata_ioports *ioaddr = &ap->ioaddr;

    tf->command = ata_check_status(ap);
    ...
    if (tf->flags & ATA_TFLAG_LBA48) {
    iowrite8(tf->ctl | ATA_HOB, ioaddr->ctl_addr);
    tf->hob_feature = ioread8(ioaddr->error_addr);
    ...
    }
    }
    ...
    static void fill_result_tf(struct ata_queued_cmd *qc)
    {
    struct ata_port *ap = qc->ap;

    ap->ops->tf_read(ap, &qc->result_tf);
    qc->result_tf.flags = qc->tf.flags;
    }

    Based on this, those last two statements fill_result_tf()
    appear to me to be in the wrong order, in that the tf->flags
    are uninitialized at the point where tf_read() is invoked.
    So for lba48 commands, tf_read() won't be reading back the
    full lba48 register contents..

    Correct?

    This patch corrects fill_result_tf() so that the flags
    get copied to result_tf before they are used by tf_read().

    Signed-off-by: Mark Lord
    Signed-off-by: Jeff Garzik

    Mark Lord
     
  • The PM hooks are no-op if the r8169 interface is down (i.e. !IFF_UP).
    However, as the chipset is enabled, the device will not work after a
    suspend/resume cycle. The patch always issue the required PCI suspend
    sequence and removes the module unload/reload workaround.

    Signed-off-by: Arnaud Patard
    Signed-off-by: Francois Romieu
    Signed-off-by: Jeff Garzik

    Francois Romieu
     
  • The irq handler schedules a NAPI poll request unconditionally as soon as
    the status register is not clean. It has been there - and wrong - for
    ages but a recent timing change made it apparently easier to trigger.

    Signed-off-by: Francois Romieu
    Cc: Jay Cliburn
    Signed-off-by: Jeff Garzik

    Francois Romieu
     
  • If you set the IFF_ALLMULTI flag on a b44 device, or if you join more than
    B44_MCAST_TABLE_SIZE multicast groups, the device will stop receiving unicast
    messages. This is because the __b44_set_mac_addr call sets the zeroth CAM
    entry to the MAC address of the device, and then the loop at line 1722
    proceeds to overwrite it unless the value of i is set by the __b44_load_mcast
    call. However, when IFF_ALLMULTI is set, that call is bypassed, leaving i set
    to zero.

    Fixed by starting the loop at 1 to make it skip the CAM entry for the MAC
    address.

    Signed-off-by: Bill Helfinstine
    Signed-off-by: Jeff Garzik

    Bill Helfinstine
     
  • Introduce FW micro version.
    Bump up FW version to 3.3.0

    Signed-off-by: Divy Le Ray
    Signed-off-by: Jeff Garzik

    Divy Le Ray
     
  • Run the watchdog task when the link is up.
    Flush the XGMAC Tx FIFO when the link drops.

    Also remove a statistics update that should have gone
    in the previous modification of xgmac.c.

    Signed-off-by: Divy Le Ray
    Signed-off-by: Jeff Garzik

    Divy Le Ray