1. 28 3月, 2007 27 次提交
  2. 27 3月, 2007 13 次提交
    • V
      [PATCH] Fix maxcpus=1 trigerring BUG() in cpufreq · ec28297a
      Venki Pallipadi 提交于
      Ingo reported it on lkml in the thread
        "2.6.21-rc5: maxcpus=1 crash in cpufreq: kernel BUG at drivers/cpufreq/cpufreq.c:82!"
      
      This check added to remove_dev  is symmetric to one in add_dev and handles
      callbacks for offline cpus cleanly.
      Signed-off-by: NVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ec28297a
    • I
      KVM: always reload segment selectors · 6d9658df
      Ingo Molnar 提交于
      failed VM entry on VMX might still change %fs or %gs, thus make sure
      that KVM always reloads the segment selectors. This is crutial on both
      x86 and x86_64: x86 has __KERNEL_PDA in %fs on which things like
      'current' depends and x86_64 has 0 there and needs MSR_GS_BASE to work.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      6d9658df
    • A
      KVM: Prevent system selectors leaking into guest on real->protected mode transition on vmx · 6af11b9e
      Avi Kivity 提交于
      Intel virtualization extensions do not support virtualizing real mode.  So
      kvm uses virtualized vm86 mode to run real mode code.  Unfortunately, this
      virtualized vm86 mode does not support the so called "big real" mode, where
      the segment selector and base do not agree with each other according to the
      real mode rules (base == selector << 4).
      
      To work around this, kvm checks whether a selector/base pair violates the
      virtualized vm86 rules, and if so, forces it into conformance.  On a
      transition back to protected mode, if we see that the guest did not touch
      a forced segment, we restore it back to the original protected mode value.
      
      This pile of hacks breaks down if the gdt has changed in real mode, as it
      can cause a segment selector to point to a system descriptor instead of a
      normal data segment.  In fact, this happens with the Windows bootloader
      and the qemu acpi bios, where a protected mode memcpy routine issues an
      innocent 'pop %es' and traps on an attempt to load a system descriptor.
      
      "Fix" by checking if the to-be-restored selector points at a system segment,
      and if so, coercing it into a normal data segment.  The long term solution,
      of course, is to abandon vm86 mode and use emulation for big real mode.
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      6af11b9e
    • M
      Export __splice_from_pipe() · 40bee44e
      Mark Fasheh 提交于
      Ocfs2 wants to implement it's own splice write actor so that it can better
      manage cluster / page locks. This lets us re-use the rest of splice write
      while only providing our own code where it's actually important.
      Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      40bee44e
    • N
      2/2 splice: dont readpage · 08c72591
      Nick Piggin 提交于
      Splice does not need to readpage to bring the page uptodate before writing
      to it, because prepare_write will take care of that for us.
      
      Splice is also wrong to SetPageUptodate before the page is actually uptodate.
      This results in the old uninitialised memory leak. This gets fixed as a
      matter of course when removing the readpage logic.
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      08c72591
    • N
      1/2 splice: dont steal · 485ddb4b
      Nick Piggin 提交于
      Stealing pages with splice is problematic because we cannot just insert
      an uptodate page into the pagecache and hope the filesystem can take care
      of it later.
      
      We also cannot just ClearPageUptodate, then hope prepare_write does not
      write anything into the page, because I don't think prepare_write gives
      that guarantee.
      
      Remove support for SPLICE_F_MOVE for now. If we really want to bring it
      back, we might be able to do so with a the new filesystem buffered write
      aops APIs I'm working on. If we really don't want to bring it back, then
      we should decide that sooner rather than later, and remove the flag and
      all the stealing infrastructure before anybody starts using it.
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      485ddb4b
    • T
      make elv_register() output atomic · 1ffb96c5
      Thibaut VARENE 提交于
      Booting 2.6.21-rc3-g45592145 I noticed the following on one of my
      machines in the bootlog:
      
      io scheduler noop registered<6>Time: jiffies clocksource has been installed.
      
      io scheduler deadline registered (default)
      
      Looking at block/elevator.c, it appears that elv_register() uses two
      consecutive printks in a non-atomic way, leading to the above glitch. The
      attached trivial patch fixes this issue, by using a single printk.
      Signed-off-by: NThibaut VARENE <varenet@parisc-linux.org>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      1ffb96c5
    • V
      block: blk_max_pfn is somtimes wrong · f772b3d9
      Vasily Tarasov 提交于
      There is a small problem in handling page bounce.
      
      At the moment blk_max_pfn equals max_pfn, which is in fact not maximum
      possible _number_ of a page frame, but the _amount_ of page frames.  For
      example for the 32bit x86 node with 4Gb RAM, max_pfn = 0x100000, but not
      0xFFFF.
      
      request_queue structure has a member q->bounce_pfn and queue needs bounce
      pages for the pages _above_ this limit.  This routine is handled by
      blk_queue_bounce(), where the following check is produced:
      
      	if (q->bounce_pfn >= blk_max_pfn)
      		return;
      
      Assume, that a driver has set q->bounce_pfn to 0xFFFF, but blk_max_pfn
      equals 0x10000.  In such situation the check above fails and for each bio
      we always fall down for iterating over pages tied to the bio.
      
      I want to notice, that for quite a big range of device drivers (ide, md,
      ...) such problem doesn't happen because they use BLK_BOUNCE_ANY for
      bounce_pfn.  BLK_BOUNCE_ANY is defined as blk_max_pfn << PAGE_SHIFT, and
      then the check above doesn't fail.  But for other drivers, which obtain
      reuired value from drivers, it fails.  For example sata_nv uses
      ATA_DMA_MASK or dev->dma_mask.
      
      I propose to use (max_pfn - 1) for blk_max_pfn.  And the same for
      blk_max_low_pfn.  The patch also cleanses some checks related with
      bounce_pfn.
      Signed-off-by: NVasily Tarasov <vtaras@openvz.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      f772b3d9
    • L
      Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 · 703071b5
      Linus Torvalds 提交于
      * master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
        [SUNGEM]: Fix MAC address setting when interface is up.
        [IPV4] fib_trie: Document locking.
        [NET]: Correct accept(2) recovery after sock_attach_fd()
        [PPP]: Don't leak an sk_buff on interface destruction.
        [NET_SCHED]: Fix ingress locking
        [NET_SCHED]: cls_basic: fix NULL pointer dereference
        [DCCP]: make dccp_write_xmit_timer() static again
        [TG3]: Update version and reldate.
        [TG3]: Exit irq handler during chip reset.
        [TG3]: Eliminate the unused TG3_FLAG_SPLIT_MODE flag.
        [IPV6]: Fix routing round-robin locking.
        [DECNet] fib: Fix out of bound access of dn_fib_props[]
        [IPv4] fib: Fix out of bound access of fib_props[]
        [NET] AX.25 Kconfig and docs updates and fixes
        [NET]: Fix neighbour destructor handling.
        [NET]: Fix fib_rules compatibility breakage
        [SCTP]: Update SCTP Maintainers entry
        [NET]: remove unused header file: drivers/net/wan/lmc/lmc_media.h
      703071b5
    • L
      Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 · 6288c338
      Linus Torvalds 提交于
      * 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
        [S390] zcrypt: Fix ap_poll_requests counter in lost requests error path.
        [S390] zcrypt: Fix possible dead lock in AP bus module.
        [S390] cio: Device status validity.
        [S390] kprobes: Align probe address.
        [S390] Fix TCP/UDP pseudo header checksum computation.
        [S390] dasd: Work around gcc bug.
      6288c338
    • R
      [SUNGEM]: Fix MAC address setting when interface is up. · 09c72ec8
      Ruben Vandeginste 提交于
      This patch implements set_mac_address for the sungem driver.  This
      allows changing the mac address of the interface, even when the
      interface is up.
      Signed-off-by: NRuben Vandeginste <snowbender@gmail.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      09c72ec8
    • L
      Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6 · 8b66a454
      Linus Torvalds 提交于
      * master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6:
        USB: fix usb-serial/ftdi build warning
        USB: fix usb-serial/generic build warning
        USB: another entry for the quirk list
        USB: remove duplicated device id in airprime driver
        USB: omap_udc: workaround dma_free_coherent() bogosity
        UHCI: Fix problem caused by lack of terminating QH
      8b66a454
    • L
      Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6 · 55ab9756
      Linus Torvalds 提交于
      * master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6:
        PCI: Fix warning message in PCIE port driver
        PCI: Stop unhiding the SMBus on Toshiba laptops
        PCI: Fix up PCI power management doc
        pci: set pci=bfsort for PowerEdge R900
      55ab9756