05 Jun, 2009

6 commits

  • The checking of CONFIG_FRAME_WARN in the top level Makefile forgot to
    actually derefence the variable thus leading to an always true check.

    Signed-off-by: Mike Frysinger
    Cc: Andi Kleen
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Frysinger
     
  • The "trace || CLONE_PTRACE" check in tracehook_report_clone() is not right,

    - If the untraced task does clone(CLONE_PTRACE) the new child is not traced,
    we must not queue SIGSTOP.

    - If we forked the traced task, but the tracer exits and untraces both the
    forking task and the new child (after copy_process() drops tasklist_lock),
    we should not queue SIGSTOP too.

    Change the code to check task_ptrace() != 0 instead. This is still racy, but
    the race is harmless.

    We can race with another tracer attaching to this child, or the tracer can
    exit and detach in parallel. But giwen that we didn't do wake_up_new_task()
    yet, the child must have the pending SIGSTOP anyway.

    Signed-off-by: Oleg Nesterov
    Acked-by: Roland McGrath
    Cc: Christoph Hellwig
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel:
    drm/i915: Remove a bad BUG_ON in the fence management code.

    Linus Torvalds
     
  • * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
    drm: ignore EDID with really tiny modes.
    drm: don't associate _DRM_DRIVER maps with a master
    drm/i915: intel_lvds.c fix section mismatch
    drm: Hook up DPMS property handling in drm_crtc.c. Add drm_helper_connector_dpms.
    drm: set permissions on edid file to 0444
    drm: add newlines to text sysfs files
    drm/radeon: fix ring free alignment calculations
    drm: fix irq naming for kms drivers.

    Linus Torvalds
     
  • While running 20 parallel instances of dd as follows:

    #!/bin/bash
    for i in `seq 1 20`; do
    dd if=/dev/zero of=/export/hda3/dd_$i bs=1073741824 count=1 &
    done
    wait

    on a 16G machine, we noticed that rather than just killing the processes,
    the entire kernel went down. Stracing dd reveals that it first does an
    mmap2, which makes 1GB worth of zero page mappings. Then it performs a
    read on those pages from /dev/zero, and finally it performs a write.

    The machine died during the reads. Looking at the code, it was noticed
    that /dev/zero's read operation had been changed by
    557ed1fa2620dc119adb86b34c614e152a629a80 ("remove ZERO_PAGE") from giving
    zero page mappings to actually zeroing the page.

    The zeroing of the pages causes physical pages to be allocated to the
    process. But, when the process exhausts all the memory that it can, the
    kernel cannot kill it, as it is still in the kernel mode allocating more
    memory. Consequently, the kernel eventually crashes.

    To fix this, I propose that when a fatal signal is pending during
    /dev/zero read operation, we simply return and let the user process die.

    Signed-off-by: Salman Qazi
    Cc: Nick Piggin
    Signed-off-by: Andrew Morton
    [ Modified error return and comment trivially. - Linus]
    Signed-off-by: Linus Torvalds

    Salman Qazi
     
  • We don't set up the canary; let's disable stack protector on boot.c so
    we can get into lguest_init, then set it up. As a side effect,
    switch_to_new_gdt() sets up %fs for us properly too.

    Signed-off-by: Rusty Russell
    Acked-by: Tejun Heo
    Signed-off-by: Linus Torvalds

    Rusty Russell
     

04 Jun, 2009

9 commits

  • This could be triggered by a gtt mapping fault on 965 that decides to
    remove the fence from another object that happens to be active currently.
    Since the other object doesn't rely on the fence reg for its execution, we
    don't wait for it to finish. We'll soon be not waiting on 915 most of the
    time as well, so just drop the BUG_ON.

    Signed-off-by: Eric Anholt

    Eric Anholt
     
  • Some EDIDs lie and report tiny modes that aren't possible. Ignore
    these modes.

    Signed-off-by: Adam Jackson
    Signed-off-by: Dave Airlie

    Adam Jackson
     
  • A driver will use the _DRM_DRIVER map flag to indicate that it wants
    to be responsible for removing the map itself, bypassing the DRM's
    automagic cleanup code.

    Since the multi-master changes this has been broken, resulting in some
    drivers having their registers unmapped before it's finished with them.

    Signed-off-by: Ben Skeggs
    Signed-off-by: Dave Airlie

    Ben Skeggs
     
  • intel_no_lvds[] does not require __initdata as it is used only by

    void intel_lvds_init(struct drm_device *dev).

    Signed-off-by: Jaswinder Singh Rajput
    Signed-off-by: Dave Airlie

    Jaswinder Singh Rajput
     
  • Making the drm_crtc.c code recognize the DPMS property and invoke the
    connector->dpms function doesn't remove any capability from the driver while
    reducing code duplication.

    That just highlighted the problem with the existing DPMS functions which
    could turn off the connector, but failed to turn off any relevant crtcs. The
    new drm_helper_connector_dpms function manages all of that, using the
    drm_helper-specific crtc and encoder dpms functions, automatically computing
    the appropriate DPMS level for each object in the system.

    This fixes the current troubles in the i915 driver which left PLLs, pipes
    and planes running while in DPMS_OFF mode or even while they were unused.

    Signed-off-by: Keith Packard
    Signed-off-by: Dave Airlie

    Keith Packard
     
  • Without initializing the sysfs attributes for the edid file,
    it was created with mode 0, making it difficult for applications to use.

    Signed-off-by: Keith Packard
    Signed-off-by: Dave Airlie

    Keith Packard
     
  • The contents of various simple text files in sysfs should end with
    a newline to make them easier to read from the console.

    Signed-off-by: Keith Packard
    Signed-off-by: Dave Airlie

    Keith Packard
     
  • fd.o bz#21849

    We were aligning to +16 dwords, instead of to the next 16dword
    boundary in the ring. Fix the calculation to go to the next 16dword
    boundary when space checking.

    Signed-off-by: Dave Airlie

    Dave Airlie
     
  • allocating devname in the i915 driver was a hack originally and I
    forgot to figure out how to do this properly back then.

    So this is the cleaner version that just picks devname or driver name
    in the irq code.

    It removes the devname allocs from the i915 driver.

    Signed-off-by: Dave Airlie

    Dave Airlie
     

03 Jun, 2009

6 commits


02 Jun, 2009

9 commits

  • … when we use cls_cgroup

    This patch fixes a bug which unconfigured struct tcf_proto keeps
    chaining in tc_ctl_tfilter(), and avoids kernel panic in
    cls_cgroup_classify() when we use cls_cgroup.

    When we execute 'tc filter add', tcf_proto is allocated, initialized
    by classifier's init(), and chained. After it's chained,
    tc_ctl_tfilter() calls classifier's change(). When classifier's
    change() fails, tc_ctl_tfilter() does not free and keeps tcf_proto.

    In addition, cls_cgroup is initialized in change() not in init(). It
    accesses unconfigured struct tcf_proto which is chained before
    change(), then hits Oops.

    Signed-off-by: Minoru Usui <usui@mxm.nes.nec.co.jp>
    Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
    Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
    Tested-by: Minoru Usui <usui@mxm.nes.nec.co.jp>
    Signed-off-by: David S. Miller <davem@davemloft.net>

    Minoru Usui
     
  • Patch to fix bad length checking in e1000. E1000 by default does two
    things:

    1) Spans rx descriptors for packets that don't fit into 1 skb on recieve
    2) Strips the crc from a frame by subtracting 4 bytes from the length prior to
    doing an skb_put

    Since the e1000 driver isn't written to support receiving packets that span
    multiple rx buffers, it checks the End of Packet bit of every frame, and
    discards it if its not set. This places us in a situation where, if we have a
    spanning packet, the first part is discarded, but the second part is not (since
    it is the end of packet, and it passes the EOP bit test). If the second part of
    the frame is small (4 bytes or less), we subtract 4 from it to remove its crc,
    underflow the length, and wind up in skb_over_panic, when we try to skb_put a
    huge number of bytes into the skb. This amounts to a remote DOS attack through
    careful selection of frame size in relation to interface MTU. The fix for this
    is already in the e1000e driver, as well as the e1000 sourceforge driver, but no
    one ever pushed it to e1000. This is lifted straight from e1000e, and prevents
    small frames from causing the underflow described above

    Signed-off-by: Neil Horman
    Tested-by: Andy Gospodarek
    Signed-off-by: David S. Miller

    Neil Horman
     
  • Add a phy_power_down parameter to forcedeth: set to 1 to power down the
    phy and disable the link when an interface goes down; set to 0 to always
    leave the phy powered up.

    The phy power state persists across reboots; Windows, some BIOSes, and
    older versions of Linux don't bother to power up the phy again, forcing
    users to remove all power to get the interface working (see
    http://bugzilla.kernel.org/show_bug.cgi?id=13072). Leaving the phy
    powered on is the safest default behavior. Users accustomed to seeing
    the link state reflect the interface state and/or wanting to minimize
    power consumption can set phy_power_down=1 if compatibility with other
    OSes is not an issue.

    Signed-off-by: Ed Swierk
    Signed-off-by: David S. Miller

    Ed Swierk
     
  • It's possible to recurse into filesystem from the memory
    allocation, which deadlocks in xfs_qm_shake(). Add check
    for __GFP_FS, and bail out if it is not set.

    Signed-off-by: Felix Blyakher
    Signed-off-by: Hedi Berriche
    Reviewed-by: Christoph Hellwig
    Reviewed-by: Andi Kleen
    Signed-off-by: Felix Blyakher

    Felix Blyakher
     
  • In the case where growing a filesystem would leave the last AG
    too small, the fixup code has an overflow in the calculation
    of the new size with one fewer ag, because "nagcount" is a 32
    bit number. If the new filesystem has > 2^32 blocks in it
    this causes a problem resulting in an EINVAL return from growfs:

    # xfs_io -f -c "truncate 19998630180864" fsfile
    # mkfs.xfs -f -bsize=4096 -dagsize=76288719b,size=3905982455b fsfile
    # mount -o loop fsfile /mnt
    # xfs_growfs /mnt

    meta-data=/dev/loop0 isize=256 agcount=52,
    agsize=76288719 blks
    = sectsz=512 attr=2
    data = bsize=4096 blocks=3905982455, imaxpct=5
    = sunit=0 swidth=0 blks
    naming =version 2 bsize=4096 ascii-ci=0
    log =internal bsize=4096 blocks=32768, version=2
    = sectsz=512 sunit=0 blks, lazy-count=0
    realtime =none extsz=4096 blocks=0, rtextents=0
    xfs_growfs: XFS_IOC_FSGROWFSDATA xfsctl failed: Invalid argument

    Reported-by: richard.ems@cape-horn-eng.com
    Signed-off-by: Eric Sandeen
    Reviewed-by: Christoph Hellwig
    Reviewed-by: Felix Blyakher
    Signed-off-by: Felix Blyakher

    Eric Sandeen
     
  • Regreesion from commit ef8f7fc, which rearranged the code in
    xfs_swap_extents() leading to double unlock of xfs inode ilock.
    That resulted in xfs_fsr deadlocking itself on platforms, which
    don't handle double unlock of rw_semaphore nicely. It caused the
    count go negative, which represents the write holder, without
    really having one. ia64 is one of the platforms where deadlock
    was easily reproduced and the fix was tested.

    Signed-off-by: Eric Sandeen
    Reviewed-by: Eric Sandeen
    Signed-off-by: Felix Blyakher

    Felix Blyakher
     
  • This mostly adds back AppleTouch support and adds CONFIG_HIGHMEM
    by default.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • David S. Miller
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
    crypto: hash - Fix handling of sg entry that crosses page boundary

    Linus Torvalds
     

01 Jun, 2009

10 commits