1. 10 11月, 2010 2 次提交
    • J
      x86: Remove unnecessary casts of void ptr returning alloc function return values · 8e5e9521
      Jesper Juhl 提交于
      The [vk][cmz]alloc(_node) family of functions return void
      pointers which it's completely unnecessary/pointless to cast to
      other pointer types since that happens implicitly.
      
      This patch removes such casts from arch/x86.
      Signed-off-by: NJesper Juhl <jj@chaosbits.net>
      Cc: trivial@kernel.org
      Cc: amd64-microcode@amd64.org
      Cc: Andreas Herrmann <andreas.herrmann3@amd.com>
      LKML-Reference: <alpine.LNX.2.00.1011082310220.23697@swampdragon.chaosbits.net>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      8e5e9521
    • A
      x86: Address gcc4.6 "set but not used" warnings in apic.h · 0059b243
      Andi Kleen 提交于
      native_apic_msr_read() and x2apic_enabled() use rdmsr(msr, low, high),
      but only use the low part.
      
      gcc4.6 complains about this:
      .../apic.h:144:11: warning: variable 'high' set but not used [-Wunused-but-set-variable]
      
      rdmsr() is just a wrapper around rdmsrl() which splits the 64bit value
      into low and high, so using rdmsrl() directly solves this.
      
      [tglx: Changed the variables to u64 as suggested by Cyrill. It's less
             confusing and has no code impact as this is 64bit only anyway.
             Massaged changelog as well. ]
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Cc: x86@kernel.org
      Cc: Cyrill Gorcunov <gorcunov@gmail.com>
      LKML-Reference: <1289251229-19589-1-git-send-email-andi@firstfloor.org>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      0059b243
  2. 01 11月, 2010 1 次提交
    • R
      x86, mm: Fix section mismatch in tlb.c · cf38d0ba
      Rakib Mullick 提交于
      Mark tlb_cpuhp_notify as __cpuinit. It's basically a callback
      function, which is called from __cpuinit init_smp_flash(). So -
      it's safe.
      
      We were warned by the following warning:
      
       WARNING: arch/x86/mm/built-in.o(.text+0x356d): Section mismatch
       in reference from the function tlb_cpuhp_notify() to the
       function .cpuinit.text:calculate_tlb_offset()
       The function tlb_cpuhp_notify() references
       the function __cpuinit calculate_tlb_offset().
       This is often because tlb_cpuhp_notify lacks a __cpuinit
       annotation or the annotation of calculate_tlb_offset is wrong.
      Signed-off-by: NRakib Mullick <rakib.mullick@gmail.com>
      Cc: Borislav Petkov <borislav.petkov@amd.com>
      Cc: Shaohua Li <shaohua.li@intel.com>
      LKML-Reference: <AANLkTinWQRG=HA9uB3ad0KAqRRTinL6L_4iKgF84coph@mail.gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      cf38d0ba
  3. 31 10月, 2010 27 次提交
  4. 30 10月, 2010 10 次提交
    • L
      fs-writeback.c: unify some common code · cdf01dd5
      Linus Torvalds 提交于
      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: NLinus Torvalds <torvalds@linux-foundation.org>
      cdf01dd5
    • L
      Merge branch 'audit.b64' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current · 847f8776
      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
      847f8776
    • L
      Merge git://git.infradead.org/mtd-2.6 · 79346507
      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
      79346507
    • L
      Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm · 706d4b12
      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
        ...
      706d4b12
    • V
      ipc: shm: fix information leak to userland · 3af54c9b
      Vasiliy Kulikov 提交于
      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: NVasiliy Kulikov <segooon@gmail.com>
      Acked-by: NAl Viro <viro@ZenIV.linux.org.uk>
      Cc: stable@kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3af54c9b
    • W
      fs/compat.c: fix build on MIPS/s390 · 504b701b
      wu zhangjin 提交于
      The definition of PAGE_CACHE_MASK in <linux/pagemap.h> 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 435f49a5 ("readv/writev: do the same
      MAX_RW_COUNT truncation that read/write does").
      
      Reported-by: Sachin Sant <sachinp@in.ibm.com> (S390)
      Reported-by: wu zhangjin <wuzhangjin@gmail.com> (MIPS)
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      504b701b
    • A
      audit mmap · 120a795d
      Al Viro 提交于
      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: NAl Viro <viro@zeniv.linux.org.uk>
      120a795d
    • A
      af295132
    • T
      audit: Use rcu for task lookup protection · ab263f47
      Thomas Gleixner 提交于
      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: NThomas Gleixner <tglx@linutronix.de>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Eric Paris <eparis@redhat.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      ab263f47
    • T
      audit: Do not send uninitialized data for AUDIT_TTY_GET · 20703205
      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: NThomas Gleixner <tglx@linutronix.de>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Eric Paris <eparis@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      20703205