20 Sep, 2007

4 commits

  • struct utsname is copied from master one without any exclusion.

    Here is sample output from one proggie doing

    sethostname("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
    sethostname("bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");

    and another

    clone(,, CLONE_NEWUTS, ...)
    uname()

    hostname = 'aaaaaaaaaaaaaaaaaaaaaaaaabbbbb'
    hostname = 'bbbaaaaaaaaaaaaaaaaaaaaaaaaaaa'
    hostname = 'aaaaaaaabbbbbbbbbbbbbbbbbbbbbb'
    hostname = 'aaaaaaaaaaaaaaaaaaaaaaaaaabbbb'
    hostname = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaabb'
    hostname = 'aaabbbbbbbbbbbbbbbbbbbbbbbbbbb'
    hostname = 'bbbbbbbbbbbbbbbbaaaaaaaaaaaaaa'

    Hostname is sometimes corrupted.

    Yes, even _the_ simplest namespace activity had bug in it. :-(

    Signed-off-by: Alexey Dobriyan
    Acked-by: Serge Hallyn
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Commit 831441862956fffa17b9801db37e6ea1650b0f69 (Freezer: make kernel
    threads nonfreezable by default) breaks freezing when attempting to resume
    from an initrd, because the init (which is freezeable) spins while waiting
    for another thread to run /linuxrc, but doesn't check whether it has been
    told to enter the refrigerator. The original patch replaced a call to
    try_to_freeze() with a call to yield(). I believe a simple reversion is
    wrong because if !CONFIG_PM_SLEEP, try_to_freeze() is a noop. It should
    still yield.

    Signed-off-by: Nigel Cunningham
    Acked-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nigel Cunningham
     
  • I found a type mismatch in UML that makes host block devices unusable as ubd
    devices on x86_64 and other 64 bits systems (segfault of the mm subsystem):

    In block/ioctl.c, the following lines show that the BLKGETSIZE ioctl expects
    a pointer to a long:

    case BLKGETSIZE:
    if ((bdev->bd_inode->i_size >> 9) > ~0UL)
    return -EFBIG;
    return put_ulong(arg, bdev->bd_inode->i_size >> 9);

    In arch/um/os-Linux/file.c, os_file_size calls it with an int.

    The ioctl_list man page should be fixed as well.

    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nicolas George
     
  • sparc32:

    drivers/block/DAC960.c: In function 'DAC960_V1_EnableMemoryMailboxInterface':
    drivers/block/DAC960.c:1168: error: 'DMA_32BIT_MASK' undeclared (first use in this function)
    drivers/block/DAC960.c:1168: error: (Each undeclared identifier is reported only

    Cc:
    Cc:
    Cc: Alessandro Polverini
    Cc: Jeff Garzik
    Cc: Matthew Wilcox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

17 Sep, 2007

24 commits

  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
    ACPI: thinkpad-acpi: bump up version to 0.16
    ACPI: thinkpad-acpi: revert new 2.6.23 CONFIG_THINKPAD_ACPI_INPUT_ENABLED option
    ACPI: fix CONFIG_NET=n acpi_bus_generate_netlink_event build failure
    msi-laptop: replace ',' with ';'
    ACPI: (more) delete CONFIG_ACPI_PROCFS_SLEEP (again)

    Linus Torvalds
     
  • Len Brown
     
  • Name it thinkpad-acpi version 0.16 to avoid any confusion with some 0.15
    thinkpad-acpi development snapshots and backports that had input layer
    support, but no hotkey_report_mode support.

    Signed-off-by: Henrique de Moraes Holschuh
    Signed-off-by: Len Brown

    Henrique de Moraes Holschuh
     
  • Revert new 2.6.23 CONFIG_THINKPAD_ACPI_INPUT_ENABLED Kconfig option because
    it would create a legacy we don't want to support.

    CONFIG_THINKPAD_ACPI_INPUT_ENABLED was added to try to fix an issue that is
    now moot with the addition of the netlink ACPI event report interface to
    the ACPI core.

    Now that ACPI core can send events over netlink, we can use a different
    strategy to keep backwards compatibility with older userspace, without the
    need for the CONFIG_THINKPAD_ACPI_INPUT_ENABLED games. And it arrived
    before CONFIG_THINKPAD_ACPI_INPUT_ENABLED made it to a stable mainline
    kernel, even, which is Good.

    This patch is in sync with some changes to thinkpad-acpi backports, that
    will keep things sane for userspace across different combinations of kernel
    versions, thinkpad-acpi backports (or the lack thereof), and userspace
    capabilities:

    Unless a module parameter is used, thinkpad-acpi will now behave in such a
    way that it will work well (by default) with userspace that still uses only
    the old ACPI procfs event interface and doesn't care for thinkpad-acpi
    input devices.

    It will also always work well with userspace that has been updated to use
    both the thinkpad-acpi input devices, and ACPI core netlink event
    interface, regardless of any module parameter.

    The module parameter was added to allow thinkpad-acpi to work with
    userspace that has been partially updated to use thinkpad-acpi input
    devices, but not the new ACPI core netlink event interface. To use this
    mode of hot key reporting, one has to specify the hotkey_report_mode=2
    module parameter.

    The thinkpad-acpi driver exports the value of hotkey_report_mode through
    sysfs, as well. thinkpad-acpi backports to older kernels, that do not
    support the new ACPI core netlink interface, have code to allow userspace
    to switch hotkey_report_mode at runtime through sysfs. This capability
    will not be provided in mainline thinkpad-acpi as it is not needed there.

    Signed-off-by: Henrique de Moraes Holschuh
    Cc: Michael S. Tsirkin
    Cc: Hugh Dickins
    Cc: Richard Hughes
    Signed-off-by: Len Brown

    Henrique de Moraes Holschuh
     
  • Len Brown
     
  • * 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
    [SPARC64]: Warn user if cpu is ignored.
    [SPARC64]: Fix lockdep, particularly on SMP.
    [SPARC64]: Update defconfig.

    Linus Torvalds
     
  • * 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
    [VLAN]: Fix net_device leak.
    [PPP] generic: Fix receive path data clobbering & non-linear handling
    [PPP] generic: Call skb_cow_head before scribbling over skb
    [NET] skbuff: Add skb_cow_head
    [BRIDGE]: Kill clone argument to br_flood_*
    [PPP] pppoe: Fill in header directly in __pppoe_xmit
    [PPP] pppoe: Fix data clobbering in __pppoe_xmit and return value
    [PPP] pppoe: Fix skb_unshare_check call position
    [SCTP]: Convert bind_addr_list locking to RCU
    [SCTP]: Add RCU synchronization around sctp_localaddr_list
    [PKT_SCHED]: sch_cbq.c: Shut up uninitialized variable warning
    [PKTGEN]: srcmac fix
    [IPV6]: Fix source address selection.
    [IPV4]: Just increment OutDatagrams once per a datagram.
    [IPV6]: Just increment OutDatagrams once per a datagram.
    [IPV6]: Fix unbalanced socket reference with MSG_CONFIRM.
    [NET_SCHED] protect action config/dump from irqs
    [NET]: Fix two issues wrt. SO_BINDTODEVICE.

    Linus Torvalds
     
  • When CONFIG_ISA is disabled, the isa_driver support will not be compiled
    in. Define stubs so that we don't get link-time errors.

    Signed-off-by: Matthew Wilcox
    Signed-off-by: Linus Torvalds

    Matthew Wilcox
     
  • In "[VLAN]: Move device registation to seperate function" (commit
    e89fe42cd03c8fd3686df82d8390a235717a66de), a pile of code got moved
    to register_vlan_dev(), including grabbing a reference to underlying
    device. However, original dev_hold() had been left behind, so we
    leak a reference to net_device now...

    Signed-off-by: Al Viro
    Signed-off-by: David S. Miller

    Al Viro
     
  • This patch adds missing pskb_may_pull calls to deal with non-linear
    packets that may arrive from pppoe or pppol2tp.

    It also copies cloned packets before writing over them.

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

    Herbert Xu
     
  • It's rude to write over data that other people are still using. So call
    skb_cow_head before PPP proceeds to modify the skb data.

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

    Herbert Xu
     
  • This patch adds an optimised version of skb_cow that avoids the copy if
    the header can be modified even if the rest of the payload is cloned.

    This can be used in encapsulating paths where we only need to modify the
    header. As it is, this can be used in PPPOE and bridging.

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

    Herbert Xu
     
  • The clone argument is only used by one caller and that caller can clone
    the packet itself. This patch moves the clone call into the caller and
    kills the clone argument.

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

    Herbert Xu
     
  • This patch removes the hdr variable (which is copied into the skb)
    and instead sets the header directly in the skb.

    It also uses __skb_push instead of skb_push since we've just checked
    using skb_cow for enough head room.

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

    Herbert Xu
     
  • The function __pppoe_xmit modifies the skb data and therefore it needs
    to copy and skb data if it's cloned.

    In fact, it currently allocates a new skb so that it can return 0 in
    case of error without freeing the original skb. This is totally wrong
    because returning zero is meant to indicate congestion whereupon pppoe
    is supposed to wake up the upper layer once the congestion subsides.

    This makes sense for ppp_async and ppp_sync but is out-of-place for
    pppoe. This patch makes it always return 1 and free the skb.

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

    Herbert Xu
     
  • The skb_unshare_check call needs to be made before pskb_may_pull,
    not after.

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

    Herbert Xu
     
  • Since the sctp_sockaddr_entry is now RCU enabled as part of
    the patch to synchronize sctp_localaddr_list, it makes sense to
    change all handling of these entries to RCU. This includes the
    sctp_bind_addrs structure and it's list of bound addresses.

    This list is currently protected by an external rw_lock and that
    looks like an overkill. There are only 2 writers to the list:
    bind()/bindx() calls, and BH processing of ASCONF-ACK chunks.
    These are already seriealized via the socket lock, so they will
    not step on each other. These are also relatively rare, so we
    should be good with RCU.

    The readers are varied and they are easily converted to RCU.

    Signed-off-by: Vlad Yasevich
    Acked-by: Paul E. McKenney
    Acked-by: Sridhar Samdurala
    Signed-off-by: David S. Miller

    Vlad Yasevich
     
  • sctp_localaddr_list is modified dynamically via NETDEV_UP
    and NETDEV_DOWN events, but there is not synchronization
    between writer (even handler) and readers. As a result,
    the readers can access an entry that has been freed and
    crash the sytem.

    Signed-off-by: Vlad Yasevich
    Acked-by: Paul E. McKenney
    Acked-by: Sridhar Samdurala
    Signed-off-by: David S. Miller

    Vlad Yasevich
     
  • net/sched/sch_cbq.c: In function 'cbq_enqueue':
    net/sched/sch_cbq.c:383: warning: 'ret' may be used uninitialized in this function

    has been verified to be a bogus case. So let's shut it up.

    Signed-off-by: Satyam Sharma
    Acked-by: Patrick McHardy
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Satyam Sharma
     
  • From: Adit Ranadive

    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Adit Ranadive
     
  • The commit 95c385 broke proper source address selection for cases in which
    there is a address which is makred 'deprecated'. The commit mistakenly
    changed ifa->flags to ifa_result->flags (probably copy/paste error from a
    few lines above) in the 'Rule 3' address selection code.

    The patch restores the previous RFC-compliant behavior.

    Signed-off-by: Jiri Kosina
    Signed-off-by: David S. Miller

    Jiri Kosina
     
  • When NR_CPUS is smaller than the cpu probed, let the user
    know that the cpu won't be used.

    Suggested by Al Viro.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • As noted by Al Viro, when we try to call prom_set_trap_table()
    in the SMP trampoline code we try to take the PROM call spinlock
    which doesn't work because the current thread pointer isn't
    valid yet and lockdep depends upon that being correct.

    Furthermore, we cannot set the current thread pointer register
    because it can't be properly dereferenced until we return from
    prom_set_trap_table(). Kernel TLB misses only work after that
    call.

    So do the PROM call to set the trap table directly instead of
    going through the OBP library C code, and thus avoid the lock
    altogether.

    These calls are guarenteed to be serialized fully.

    Since there are now no calls to the prom_set_trap_table{_sun4v}()
    library functions, they can be deleted.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Signed-off-by: David S. Miller

    David S. Miller
     

16 Sep, 2007

12 commits

  • Taking a cpu offline removes the cpu from the online mask before the
    CPU_DEAD notification is done. The clock events layer does the cleanup
    of the dead CPU from the CPU_DEAD notifier chain. tick_do_timer_cpu is
    used to avoid xtime lock contention by assigning the task of jiffies
    xtime updates to one CPU. If a CPU is taken offline, then this
    assignment becomes stale. This went unnoticed because most of the time
    the offline CPU went dead before the online CPU reached __cpu_die(),
    where the CPU_DEAD state is checked. In the case that the offline CPU did
    not reach the DEAD state before we reach __cpu_die(), the code in there
    goes to sleep for 100ms. Due to the stale time update assignment, the
    system is stuck forever.

    Take the assignment away when a cpu is not longer in the cpu_online_mask.
    We do this in the last call to tick_nohz_stop_sched_tick() when the offline
    CPU is on the way to the final play_dead() idle entry.

    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     
  • When a cpu goes offline it is removed from the broadcast masks. If the
    mask becomes empty the code shuts down the broadcast device. This is
    wrong, because the broadcast device needs to be ready for the online
    cpu going idle (into a c-state, which stops the local apic timer).

    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     
  • The jinxed VAIO refuses to resume without hitting keys on the keyboard
    when this is not enforced. It is unclear why the cpu ends up in a lower
    C State without notifying the clock events layer, but enforcing the
    oneshot broadcast here is safe.

    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     
  • Reevaluate C/P/T states when a cpu becomes online. This avoids
    the caching of the broadcast information in the clockevents layer.

    Signed-off-by: Venkatesh Pallipadi
    Signed-off-by: Thomas Gleixner
    Cc: Len Brown

    Venkatesh Pallipadi
     
  • Timekeeping resume adjusts xtime by adding the slept time in seconds and
    resets the reference value of the clock source (clock->cycle_last).
    clock->cycle last is used to calculate the delta between the last xtime
    update and the readout of the clock source in __get_nsec_offset(). xtime
    plus the offset is the current time. The resume code ignores the delta
    which had already elapsed between the last xtime update and the actual
    time of suspend. If the suspend time is short, then we can see time
    going backwards on resume.

    Suspend:
    offs_s = clock->read() - clock->cycle_last;
    now = xtime + offs_s;
    timekeeping_suspend_time = read_rtc();

    Resume:
    sleep_time = read_rtc() - timekeeping_suspend_time;
    xtime.tv_sec += sleep_time;
    clock->cycle_last = clock->read();
    offs_r = clock->read() - clock->cycle_last;
    now = xtime + offs_r;

    if sleep_time_seconds == 0 and offs_r < offs_s, then time goes
    backwards.

    Fix this by storing the offset from the last xtime update and add it to
    xtime during resume, when we reset clock->cycle_last:

    sleep_time = read_rtc() - timekeeping_suspend_time;
    xtime.tv_sec += sleep_time;
    xtime += offs_s; /* Fixup xtime offset at suspend time */
    clock->cycle_last = clock->read();
    offs_r = clock->read() - clock->cycle_last;
    now = xtime + offs_r;

    Thanks to Marcelo for tracking this down on the OLPC and providing the
    necessary details to analyze the root cause.

    Signed-off-by: Thomas Gleixner
    Cc: John Stultz
    Cc: Tosatti

    Thomas Gleixner
     
  • Lockdep complains about the access of rtc in timekeeping_suspend
    inside the interrupt disabled region of the write locked xtime lock.
    Move the access outside.

    Signed-off-by: Thomas Gleixner
    Cc: John Stultz

    Thomas Gleixner
     
  • * 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
    drivers/net/pcmcia/3c589_cs: fix port configuration switcheroo
    sk98lin: resurrect driver
    ucc_geth: fix compilation
    mv643xx_eth: Fix tx_bytes stats calculation
    As struct iw_point is bi-directional payload, we should copy back the content
    [PATCH] bcm43xx: Fix cancellation of work queue crashes
    spidernet: fix interrupt reason recognition
    ehea: fix last_rx update
    ehea: propagate physical port state
    Fix a lock problem in generic phy code
    sky2: restore multicast list on resume and other ops
    atl1: disable broken 64-bit DMA

    Linus Torvalds
     
  • 10base2 and 10baseT were accidentally switched.

    Noticed by Andreas HÃŒbner, forwarded by Alan Cox.

    Signed-off-by: Jeff Garzik

    Jeff Garzik
     
  • This reverts commit e1abecc48938fbe1966ea6e78267fc673fa59295.

    The driver works on some hardware that skge doesn't handle yet.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: Jeff Garzik

    Stephen Hemminger
     
  • Currently qe_bd_t is used in the macro call -- dma_unmap_single,
    which is a no-op on PPC32, thus error is hidden today. Starting
    with 2.6.24, macro will be replaced by the empty static function,
    and erroneous use of qe_bd_t will trigger compilation error.

    Signed-off-by: Anton Vorontsov
    Signed-off-by: Jeff Garzik

    Anton Vorontsov
     
  • Reported by Corey Minyard

    Signed-off-by: Jeff Garzik

    Dale Farnsworth
     
  • …nville/wireless-2.6 into upstream-fixes

    Jeff Garzik