19 Jun, 2008

1 commit


18 Jun, 2008

1 commit

  • Use max not min to enforce a lower limit on the max I/O size.

    This bug was introduced by "fuse: fix max i/o size calculation" (commit
    e5d9a0df07484d6d191756878c974e4307fb24ce).

    Thanks to Brian Wang for noticing.

    Reported-by: Brian Wang
    Signed-off-by: Miklos Szeredi
    Acked-by: Szabolcs Szakacsits
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     

17 Jun, 2008

6 commits


16 Jun, 2008

1 commit


13 Jun, 2008

3 commits

  • We were walking right into huge page areas in the pagemap walker, and
    calling the pmds pmd_bad() and clearing them.

    That leaked huge pages. Bad.

    This patch at least works around that for now. It ignores huge pages in
    the pagemap walker for the time being, and won't leak those pages.

    Signed-off-by: Dave Hansen
    Acked-by: Matt Mackall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Hansen
     
  • We need this at least for huge page detection for now, because powerpc
    needs the vm_area_struct to be able to determine whether a virtual address
    is referring to a huge page (its pmd_huge() doesn't work).

    It might also come in handy for some of the other users.

    Signed-off-by: Dave Hansen
    Acked-by: Matt Mackall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Hansen
     
  • New chmod() allows only acceptable permission, and if not acceptable, it
    returns -EPERM. Old one allows even if it can't store permission to on
    disk inode. But it seems too strict for users.

    E.g. https://bugzilla.redhat.com/show_bug.cgi?id=449080: With new one,
    rsync couldn't create the temporary file.

    So, this patch allows like old one, but now it doesn't change the
    permission if it can't store, and it returns 0.

    Also, this patch fixes missing check.

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

    OGAWA Hirofumi
     

12 Jun, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
    [CIFS] cifs: fix oops on mount when CONFIG_CIFS_DFS_UPCALL is enabled
    [CIFS] Fix hang in mount when negprot causes server to kill tcp session
    disable most mode changes on non-unix/non-cifsacl mounts
    [CIFS] Correct incorrect obscure open flag
    [CIFS] warn if both dynperm and cifsacl mount options specified
    silently ignore ownership changes unless unix extensions are enabled or we're faking uid changes
    [CIFS] remove trailing whitespace
    when creating new inodes, use file_mode/dir_mode exclusively on mount without unix extensions
    on non-posix shares, clear write bits in mode when ATTR_READONLY is set
    [CIFS] remove unused variables

    Linus Torvalds
     

11 Jun, 2008

2 commits


07 Jun, 2008

14 commits

  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
    ext4: enable barriers by default
    jbd2: Fix barrier fallback code to re-lock the buffer head
    ext4: Display the journal_async_commit mount option in /proc/mounts
    jbd2: If a journal checksum error is detected, propagate the error to ext4
    jbd2: Fix memory leak when verifying checksums in the journal
    ext4: fix online resize bug
    ext4: Fix uninit block group initialization with FLEX_BG
    ext4: Fix use of uninitialized data with debug enabled.

    Linus Torvalds
     
  • use_mm() was changed to use switch_mm() instead of activate_mm(), since
    then nobody calls (and nobody should call) activate_mm() with
    PF_BORROWED_MM bit set.

    As Jeff Dike pointed out, we can also remove the "old != new" check, it is
    always true.

    Signed-off-by: Oleg Nesterov
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/chrisw/lsm-2.6:
    capabilities: remain source compatible with 32-bit raw legacy capability support.
    LSM: remove stale web site from MAINTAINERS

    Linus Torvalds
     
  • If the user tries to read from a position that is not a multiple of 8, or
    read a number of bytes that is not a multiple of 8, they have passed an
    invalid argument to read, for the purpose of reading these files. It's
    not an IO error because we didn't encounter any trouble finding the data
    they asked for.

    Signed-off-by: Thomas Tuttle
    Cc: Matt Mackall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Tuttle
     
  • Since pagemap is all about examining pages mapped into processes' memory
    spaces, it makes sense for kpagecount to return the map counts, not the
    reference counts.

    Signed-off-by: Thomas Tuttle
    Cc: Matt Mackall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Tuttle
     
  • This patch:

    commit e9720acd728a46cb40daa52c99a979f7c4ff195c
    Author: Pavel Emelyanov
    Date: Fri Mar 7 11:08:40 2008 -0800

    [NET]: Make /proc/net a symlink on /proc/self/net (v3)

    introduced a /proc/self/net directory without bumping the corresponding
    link count for /proc/self.

    This patch replaces the static link count initializations with a call that
    counts the number of directory entries in the given pid_entry table
    whenever it is instantiated, and thus relieves the burden of manually
    keeping the two in sync.

    [akpm@linux-foundation.org: cleanup]
    Acked-by: Eric W. Biederman
    Cc: Pavel Emelyanov
    Signed-off-by: Vegard Nossum
    Cc: "David S. Miller"
    Cc: Alexey Dobriyan
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vegard Nossum
     
  • There is a bug when we are trying to verify that the reserve inode's
    double indirect blocks point back to the primary gdt blocks. The fix is
    obvious, we need to mod the gdb count by the addr's per block. You can
    verify this with the following test case

    dd if=/dev/zero of=disk1 seek=1024 count=1 bs=100M
    losetup /dev/loop1 disk1
    pvcreate /dev/loop1
    vgcreate loopvg1 /dev/loop1
    lvcreate -l 100%VG loopvg1 -n looplv1
    mkfs.ext3 -J size=64 -b 1024 /dev/loopvg1/looplv1
    mount /dev/loopvg1/looplv1 /mnt/loop
    dd if=/dev/zero of=disk2 seek=1024 count=1 bs=50M
    losetup /dev/loop2 disk2
    pvcreate /dev/loop2
    vgextend loopvg1 /dev/loop2
    lvextend -l 100%VG /dev/loopvg1/looplv1
    resize2fs /dev/loopvg1/looplv1

    without this patch the resize2fs fails, with it the resize2fs succeeds.

    Signed-off-by: Josef Bacik
    Acked-by: Andreas Dilger
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josef Bacik
     
  • The nommu binfmt code uses ksize() for pointers returned from do_mmap()
    which is wrong. This converts the call-sites to use the nommu specific
    kobjsize() function which works as expected.

    Cc: Christoph Lameter
    Cc: Matt Mackall
    Acked-by: Paul Mundt
    Acked-by: David Howells
    Signed-off-by: Pekka Enberg
    Acked-by: Greg Ungerer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pekka Enberg
     
  • Fix a bug in add_to_pagemap. Previously, since pm->out was a char *,
    put_user was only copying 1 byte of every PFN, resulting in the top 7
    bytes of each PFN not being copied. By requiring that reads be a multiple
    of 8 bytes, I can make pm->out and pm->end u64*s instead of char*s, which
    makes put_user work properly, and also simplifies the logic in
    add_to_pagemap a bit.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Thomas Tuttle
    Cc: Matt Mackall
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Tuttle
     
  • Currently even if a task sits in an all-denied cgroup it can still mount
    any block device in any mode it wants.

    Put a proper check in do_open for block device to prevent this.

    Signed-off-by: Pavel Emelyanov
    Acked-by: Serge Hallyn
    Tested-by: Serge Hallyn
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Emelyanov
     
  • This patch introduces memory_read_from_buffer().

    The only difference between memory_read_from_buffer() and
    simple_read_from_buffer() is which address space the function copies to.

    simple_read_from_buffer copies to user space memory.
    memory_read_from_buffer copies to normal memory.

    Signed-off-by: Akinobu Mita
    Cc: Al Viro
    Cc: Doug Warzecha
    Cc: Zhang Rui
    Cc: Matt Domsch
    Cc: Abhay Salunke
    Cc: Greg Kroah-Hartman
    Cc: Markus Rechberger
    Cc: Kay Sievers
    Cc: Bob Moore
    Cc: Thomas Renninger
    Cc: Len Brown
    Cc: Benjamin Herrenschmidt
    Cc: "Antonino A. Daplas"
    Cc: Krzysztof Helt
    Cc: Geert Uytterhoeven
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Peter Oberparleiter
    Cc: Michael Holzheu
    Cc: Brian King
    Cc: James E.J. Bottomley
    Cc: Andrew Vasquez
    Cc: Seokmann Ju
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • Although if people have questions about ARCnet, perhaps it's _better_
    for them to be mailing dwmw2@cam.ac.uk about it...

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

    David Woodhouse
     
  • The page decrypt calls in ecryptfs_write() are both pointless and buggy.
    Pointless because ecryptfs_get_locked_page() has already brought the page
    up to date, and buggy because prior mmap writes will just be blown away by
    the decrypt call.

    This patch also removes the declaration of a now-nonexistent function
    ecryptfs_write_zeros().

    Thanks to Eric Sandeen and David Kleikamp for helping to track this
    down.

    Eric said:

    fsx w/ mmap dies quickly ( < 100 ops) without this, and survives
    nicely (to millions of ops+) with it in place.

    Signed-off-by: Michael Halcrow
    Cc: Eric Sandeen
    Cc: Dave Kleikamp
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Halcrow
     
  • Fix the following compile error:

    CC fs/binfmt_flat.o
    In file included from
    /home/bunk/linux/kernel-2.6/git/linux-2.6/fs/binfmt_flat.c:36:
    /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/flat.h:14:22: error: asm/flat.h: No such file or directory
    /home/bunk/linux/kernel-2.6/git/linux-2.6/fs/binfmt_flat.c: In function 'create_flat_tables':
    /home/bunk/linux/kernel-2.6/git/linux-2.6/fs/binfmt_flat.c:124: error: implicit declaration of function 'flat_stack_align'
    /home/bunk/linux/kernel-2.6/git/linux-2.6/fs/binfmt_flat.c:125: error: implicit declaration of function 'flat_argvp_envp_on_stack'
    /home/bunk/linux/kernel-2.6/git/linux-2.6/fs/binfmt_flat.c: In function 'calc_reloc':
    /home/bunk/linux/kernel-2.6/git/linux-2.6/fs/binfmt_flat.c:347: error: implicit declaration of function 'flat_reloc_valid'
    /home/bunk/linux/kernel-2.6/git/linux-2.6/fs/binfmt_flat.c: In function 'load_flat_file':
    /home/bunk/linux/kernel-2.6/git/linux-2.6/fs/binfmt_flat.c:479: error: implicit declaration of function 'flat_old_ram_flag'
    /home/bunk/linux/kernel-2.6/git/linux-2.6/fs/binfmt_flat.c:755: error: implicit declaration of function 'flat_set_persistent'
    /home/bunk/linux/kernel-2.6/git/linux-2.6/fs/binfmt_flat.c:757: error: implicit declaration of function 'flat_get_relocate_addr'
    /home/bunk/linux/kernel-2.6/git/linux-2.6/fs/binfmt_flat.c:765: error: implicit declaration of function 'flat_get_addr_from_rp'
    /home/bunk/linux/kernel-2.6/git/linux-2.6/fs/binfmt_flat.c:781: error: implicit declaration of function 'flat_put_addr_at_rp'

    Reported-by: Adrian Bunk
    Signed-off-by: Adrian Bunk
    Tested-by: David Howells
    Acked-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     

06 Jun, 2008

1 commit

  • - Don't trust a length which is greater than the working buffer.
    An invalid length could cause overflow when calculating buffer size
    for decoding oid.

    - An oid length of zero is invalid and allows for an off-by-one error when
    decoding oid because the first subid actually encodes first 2 subids.

    - A primitive encoding may not have an indefinite length.

    Thanks to Wei Wang from McAfee for report.

    Cc: Steven French
    Cc: stable@kernel.org
    Acked-by: Patrick McHardy
    Signed-off-by: Chris Wright
    Signed-off-by: Linus Torvalds

    Chris Wright
     

04 Jun, 2008

1 commit


01 Jun, 2008

1 commit

  • Source code out there hard-codes a notion of what the
    _LINUX_CAPABILITY_VERSION #define means in terms of the semantics of the
    raw capability system calls capget() and capset(). Its unfortunate, but
    true.

    Since the confusing header file has been in a released kernel, there is
    software that is erroneously using 64-bit capabilities with the semantics
    of 32-bit compatibilities. These recently compiled programs may suffer
    corruption of their memory when sys_getcap() overwrites more memory than
    they are coded to expect, and the raising of added capabilities when using
    sys_capset().

    As such, this patch does a number of things to clean up the situation
    for all. It

    1. forces the _LINUX_CAPABILITY_VERSION define to always retain its
    legacy value.

    2. adopts a new #define strategy for the kernel's internal
    implementation of the preferred magic.

    3. deprecates v2 capability magic in favor of a new (v3) magic
    number. The functionality of v3 is entirely equivalent to v2,
    the only difference being that the v2 magic causes the kernel
    to log a "deprecated" warning so the admin can find applications
    that may be using v2 inappropriately.

    [User space code continues to be encouraged to use the libcap API which
    protects the application from details like this. libcap-2.10 is the first
    to support v3 capabilities.]

    Fixes issue reported in https://bugzilla.redhat.com/show_bug.cgi?id=447518.
    Thanks to Bojan Smojver for the report.

    [akpm@linux-foundation.org: s/depreciate/deprecate/g]
    [akpm@linux-foundation.org: be robust about put_user size]
    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Andrew G. Morgan
    Cc: Serge E. Hallyn
    Cc: Bojan Smojver
    Cc: stable@kernel.org
    Signed-off-by: Andrew Morton
    Signed-off-by: Chris Wright

    Andrew G. Morgan
     

31 May, 2008

4 commits


28 May, 2008

2 commits


27 May, 2008

2 commits

  • Based on Roland's patch. This approach was suggested by Austin Clements
    from the very beginning, and then by Linus.

    As Austin pointed out, the execing task can be killed by SI_TIMER signal
    because exec flushes the signal handlers, but doesn't discard the pending
    signals generated by posix timers. Perhaps not a bug, but people find this
    surprising. See http://bugzilla.kernel.org/show_bug.cgi?id=10460

    Signed-off-by: Oleg Nesterov
    Cc: Austin Clements
    Cc: Roland McGrath
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • I can't think of any valid reason for ext4 to not use barriers when
    they are available; I believe this is necessary for filesystem
    integrity in the face of a volatile write cache on storage.

    An administrator who trusts that the cache is sufficiently battery-
    backed (and power supplies are sufficiently redundant, etc...)
    can always turn it back off again.

    SuSE has carried such a patch for ext3 for quite some time now.

    Also document the mount option while we're at it.

    Signed-off-by: Eric Sandeen
    Signed-off-by: Mingming Cao
    Signed-off-by: "Theodore Ts'o"

    Eric Sandeen