26 Jun, 2006

40 commits

  • sysrq SAK is described as being something you should mistake for SAK from
    c2 compliant systems - whoops. What's meant is that it should *not* be
    mistaken as such.

    Signed-off-by: Jesper Juhl
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Juhl
     
  • Currently, enabling/disabling printk timestamps is only possible through
    reboot (bootparam) or recompile. I normally do not run with timestamps
    (since syslog handles that in a good manner), but for measuring small
    kernel delays (e.g. irq probing - see parport thread) I needed subsecond
    precision, but then again, just for some minutes rather than all kernel
    messages to come. The following patch adds a module_param() with which the
    timestamps can be en-/disabled in a live system through
    /sys/modules/printk/parameters/printk_time.

    Signed-off-by: Jan Engelhardt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Engelhardt
     
  • In radix_tree_tag_get(), return normalized value of 0/1, as indicated
    by its comment.

    Signed-off-by: Wu Fengguang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wu Fengguang
     
  • A few days ago Arjan signaled a lockdep red flag on epoll locks, and
    precisely between the epoll's device structure lock (->lock) and the wait
    queue head lock (->lock).

    Like I explained in another email, and directly to Arjan, this can't happen
    in reality because of the explicit check at eventpoll.c:592, that does not
    allow to drop an epoll fd inside the same epoll fd. Since lockdep is
    working on per-structure locks, it will never be able to know of policies
    enforced in other parts of the code.

    It was decided time ago of having the ability to drop epoll fds inside
    other epoll fds, that triggers a very trick wakeup operations (due to
    possibly reentrant callback-driven wakeups) handled by the
    ep_poll_safewake() function. While looking again at the code though, I
    noticed that all the operations done on the epoll's main structure wait
    queue head (->wq) are already protected by the epoll lock (->lock), so that
    locked-style functions can be used to manipulate the ->wq member. This
    makes both a lock-acquire save, and lockdep happy.

    Running totalmess on my dual opteron for a while did not reveal any problem
    so far:

    http://www.xmailserver.org/totalmess.c

    Signed-off-by: Davide Libenzi
    Cc: Arjan van de Ven
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Davide Libenzi
     
  • Signed-off-by: Alexey Dobriyan
    Cc: Paul Clements
    Cc: Jens Axboe
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • This patch makes EXT2_DEBUG work again. Due to lack of proper include
    file, EXT2_DEBUG was undefined in bitmap.c and ext2_count_free() is left
    out. Moved to balloc.c and removed bitmap.c entirely.

    Second, debug versions of ext2_count_free_{inodes/blocks} reacquires
    superblock lock. Moved lock into callers.

    Signed-off-by: Val Henson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Valerie Henson
     
  • Why is it marked unused when in fact it's used?

    Signed-off-by: Alexey Dobriyan
    Cc: Ingo Molnar
    Cc: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • On UP, this:

    cpumask_t mask = node_to_cpumask(numa_node_id());

    for_each_cpu_mask(cpu, mask)

    does this:

    mm/readahead.c: In function `node_readahead_aging':
    mm/readahead.c:850: warning: unused variable `mask'

    which is unpleasantly fixed by this:

    Acked-by: Paul Jackson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Make makes sysctl non-optional unless EMBEDDED is set. There are a number
    of interfaces exposed via sysctl, enough that it has to be considered core
    kernel functionality at this point.

    Signed-off-by: H. Peter Anvin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    H. Peter Anvin
     
  • Add WARN_ON_ONCE(cond) to print once-per-bootup messages.

    [rostedt@goodmis.org: improve code generation]
    Signed-off-by: Ingo Molnar
    Signed-off-by: Arjan van de Ven
    Signed-off-by: Steven Rostedt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • Make procfs non-optional unless EMBEDDED is set, just like sysfs. procfs
    is already de facto required for a large subset of Linux functionality.

    Signed-off-by: H. Peter Anvin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    H. Peter Anvin
     
  • Put short function description for read_cache_pages() on one line as needed
    by kernel-doc.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • Convert the ext3 in-kernel filesystem blocks to ext3_fsblk_t. Convert the
    rest of all unsigned long type in-kernel filesystem blocks to ext3_fsblk_t,
    and replace the printk format string respondingly.

    Signed-off-by: Mingming Cao
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mingming Cao
     
  • Some of the in-kernel ext3 block variable type are treated as signed 4 bytes
    int type, thus limited ext3 filesystem to 8TB (4kblock size based). While
    trying to fix them, it seems quite confusing in the ext3 code where some
    blocks are filesystem-wide blocks, some are group relative offsets that need
    to be signed value (as -1 has special meaning). So it seem saner to define
    two types of physical blocks: one is filesystem wide blocks, another is
    group-relative blocks. The following patches clarify these two types of
    blocks in the ext3 code, and fix the type bugs which limit current 32 bit ext3
    filesystem limit to 8TB.

    With this series of patches and the percpu counter data type changes in the mm
    tree, we are able to extend exts filesystem limit to 16TB.

    This work is also a pre-request for the recent >32 bit ext3 work, and makes
    the kernel to able to address 48 bit ext3 block a lot easier: Simply redefine
    ext3_fsblk_t from unsigned long to sector_t and redefine the format string for
    ext3 filesystem block corresponding.

    Two RFC with a series patches have been posted to ext2-devel list and have
    been reviewed and discussed:
    http://marc.theaimsgroup.com/?l=ext2-devel&m=114722190816690&w=2

    http://marc.theaimsgroup.com/?l=ext2-devel&m=114784919525942&w=2

    Patches are tested on both 32 bit machine and 64 bit machine, 8TB ext3 filesystem(with the latest to be released e2fsprogs-1.39). Tests
    includes overnight fsx, tiobench, dbench and fsstress.

    This patch:

    Defines ext3_fsblk_t and ext3_grpblk_t, and the printk format string for
    filesystem wide blocks.

    This patch classifies all block group relative blocks, and ext3_fsblk_t blocks
    occurs in the same function where used to be confusing before. Also include
    kernel bug fixes for filesystem wide in-kernel block variables. There are
    some fileystem wide blocks are treated as int/unsigned int type in the kernel
    currently, especially in ext3 block allocation and reservation code. This
    patch fixed those bugs by converting those variables to ext3_fsblk_t(unsigned
    long) type.

    Signed-off-by: Mingming Cao
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mingming Cao
     
  • Fix section warning:
    WARNING: drivers/scsi/megaraid/megaraid_mbox.o - Section mismatch: reference to .init.text: from .text between 'megaraid_probe_one' (at offset 0x171e) and 'megaraid_queue_command'

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • From: Randy Dunlap

    Fix section mismatch in wd7000 driver:
    WARNING: drivers/scsi/wd7000.o - Section mismatch: reference to .init.text: from .text after 'wd7000_detect' (at offset 0xa5d)
    WARNING: drivers/scsi/wd7000.o - Section mismatch: reference to .init.text: from .text after 'wd7000_detect' (at offset 0xab6)
    WARNING: drivers/scsi/wd7000.o - Section mismatch: reference to .init.text: from .text after 'wd7000_detect' (at offset 0xb67

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy.Dunlap
     
  • Driver for the simple parallel port interface on the Asix AX88796 chip on
    an platform_bus.

    [akpm@osdl.org: x86_64 build fix]
    Signed-off-by: Ben Dooks
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • copy_process() appears to be the only caller of acct_clear_integrals() and
    does not pass in NULL task pointers. Remove the unecessary check.

    Signed-off-by: Matt Helsley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matt Helsley
     
  • As described in a previous patch and documented in mm/filemap.h,
    copy_from_user_inatomic* shouldn't zero out the tail of the buffer after an
    incomplete copy.

    This patch implements that change for i386.

    For the _nocache version, a new __copy_user_intel_nocache is defined similar
    to copy_user_zeroio_intel_nocache, and this is ultimately used for the copy.

    For the regular version, __copy_from_user_ll_nozero is defined which uses
    __copy_user and __copy_user_intel - the later needs casts to reposition the
    __user annotations.

    If copy_from_user_atomic is given a constant length of 1, 2, or 4, then we do
    still zero the destintion on failure. This didn't seem worth the effort of
    fixing as the places where it is used really don't care.

    Signed-off-by: Neil Brown
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Ralf Baechle
    Cc: William Lee Irwin III
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     
  • The problem is that when we write to a file, the copy from userspace to
    pagecache is first done with preemption disabled, so if the source address is
    not immediately available the copy fails *and* *zeros* *the* *destination*.

    This is a problem because a concurrent read (which admittedly is an odd thing
    to do) might see zeros rather that was there before the write, or what was
    there after, or some mixture of the two (any of these being a reasonable thing
    to see).

    If the copy did fail, it will immediately be retried with preemption
    re-enabled so any transient problem with accessing the source won't cause an
    error.

    The first copying does not need to zero any uncopied bytes, and doing so
    causes the problem. It uses copy_from_user_atomic rather than copy_from_user
    so the simple expedient is to change copy_from_user_atomic to *not* zero out
    bytes on failure.

    The first of these two patches prepares for the change by fixing two places
    which assume copy_from_user_atomic does zero the tail. The two usages are
    very similar pieces of code which copy from a userspace iovec into one or more
    page-cache pages. These are changed to remove the assumption.

    The second patch changes __copy_from_user_inatomic* to not zero the tail.
    Once these are accepted, I will look at similar patches of other architectures
    where this is important (ppc, mips and sparc being the ones I can find).

    This patch:

    There is a problem with __copy_from_user_inatomic zeroing the tail of the
    buffer in the case of an error. As it is called in atomic context, the error
    may be transient, so it results in zeros being written where maybe they
    shouldn't be.

    In the usage in filemap, this opens a window for a well timed read to see data
    (zeros) which is not consistent with any ordering of reads and writes.

    Most cases where __copy_from_user_inatomic is called, a failure results in
    __copy_from_user being called immediately. As long as the latter zeros the
    tail, the former doesn't need to. However in *copy_from_user_iovec
    implementations (in both filemap and ntfs/file), it is assumed that
    copy_from_user_inatomic will zero the tail.

    This patch removes that assumption, so that after this patch it will
    be safe for copy_from_user_inatomic to not zero the tail.

    This patch also adds some commentary to filemap.h and asm-i386/uaccess.h.

    After this patch, all architectures that might disable preempt when
    kmap_atomic is called need to have their __copy_from_user_inatomic* "fixed".
    This includes
    - powerpc
    - i386
    - mips
    - sparc

    Signed-off-by: Neil Brown
    Cc: David Howells
    Cc: Anton Altaparmakov
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Ralf Baechle
    Cc: William Lee Irwin III
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     
  • constify a medium-large CRC code table.

    Signed-off-by: Andreas Mohr
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andreas Mohr
     
  • Signed-off-by: Andreas Mohr
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andreas Mohr
     
  • This is redundant with check in wakeup_kswapd.

    Signed-off-by: Chris Wright
    Acked-by: Paul Jackson
    Acked-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chris Wright
     
  • Cc: Vivek Goyal
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Wilder
     
  • Do a *partial* CodingStyle cleanup, correct some spelling in printk()'s &&
    convert C++ comments to C comments - in moxa driver.

    Signed-off-by: Jesper Juhl
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Juhl
     
  • Remove pointless check of 'tty' argument vs NULL from moxa driver.

    Signed-off-by: Jesper Juhl
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Juhl
     
  • Signed-off-by: Jesper Juhl
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Juhl
     
  • This was reported as Debian bug #336604.

    Signed-off-by: "Theodore Ts'o"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Theodore Ts'o
     
  • Signed-off-by: "Theodore Ts'o"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Theodore Ts'o
     
  • The variable i is guaranteed to be the same as db_count given the previous
    for loop. So get rid of it since it's dead code.

    Signed-off-by: "Theodore Ts'o"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Theodore Ts'o
     
  • If ext3 filesystem is larger than 2TB, and sector_t is a u32 (i.e.
    CONFIG_LBD not defined in the kernel), the calculation of the disk sector
    will overflow. Add check at ext3_fill_super() and ext3_group_extend() to
    prevent mount/remount/resize >2TB ext3 filesystem if sector_t size is 4
    bytes.

    Verified this patch on a 32 bit platform without CONFIG_LBD defined
    (sector_t is 32 bits long), mount refuse to mount a 10TB ext3.

    Signed-off-by: Mingming Cao
    Acked-by: Andreas Dilger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mingming Cao
     
  • schedule_on_each_cpu() presently does a large kmalloc - 96 kbytes on 1024 CPU
    64-bit.

    Rework it so that we do one 8192-byte allocation and then a pile of tiny ones,
    via alloc_percpu(). This has a much higher chance of success (100% in the
    current VM).

    This also has the effect of reducing the memory requirements from NR_CPUS*n to
    num_possible_cpus()*n.

    Cc: Christoph Lameter
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Fix indentation.
    Quote a brace '{' so that vi won't be fooled by it.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • Drop leading space of kernel-doc section contents.

    "Section" data (contents) are split from the section header
    (e.g., Note: below is a section header:
    * Note: list_empty on entry does not return true after this, the entry is
    * in an undefined state.
    ).

    Currently the data/contents begins with a space and is left that way, which
    causes it to look bad when printed (in text mode; see example below), so
    just remove the leading space.

    Note:

    list_empty on entry does not return true after this, the entry is in an
    undefined state.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • Lots of people use this. Apparently RH has for over 18 months so lets
    drop EXPERIMENTAL.

    Signed-off-by: Chris Wedgwood
    Cc: Matt Domsch
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chris Wedgwood
     
  • pdflush is carefully designed to ensure that all wakeups have some
    corresponding work to do - if a woken-up pdflush thread discovers that it
    hasn't been given any work to do then this is considered an error.

    That all broke when swsusp came along - because a timer-delivered wakeup to a
    frozen pdflush thread will just get lost. This causes the pdflush thread to
    get lost as well: the writeback timer is supposed to be re-armed by pdflush in
    process context, but pdflush doesn't execute the callout which does this.

    Fix that up by ignoring the return value from try_to_freeze(): jsut proceed,
    see if we have any work pending and only go back to sleep if that is not the
    case.

    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • WARNING: drivers/block/cpqarray.o - Section mismatch: reference to .init.text: from .text between 'cpqarray_register_ctlr' (at offset 0xe98) and 'alloc_cpqarray_hba'
    WARNING: drivers/block/cpqarray.o - Section mismatch: reference to .init.text: from .text between 'cpqarray_register_ctlr' (at offset 0xe9c) and 'alloc_cpqarray_hba'

    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • This is a patch from Alan that fixes a real ide-cd.c regression causing
    bogus "Media Check" failures for perfectly valid Fedora install ISOs, on
    certain CD-ROM drives.

    This is a forward port to 2.6.16 (from RHEL) of the minimal changes for the
    end of media problem. It may not be sufficient for some controllers
    (promise notably) and it does not touch the locking so the error path
    locking is as horked as in mainstream.

    From: Ingo Molnar

    I have ported the patch to 2.6.17-rc4 and tested it by provoking
    end-of-media IO errors with an unaligned ISO image. Unlike the vanilla
    kernel, the patched kernel interpreted the error condition correctly with
    512 byte granularity:

    hdc: command error: status=0x51 { DriveReady SeekComplete Error }
    hdc: command error: error=0x54 { AbortedCommand LastFailedSense=0x05 }
    ide: failed opcode was: unknown
    ATAPI device hdc:
    Error: Illegal request -- (Sense key=0x05)
    Illegal mode for this track or incompatible medium -- (asc=0x64, ascq=0x00)
    The failed "Read 10" packet command was:
    "28 00 00 04 fb 78 00 00 06 00 00 00 00 00 00 00 "
    end_request: I/O error, dev hdc, sector 1306080
    Buffer I/O error on device hdc, logical block 163260
    Buffer I/O error on device hdc, logical block 163261
    Buffer I/O error on device hdc, logical block 163262

    the unpatched kernel produces an incorrect error dump:

    hdc: command error: status=0x51 { DriveReady SeekComplete Error }
    hdc: command error: error=0x54 { AbortedCommand LastFailedSense=0x05 }
    ide: failed opcode was: unknown
    end_request: I/O error, dev hdc, sector 1306080
    Buffer I/O error on device hdc, logical block 163260
    hdc: command error: status=0x51 { DriveReady SeekComplete Error }
    hdc: command error: error=0x54 { AbortedCommand LastFailedSense=0x05 }
    ide: failed opcode was: unknown
    end_request: I/O error, dev hdc, sector 1306088
    Buffer I/O error on device hdc, logical block 163261
    hdc: command error: status=0x51 { DriveReady SeekComplete Error }
    hdc: command error: error=0x54 { AbortedCommand LastFailedSense=0x05 }
    ide: failed opcode was: unknown
    end_request: I/O error, dev hdc, sector 1306096
    Buffer I/O error on device hdc, logical block 163262

    I do not have the right type of CD-ROM drive to reproduce the end-of-media
    data corruption bug myself, but this same patch in RHEL solved it.

    Signed-off-by: Ingo Molnar
    Cc: Alan Cox
    Cc: Bartlomiej Zolnierkiewicz
    Cc: Jens Axboe
    Cc: Matt Mackall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Use loop "cursor" instead of loop "counter" for list iterator descriptions.
    They are not counters, they are pointers or positions.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • kernel-doc:

    Put all short function descriptions on one line or if they are too long,
    omit the short description & add a Description: section for them.

    Change some list iterator descriptions to use "current" point instead of
    "existing" point.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap