29 Dec, 2008

2 commits

  • This is step one towards having multiple masters sharing a drm
    device in order to get fast-user-switching to work.

    It splits out the information associated with the drm master
    into a separate kref counted structure, and allocates this when
    a master opens the device node. It also allows the current master
    to abdicate (say while VT switched), and a new master to take over
    the hardware.

    It moves the Intel and radeon drivers to using the sarea from
    within the new master structures.

    Signed-off-by: Dave Airlie

    Dave Airlie
     
  • The current sub-module unload exit path is a mess, it tries
    to abuse the idr. Just keep a list of devices per driver struct
    and free them in-order on rmmod.

    Signed-off-by: Dave Airlie

    Dave Airlie
     

19 Dec, 2008

3 commits

  • The ACPI interpreter usually runs with irqs enabled.
    However, during suspend/resume it runs with
    irqs disabled to evaluate _GTS/_BFS, as well as
    by irqrouter_resume() which evaluates _CRS, _PRS, _SRS.

    http://bugzilla.kernel.org/show_bug.cgi?id=12252

    Signed-off-by: Wu Fengguang
    Signed-off-by: Len Brown

    Wu Fengguang
     
  • acpi_early_init() was changed to over-write the cmdline param,
    making it really inconvenient to set debug flags at boot-time.

    Also,
    This sets the default level to "info", which is what all the ACPI
    drivers use. So to enable messages from drivers, you only have to
    supply the "layer" (a.k.a. "component"). For non-"info" ACPI core
    and ACPI interpreter messages, you have to supply both level and
    layer masks, as before.

    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Len Brown

    Bjorn Helgaas
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    bnx2: Fix bug in bnx2_free_rx_mem().
    irda: Add irda_skb_cb qdisc related padding
    jme: Fixed a typo
    net: kernel BUG at drivers/net/phy/mdio_bus.c:165!
    drivers/net: starfire: Fix napi ->poll() weight handling
    tlan: Fix pci memory unmapping
    enc28j60: use netif_rx_ni() to deliver RX packets
    tlan: Fix small (< 64 bytes) datagram transmissions
    netfilter: ctnetlink: fix missing CTA_NAT_SEQ_UNSPEC

    Linus Torvalds
     

18 Dec, 2008

2 commits

  • We need to pad irda_skb_cb in order to keep it safe accross dev_queue_xmit()
    calls. This is some ugly and temporary hack triggered by recent qisc code
    changes.
    Even though it fixes bugzilla.kernel.org bug #11795, it will be replaced by a
    proper fix before 2.6.29 is released.

    Signed-off-by: Samuel Ortiz
    Signed-off-by: David S. Miller

    Samuel Ortiz
     
  • This patch fixes a comment and clarifies the documentation about the
    endianness of descriptors. The current policy is that descriptors will
    be little-endian at the API even on big-endian systems; however the
    /proc/bus/usb API predates this policy and presents descriptors with
    some multibyte fields byte-swapped.

    Signed-off-by: Phil Endecott
    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Phil Endecott
     

16 Dec, 2008

3 commits

  • This patch fixes an inconsistency in nfnetlink_conntrack.h that
    I introduced myself. The problem is that CTA_NAT_SEQ_UNSPEC is
    missing from enum ctattr_natseq. This inconsistency may lead to
    problems in the message parsing in userspace (if the message
    contains the CTA_NAT_SEQ_* attributes, of course).

    This patch breaks backward compatibility, however, the only known
    client of this code is libnetfilter_conntrack which indeed crashes
    because it assumes the existence of CTA_NAT_SEQ_UNSPEC to do
    the parsing.

    The CTA_NAT_SEQ_* attributes were introduced in 2.6.25.

    Signed-off-by: Pablo Neira Ayuso
    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Pablo Neira Ayuso
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    Phonet: keep TX queue disabled when the device is off
    SCHED: netem: Correct documentation comment in code.
    netfilter: update rwlock initialization for nat_table
    netlabel: Compiler warning and NULL pointer dereference fix
    e1000e: fix double release of mutex
    IA64: HP_SIMETH needs to depend upon NET
    netpoll: fix race on poll_list resulting in garbage entry
    ipv6: silence log messages for locally generated multicast
    sungem: improve ethtool output with internal pcs and serdes
    tcp: tcp_vegas cong avoid fix
    sungem: Make PCS PHY support partially work again.

    Linus Torvalds
     
  • Otherwise those using it in transition patches (eg. kvm) can't compile
    with CONFIG_SMP=n:

    arch/x86/kvm/../../../virt/kvm/kvm_main.c: In function 'make_all_cpus_request':
    arch/x86/kvm/../../../virt/kvm/kvm_main.c:380: error: implicit declaration of function 'smp_call_function_many'

    Signed-off-by: Rusty Russell
    Signed-off-by: Linus Torvalds

    Rusty Russell
     

11 Dec, 2008

6 commits

  • This reverts commit b1ee26bab14886350ba12a5c10cbc0696ac679bf, along with
    the "fixes" for it that all just caused problems:

    - c4c6fa9891f3d1bcaae4f39fb751d5302965b566 "radeonfb: fix problem with
    color expansion & alignment"

    - f3179748a157c21d44d929fd3779421ebfbeaa93 "radeonfb: Disable new color
    expand acceleration unless explicitely enabled"

    because even when disabled, it breaks for people. See

    http://bugzilla.kernel.org/show_bug.cgi?id=12191

    for the latest example.

    Acked-by: Benjamin Herrenschmidt
    Acked-by: David S. Miller
    Cc: Krzysztof Halasa
    Cc: James Cloos
    Cc: "Rafael J. Wysocki"
    Cc: Krzysztof Helt
    Cc: Jean-Luc Coulon
    Cc: Andrew Morton
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Fix __put_user_asm8() by jumping to the end label (3:) from the exception
    handler, rather than jumping back to retry the second store instruction (label
    2:).

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

    Akira Takeuchi
     
  • Miles Lane tailing /sys files hit a BUG which Pekka Enberg has tracked
    to my 966c8c12dc9e77f931e2281ba25d2f0244b06949 sprint_symbol(): use
    less stack exposing a bug in slub's list_locations() -
    kallsyms_lookup() writes a 0 to namebuf[KSYM_NAME_LEN-1], but that was
    beyond the end of page provided.

    The 100 slop which list_locations() allows at end of page looks roughly
    enough for all the other stuff it might print after the symbol before
    it checks again: break out KSYM_SYMBOL_LEN earlier than before.

    Latencytop and ftrace and are using KSYM_NAME_LEN buffers where they
    need KSYM_SYMBOL_LEN buffers, and vmallocinfo a 2*KSYM_NAME_LEN buffer
    where it wants a KSYM_SYMBOL_LEN buffer: fix those before anyone copies
    them.

    [akpm@linux-foundation.org: ftrace.h needs module.h]
    Signed-off-by: Hugh Dickins
    Cc: Christoph Lameter
    Cc Miles Lane
    Acked-by: Pekka Enberg
    Acked-by: Steven Rostedt
    Acked-by: Frederic Weisbecker
    Cc: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • atomic_long_xchg() is not correctly defined for 32bit arches.

    Signed-off-by: Eric Dumazet
    Cc: Mathieu Desnoyers
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Dumazet
     
  • Revert

    commit e8ced39d5e8911c662d4d69a342b9d053eaaac4e
    Author: Mingming Cao
    Date: Fri Jul 11 19:27:31 2008 -0400

    percpu_counter: new function percpu_counter_sum_and_set

    As described in

    revert "percpu counter: clean up percpu_counter_sum_and_set()"

    the new percpu_counter_sum_and_set() is racy against updates to the
    cpu-local accumulators on other CPUs. Revert that change.

    This means that ext4 will be slow again. But correct.

    Reported-by: Eric Dumazet
    Cc: "David S. Miller"
    Cc: Peter Zijlstra
    Cc: Mingming Cao
    Cc:
    Cc: [2.6.27.x]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Revert

    commit 1f7c14c62ce63805f9574664a6c6de3633d4a354
    Author: Mingming Cao
    Date: Thu Oct 9 12:50:59 2008 -0400

    percpu counter: clean up percpu_counter_sum_and_set()

    Before this patch we had the following:

    percpu_counter_sum(): return the percpu_counter's value

    percpu_counter_sum_and_set(): return the percpu_counter's value, copying
    that value into the central value and zeroing the per-cpu counters before
    returning.

    After this patch, percpu_counter_sum_and_set() has gone, and
    percpu_counter_sum() gets the old percpu_counter_sum_and_set()
    functionality.

    Problem is, as Eric points out, the old percpu_counter_sum_and_set()
    functionality was racy and wrong. It zeroes out counters on "other" cpus,
    without holding any locks which will prevent races agaist updates from
    those other CPUS.

    This patch reverts 1f7c14c62ce63805f9574664a6c6de3633d4a354. This means
    that percpu_counter_sum_and_set() still has the race, but
    percpu_counter_sum() does not.

    Note that this is not a simple revert - ext4 has since started using
    percpu_counter_sum() for its dirty_blocks counter as well.

    Note that this revert patch changes percpu_counter_sum() semantics.

    Before the patch, a call to percpu_counter_sum() will bring the counter's
    central counter mostly up-to-date, so a following percpu_counter_read()
    will return a close value.

    After this patch, a call to percpu_counter_sum() will leave the counter's
    central accumulator unaltered, so a subsequent call to
    percpu_counter_read() can now return a significantly inaccurate result.

    If there is any code in the tree which was introduced after
    e8ced39d5e8911c662d4d69a342b9d053eaaac4e was merged, and which depends
    upon the new percpu_counter_sum() semantics, that code will break.

    Reported-by: Eric Dumazet
    Cc: "David S. Miller"
    Cc: Peter Zijlstra
    Cc: Mingming Cao
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

10 Dec, 2008

2 commits

  • A few months back a race was discused between the netpoll napi service
    path, and the fast path through net_rx_action:
    http://kerneltrap.org/mailarchive/linux-netdev/2007/10/16/345470

    A patch was submitted for that bug, but I think we missed a case.

    Consider the following scenario:

    INITIAL STATE
    CPU0 has one napi_struct A on its poll_list
    CPU1 is calling netpoll_send_skb and needs to call poll_napi on the same
    napi_struct A that CPU0 has on its list

    CPU0 CPU1
    net_rx_action poll_napi
    !list_empty (returns true) locks poll_lock for A
    poll_one_napi
    napi->poll
    netif_rx_complete
    __napi_complete
    (removes A from poll_list)
    list_entry(list->next)

    In the above scenario, net_rx_action assumes that the per-cpu poll_list is
    exclusive to that cpu. netpoll of course violates that, and because the netpoll
    path can dequeue from the poll list, its possible for CPU0 to detect a non-empty
    list at the top of the while loop in net_rx_action, but have it become empty by
    the time it calls list_entry. Since the poll_list isn't surrounded by any other
    structure, the returned data from that list_entry call in this situation is
    garbage, and any number of crashes can result based on what exactly that garbage
    is.

    Given that its not fasible for performance reasons to place exclusive locks
    arround each cpus poll list to provide that mutal exclusion, I think the best
    solution is modify the netpoll path in such a way that we continue to guarantee
    that the poll_list for a cpu is in fact exclusive to that cpu. To do this I've
    implemented the patch below. It adds an additional bit to the state field in
    the napi_struct. When executing napi->poll from the netpoll_path, this bit will
    be set. When a driver calls netif_rx_complete, if that bit is set, it will not
    remove the napi_struct from the poll_list. That work will be saved for the next
    iteration of net_rx_action.

    I've tested this and it seems to work well. About the biggest drawback I can
    see to it is the fact that it might result in an extra loop through
    net_rx_action in the event that the device is actually contended for (i.e. the
    netpoll path actually preforms all the needed work no the device, and the call
    to net_rx_action winds up doing nothing, except removing the napi_struct from
    the poll_list. However I think this is probably a small price to pay, given
    that the alternative is a crash.

    Signed-off-by: Neil Horman
    Signed-off-by: David S. Miller

    Neil Horman
     
  • * 'audit.b59' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
    [PATCH] fix broken timestamps in AVC generated by kernel threads
    [patch 1/1] audit: remove excess kernel-doc
    [PATCH] asm/generic: fix bug - kernel fails to build when enable some common audit code on Blackfin
    [PATCH] return records for fork() both to child and parent
    [PATCH] Audit: make audit=0 actually turn off audit

    Linus Torvalds
     

09 Dec, 2008

4 commits

  • Timestamp in audit_context is valid only if ->in_syscall is set.

    Signed-off-by: Al Viro

    Al Viro
     
  • If you enable some common audit code, the kernel fails to build.

    In file included from lib/audit.c:17:
    include/asm-generic/audit_write.h:3: error: '__NR_swapon' undeclared here (not in a function)
    make[1]: *** [lib/audit.o] Error 1
    make: *** [lib] Error 2

    So do not use __NR_swapon if it isnt defined for a port.

    Signed-off-by: Mike Frysinger
    Signed-off-by: Bryan Wu
    Signed-off-by: Al Viro

    Mike Frysinger
     
  • Signed-off-by: Al Viro

    Al Viro
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    tproxy: fixe a possible read from an invalid location in the socket match
    zd1211rw: use unaligned safe memcmp() in-place of compare_ether_addr()
    mac80211: use unaligned safe memcmp() in-place of compare_ether_addr()
    ipw2200: fix netif_*_queue() removal regression
    iwlwifi: clean key table in iwl_clear_stations_table function
    tcp: tcp_vegas ssthresh bug fix
    can: omit received RTR frames for single ID filter lists
    ATM: CVE-2008-5079: duplicate listen() on socket corrupts the vcc table
    netx-eth: initialize per device spinlock
    tcp: make urg+gso work for real this time
    enc28j60: Fix sporadic packet loss (corrected again)
    hysdn: fix writing outside the field on 64 bits
    b1isa: fix b1isa_exit() to really remove registered capi controllers
    can: Fix CAN_(EFF|RTR)_FLAG handling in can_filter
    Phonet: do not dump addresses from other namespaces
    netlabel: Fix a potential NULL pointer dereference
    bnx2: Add workaround to handle missed MSI.
    xfrm: Fix kernel panic when flush and dump SPD entries

    Linus Torvalds
     

06 Dec, 2008

1 commit

  • There's no point in having too short SG_IO timeouts, since if the
    command does end up timing out, we'll end up through the reset sequence
    that is several seconds long in order to abort the command that timed
    out.

    As a result, shorter timeouts than a few seconds simply do not make
    sense, as the recovery would be longer than the timeout itself.

    Add a BLK_MIN_SG_TIMEOUT to match the existign BLK_DEFAULT_SG_TIMEOUT.

    Suggested-by: Alan Cox
    Acked-by: Tejun Heo
    Acked-by: Jens Axboe
    Cc: Jeff Garzik
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

04 Dec, 2008

3 commits

  • Make sure all FMODE_ constants are documents, and ensure a coherent
    style for the already existing comments.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • Update FMODE_NDELAY before each ioctl call so that we can kill the
    magic FMODE_NDELAY_NOW. It would be even better to do this directly
    in setfl(), but for that we'd need to have FMODE_NDELAY for all files,
    not just block special files.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • Due to a wrong safety check in af_can.c it was not possible to filter
    for SFF frames with a specific CAN identifier without getting the
    same selected CAN identifier from a received EFF frame also.

    This fix has a minimum (but user visible) impact on the CAN filter
    API and therefore the CAN version is set to a new date.

    Indeed the 'old' API is still working as-is. But when now setting
    CAN_(EFF|RTR)_FLAG in can_filter.can_mask you might get less traffic
    than before - but still the stuff that you expected to get for your
    defined filter ...

    Thanks to Kurt Van Dijck for pointing at this issue and for the review.

    Signed-off-by: Oliver Hartkopp
    Acked-by: Kurt Van Dijck
    Signed-off-by: David S. Miller

    Oliver Hartkopp
     

03 Dec, 2008

7 commits

  • Fix setting of max_segment_size and seg_boundary mask for stacked md/dm
    devices.

    When stacking devices (LVM over MD over SCSI) some of the request queue
    parameters are not set up correctly in some cases by default, namely
    max_segment_size and and seg_boundary mask.

    If you create MD device over SCSI, these attributes are zeroed.

    Problem become when there is over this mapping next device-mapper mapping
    - queue attributes are set in DM this way:

    request_queue max_segment_size seg_boundary_mask
    SCSI 65536 0xffffffff
    MD RAID1 0 0
    LVM 65536 -1 (64bit)

    Unfortunately bio_add_page (resp. bio_phys_segments) calculates number of
    physical segments according to these parameters.

    During the generic_make_request() is segment cout recalculated and can
    increase bio->bi_phys_segments count over the allowed limit. (After
    bio_clone() in stack operation.)

    Thi is specially problem in CCISS driver, where it produce OOPS here

    BUG_ON(creq->nr_phys_segments > MAXSGENTRIES);

    (MAXSEGENTRIES is 31 by default.)

    Sometimes even this command is enough to cause oops:

    dd iflag=direct if=/dev// of=/dev/null bs=128000 count=10

    This command generates bios with 250 sectors, allocated in 32 4k-pages
    (last page uses only 1024 bytes).

    For LVM layer, it allocates bio with 31 segments (still OK for CCISS),
    unfortunatelly on lower layer it is recalculated to 32 segments and this
    violates CCISS restriction and triggers BUG_ON().

    The patch tries to fix it by:

    * initializing attributes above in queue request constructor
    blk_queue_make_request()

    * make sure that blk_queue_stack_limits() inherits setting

    (DM uses its own function to set the limits because it
    blk_queue_stack_limits() was introduced later. It should probably switch
    to use generic stack limit function too.)

    * sets the default seg_boundary value in one place (blkdev.h)

    * use this mask as default in DM (instead of -1, which differs in 64bit)

    Bugs related to this:
    https://bugzilla.redhat.com/show_bug.cgi?id=471639
    http://bugzilla.kernel.org/show_bug.cgi?id=8672

    Signed-off-by: Milan Broz
    Reviewed-by: Alasdair G Kergon
    Cc: Neil Brown
    Cc: FUJITA Tomonori
    Cc: Tejun Heo
    Cc: Mike Miller
    Signed-off-by: Jens Axboe

    Milan Broz
     
  • blkdev_dequeue_request() and elv_dequeue_request() are equivalent and
    both start the timeout timer. Barrier code dequeues the original
    barrier request but doesn't passes the request itself to lower level
    driver, only broken down proxy requests; however, as the original
    barrier code goes through the same dequeue path and timeout timer is
    started on it. If barrier sequence takes long enough, this timer
    expires but the low level driver has no idea about this request and
    oops follows.

    Timeout timer shouldn't have been started on the original barrier
    request as it never goes through actual IO. This patch unexports
    elv_dequeue_request(), which has no external user anyway, and makes it
    operate on elevator proper w/o adding the timer and make
    blkdev_dequeue_request() call elv_dequeue_request() and add timer.
    Internal users which don't pass the request to driver - barrier code
    and end_that_request_last() - are converted to use
    elv_dequeue_request().

    Signed-off-by: Tejun Heo
    Cc: Mike Anderson
    Signed-off-by: Jens Axboe

    Tejun Heo
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (30 commits)
    MAINTAINERS: add netdev to ATM
    ATM: horizon, fix hrz_probe fail path
    pppol2tp: Add missing sock_put() in pppol2tp_release()
    net: Fix soft lockups/OOM issues w/ unix garbage collector
    macvlan: don't broadcast PAUSE frames to macvlan devices
    Phonet: fix oops in phonet_address_del() on non-Phonet device
    netfilter: ctnetlink: fix GFP_KERNEL allocation under spinlock
    sungem: Fix PCS_MIICTRL register write in gem_init_phy().
    net: make skb_truesize_bug() call WARN()
    net: hp-plus uses eip_poll
    net/wireless/reg.c: fix bad WARN_ON in if statement
    ath5k: disable beacon filter when station is not associated
    ath5k: fix Security issue in DebugFS part of ath5k
    ath9k: correct expected max RX buffer size
    ath9k: Fix SW-IOMMU bounce buffer starvation
    mac80211 : Fix setting ad-hoc mode and non-ibss channel
    iwlagn: fix DMA sync
    phylib: Add Vitesse VSC8221 SGMII PHY
    rose: zero length frame filtering in af_rose.c
    bridge: netfilter: fix update_pmtu crash with GRE
    ...

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
    alim15x3: fix sparse warning
    ide: remove dead code from drive_is_ready()
    ide: fix build for DEBUG_PM
    ide: respect current DMA setting during resume
    ide: add SAMSUNG SP0822N with firmware WA100-10 to ivb_list[]
    amd74xx: workaround unreliable AltStatus register for nVidia controllers
    ide: fix the ide_release_lock imbalance

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
    [SCSI] stex: switch to block timeout
    [SCSI] make scsi_eh_try_stu use block timeout
    [SCSI] megaraid_sas: switch to block timeout
    [SCSI] ibmvscsi: switch to block timeout
    [SCSI] aacraid: switch to block timeout
    [SCSI] zfcp: prevent double decrement on host_busy while being busy
    [SCSI] zfcp: fix deadlock between wq triggered port scan and ERP
    [SCSI] zfcp: eliminate race between validation and locking
    [SCSI] zfcp: verify for correct rport state before scanning for SCSI devs
    [SCSI] zfcp: returning an ERR_PTR where a NULL value is expected
    [SCSI] zfcp: Fix opening of wka ports
    [SCSI] zfcp: fix remote port status check
    [SCSI] fc_transport: fix old bug on bitflag definitions
    [SCSI] Fix hang in starved list processing

    Linus Torvalds
     
  • The previous patch from Alan Cox ("nfsd: fix vm overcommit crash",
    commit 731572d39fcd3498702eda4600db4c43d51e0b26) fixed the problem where
    knfsd crashes on exported shmemfs objects and strict overcommit is set.

    But the patch forgot supporting the case when CONFIG_SECURITY is
    disabled.

    This patch copies a part of his fix which is mainly for detecting a bug
    earlier.

    Acked-by: James Morris
    Signed-off-by: Alan Cox
    Signed-off-by: Junjiro R. Okajima
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Junjiro R. Okajima
     
  • It seems that on some nVidia controllers using AltStatus register
    can be unreliable so default to Status register if the PCI device
    is in Compatibility Mode. In order to achieve this:

    * Add ide_pci_is_in_compatibility_mode() inline helper to .

    * Add IDE_HFLAG_BROKEN_ALTSTATUS host flag and set it in amd74xx host
    driver for nVidia controllers in Compatibility Mode.

    * Teach actual_try_to_identify() and drive_is_ready() about the new flag.

    This fixes the regression caused by removal of CONFIG_IDEPCI_SHARE_IRQ
    config option in 2.6.25 and using AltStatus register unconditionally when
    available (kernel.org bugs #11659 and #10216).

    [ Moreover for CONFIG_IDEPCI_SHARE_IRQ=y (which is what most people
    and distributions use) it never worked correctly. ]

    Thanks to Remy LABENE and Lars Winterfeld for help with debugging the problem.

    More info at:
    http://bugzilla.kernel.org/show_bug.cgi?id=11659
    http://bugzilla.kernel.org/show_bug.cgi?id=10216

    Reported-by: Remy LABENE
    Tested-by: Remy LABENE
    Tested-by: Lars Winterfeld
    Acked-by: Borislav Petkov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     

02 Dec, 2008

5 commits

  • 2nd part of the fixes needed for
    http://bugzilla.kernel.org/show_bug.cgi?id=11796.

    When the idr tree is either grown or shrunk, then the update to the number
    of layers and the top pointer were not atomic. This race caused crashes.

    The attached patch fixes that by replicating the layers counter in each
    layer, thus idr_find doesn't need idp->layers anymore.

    Signed-off-by: Manfred Spraul
    Cc: Clement Calmels
    Cc: Nadia Derbey
    Cc: Pierre Peiffer
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Manfred Spraul
     
  • It has been thought that the per-user file descriptors limit would also
    limit the resources that a normal user can request via the epoll
    interface. Vegard Nossum reported a very simple program (a modified
    version attached) that can make a normal user to request a pretty large
    amount of kernel memory, well within the its maximum number of fds. To
    solve such problem, default limits are now imposed, and /proc based
    configuration has been introduced. A new directory has been created,
    named /proc/sys/fs/epoll/ and inside there, there are two configuration
    points:

    max_user_instances = Maximum number of devices - per user

    max_user_watches = Maximum number of "watched" fds - per user

    The current default for "max_user_watches" limits the memory used by epoll
    to store "watches", to 1/32 of the amount of the low RAM. As example, a
    256MB 32bit machine, will have "max_user_watches" set to roughly 90000.
    That should be enough to not break existing heavy epoll users. The
    default value for "max_user_instances" is set to 128, that should be
    enough too.

    This also changes the userspace, because a new error code can now come out
    from EPOLL_CTL_ADD (-ENOSPC). The EMFILE from epoll_create() was already
    listed, so that should be ok.

    [akpm@linux-foundation.org: use get_current_user()]
    Signed-off-by: Davide Libenzi
    Cc: Michael Kerrisk
    Cc:
    Cc: Cyrill Gorcunov
    Reported-by: Vegard Nossum
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Davide Libenzi
     
  • * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
    libata: blacklist Seagate drives which time out FLUSH_CACHE when used with NCQ
    [libata] pata_rb532_cf: fix signature of the xfer function
    [libata] pata_rb532_cf: fix and rename register definitions
    ata_piix: add borked Tecra M4 to broken suspend list

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
    IB/mlx4: Fix MTT leakage in resize CQ
    IB/ehca: Fix problem with generated flush work completions
    IB/ehca: Change misleading error message on memory hotplug
    mlx4_core: Save/restore default port IB capability mask

    Linus Torvalds
     
  • Some recent Seagate harddrives have firmware bug which causes FLUSH
    CACHE to timeout under certain circumstances if NCQ is being used.
    This can be worked around by disabling NCQ and fixed by updating the
    firmware. Implement ATA_HORKAGE_FIRMWARE_UPDATE and blacklist these
    devices.

    The wiki page has been updated to contain information on this issue.

    http://ata.wiki.kernel.org/index.php/Known_issues

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

    Tejun Heo
     

01 Dec, 2008

2 commits

  • * master.kernel.org:/home/rmk/linux-2.6-arm:
    Allow architectures to override copy_user_highpage()
    [ARM] pxa/palmtx: misc fixes to use generic GPIO API
    ARM: OMAP: Fixes for suspend / resume GPIO wake-up handling
    [ARM] pxa/corgi: update default config to exclude tosa from being built
    [ARM] pxa/pcm990: use negative number for an invalid GPIO in camera data
    ARM: OMAP: Typo fix for clock_allow_idle
    ARM: OMAP: Remove broken LCD driver for SX1
    [ARM] 5335/1: pxa25x_udc: Fix is_vbus_present to return 1 or 0
    [ARM] pxa/MioA701: bluetooth resume fix
    [ARM] pxa/MioA701: fix memory corruption.

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

    * 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    irq.h: fix missing/extra kernel-doc
    genirq: __irq_set_trigger: change pr_warning to pr_debug
    irq: fix typo
    x86: apic honour irq affinity which was set in early boot
    genirq: fix the affinity setting in setup_irq
    genirq: keep affinities set from userspace across free/request_irq()

    Linus Torvalds