29 Aug, 2008

3 commits


28 Aug, 2008

2 commits


27 Aug, 2008

4 commits

  • They are unused and ->busy doesn't exist anymore.

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • Technically, the cmd_filter would be applied to other protocols though
    it's unlikely to happen. Putting SCSI stuff to request_queue is kinda
    layer violation. So let's rename it.

    Signed-off-by: FUJITA Tomonori
    Signed-off-by: Jens Axboe

    FUJITA Tomonori
     
  • cmd_filter works only for the block layer SG_IO with SCSI block
    devices. It breaks scsi/sg.c, bsg, and the block layer SG_IO with SCSI
    character devices (such as st). We hit a kernel crash with them.

    The problem is that cmd_filter code accesses to gendisk (having struct
    blk_scsi_cmd_filter) via inode->i_bdev->bd_disk. It works for only
    SCSI block device files. With character device files, inode->i_bdev
    leads you to struct cdev. inode->i_bdev->bd_disk->blk_scsi_cmd_filter
    isn't safe.

    SCSI ULDs don't expose gendisk; they keep it private. bsg needs to be
    independent on any protocols. We shouldn't change ULDs to expose their
    gendisk.

    This patch moves struct blk_scsi_cmd_filter from gendisk to
    request_queue, a common object, which eveyone can access to.

    The user interface doesn't change; users can change the filters via
    /sys/block/. gendisk has a pointer to request_queue so the cmd_filter
    code accesses to struct blk_scsi_cmd_filter.

    Signed-off-by: FUJITA Tomonori
    Signed-off-by: Jens Axboe

    FUJITA Tomonori
     
  • Including in the user-visible part of this header has
    caused build regressions with headers from 2.6.27-rc. Move it down to
    the #ifdef __KERNEL__ part, which is the only place it's needed. Move
    some other kernel-only things down there too, while we're at it.

    Signed-off-by: David Woodhouse
    Signed-off-by: Linus Torvalds

    David Woodhouse
     

26 Aug, 2008

1 commit


25 Aug, 2008

3 commits

  • The following part of commit 9ef621d3be56e1188300476a8102ff54f7b6793f
    (KVM: Support mixed endian machines) changed on the size of a struct
    that is exported to userspace:

    include/linux/kvm.h:

    @@ -318,14 +318,14 @@ struct kvm_trace_rec {
    __u32 vcpu_id;
    union {
    struct {
    - __u32 cycle_lo, cycle_hi;
    + __u64 cycle_u64;
    __u32 extra_u32[KVM_TRC_EXTRA_MAX];
    } cycle;
    struct {
    __u32 extra_u32[KVM_TRC_EXTRA_MAX];
    } nocycle;
    } u;
    -};
    +} __attribute__((packed));

    Packing a struct was the correct idea, but it packed the wrong struct.

    Signed-off-by: Adrian Bunk
    Signed-off-by: Avi Kivity

    Adrian Bunk
     
  • Everyone should be using stop_machine() now. The staged API
    transition helped life in linux-next.

    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • As pointed out during review d_add_ci argument order should match d_add,
    so switch the dentry and inode arguments.

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

    Christoph Hellwig
     

24 Aug, 2008

1 commit


22 Aug, 2008

9 commits

  • …el/git/tip/linux-2.6-tip

    * 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    nohz: fix wrong event handler after online an offlined cpu

    Linus Torvalds
     
  • * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
    [libata] pata_it821x: fix warning
    libata: Fix a large collection of DMA mode mismatches
    ahci: sis controllers actually can do PMP
    pata_via: clean up recent tf_load changes
    libata: restore SControl on detach
    libata: use ata_link_printk() when printing SError
    libata: always do follow-up SRST if hardreset returned -EAGAIN
    libata: fix EH action overwriting in ata_eh_reset()
    sata_mv: add the Gen IIE flag to the SoC devices.
    ata_piix: IDE Mode SATA patch for Intel Ibex Peak DeviceIDs
    ahci: RAID mode SATA patch for Intel Ibex Peak DeviceIDs
    sata_mv: don't issue two DMA commands concurrently
    libata: implement no[hs]rst force params

    Linus Torvalds
     
  • Dave Müller sent a diff for the pata_oldpiix that highlighted a problem
    where a lot of the ATA drivers assume dma_mode == 0 means "no DMA" while
    the core code uses 0xFF.

    This turns out to have other consequences such as code doing >= XFER_UDMA_0
    also catching 0xFF as UDMAlots. Fortunately it doesn't generally affect
    set_dma_mode, although some drivers call back into their own set mode code
    from other points.

    Having been through the drivers I've added helpers for using_udma/using_mwdma
    dma_enabled so that people don't open code ranges that may change (eg if UDMA8
    appears somewhere)

    Thanks to David for the initial bits
    [and added fix for pata_oldpiix from and signed-off-by Dave Mueller
    -jg]

    Signed-off-by: Alan Cox
    Signed-off-by: Jeff Garzik

    Alan Cox
     
  • Save SControl during probing and restore it on detach. This prevents
    adjustments made by libata drivers to seep into the next driver which
    gets attached (be it a libata one or not).

    It's not clear whether SControl also needs to be restored on suspend.
    The next system to have control (ACPI or kexec'd kernel) would
    probably like to see the original SControl value but there's no
    guarantee that a link is gonna keep working after SControl is adjusted
    without a reset and adding a reset and modified recovery cycle soley
    for this is an overkill. For now, do it only for detach.

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

    Tejun Heo
     
  • Implement force params nohrst, nosrst and norst. This is to work
    around reset related problems and ease debugging.

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

    Tejun Heo
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
    pnp: fix "add acpi:* modalias entries"
    UIO: generic irq handling for some uio platform devices
    UIO: uio_pdrv: fix license specification
    UIO: uio_pdrv: fix memory leak
    block: drop references taken by class_find_device()
    block: fix partial read() of /proc/{partitions,diskstats}
    PM: Remove WARN_ON from device_pm_add
    driver core: add init_name to struct device
    PM: don't skip device PM init when CONFIG_PM_SLEEP isn't set and CONFIG_PM is set
    driver model: anti-oopsing medicine
    dev_printk(): constify the `dev' argument
    drivers/base/driver.c: remove unused to_dev() macro
    Documentation: HOWTO-ja_JP-sync patch
    Japanese translation of Documentation/SubmitChecklist
    kobject: Replace ALL occurrences of '/' with '!' instead of only the first one.

    Linus Torvalds
     
  • This patch (as1128) fixes one of the problems related to the new PM
    infrastructure. We are not allowed to register new child devices
    during the middle of a system sleep transition, but unbinding a USB
    driver causes the core to automatically install altsetting 0 and
    thereby create new endpoint pseudo-devices.

    The patch fixes this problem (and the related problem that installing
    altsetting 0 will fail if the device is suspended) by deferring the
    Set-Interface call until some later time when it is legal and can
    succeed. Possible later times are: when a new driver is being probed
    for the interface, and when the interface is being resumed.

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

    Alan Stern
     
  • This gives us a way to handle both the bus_id and init_name values being
    used for a while during the transition period.

    Cc: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • Add const markings to dev_name and dev_driver_string to make it clear that
    dev_printk doesn't modify dev. This is a prerequisite to adding more
    const markings to other functions make it clearer, which functions can
    modify dev and which can't.

    Signed-off-by: Jean Delvare
    Cc: Kay Sievers
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Jean Delvare
     

21 Aug, 2008

5 commits

  • On the tickless system(CONFIG_NO_HZ=y and CONFIG_HIGH_RES_TIMERS=n), after
    I made an offlined cpu online, I found this cpu's event handler was
    tick_handle_periodic, not tick_nohz_handler.

    After debuging, I found this bug was caused by the wrong tick mode. the
    tick mode is not changed to NOHZ_MODE_INACTIVE when the cpu is offline.

    This patch fixes this bug.

    Signed-off-by: Miao Xie
    Signed-off-by: Andrew Morton
    Signed-off-by: Ingo Molnar

    Miao Xie
     
  • Fixes kernel BUG at lib/radix-tree.c:473.

    Previously the handler was incidentally provided by tmpfs but this was
    removed with:

    commit 14fcc23fdc78e9d32372553ccf21758a9bd56fa1
    Author: Hugh Dickins
    Date: Mon Jul 28 15:46:19 2008 -0700

    tmpfs: fix kernel BUG in shmem_delete_inode

    relying on this behaviour was incorrect in any case and the BUG also
    appeared when the device node was on an ext3 filesystem.

    v2: override a_ops at open() time rather than mmap() time to minimise
    races per AKPM's concerns.

    Signed-off-by: Ian Campbell
    Cc: Jaya Kumar
    Cc: Nick Piggin
    Cc: Peter Zijlstra
    Cc: Hugh Dickins
    Cc: Johannes Weiner
    Cc: Jeremy Fitzhardinge
    Cc: Kel Modderman
    Cc: Markus Armbruster
    Cc: Krzysztof Helt
    Cc: [14fcc23fd is in 2.6.25.14 and 2.6.26.1]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ian Campbell
     
  • There is a race with dirty page accounting where a page may not properly
    be accounted for.

    clear_page_dirty_for_io() calls page_mkclean; then TestClearPageDirty.

    page_mkclean walks the rmaps for that page, and for each one it cleans and
    write protects the pte if it was dirty. It uses page_check_address to
    find the pte. That function has a shortcut to avoid the ptl if the pte is
    not present. Unfortunately, the pte can be switched to not-present then
    back to present by other code while holding the page table lock -- this
    should not be a signal for page_mkclean to ignore that pte, because it may
    be dirty.

    For example, powerpc64's set_pte_at will clear a previously present pte
    before setting it to the desired value. There may also be other code in
    core mm or in arch which do similar things.

    The consequence of the bug is loss of data integrity due to msync, and
    loss of dirty page accounting accuracy. XIP's __xip_unmap could easily
    also be unreliable (depending on the exact XIP locking scheme), which can
    lead to data corruption.

    Fix this by having an option to always take ptl to check the pte in
    page_check_address.

    It's possible to retain this optimization for page_referenced and
    try_to_unmap.

    Signed-off-by: Nick Piggin
    Cc: Jared Hulbert
    Cc: Carsten Otte
    Cc: Hugh Dickins
    Acked-by: Peter Zijlstra
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • When user calls sys_setpriority(PRIO_PGRP ...) on a NPTL style multi-LWP
    process, only the task leader of the process is affected, all other
    sibling LWP threads didn't receive the setting. The problem was that the
    iterator used in sys_setpriority() only iteartes over one task for each
    process, ignoring all other sibling thread.

    Introduce a new macro do_each_pid_thread / while_each_pid_thread to walk
    each thread of a process. Convert 4 call sites in {set/get}priority and
    ioprio_{set/get}.

    Signed-off-by: Ken Chen
    Cc: Oleg Nesterov
    Cc: Roland McGrath
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ken Chen
     
  • Purely cosmetic for now, but we might as well get it merged ASAP.

    Signed-off-by: David Woodhouse
    Signed-off-by: Linus Torvalds

    David Woodhouse
     

20 Aug, 2008

2 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
    PCI: add acpi_find_root_bridge_handle
    PCI: acpi_pcihp: run _OSC on a root bridge
    x86/PCI: irq and pci_ids patch for Intel Ibex Peak PCHs
    x86/PCI: allow scanning of 255 PCI busses
    x86, pci: detect end_bus_number according to acpi/e820 reserved, v2
    pci: debug extra pci bus resources
    pci: debug extra pci resources range

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (94 commits)
    pkt_sched: Prevent livelock in TX queue running.
    Revert "pkt_sched: Add BH protection for qdisc_stab_lock."
    Revert "pkt_sched: Protect gen estimators under est_lock."
    pkt_sched: remove bogus block (cleanup)
    nf_nat: use secure_ipv4_port_ephemeral() for NAT port randomization
    netfilter: ctnetlink: sleepable allocation with spin lock bh
    netfilter: ctnetlink: fix sleep in read-side lock section
    netfilter: ctnetlink: fix double helper assignation for NAT'ed conntracks
    netfilter: ipt_addrtype: Fix matching of inverted destination address type
    dccp: Fix panic caused by too early termination of retransmission mechanism
    pkt_sched: Don't hold qdisc lock over qdisc_destroy().
    pkt_sched: Add lockdep annotation for qdisc locks
    pkt_sched: Never schedule non-root qdiscs.
    removed unused #include
    rt2x00: Fix txdone_entry_desc_flags
    b43: Fix for another Bluetooth Coexistence SPROM Programming error for BCM4306
    mac80211: remove kdoc references to IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE
    p54u: reset skb's data/tail pointer on requeue
    p54: move p54_vdcf_init to the right place.
    iwlwifi: fix printk newlines
    ...

    Linus Torvalds
     

19 Aug, 2008

5 commits


17 Aug, 2008

3 commits

  • security.h: fix build failure

    include/linux/security.h: In function 'security_ptrace_traceme':
    include/linux/security.h:1760: error: 'parent' undeclared (first use in this function)

    Signed-off-by: Alexander Beregalov
    Tested-by: Ingo Molnar
    Signed-off-by: James Morris

    Alexander Beregalov
     
  • The exported copy of videodev2.h contains this line:

    #define #include

    This is because for some reason it defines __user for itself -- despite
    the fact that we remove all instances of __user when exporting headers.
    _All_ pointers in userspace are user pointers. Fix it by removing the
    unnecessary '#define __user' from the file.

    The new headers ivtv.h and ivtvfb.h would have the same problem... if
    whoever put them there had actually remembered to add them to the Kbuild
    file while he was at it. Fix those too, and export them as was
    presumably intended.

    Note that includes of are also stripped by the header
    export process, so those don't need to be conditional.

    Signed-off-by: David Woodhouse
    Signed-off-by: Mauro Carvalho Chehab
    Acked-by: Hans Verkuil
    Signed-off-by: Linus Torvalds

    David Woodhouse
     
  • Try to comment away a little of the confusion between mm's vm_area_struct
    vm_flags and vmalloc's vm_struct flags: based on an idea by Ulrich Drepper.

    Signed-off-by: Hugh Dickins
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     

16 Aug, 2008

2 commits

  • There's an skb_copy_datagram_iovec() to copy out of a paged skb, but
    nothing the other way around (because we don't do that).

    We want to allocate big skbs in tun.c, so let's add the function.
    It's a carbon copy of skb_copy_datagram_iovec() with enough changes to
    be annoying.

    Signed-off-by: Rusty Russell
    Signed-off-by: David S. Miller

    Rusty Russell
     
  • Add a TUNGETIFF interface so that userspace can query a
    tun/tap descriptor for its name and flags.

    This is needed because it is common for one app to create
    a tap interface, exec another app and pass it the file
    descriptor for the interface. Without TUNGETIFF the spawned
    app has no way of detecting wheter the interface has e.g.
    IFF_VNET_HDR set.

    Signed-off-by: Mark McLoughlin
    Acked-by: Max Krasnyansky
    Signed-off-by: David S. Miller

    Mark McLoughlin