11 Sep, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (28 commits)
    ipheth: remove incorrect devtype to WWAN
    MAINTAINERS: Add CAIF
    sctp: fix test for end of loop
    KS8851: Correct RX packet allocation
    udp: add rehash on connect()
    net: blackhole route should always be recalculated
    ipv4: Suppress lockdep-RCU false positive in FIB trie (3)
    niu: Fix kernel buffer overflow for ETHTOOL_GRXCLSRLALL
    ipvs: fix active FTP
    gro: Re-fix different skb headrooms
    via-velocity: Turn scatter-gather support back off.
    ipv4: Fix reverse path filtering with multipath routing.
    UNIX: Do not loop forever at unix_autobind().
    PATCH: b44 Handle RX FIFO overflow better (simplified)
    irda: off by one
    3c59x: Fix deadlock in vortex_error()
    netfilter: discard overlapping IPv6 fragment
    ipv6: discard overlapping fragment
    net: fix tx queue selection for bridged devices implementing select_queue
    bonding: Fix jiffies overflow problems (again)
    ...

    Fix up trivial conflicts due to the same cgroup API thinko fix going
    through both Andrew and the networking tree. However, there were small
    differences between the two, with Andrew's version generally being the
    nicer one, and the one I merged first. So pick that one.

    Conflicts in: include/linux/cgroup.h and kernel/cgroup.c

    Linus Torvalds
     

10 Sep, 2010

16 commits

  • * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
    block: Range check cpu in blk_cpu_to_group
    scatterlist: prevent invalid free when alloc fails
    writeback: Fix lost wake-up shutting down writeback thread
    writeback: do not lose wakeup events when forking bdi threads
    cciss: fix reporting of max queue depth since init
    block: switch s390 tape_block and mg_disk to elevator_change()
    block: add function call to switch the IO scheduler from a driver
    fs/bio-integrity.c: return -ENOMEM on kmalloc failure
    bio-integrity.c: remove dependency on __GFP_NOFAIL
    BLOCK: fix bio.bi_rw handling
    block: put dev->kobj in blk_register_queue fail path
    cciss: handle allocation failure
    cfq-iosched: Documentation help for new tunables
    cfq-iosched: blktrace print per slice sector stats
    cfq-iosched: Implement tunable group_idle
    cfq-iosched: Do group share accounting in IOPS when slice_idle=0
    cfq-iosched: Do not idle if slice_idle=0
    cciss: disable doorbell reset on reset_devices
    blkio: Fix return code for mkdir calls

    Linus Torvalds
     
  • David S. Miller
     
  • * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
    libata-sff: Reenable Port Multiplier after libata-sff remodeling.
    libata: skip EH autopsy and recovery during suspend
    ahci: AHCI and RAID mode SATA patch for Intel Patsburg DeviceIDs
    ata_piix: IDE Mode SATA patch for Intel Patsburg DeviceIDs
    libata,pata_via: revert ata_wait_idle() removal from ata_sff/via_tf_load()
    ahci: fix hang on failed softreset
    pata_artop: Fix device ID parity check

    Linus Torvalds
     
  • Keep track of the link on the which the current request is in progress.
    It allows support of links behind port multiplier.

    Not all libata-sff is PMP compliant. Code for native BMDMA controller
    does not take in accound PMP.

    Tested on Marvell 7042 and Sil7526.

    Signed-off-by: Gwendal Grignou
    Signed-off-by: Jeff Garzik

    Gwendal Grignou
     
  • For some mysterious reason, certain hardware reacts badly to usual EH
    actions while the system is going for suspend. As the devices won't
    be needed until the system is resumed, ask EH to skip usual autopsy
    and recovery and proceed directly to suspend.

    Signed-off-by: Tejun Heo
    Tested-by: Stephan Diestelhorst
    Cc: stable@kernel.org
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • …low and kswapd is awake

    Ordinarily watermark checks are based on the vmstat NR_FREE_PAGES as it is
    cheaper than scanning a number of lists. To avoid synchronization
    overhead, counter deltas are maintained on a per-cpu basis and drained
    both periodically and when the delta is above a threshold. On large CPU
    systems, the difference between the estimated and real value of
    NR_FREE_PAGES can be very high. If NR_FREE_PAGES is much higher than
    number of real free page in buddy, the VM can allocate pages below min
    watermark, at worst reducing the real number of pages to zero. Even if
    the OOM killer kills some victim for freeing memory, it may not free
    memory if the exit path requires a new page resulting in livelock.

    This patch introduces a zone_page_state_snapshot() function (courtesy of
    Christoph) that takes a slightly more accurate view of an arbitrary vmstat
    counter. It is used to read NR_FREE_PAGES while kswapd is awake to avoid
    the watermark being accidentally broken. The estimate is not perfect and
    may result in cache line bounces but is expected to be lighter than the
    IPI calls necessary to continually drain the per-cpu counters while kswapd
    is awake.

    Signed-off-by: Christoph Lameter <cl@linux.com>
    Signed-off-by: Mel Gorman <mel@csn.ul.ie>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

    Christoph Lameter
     
  • Tests with recent firmware on Intel X25-M 80GB and OCZ Vertex 60GB SSDs
    show a shift since I last tested in December: in part because of firmware
    updates, in part because of the necessary move from barriers to awaiting
    completion at the block layer. While discard at swapon still shows as
    slightly beneficial on both, discarding 1MB swap cluster when allocating
    is now disadvanteous: adds 25% overhead on Intel, adds 230% on OCZ (YMMV).

    Surrender: discard as presently implemented is more hindrance than help
    for swap; but might prove useful on other devices, or with improvements.
    So continue to do the discard at swapon, but make discard while swapping
    conditional on a SWAP_FLAG_DISCARD to sys_swapon() (which has been using
    only the lower 16 bits of int flags).

    We can add a --discard or -d to swapon(8), and a "discard" to swap in
    /etc/fstab: matching the mount option for btrfs, ext4, fat, gfs2, nilfs2.

    Signed-off-by: Hugh Dickins
    Cc: Christoph Hellwig
    Cc: Nigel Cunningham
    Cc: Tejun Heo
    Cc: Jens Axboe
    Cc: James Bottomley
    Cc: "Martin K. Petersen"
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • Please revert 2.6.36-rc commit d2997b1042ec150616c1963b5e5e919ffd0b0ebf
    "hibernation: freeze swap at hibernation". It complicated matters by
    adding a second swap allocation path, just for hibernation; without in any
    way fixing the issue that it was intended to address - page reclaim after
    fixing the hibernation image might free swap from a page already imaged as
    swapcache, letting its swap be reallocated to store a different page of
    the image: resulting in data corruption if the imaged page were freed as
    clean then swapped back in. Pages freed to si->swap_map were still in
    danger of being reallocated by the alternative allocation path.

    I guess it inadvertently fixed slow SSD swap allocation for hibernation,
    as reported by Nigel Cunningham: by missing out the discards that occur on
    the usual swap allocation path; but that was unintentional, and needs a
    separate fix.

    Signed-off-by: Hugh Dickins
    Cc: KAMEZAWA Hiroyuki
    Cc: KOSAKI Motohiro
    Cc: "Rafael J. Wysocki"
    Cc: Ondrej Zary
    Cc: Andrea Gelmini
    Cc: Balbir Singh
    Cc: Andrea Arcangeli
    Cc: Nigel Cunningham
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • There's been some recent confusion about error checking GPIO numbers.
    briefly, it should be handled mostly during setup, when gpio_request() is
    called, and NEVER by expectig gpio_is_valid to report more than
    never-usable GPIO numbers.

    [akpm@linux-foundation.org: terminate unterminated comment]
    Signed-off-by: David Brownell
    Cc: Eric Miao"
    Cc: "Ryan Mallon"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • Replace the arbitrary software-reset call from the device-probe
    method, because:

    - It is defective. To work correctly, it should be two byte writes,
    not a single word write. As it stands, it does nothing.

    - Some devices with sx150x expanders installed have their NRESET pins
    ganged on the same line, so resetting one causes the others to reset -
    not a nice thing to do arbitrarily!

    - The probe, usually taking place at boot, implies a recent hard-reset,
    so a software reset at this point is just a waste of energy anyway.

    Therefore, make it optional, defaulting to off, as this will match the
    common case of probing at powerup and also matches the current broken
    no-op behavior.

    Signed-off-by: Gregory Bean
    Reviewed-by: Jean Delvare
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Gregory Bean
     
  • The pte_same check is reliable only if the swap entry remains pinned (by
    the page lock on swapcache). We've also to ensure the swapcache isn't
    removed before we take the lock as try_to_free_swap won't care about the
    page pin.

    One of the possible impacts of this patch is that a KSM-shared page can
    point to the anon_vma of another process, which could exit before the page
    is freed.

    This can leave a page with a pointer to a recycled anon_vma object, or
    worse, a pointer to something that is no longer an anon_vma.

    [riel@redhat.com: changelog help]
    Signed-off-by: Andrea Arcangeli
    Acked-by: Hugh Dickins
    Reviewed-by: Rik van Riel
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Arcangeli
     
  • Add cgroup_attach_task_all()

    The existing cgroup_attach_task_current_cg() API is called by a thread to
    attach another thread to all of its cgroups; this is unsuitable for cases
    where a privileged task wants to attach itself to the cgroups of a less
    privileged one, since the call must be made from the context of the target
    task.

    This patch adds a more generic cgroup_attach_task_all() API that allows
    both the source task and to-be-moved task to be specified.
    cgroup_attach_task_current_cg() becomes a specialization of the more
    generic new function.

    [menage@google.com: rewrote changelog]
    [akpm@linux-foundation.org: address reviewer comments]
    Signed-off-by: Michael S. Tsirkin
    Tested-by: Alex Williamson
    Acked-by: Paul Menage
    Cc: Li Zefan
    Cc: Ben Blum
    Cc: Sridhar Samudrala
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael S. Tsirkin
     
  • Some macro parameter references inside typeof() operator are not enclosed
    with parenthesis. It should be safer to add them.

    Signed-off-by: Huang Ying
    Acked-by: Stefani Seibold
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Huang Ying
     
  • The introduction of support for SD combo cards breaks the initialization
    of all CSR SDIO chips. The GO_IDLE (CMD0) in mmc_sd_get_cid() causes CSR
    chips to be reset (this is non-standard behavior).

    When initializing an SDIO card check for a combo card by using the memory
    present bit in the R4 response to IO_SEND_OP_COND (CMD5). This avoids the
    call to mmc_sd_get_cid() on an SDIO-only card.

    Signed-off-by: David Vrabel
    Acked-by: Michal Mirolaw
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Vrabel
     
  • lg_lock_global() currently only acquires spinlocks for online CPUs, but
    it's meant to lock all possible CPUs. Lglock-protected resources may be
    associated with removed CPUs - and, indeed, that could happen with the
    per-superblock open files lists.

    At Nick's suggestion, change for_each_online_cpu() to
    for_each_possible_cpu() to protect accesses to those resources.

    Cc: Al Viro
    Acked-by: Nick Piggin
    Signed-off-by: Jonathan Corbet
    Signed-off-by: Linus Torvalds

    Jonathan Corbet
     
  • So it can be used by all that need to check for that.

    Signed-off-by: Stefan Bader
    Signed-off-by: Linus Torvalds

    Stefan Bader
     

09 Sep, 2010

6 commits

  • David S. Miller
     
  • commit 30fff923 introduced in linux-2.6.33 (udp: bind() optimisation)
    added a secondary hash on UDP, hashed on (local addr, local port).

    Problem is that following sequence :

    fd = socket(...)
    connect(fd, &remote, ...)

    not only selects remote end point (address and port), but also sets
    local address, while UDP stack stored in secondary hash table the socket
    while its local address was INADDR_ANY (or ipv6 equivalent)

    Sequence is :
    - autobind() : choose a random local port, insert socket in hash tables
    [while local address is INADDR_ANY]
    - connect() : set remote address and port, change local address to IP
    given by a route lookup.

    When an incoming UDP frame comes, if more than 10 sockets are found in
    primary hash table, we switch to secondary table, and fail to find
    socket because its local address changed.

    One solution to this problem is to rehash datagram socket if needed.

    We add a new rehash(struct socket *) method in "struct proto", and
    implement this method for UDP v4 & v6, using a common helper.

    This rehashing only takes care of secondary hash table, since primary
    hash (based on local port only) is not changed.

    Reported-by: Krzysztof Piotr Oledzki
    Signed-off-by: Eric Dumazet
    Tested-by: Krzysztof Piotr Oledzki
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • …git/tip/linux-2.6-tip

    * 'semaphore-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    semaphore: Add DEFINE_SEMAPHORE

    Linus Torvalds
     
  • …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, mcheck: Avoid duplicate sysfs links/files for thresholding banks
    io-mapping: Fix the address space annotations
    x86: Fix the address space annotations of iomap_atomic_prot_pfn()
    x86, mm: Fix CONFIG_VMSPLIT_1G and 2G_OPT trampoline
    x86, hwmon: Fix unsafe smp_processor_id() in thermal_throttle_add_dev

    Linus Torvalds
     
  • …/git/tip/linux-2.6-tip

    * 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    gcc-4.6: kernel/*: Fix unused but set warnings
    mutex: Fix annotations to include it in kernel-locking docbook
    pid: make setpgid() system call use RCU read-side critical section
    MAINTAINERS: Add RCU's public git tree

    Linus Torvalds
     
  • - Do not create expectation when forwarding the PORT
    command to avoid blocking the connection. The problem is that
    nf_conntrack_ftp.c:help() tries to create the same expectation later in
    POST_ROUTING and drops the packet with "dropping packet" message after
    failure in nf_ct_expect_related.

    - Change ip_vs_update_conntrack to alter the conntrack
    for related connections from real server. If we do not alter the reply in
    this direction the next packet from client sent to vport 20 comes as NEW
    connection. We alter it but may be some collision happens for both
    conntracks and the second conntrack gets destroyed immediately. The
    connection stucks too.

    Signed-off-by: Julian Anastasov
    Signed-off-by: Simon Horman
    Signed-off-by: David S. Miller

    Julian Anastasov
     

08 Sep, 2010

6 commits

  • The full cleanup of init_MUTEX[_LOCKED] and DECLARE_MUTEX has not been
    done. Some of the users are real semaphores and we should name them as
    such instead of confusing everyone with "MUTEX".

    Provide the infrastructure to get finally rid of init_MUTEX[_LOCKED]
    and DECLARE_MUTEX.

    Signed-off-by: Thomas Gleixner
    Cc: Peter Zijlstra
    Cc: Christoph Hellwig
    LKML-Reference:

    Thomas Gleixner
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
    PCI: bus speed strings should be const
    PCI hotplug: Fix build with CONFIG_ACPI unset
    PCI: PCIe: Remove the port driver module exit routine
    PCI: PCIe: Move PCIe PME code to the pcie directory
    PCI: PCIe: Disable PCIe port services during port initialization
    PCI: PCIe: Ask BIOS for control of all native services at once
    ACPI/PCI: Negotiate _OSC control bits before requesting them
    ACPI/PCI: Do not preserve _OSC control bits returned by a query
    ACPI/PCI: Make acpi_pci_query_osc() return control bits
    ACPI/PCI: Reorder checks in acpi_pci_osc_control_set()
    PCI: PCIe: Introduce commad line switch for disabling port services
    PCI: PCIe AER: Introduce pci_aer_available()
    x86/PCI: only define pci_domain_nr if PCI and PCI_DOMAINS are set
    PCI: provide stub pci_domain_nr function for !CONFIG_PCI configs

    Linus Torvalds
     
  • * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
    powerpc/pseries: Correct rtas_data_buf locking in dlpar code
    powerpc/85xx: Add P1021 PCI IDs and quirks
    arch/powerpc/sysdev/qe_lib/qe.c: Add of_node_put to avoid memory leak
    arch/powerpc/platforms/83xx/mpc837x_mds.c: Add missing iounmap
    fsl_rio: fix compile errors
    powerpc/85xx: Fix compile issue with p1022_ds due to lmb rename to memblock
    powerpc/85xx: Fix compilation of mpc85xx_mds.c
    powerpc: Don't use kernel stack with translation off
    powerpc/perf_event: Reduce latency of calling perf_event_do_pending
    powerpc/kexec: Adds correct calling convention for kexec purgatory

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
    percpu: fix a mismatch between code and comment
    percpu: fix a memory leak in pcpu_extend_area_map()
    percpu: add __percpu notations to UP allocator
    percpu: handle __percpu notations in UP accessors

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
    workqueue: use zalloc_cpumask_var() for gcwq->mayday_mask
    workqueue: fix GCWQ_DISASSOCIATED initialization
    workqueue: Add a workqueue chapter to the tracepoint docbook
    workqueue: fix cwq->nr_active underflow
    workqueue: improve destroy_workqueue() debuggability
    workqueue: mark lock acquisition on worker_maybe_bind_and_lock()
    workqueue: annotate lock context change
    workqueue: free rescuer on destroy_workqueue

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6:
    tty: fix tty_line must not be equal to number of allocated tty pointers in tty driver
    serial: bfin_sport_uart: restore transmit frame sync fix
    serial: fix port type conflict between NS16550A & U6_16550A
    MAINTAINERS: orphan isicom
    vt: Fix console corruption on driver hand-over.

    Linus Torvalds
     

07 Sep, 2010

1 commit

  • Sandybridge GTT has new cache control bits in PTE, which controls
    graphics page cache in LLC or LLC/MLC, so we need to extend the mask
    function to respect the new bits.

    And set cache control to always LLC only by default on Gen6.

    Signed-off-by: Zhenyu Wang
    Cc: stable@kernel.org
    Signed-off-by: Chris Wilson

    Zhenyu Wang
     

05 Sep, 2010

2 commits

  • cgroup_attach_task_current_cg API that have upstream is backwards: we
    really need an API to attach to the cgroups from another process A to
    the current one.

    In our case (vhost), a priveledged user wants to attach it's task to cgroups
    from a less priveledged one, the API makes us run it in the other
    task's context, and this fails.

    So let's make the API generic and just pass in 'from' and 'to' tasks.
    Add an inline wrapper for cgroup_attach_task_current_cg to avoid
    breaking bisect.

    Signed-off-by: Michael S. Tsirkin
    Acked-by: Li Zefan
    Acked-by: Paul Menage

    Michael S. Tsirkin
     
  • Fixes a bunch of sparse warnings in io-mapping.h because of the
    inconsistent __iomem usage.

    Signed-off-by: Francisco Jerez
    LKML-Reference:
    Cc: Andrew Morton
    Signed-off-by: Ingo Molnar

    Francisco Jerez
     

04 Sep, 2010

2 commits


03 Sep, 2010

1 commit


01 Sep, 2010

1 commit


29 Aug, 2010

4 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    net/ipv4: Eliminate kstrdup memory leak
    net/caif/cfrfml.c: use asm/unaligned.h
    ax25: missplaced sock_put(sk)
    qlge: reset the chip before freeing the buffers
    l2tp: test for ethernet header in l2tp_eth_dev_recv()
    tcp: select(writefds) don't hang up when a peer close connection
    tcp: fix three tcp sysctls tuning
    tcp: Combat per-cpu skew in orphan tests.
    pxa168_eth: silence gcc warnings
    pxa168_eth: update call to phy_mii_ioctl()
    pxa168_eth: fix error handling in prope
    pxa168_eth: remove unneeded null check
    phylib: Fix race between returning phydev and calling adjust_link
    caif-driver: add HAS_DMA dependency
    3c59x: Fix deadlock between boomerang_interrupt and boomerang_start_tx
    qlcnic: fix poll implementation
    netxen: fix poll implementation
    bridge: netfilter: fix a memory leak

    Linus Torvalds
     
  • * 'for-linus' of git://git.infradead.org/users/eparis/notify:
    fsnotify: drop two useless bools in the fnsotify main loop
    fsnotify: fix list walk order
    fanotify: Return EPERM when a process is not privileged
    fanotify: resize pid and reorder structure
    fanotify: drop duplicate pr_debug statement
    fanotify: flush outstanding perm requests on group destroy
    fsnotify: fix ignored mask handling between inode and vfsmount marks
    fanotify: add MAINTAINERS entry
    fsnotify: reset used_inode and used_vfsmount on each pass
    fanotify: do not dereference inode_mark when it is unset

    Linus Torvalds
     
  • * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
    vgaarb: Wrap vga_(get|put) in CONFIG_VGA_ARB
    drm/radeon/kms: add missing scratch update in dp_detect
    drm/modes: Fix CVT-R modeline generation
    drm: fix regression in drm locking since BKL removal.
    drm/radeon/kms: remove stray radeon_i2c_destroy
    drm: mm: fix range restricted allocations
    drm/nouveau: drop drm_global_mutex before sleeping in submission path
    drm: export drm_global_mutex for drivers to use
    drm/nv20: Don't use pushbuf calls on the original nv20.
    drm/nouveau: Fix TMDS on some DCB1.5 boards.
    drm/nouveau: Fix backlight control on PPC machines with an internal TMDS panel.
    drm/nv30: Apply modesetting to the correct slave encoder
    drm/nouveau: Use a helper function to match PCI device/subsystem IDs.
    drm/nv50: add dcb type 14 to enum to prevent compiler complaint

    Linus Torvalds
     
  • Stub out vm_get_page_prot() if there's no MMU.

    This was added by commit 804af2cf6e7a ("[AGPGART] remove private page
    protection map") and is used in commit c07fbfd17e61 ("fbmem: VM_IO set,
    but not propagated") in the fbmem video driver, but the function doesn't
    exist on NOMMU, resulting in an undefined symbol at link time.

    Signed-off-by: David Howells
    Reviewed-by: Konrad Rzeszutek Wilk
    Signed-off-by: Linus Torvalds

    David Howells