03 Aug, 2010

5 commits


31 Jul, 2010

4 commits


23 Jul, 2010

1 commit


22 Jul, 2010

2 commits

  • The kdb code should not toggle the sysrq state in case an end user
    wants to try and resume the normal kernel execution.

    Signed-off-by: Jason Wessel
    Acked-by: Dmitry Torokhov

    Jason Wessel
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
    math-emu: correct test for downshifting fraction in _FP_FROM_INT()
    perf: Add DWARF register lookup for sparc
    MAINTAINERS: Add SBUS driver path to sparc entry.
    drivers/sbus: Remove unnecessary casts of private_data
    sparc: remove homegrown L1_CACHE_ALIGN macro
    sparc64: fix the build error due to smp_kgdb_capture_client()
    sparc64: Fix maybe_change_configuration() PCR setting.
    arch/sparc/kernel: Eliminate what looks like a NULL pointer dereference
    sparc64: Update defconfig.
    sunsu: Fix use after free in su_remove().
    sunserial: Don't call add_preferred_console() when console= is specified.
    sparc32: Kill none_mask, it's bogus.

    Linus Torvalds
     

21 Jul, 2010

5 commits

  • The kernel's math-emu code contains a macro _FP_FROM_INT() which is
    used to convert an integer to a raw normalized floating-point value.
    It does this basically in three steps:

    1. Compute the exponent from the number of leading zero bits.
    2. Downshift large fractions to put the MSB in the right position
    for normalized fractions.
    3. Upshift small fractions to put the MSB in the right position.

    There is an boundary error in step 2, causing a fraction with its
    MSB exactly one bit above the normalized MSB position to not be
    downshifted. This results in a non-normalized raw float, which when
    packed becomes a massively inaccurate representation for that input.

    The impact of this depends on a number of arch-specific factors,
    but it is known to have broken emulation of FXTOD instructions
    on UltraSPARC III, which was originally reported as GCC bug 44631
    .

    Any arch which uses math-emu to emulate conversions from integers to
    same-size floats may be affected.

    The fix is simple: the exponent comparison used to determine if the
    fraction should be downshifted must be "
    Signed-off-by: David S. Miller

    Mikael Pettersson
     
  • * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
    drm/r600: fix possible NULL pointer derefernce
    drm/radeon/kms: add quirk for ASUS HD 3600 board
    include/linux/vgaarb.h: add missing part of include guard
    drm/nouveau: Fix crashes during fbcon init on single head cards.
    drm/nouveau: fix pcirom vbios shadow breakage from acpi rom patch
    drm/radeon/kms: fix shared ddc harder
    drm/i915: enable low power render writes on GEN3 hardware.
    drm/i915: Define MI_ARB_STATE bits
    vmwgfx: return -EFAULT if copy_to_user fails
    fb: handle allocation failure in alloc_apertures()
    drm: radeon: check kzalloc() result
    drm/ttm: Fix build on architectures without AGP
    drm/radeon/kms: fix gtt MC base alignment on rs4xx/rs690/rs740 asics
    drm/radeon/kms: fix possible mis-detection of sideport on rs690/rs740
    drm/radeon/kms: fix legacy tv-out pal mode

    Linus Torvalds
     
  • vgaarb.h was missing the #define of the #ifndef at the top for the guard
    to prevent multiple #include's from causing re-define errors

    Signed-off-by: Doug Goldstein
    Cc: Dave Airlie
    Cc: Jesse Barnes
    Signed-off-by: Andrew Morton
    Signed-off-by: Dave Airlie

    Doug Goldstein
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (24 commits)
    bridge: Partially disable netpoll support
    tcp: fix crash in tcp_xmit_retransmit_queue
    IPv6: fix CoA check in RH2 input handler (mip6_rthdr_input())
    ibmveth: lost IRQ while closing/opening device leads to service loss
    rt2x00: Fix lockdep warning in rt2x00lib_probe_dev()
    vhost: avoid pr_err on condition guest can trigger
    ipmr: Don't leak memory if fib lookup fails.
    vhost-net: avoid flush under lock
    net: fix problem in reading sock TX queue
    net/core: neighbour update Oops
    net: skb_tx_hash() fix relative to skb_orphan_try()
    rfs: call sock_rps_record_flow() in tcp_splice_read()
    xfrm: do not assume that template resolving always returns xfrms
    hostap_pci: set dev->base_addr during probe
    axnet_cs: use spin_lock_irqsave in ax_interrupt
    dsa: Fix Kconfig dependencies.
    act_nat: not all of the ICMP packets need an IP header payload
    r8169: incorrect identifier for a 8168dp
    Phonet: fix skb leak in pipe endpoint accept()
    Bluetooth: Update sec_level/auth_type for already existing connections
    ...

    Linus Torvalds
     
  • If a single-threaded process does a file-descriptor operation, and some
    other process accesses that same file descriptor via /proc, the current
    rcu_dereference_check_fdtable() can give a false-positive RCU-lockdep
    splat due to the reference count being increased by the /proc access after
    the reference-count check in fget_light() but before the check in
    rcu_dereference_check_fdtable().

    This commit prevents this false positive by checking for a single-threaded
    process. To avoid #include hell, this commit uses the wrapper for
    thread_group_empty(current) defined by rcu_my_thread_group_empty()
    provided in a separate commit.

    Located-by: Miles Lane
    Located-by: Eric Dumazet
    Signed-off-by: Paul E. McKenney
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul E. McKenney
     

20 Jul, 2010

1 commit


19 Jul, 2010

3 commits

  • The current shrinker implementation requires the registered callback
    to have global state to work from. This makes it difficult to shrink
    caches that are not global (e.g. per-filesystem caches). Pass the shrinker
    structure to the callback so that users can embed the shrinker structure
    in the context the shrinker needs to operate on and get back to it in the
    callback via container_of().

    Signed-off-by: Dave Chinner
    Reviewed-by: Christoph Hellwig

    Dave Chinner
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
    PCI: fall back to original BIOS BAR addresses

    Linus Torvalds
     
  • * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2:
    ocfs2: Silence gcc warning in ocfs2_write_zero_page().
    jbd2/ocfs2: Fix block checksumming when a buffer is used in several transactions
    ocfs2/dlm: Remove BUG_ON from migration in the rare case of a down node
    ocfs2: Don't duplicate pages past i_size during CoW.
    ocfs2: tighten up strlen() checking
    ocfs2: Make xattr reflink work with new local alloc reservation.
    ocfs2: make xattr extension work with new local alloc reservation.
    ocfs2: Remove the redundant cpu_to_le64.
    ocfs2/dlm: don't access beyond bitmap size
    ocfs2: No need to zero pages past i_size.
    ocfs2: Zero the tail cluster when extending past i_size.
    ocfs2: When zero extending, do it by page.
    ocfs2: Limit default local alloc size within bitmap range.
    ocfs2: Move orphan scan work to ocfs2_wq.
    fs/ocfs2/dlm: Add missing spin_unlock

    Linus Torvalds
     

17 Jul, 2010

2 commits

  • If we fail to assign resources to a PCI BAR, this patch makes us try the
    original address from BIOS rather than leaving it disabled.

    Linux tries to make sure all PCI device BARs are inside the upstream
    PCI host bridge or P2P bridge apertures, reassigning BARs if necessary.
    Windows does similar reassignment.

    Before this patch, if we could not move a BAR into an aperture, we left
    the resource unassigned, i.e., at address zero. Windows leaves such BARs
    at the original BIOS addresses, and this patch makes Linux do the same.

    This is a bit ugly because we disable the resource long before we try to
    reassign it, so we have to keep track of the BIOS BAR address somewhere.
    For lack of a better place, I put it in the struct pci_dev.

    I think it would be cleaner to attempt the assignment immediately when the
    claim fails, so we could easily remember the original address. But we
    currently claim motherboard resources in the middle, after attempting to
    claim PCI resources and before assigning new PCI resources, and changing
    that is a fairly big job.

    Addresses https://bugzilla.kernel.org/show_bug.cgi?id=16263

    Reported-by: Andrew
    Tested-by: Andrew
    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Jesse Barnes

    Bjorn Helgaas
     
  • …/git/tip/linux-2.6-tip

    * 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    tracing: Add alignment to syscall metadata declarations
    perf: Sync callchains with period based hits
    perf: Resurrect flat callchains
    perf: Version String fix, for fallback if not from git
    perf: Version String fix, using kernel version

    Linus Torvalds
     

16 Jul, 2010

2 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: w90p910_ts - fix call to setup_timer()
    Input: synaptics - fix wrong dimensions check
    Input: i8042 - mark stubs in i8042.h "static inline"

    Linus Torvalds
     
  • OCFS2 uses t_commit trigger to compute and store checksum of the just
    committed blocks. When a buffer has b_frozen_data, checksum is computed
    for it instead of b_data but this can result in an old checksum being
    written to the filesystem in the following scenario:

    1) transaction1 is opened
    2) handle1 is opened
    3) journal_access(handle1, bh)
    - This sets jh->b_transaction to transaction1
    4) modify(bh)
    5) journal_dirty(handle1, bh)
    6) handle1 is closed
    7) start committing transaction1, opening transaction2
    8) handle2 is opened
    9) journal_access(handle2, bh)
    - This copies off b_frozen_data to make it safe for transaction1 to commit.
    jh->b_next_transaction is set to transaction2.
    10) jbd2_journal_write_metadata() checksums b_frozen_data
    11) the journal correctly writes b_frozen_data to the disk journal
    12) handle2 is closed
    - There was no dirty call for the bh on handle2, so it is never queued for
    any more journal operation
    13) Checkpointing finally happens, and it just spools the bh via normal buffer
    writeback. This will write b_data, which was never triggered on and thus
    contains a wrong (old) checksum.

    This patch fixes the problem by calling the trigger at the moment data is
    frozen for journal commit - i.e., either when b_frozen_data is created by
    do_get_write_access or just before we write a buffer to the log if
    b_frozen_data does not exist. We also rename the trigger to t_frozen as
    that better describes when it is called.

    Signed-off-by: Jan Kara
    Signed-off-by: Mark Fasheh
    Signed-off-by: Joel Becker

    Jan Kara
     

15 Jul, 2010

1 commit

  • Fix problem in reading the tx_queue recorded in a socket. In
    dev_pick_tx, the TX queue is read by doing a check with
    sk_tx_queue_recorded on the socket, followed by a sk_tx_queue_get.
    The problem is that there is not mutual exclusion across these
    calls in the socket so it it is possible that the queue in the
    sock can be invalidated after sk_tx_queue_recorded is called so
    that sk_tx_queue get returns -1, which sets 65535 in queue_index
    and thus dev_pick_tx returns 65536 which is a bogus queue and
    can cause crash in dev_queue_xmit.

    We fix this by only calling sk_tx_queue_get which does the proper
    checks. The interface is that sk_tx_queue_get returns the TX queue
    if the sock argument is non-NULL and TX queue is recorded, else it
    returns -1. sk_tx_queue_recorded is no longer used so it can be
    completely removed.

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

    Tom Herbert
     

14 Jul, 2010

1 commit

  • via following scripts

    FILES=$(find * -type f | grep -vE 'oprofile|[^K]config')

    sed -i \
    -e 's/lmb/memblock/g' \
    -e 's/LMB/MEMBLOCK/g' \
    $FILES

    for N in $(find . -name lmb.[ch]); do
    M=$(echo $N | sed 's/lmb/memblock/g')
    mv $N $M
    done

    and remove some wrong change like lmbench and dlmb etc.

    also move memblock.c from lib/ to mm/

    Suggested-by: Ingo Molnar
    Acked-by: "H. Peter Anvin"
    Acked-by: Benjamin Herrenschmidt
    Acked-by: Linus Torvalds
    Signed-off-by: Yinghai Lu
    Signed-off-by: Benjamin Herrenschmidt

    Yinghai Lu
     

13 Jul, 2010

1 commit

  • * 'v4l_for_2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
    V4L/DVB: uvc: Fix multiple symbols definitions with UVC gadget and host drivers
    V4L/DVB: v4l: mem2mem_testdev: fix g_fmt NULL pointer dereference
    V4L/DVB: uvcvideo: Power line frequency control doesn't support GET_MIN/MAX/RES
    V4L/DVB: ivtv: Add delay to ensure the decoder always restarts with a blank screen
    V4L/DVB: Documentation: Add the Philips FQ1236 MK5 to video4linux/CARDLIST.tuner
    V4L/DVB: tveeprom: Add an entry for tuner code 168: a TCL M30WTP-4N-E tuner
    V4L/DVB: tuner: Add a definition for the Philips FQ1236 MK5 NTSC tuner
    V4L/DVB: OMAP_VOUT: fix: Module params were not working through bootargs
    V4L/DVB: OMAP_VOUT: fix: Replaced dma-sg with dma-contig
    V4L/DVB: OMAP_VOUT:Build FIX: Rebased against latest DSS2 changes

    Linus Torvalds
     

10 Jul, 2010

1 commit

  • For some reason if we declare a static variable and then assign it
    later, and the assignment contains a __attribute__((__aligned__(#))),
    some versions of gcc will ignore it.

    This caused the syscall meta data to not be compact in its section
    and caused a kernel oops when the section was being read.

    The fix for these versions of gcc seems to be to add the aligned
    attribute to the declaration as well.

    This fixes the BZ regression:

    https://bugzilla.kernel.org/show_bug.cgi?id=16353

    Reported-by: Zeev Tarantov
    Tested-by: Zeev Tarantov
    Acked-by: Frederic Weisbecker
    LKML-Reference:
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     

09 Jul, 2010

1 commit


08 Jul, 2010

3 commits

  • * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
    writeback: simplify the write back thread queue
    writeback: split writeback_inodes_wb
    writeback: remove writeback_inodes_wbc
    fs-writeback: fix kernel-doc warnings
    splice: check f_mode for seekable file
    splice: direct_splice_actor() should not use pos in sd

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (35 commits)
    NET: SB1250: Initialize .owner
    vxge: show startup message with KERN_INFO
    ll_temac: Fix missing iounmaps
    bridge: Clear IPCB before possible entry into IP stack
    bridge br_multicast: BUG: unable to handle kernel NULL pointer dereference
    net: Fix definition of netif_vdbg() when VERBOSE_DEBUG is defined
    net/ne: fix memory leak in ne_drv_probe()
    xfrm: fix xfrm by MARK logic
    virtio_net: fix oom handling on tx
    virtio_net: do not reschedule rx refill forever
    s2io: resolve statistics issues
    linux/net.h: fix kernel-doc warnings
    net: decreasing real_num_tx_queues needs to flush qdisc
    sched: qdisc_reset_all_tx is calling qdisc_reset without qdisc_lock
    qlge: fix a eeh handler to not add a pending timer
    qlge: Replacing add_timer() to mod_timer()
    usbnet: Set parent device early for netdev_printk()
    net: Revert "rndis_host: Poll status channel before control channel"
    netfilter: ip6t_REJECT: fix a dst leak in ipv6 REJECT
    drivers: bluetooth: bluecard_cs.c: Fixed include error, changed to linux/io.h
    ...

    Linus Torvalds
     
  • * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
    drm: correctly update connector DPMS status in drm_fb_helper
    drm/radeon/kms: fix shared ddc handling
    drm/ttm: Allocate the page pool manager in the heap.

    Linus Torvalds
     

07 Jul, 2010

3 commits

  • Repeated ttm_page_alloc_init/fini fails noisily because the pool
    manager kobj isn't zeroed out between uses (we could do just that but
    statically allocated kobjects are generally considered a bad thing).
    Move it to kzalloc'ed memory.

    Note that this patch drops the refcounting behavior of the pool
    allocator init/fini functions: it would have led to a race condition
    in its current form, and anyway it was never exploited.

    This fixes a regression with reloading kms modules at runtime, since
    page allocator was introduced.

    Signed-off-by: Francisco Jerez
    Signed-off-by: Dave Airlie

    Francisco Jerez
     
  • This patch introduces 3 VFS accessors: 'sb_mark_dirty()',
    'sb_mark_clean()', and 'sb_is_dirty()'. They simply
    set 'sb->s_dirt' or test 'sb->s_dirt'. The plan is to make
    every FS use these accessors later instead of manipulating
    the 'sb->s_dirt' flag directly.

    Ultimately, this change is a preparation for the periodic
    superblock synchronization optimization which is about
    preventing the "sync_supers" kernel thread from waking up
    even if there is nothing to synchronize.

    This patch does not do any functional change, just adds
    accessor functions.

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: Linus Torvalds

    Artem Bityutskiy
     
  • …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:
    rbtree: Undo augmented trees performance damage and regression
    x86, Calgary: Limit the max PHB number to 256

    Linus Torvalds
     

06 Jul, 2010

4 commits

  • First remove items from work_list as soon as we start working on them. This
    means we don't have to track any pending or visited state and can get
    rid of all the RCU magic freeing the work items - we can simply free
    them once the operation has finished. Second use a real completion for
    tracking synchronous requests - if the caller sets the completion pointer
    we complete it, otherwise use it as a boolean indicator that we can free
    the work item directly. Third unify struct wb_writeback_args and struct
    bdi_work into a single data structure, wb_writeback_work. Previous we
    set all parameters into a struct wb_writeback_args, copied it into
    struct bdi_work, copied it again on the stack to use it there. Instead
    of just allocate one structure dynamically or on the stack and use it
    all the way through the stack.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Christoph Hellwig
     
  • The case where we have a superblock doesn't require a loop here as we scan
    over all inodes in writeback_sb_inodes. Split it out into a separate helper
    to make the code simpler. This also allows to get rid of the sb member in
    struct writeback_control, which was rather out of place there.

    Also update the comments in writeback_sb_inodes that explain the handling
    of inodes from wrong superblocks.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Christoph Hellwig
     
  • This was just an odd wrapper around writeback_inodes_wb. Removing this
    also allows to get rid of the bdi member of struct writeback_control
    which was rather out of place there.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Christoph Hellwig
     
  • netif_vdbg() was originally defined as entirely equivalent to
    netdev_vdbg(), but I assume that it was intended to take the same
    parameters as netif_dbg() etc. (Currently it is only used by the
    sfc driver, in which I worked on that assumption.)

    In commit a4ed89c I changed the definition used when VERBOSE_DEBUG is
    not defined, but I failed to notice that the definition used when
    VERBOSE_DEBUG is defined was also not as I expected. Change that to
    match netif_dbg() as well.

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings