29 Nov, 2010

1 commit

  • These warnings are spewed during a build of a 'allnoconfig' kernel
    (especially the ones from u64_stats_sync.h show up a lot) when building
    with -Wextra (which I often do)..
    They are
    a) annoying
    b) easy to get rid of.
    This patch kills them off.

    include/linux/u64_stats_sync.h:70:1: warning: ‘inline’ is not at beginning of declaration
    include/linux/u64_stats_sync.h:77:1: warning: ‘inline’ is not at beginning of declaration
    include/linux/u64_stats_sync.h:84:1: warning: ‘inline’ is not at beginning of declaration
    include/linux/u64_stats_sync.h:96:1: warning: ‘inline’ is not at beginning of declaration
    include/linux/u64_stats_sync.h:115:1: warning: ‘inline’ is not at beginning of declaration
    include/linux/u64_stats_sync.h:127:1: warning: ‘inline’ is not at beginning of declaration
    kernel/time.c:241:1: warning: ‘inline’ is not at beginning of declaration
    kernel/time.c:257:1: warning: ‘inline’ is not at beginning of declaration
    kernel/perf_event.c:4513:1: warning: ‘inline’ is not at beginning of declaration
    mm/page_alloc.c:4012:1: warning: ‘inline’ is not at beginning of declaration

    Signed-off-by: Jesper Juhl
    Signed-off-by: Jiri Kosina

    Jesper Juhl
     

26 Nov, 2010

1 commit


25 Nov, 2010

1 commit


22 Nov, 2010

1 commit


20 Nov, 2010

1 commit


16 Nov, 2010

4 commits

  • While at it, fix two checkpatch errors.
    Several non-const struct instances constified by this patch were added after
    the introduction of platform_suspend_ops in checkpatch.pl's list of "should
    be const" structs (79404849e90a41ea2109bd0e2f7c7164b0c4ce73).

    Patch against mainline.
    Inspired by hunks of the grsecurity patch, updated for newer kernels.

    Signed-off-by: Lionel Debroux
    Acked-by: Ingo Molnar
    Signed-off-by: Jiri Kosina

    Lionel Debroux
     
  • backlight_device_register has been expecting a const "ops" argument, and using
    it as such, since 9905a43b2d563e6f89e4c63c4278ada03f2ebb14. Let's make the
    remaining backlight_ops instances const.

    Inspired by hunks of the grsecurity patch, updated for newer kernels.

    Signed-off-by: Lionel Debroux
    Acked-by: Ingo Molnar
    Signed-off-by: Jiri Kosina

    Lionel Debroux
     
  • Patch against mainline.

    Changes since v1: added one hunk; no longer adding "const" qualifier to
    pointers in platform_hibernation_ops after seeing
    b4144e4f6e3b448d322095ca08af393682a69e33.

    Signed-off-by: Jiri Kosina

    Lionel Debroux
     
  • Some of the documentation refers to web pages under
    the domain `osdl.org'. However, `osdl.org' now
    redirects to `linuxfoundation.org'.

    Rather than rely on redirections, this patch updates
    the addresses appropriately; for the most part, only
    documentation that is meant to be current has been
    updated.

    The patch should be pretty quick to scan and check;
    each new web-page url was gotten by trying out the
    original URL in a browser and then simply copying the
    the redirected URL (formatting as necessary).

    There is some conflict as to which one of these domain
    names is preferred:

    linuxfoundation.org
    linux-foundation.org

    So, I wrote:

    info@linuxfoundation.org

    and got this reply:

    Message-ID:
    Date: Mon, 15 Nov 2010 10:41:42 -0800
    From: David Ames

    ...

    linuxfoundation.org is preferred. The canonical name for our web site is
    www.linuxfoundation.org. Our list site is actually
    lists.linux-foundation.org.

    Regarding email linuxfoundation.org is preferred there are a few people
    who choose to use linux-foundation.org for their own reasons.

    Consequently, I used `linuxfoundation.org' for web pages and
    `lists.linux-foundation.org' for mailing-list web pages and email addresses;
    the only personal email address I updated from `@osdl.org' was that of
    Andrew Morton, who prefers `linux-foundation.org' according `git log'.

    Signed-off-by: Michael Witten
    Signed-off-by: Jiri Kosina

    Michael Witten
     

15 Nov, 2010

4 commits


04 Nov, 2010

1 commit


03 Nov, 2010

4 commits


02 Nov, 2010

2 commits


31 Oct, 2010

7 commits

  • The VIA Chrome integrated camera controller driver includes both 'linux/pci.h'
    and 'linux/device.h' twice. This gets rid of the duplicates.

    Signed-off-by: Jesper Juhl
    Acked-by: Jonathan Corbet
    Signed-off-by: Jiri Kosina

    Jesper Juhl
     
  • Jiri Kosina
     
  • * 'for-linus' of git://git.infradead.org/users/eparis/notify: (22 commits)
    Ensure FMODE_NONOTIFY is not set by userspace
    make fanotify_read() restartable across signals
    fsnotify: remove alignment padding from fsnotify_mark on 64 bit builds
    fs/notify/fanotify/fanotify_user.c: fix warnings
    fanotify: Fix FAN_CLOSE comments
    fanotify: do not recalculate the mask if the ignored mask changed
    fanotify: ignore events on directories unless specifically requested
    fsnotify: rename FS_IN_ISDIR to FS_ISDIR
    fanotify: do not send events for irregular files
    fanotify: limit number of listeners per user
    fanotify: allow userspace to override max marks
    fanotify: limit the number of marks in a single fanotify group
    fanotify: allow userspace to override max queue depth
    fsnotify: implement a default maximum queue depth
    fanotify: ignore fanotify ignore marks if open writers
    fanotify: allow userspace to flush all marks
    fsnotify: call fsnotify_parent in perm events
    fsnotify: correctly handle return codes from listeners
    fanotify: use __aligned_u64 in fanotify userspace metadata
    fanotify: implement fanotify listener ordering
    ...

    Linus Torvalds
     
  • …nel.org/pub/scm/linux/kernel/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:
    jump label: Add work around to i386 gcc asm goto bug
    x86, ftrace: Use safe noops, drop trap test
    jump_label: Fix unaligned traps on sparc.
    jump label: Make arch_jump_label_text_poke_early() optional
    jump label: Fix error with preempt disable holding mutex
    oprofile: Remove deprecated use of flush_scheduled_work()
    oprofile: Fix the hang while taking the cpu offline
    jump label: Fix deadlock b/w jump_label_mutex vs. text_mutex
    jump label: Fix module __init section race

    * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86: Check irq_remapped instead of remapping_enabled in destroy_irq()

    Linus Torvalds
     
  • In fsnotify_open() ensure that FMODE_NONOTIFY is never set by userspace.
    Also always call fsnotify_parent and fsnotify.

    Signed-off-by: Lino Sanfilippo
    Signed-off-by: Eric Paris

    Lino Sanfilippo
     
  • In fanotify_read() return -ERESTARTSYS instead of -EINTR to
    make read() restartable across signals (BSD semantic).

    Signed-off-by: Eric Paris

    Lino Sanfilippo
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: (39 commits)
    Btrfs: deal with errors from updating the tree log
    Btrfs: allow subvol deletion by unprivileged user with -o user_subvol_rm_allowed
    Btrfs: make SNAP_DESTROY async
    Btrfs: add SNAP_CREATE_ASYNC ioctl
    Btrfs: add START_SYNC, WAIT_SYNC ioctls
    Btrfs: async transaction commit
    Btrfs: fix deadlock in btrfs_commit_transaction
    Btrfs: fix lockdep warning on clone ioctl
    Btrfs: fix clone ioctl where range is adjacent to extent
    Btrfs: fix delalloc checks in clone ioctl
    Btrfs: drop unused variable in block_alloc_rsv
    Btrfs: cleanup warnings from gcc 4.6 (nonbugs)
    Btrfs: Fix variables set but not read (bugs found by gcc 4.6)
    Btrfs: Use ERR_CAST helpers
    Btrfs: use memdup_user helpers
    Btrfs: fix raid code for removing missing drives
    Btrfs: Switch the extent buffer rbtree into a radix tree
    Btrfs: restructure try_release_extent_buffer()
    Btrfs: use the flusher threads for delalloc throttling
    Btrfs: tune the chunk allocation to 5% of the FS as metadata
    ...

    Fix up trivial conflicts in fs/btrfs/super.c and fs/fs-writeback.c, and
    remove use of INIT_RCU_HEAD in fs/btrfs/extent_io.c (that init macro was
    useless and removed in commit 5e8067adfdba: "rcu head remove init")

    Linus Torvalds
     

30 Oct, 2010

13 commits

  • The btrfs merge looks like hell, because it changes fs-writeback.c, and
    the crazy code has this repeated "estimate number of dirty pages"
    counting that involves three different helper functions. And it's done
    in two different places.

    Just unify that whole calculation as a "get_nr_dirty_pages()" helper
    function, and the merge result will look half-way decent.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • * 'audit.b64' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
    audit mmap
    audit: make link()/linkat() match "attribute change" predicate
    audit: Use rcu for task lookup protection
    audit: Do not send uninitialized data for AUDIT_TTY_GET
    audit: Call tty_audit_push_task() outside preempt disabled
    in untag_chunk() we need to do alloc_chunk() a bit earlier
    audit: make functions static
    Audit: add support to match lsm labels on user audit messages

    Linus Torvalds
     
  • * git://git.infradead.org/mtd-2.6: (82 commits)
    mtd: fix build error in m25p80.c
    mtd: Remove redundant mutex from mtd_blkdevs.c
    MTD: Fix wrong check register_blkdev return value
    Revert "mtd: cleanup Kconfig dependencies"
    mtd: cfi_cmdset_0002: make sector erase command variable
    mtd: cfi_cmdset_0002: add CFI detection for SST 38VF640x chips
    mtd: cfi_util: add support for switching SST 39VF640xB chips into QRY mode
    mtd: cfi_cmdset_0001: use defined value of P_ID_INTEL_PERFORMANCE instead of hardcoded one
    block2mtd: dubious assignment
    P4080/mtd: Fix the freescale lbc issue with 36bit mode
    P4080/eLBC: Make Freescale elbc interrupt common to elbc devices
    mtd: phram: use KBUILD_MODNAME
    mtd: OneNAND: S5PC110: Fix double call suspend & resume function
    mtd: nand: fix MTD_MODE_RAW writes
    jffs2: use kmemdup
    mtd: sm_ftl: cosmetic, use bool when possible
    mtd: r852: remove useless pci powerup/down from suspend/resume routines
    mtd: blktrans: fix a race vs kthread_stop
    mtd: blktrans: kill BKL
    mtd: allow to unload the mtdtrans module if its block devices aren't open
    ...

    Fix up trivial whitespace-introduced conflict in drivers/mtd/mtdchar.c

    Linus Torvalds
     
  • * 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (215 commits)
    ARM: memblock: setup lowmem mappings using memblock
    ARM: memblock: move meminfo into find_limits directly
    ARM: memblock: convert free_highpages() to use memblock
    ARM: move freeing of highmem pages out of mem_init()
    ARM: memblock: convert memory detail printing to use memblock
    ARM: memblock: use memblock to free memory into arm_bootmem_init()
    ARM: memblock: use memblock when initializing memory allocators
    ARM: ensure membank array is always sorted
    ARM: 6466/1: implement flush_icache_all for the rest of the CPUs
    ARM: 6464/2: fix spinlock recursion in adjust_pte()
    ARM: fix memblock breakage
    ARM: 6465/1: Fix data abort accessing proc_info from __lookup_processor_type
    ARM: 6460/1: ixp2000: fix type of ixp2000_timer_interrupt
    ARM: 6449/1: Fix for compiler warning of uninitialized variable.
    ARM: 6445/1: fixup TCM memory types
    ARM: imx: Add wake functionality to GPIO
    ARM: mx5: Add gpio-keys to mx51 babbage board
    ARM: imx: Add gpio-keys to plat-mxc
    mx31_3ds: Fix spi registration
    mx31_3ds: Fix the logic for detecting the debug board
    ...

    Linus Torvalds
     
  • The shmid_ds structure is copied to userland with shm_unused{,2,3}
    fields unitialized. It leads to leaking of contents of kernel stack
    memory.

    Signed-off-by: Vasiliy Kulikov
    Acked-by: Al Viro
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Vasiliy Kulikov
     
  • The definition of PAGE_CACHE_MASK in is needed to use
    MAX_RW_COUNT, and on x86-64 that gets done indirectly through the
    architecture header includes. But on MIPS and s390 that doesn't happen,
    and we need to make sure that fs/compat.c includes pagemap.h explicitly.

    Introduced in commit 435f49a518c7 ("readv/writev: do the same
    MAX_RW_COUNT truncation that read/write does").

    Reported-by: Sachin Sant (S390)
    Reported-by: wu zhangjin (MIPS)
    Signed-off-by: Linus Torvalds

    wu zhangjin
     
  • Normal syscall audit doesn't catch 5th argument of syscall. It also
    doesn't catch the contents of userland structures pointed to be
    syscall argument, so for both old and new mmap(2) ABI it doesn't
    record the descriptor we are mapping. For old one it also misses
    flags.

    Signed-off-by: Al Viro

    Al Viro
     
  • Signed-off-by: Al Viro

    Al Viro
     
  • Protect the task lookups in audit_receive_msg() with rcu_read_lock()
    instead of tasklist_lock and use lock/unlock_sighand to protect
    against the exit race.

    Signed-off-by: Thomas Gleixner
    Cc: Al Viro
    Cc: Eric Paris
    Cc: Oleg Nesterov
    Signed-off-by: Al Viro

    Thomas Gleixner
     
  • audit_receive_msg() sends uninitialized data for AUDIT_TTY_GET when
    the task was not found.

    Send reply only when task was found.

    Signed-off-by: Thomas Gleixner
    Cc: Al Viro
    Cc: Eric Paris
    Signed-off-by: Al Viro

    Thomas Gleixner
     
  • While auditing all tasklist_lock read_lock sites I stumbled over the
    following call chain:

    audit_prepare_user_tty()
    read_lock(&tasklist_lock);
    tty_audit_push_task();
    mutex_lock(&buf->mutex);

    --> buf->mutex is locked with preemption disabled.

    Solve this by acquiring a reference to the task struct under
    rcu_read_lock and call tty_audit_push_task outside of the preempt
    disabled region.

    Move all code which needs to be protected by sighand lock into
    tty_audit_push_task() and use lock/unlock_sighand as we do not hold
    tasklist_lock.

    Signed-off-by: Thomas Gleixner
    Cc: Al Viro
    Cc: Eric Paris
    Cc: Oleg Nesterov
    Signed-off-by: Al Viro

    Thomas Gleixner
     
  • While building an x86 distro kernel, I hit the following:

    Kernel: arch/x86/boot/bzImage is ready (#7)
    ERROR: "of_mtd_parse_partitions" [drivers/mtd/devices/m25p80.ko]
    undefined!

    of_mtd_parse_partitions is defined with MTD_OF_PARTS, and that's only
    built on PPC and microblaze. The code in question should be wrapped w/
    a stricter #ifdef.

    Signed-off-by: Andres Salomon
    Acked-by: Grant Likely
    Signed-off-by: David Woodhouse

    Andres Salomon
     
  • In commit 2a48fc0ab24241755dc93bfd4f01d68efab47f5a ('block: autoconvert
    trivial BKL users to private mutex'), Arnd replaced the BKL usage with a
    mutex. However, Maxim has already provided a better fix in commit
    480792b7bf188c29b8d4b10fee65c3a06ec5dbf7 ('mtd: blktrans: kill BKL'),
    which was simply to remove the BKL without replacing it — since he'd
    already made it do all necessary locking for itself.

    Signed-off-by: David Woodhouse

    David Woodhouse