27 Oct, 2009

1 commit


12 Oct, 2009

2 commits

  • * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: (21 commits)
    [S390] dasd: fix race condition in resume code
    [S390] Add EX_TABLE for addressing exception in usercopy functions.
    [S390] 64-bit register support for 31-bit processes
    [S390] hibernate: Use correct place for CPU address in lowcore
    [S390] pm: ignore time spend in suspended state
    [S390] zcrypt: Improve some comments
    [S390] zcrypt: Fix sparse warning.
    [S390] perf_counter: fix vdso detection
    [S390] ftrace: drop nmi protection
    [S390] compat: fix truncate system call wrapper
    [S390] Provide arch specific mdelay implementation.
    [S390] Fix enabled udelay for short delays.
    [S390] cio: allow setting boxed devices offline
    [S390] cio: make not operational handling consistent
    [S390] cio: make disconnected handling consistent
    [S390] Fix memory leak in /proc/cio_ignore
    [S390] cio: channel path memory leak
    [S390] module: fix memory leak in s390 module loader
    [S390] Enable kmemleak on s390.
    [S390] 3270 console build fix
    ...

    Linus Torvalds
     
  • After m68k's task_thread_info() doesn't refer to current,
    it's possible to remove sched.h from interrupt.h and not break m68k!
    Many thanks to Heiko Carstens for allowing this.

    Signed-off-by: Alexey Dobriyan

    Alexey Dobriyan
     

06 Oct, 2009

1 commit


02 Oct, 2009

1 commit

  • When using %*s, sscanf should honor conversion specifiers immediately
    following the %*s. For example, the following code should find the
    position of the end of the string "hello".

    int end;
    char buf[] = "hello world";
    sscanf(buf, "%*s%n", &end);
    printf("%d\n", end);

    Ideally, sscanf would advance the fmt and str pointers the same as it
    would without the *, but the code for that is rather complicated and is
    not included in the patch.

    Signed-off-by: Andy Spencer
    Acked-by: WANG Cong
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Spencer
     

25 Sep, 2009

1 commit


24 Sep, 2009

2 commits

  • If the lzma/gzip decompressors are called with insufficient input data
    (len > 0 & fill = NULL), they will attempt to call the fill function to
    obtain more data, leading to a kernel oops.

    Signed-off-by: Phillip Lougher
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Phillip Lougher
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next: (30 commits)
    Use macros for .data.page_aligned section.
    Use macros for .bss.page_aligned section.
    Use new __init_task_data macro in arch init_task.c files.
    kbuild: Don't define ALIGN and ENTRY when preprocessing linker scripts.
    arm, cris, mips, sparc, powerpc, um, xtensa: fix build with bash 4.0
    kbuild: add static to prototypes
    kbuild: fail build if recordmcount.pl fails
    kbuild: set -fconserve-stack option for gcc 4.5
    kbuild: echo the record_mcount command
    gconfig: disable "typeahead find" search in treeviews
    kbuild: fix cc1 options check to ensure we do not use -fPIC when compiling
    checkincludes.pl: add option to remove duplicates in place
    markup_oops: use modinfo to avoid confusion with underscored module names
    checkincludes.pl: provide usage helper
    checkincludes.pl: close file as soon as we're done with it
    ctags: usability fix
    kernel hacking: move STRIP_ASM_SYMS from General
    gitignore usr/initramfs_data.cpio.bz2 and usr/initramfs_data.cpio.lzma
    kbuild: Check if linker supports the -X option
    kbuild: introduce ld-option
    ...

    Fix trivial conflict in scripts/basic/fixdep.c

    Linus Torvalds
     

23 Sep, 2009

1 commit


22 Sep, 2009

8 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vegard/kmemcheck:
    kmemcheck: add missing braces to do-while in kmemcheck_annotate_bitfield
    kmemcheck: update documentation
    kmemcheck: depend on HAVE_ARCH_KMEMCHECK
    kmemcheck: remove useless check
    kmemcheck: remove duplicated #include

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (34 commits)
    trivial: fix typo in aic7xxx comment
    trivial: fix comment typo in drivers/ata/pata_hpt37x.c
    trivial: typo in kernel-parameters.txt
    trivial: fix typo in tracing documentation
    trivial: add __init/__exit macros in drivers/gpio/bt8xxgpio.c
    trivial: add __init macro/ fix of __exit macro location in ipmi_poweroff.c
    trivial: remove unnecessary semicolons
    trivial: Fix duplicated word "options" in comment
    trivial: kbuild: remove extraneous blank line after declaration of usage()
    trivial: improve help text for mm debug config options
    trivial: doc: hpfall: accept disk device to unload as argument
    trivial: doc: hpfall: reduce risk that hpfall can do harm
    trivial: SubmittingPatches: Fix reference to renumbered step
    trivial: fix typos "man[ae]g?ment" -> "management"
    trivial: media/video/cx88: add __init/__exit macros to cx88 drivers
    trivial: fix typo in CONFIG_DEBUG_FS in gcov doc
    trivial: fix missing printk space in amd_k7_smp_check
    trivial: fix typo s/ketymap/keymap/ in comment
    trivial: fix typo "to to" in multiple files
    trivial: fix typos in comments s/DGBU/DBGU/
    ...

    Linus Torvalds
     
  • Add kerneldoc annotations for function formals of type struct flex_array
    and gfp_t which are currently lacking.

    Signed-off-by: David Rientjes
    Cc: Dave Hansen
    Cc: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     
  • FLEX_ARRAY_INIT(element_size, total_nr_elements) cannot determine if
    either parameter is valid, so flex arrays which are statically allocated
    with this interface can easily become corrupted or reference beyond its
    allocated memory.

    This removes FLEX_ARRAY_INIT() as a struct flex_array initializer since no
    initializer may perform the required checking. Instead, the array is now
    defined with a new interface:

    DEFINE_FLEX_ARRAY(name, element_size, total_nr_elements)

    This may be prefixed with `static' for file scope.

    This interface includes compile-time checking of the parameters to ensure
    they are valid. Since the validity of both element_size and
    total_nr_elements depend on FLEX_ARRAY_BASE_SIZE and FLEX_ARRAY_PART_SIZE,
    the kernel build will fail if either of these predefined values changes
    such that the array parameters are no longer valid.

    Since BUILD_BUG_ON() requires compile time constants, several of the
    static inline functions that were once local to lib/flex_array.c had to be
    moved to include/linux/flex_array.h.

    Signed-off-by: David Rientjes
    Acked-by: Dave Hansen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     
  • Add a new function to the flex_array API:

    int flex_array_shrink(struct flex_array *fa)

    This function will free all unused second-level pages. Since elements are
    now poisoned if they are not allocated with __GFP_ZERO, it's possible to
    identify parts that consist solely of unused elements.

    flex_array_shrink() returns the number of pages freed.

    Signed-off-by: David Rientjes
    Cc: Dave Hansen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     
  • Newly initialized flex_array's and/or flex_array_part's are now poisoned
    with a new poison value, FLEX_ARRAY_FREE. It's value is similar to
    POISON_FREE used in the various slab allocators, but is different to
    distinguish between flex array's poisoned kmem and slab allocator poisoned
    kmem.

    This will allow us to identify flex_array_part's that only contain free
    elements (and free them with an addition to the flex_array API). This
    could also be extended in the future to identify `get' uses on elements
    that have not been `put'.

    If __GFP_ZERO is passed for a part's gfp mask, the poisoning is avoided.
    These elements are considered to be in-use since they have been
    initialized.

    Signed-off-by: David Rientjes
    Cc: Dave Hansen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     
  • Add a new function to the flex_array API:

    int flex_array_clear(struct flex_array *fa,
    unsigned int element_nr)

    This function will zero the element at element_nr in the flex_array.

    Although this is equivalent to using flex_array_put() and passing a
    pointer to zero'd memory, flex_array_clear() does not require such a
    pointer to memory that would most likely need to be allocated on the
    caller's stack which could be significantly large depending on
    element_size.

    Signed-off-by: David Rientjes
    Cc: Dave Hansen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     
  • Signed-off-by: Marcin Slusarz
    Reviewed-by: Frederic Weisbecker
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Marcin Slusarz
     

21 Sep, 2009

1 commit


20 Sep, 2009

1 commit


18 Sep, 2009

2 commits

  • Remove the duplicate comment of bstr_printf that is the same as the
    vsnprintf.

    Add the 's' option to the comment for the pointer function. This is
    more of an internal function so the little duplication of the comment
    here is OK.

    Reported-by: Zhaolei
    Cc: Linus Torvalds
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • On PowerPC64 function pointers do not point directly at the functions,
    but instead point to pointers to the functions. The output of %pF expects
    to point to a pointer to the function, whereas %pS will show the function
    itself.

    mcount returns the direct pointer to the function and not the pointer to
    the pointer. Thus %pS must be used to show this. The function tracer
    requires printing of the functions without offsets and uses the %pf
    instead.

    %pF produces run_local_timers+0x4/0x1f
    %pf produces just run_local_timers

    For PowerPC64, we need to use the direct pointer, and we only have
    %pS which will produce .run_local_timers+0x4/0x1f

    This patch creates a %ps that matches the %pf as %pS matches %pF.

    Cc: Linus Torvalds
    Cc: Zhao Lei
    Acked-by: Benjamin Herrenschmidt
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     

16 Sep, 2009

3 commits

  • * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (134 commits)
    powerpc/nvram: Enable use Generic NVRAM driver for different size chips
    powerpc/iseries: Fix oops reading from /proc/iSeries/mf/*/cmdline
    powerpc/ps3: Workaround for flash memory I/O error
    powerpc/booke: Don't set DABR on 64-bit BookE, use DAC1 instead
    powerpc/perf_counters: Reduce stack usage of power_check_constraints
    powerpc: Fix bug where perf_counters breaks oprofile
    powerpc/85xx: Fix SMP compile error and allow NULL for smp_ops
    powerpc/irq: Improve nanodoc
    powerpc: Fix some late PowerMac G5 with PCIe ATI graphics
    powerpc/fsl-booke: Use HW PTE format if CONFIG_PTE_64BIT
    powerpc/book3e: Add missing page sizes
    powerpc/pseries: Fix to handle slb resize across migration
    powerpc/powermac: Thermal control turns system off too eagerly
    powerpc/pci: Merge ppc32 and ppc64 versions of phb_scan()
    powerpc/405ex: support cuImage via included dtb
    powerpc/405ex: provide necessary fixup function to support cuImage
    powerpc/40x: Add support for the ESTeem 195E (PPC405EP) SBC
    powerpc/44x: Add Eiger AMCC (AppliedMicro) PPC460SX evaluation board support.
    powerpc/44x: Update Arches defconfig
    powerpc/44x: Update Arches dts
    ...

    Fix up conflicts in drivers/char/agp/uninorth-agp.c

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: (46 commits)
    powerpc64: convert to dynamic percpu allocator
    sparc64: use embedding percpu first chunk allocator
    percpu: kill lpage first chunk allocator
    x86,percpu: use embedding for 64bit NUMA and page for 32bit NUMA
    percpu: update embedding first chunk allocator to handle sparse units
    percpu: use group information to allocate vmap areas sparsely
    vmalloc: implement pcpu_get_vm_areas()
    vmalloc: separate out insert_vmalloc_vm()
    percpu: add chunk->base_addr
    percpu: add pcpu_unit_offsets[]
    percpu: introduce pcpu_alloc_info and pcpu_group_info
    percpu: move pcpu_lpage_build_unit_map() and pcpul_lpage_dump_cfg() upward
    percpu: add @align to pcpu_fc_alloc_fn_t
    percpu: make @dyn_size mandatory for pcpu_setup_first_chunk()
    percpu: drop @static_size from first chunk allocators
    percpu: generalize first chunk allocator selection
    percpu: build first chunk allocators selectively
    percpu: rename 4k first chunk allocator to page
    percpu: improve boot messages
    percpu: fix pcpu_reclaim() locking
    ...

    Fix trivial conflict as by Tejun Heo in kernel/sched.c

    Linus Torvalds
     
  • Due to problems at cam.org, my nico@cam.org email address is no longer
    valid. FRom now on, nico@fluxnic.net should be used instead.

    Signed-off-by: Nicolas Pitre
    Signed-off-by: Linus Torvalds

    Nicolas Pitre
     

15 Sep, 2009

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1623 commits)
    netxen: update copyright
    netxen: fix tx timeout recovery
    netxen: fix file firmware leak
    netxen: improve pci memory access
    netxen: change firmware write size
    tg3: Fix return ring size breakage
    netxen: build fix for INET=n
    cdc-phonet: autoconfigure Phonet address
    Phonet: back-end for autoconfigured addresses
    Phonet: fix netlink address dump error handling
    ipv6: Add IFA_F_DADFAILED flag
    net: Add DEVTYPE support for Ethernet based devices
    mv643xx_eth.c: remove unused txq_set_wrr()
    ucc_geth: Fix hangs after switching from full to half duplex
    ucc_geth: Rearrange some code to avoid forward declarations
    phy/marvell: Make non-aneg speed/duplex forcing work for 88E1111 PHYs
    drivers/net/phy: introduce missing kfree
    drivers/net/wan: introduce missing kfree
    net: force bridge module(s) to be GPL
    Subject: [PATCH] appletalk: Fix skb leak when ipddp interface is not loaded
    ...

    Fixed up trivial conflicts:

    - arch/x86/include/asm/socket.h

    converted to in the x86 tree. The generic
    header has the same new #define's, so that works out fine.

    - drivers/net/tun.c

    fix conflict between 89f56d1e9 ("tun: reuse struct sock fields") that
    switched over to using 'tun->socket.sk' instead of the redundantly
    available (and thus removed) 'tun->sk', and 2b980dbd ("lsm: Add hooks
    to the TUN driver") which added a new 'tun->sk' use.

    Noted in 'next' by Stephen Rothwell.

    Linus Torvalds
     

12 Sep, 2009

2 commits

  • * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (28 commits)
    rcu: Move end of special early-boot RCU operation earlier
    rcu: Changes from reviews: avoid casts, fix/add warnings, improve comments
    rcu: Create rcutree plugins to handle hotplug CPU for multi-level trees
    rcu: Remove lockdep annotations from RCU's _notrace() API members
    rcu: Add #ifdef to suppress __rcu_offline_cpu() warning in !HOTPLUG_CPU builds
    rcu: Add CPU-offline processing for single-node configurations
    rcu: Add "notrace" to RCU function headers used by ftrace
    rcu: Remove CONFIG_PREEMPT_RCU
    rcu: Merge preemptable-RCU functionality into hierarchical RCU
    rcu: Simplify rcu_pending()/rcu_check_callbacks() API
    rcu: Use debugfs_remove_recursive() simplify code.
    rcu: Merge per-RCU-flavor initialization into pre-existing macro
    rcu: Fix online/offline indication for rcudata.csv trace file
    rcu: Consolidate sparse and lockdep declarations in include/linux/rcupdate.h
    rcu: Renamings to increase RCU clarity
    rcu: Move private definitions from include/linux/rcutree.h to kernel/rcutree.h
    rcu: Expunge lingering references to CONFIG_CLASSIC_RCU, optimize on !SMP
    rcu: Delay rcu_barrier() wait until beginning of next CPU-hotunplug operation.
    rcu: Fix typo in rcu_irq_exit() comment header
    rcu: Make rcupreempt_trace.c look at offline CPUs
    ...

    Linus Torvalds
     
  • …/git/tip/linux-2.6-tip

    * 'core-iommu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (59 commits)
    x86/gart: Do not select AGP for GART_IOMMU
    x86/amd-iommu: Initialize passthrough mode when requested
    x86/amd-iommu: Don't detach device from pt domain on driver unbind
    x86/amd-iommu: Make sure a device is assigned in passthrough mode
    x86/amd-iommu: Align locking between attach_device and detach_device
    x86/amd-iommu: Fix device table write order
    x86/amd-iommu: Add passthrough mode initialization functions
    x86/amd-iommu: Add core functions for pd allocation/freeing
    x86/dma: Mark iommu_pass_through as __read_mostly
    x86/amd-iommu: Change iommu_map_page to support multiple page sizes
    x86/amd-iommu: Support higher level PTEs in iommu_page_unmap
    x86/amd-iommu: Remove old page table handling macros
    x86/amd-iommu: Use 2-level page tables for dma_ops domains
    x86/amd-iommu: Remove bus_addr check in iommu_map_page
    x86/amd-iommu: Remove last usages of IOMMU_PTE_L0_INDEX
    x86/amd-iommu: Change alloc_pte to support 64 bit address space
    x86/amd-iommu: Introduce increase_address_space function
    x86/amd-iommu: Flush domains if address space size was increased
    x86/amd-iommu: Introduce set_dte_entry function
    x86/amd-iommu: Add a gneric version of amd_iommu_flush_all_devices
    ...

    Linus Torvalds
     

11 Sep, 2009

1 commit


04 Sep, 2009

2 commits


02 Sep, 2009

1 commit

  • Add a config option (CONFIG_DEBUG_CREDENTIALS) to turn on some debug checking
    for credential management. The additional code keeps track of the number of
    pointers from task_structs to any given cred struct, and checks to see that
    this number never exceeds the usage count of the cred struct (which includes
    all references, not just those from task_structs).

    Furthermore, if SELinux is enabled, the code also checks that the security
    pointer in the cred struct is never seen to be invalid.

    This attempts to catch the bug whereby inode_has_perm() faults in an nfsd
    kernel thread on seeing cred->security be a NULL pointer (it appears that the
    credential struct has been previously released):

    http://www.kerneloops.org/oops.php?number=252883

    Signed-off-by: David Howells
    Signed-off-by: James Morris

    David Howells
     

29 Aug, 2009

1 commit


28 Aug, 2009

2 commits


27 Aug, 2009

4 commits

  • Benjamin Herrenschmidt
     
  • It's problematic to allow signed element_nr's or total's to be passed as
    part of the flex array API.

    flex_array_alloc() allows total_nr_elements to be set to a negative
    quantity, which is obviously erroneous.

    flex_array_get() and flex_array_put() allows negative array indices in
    dereferencing an array part, which could address memory mapped before
    struct flex_array.

    The fix is to convert all existing element_nr formals to be qualified as
    unsigned. Existing checks to compare it to total_nr_elements or the max
    array size based on element_size need not be changed.

    Signed-off-by: David Rientjes
    Cc: Dave Hansen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     
  • flex_array_free_parts() does not take `src' or `element_nr' formals, so
    remove their respective comments.

    Signed-off-by: David Rientjes
    Acked-by: Dave Hansen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     
  • If all array elements fit into the base structure and data is copied using
    flex_array_put() starting at a non-zero index, flex_array_get() will fail
    to return the data.

    This fixes the bug by only checking for NULL parts when all elements do
    not fit in the base structure when flex_array_get() is used. Otherwise,
    fa_element_to_part_nr() will always be 0 since there are no parts
    structures needed and such element may never have been put. Thus, it will
    remain NULL due to the kzalloc() of the base.

    Additionally, flex_array_put() now only checks for a NULL part when all
    elements do not fit in the base structure. This is otherwise unnecessary
    since the base structure is guaranteed to exist (or we would have already
    hit a NULL pointer).

    Signed-off-by: David Rientjes
    Acked-by: Dave Hansen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     

26 Aug, 2009

1 commit


23 Aug, 2009

1 commit

  • Now that CONFIG_TREE_PREEMPT_RCU is in place, there is no
    further need for CONFIG_PREEMPT_RCU. Remove it, along with
    whatever subtle bugs it may (or may not) contain.

    Signed-off-by: Paul E. McKenney
    Cc: laijs@cn.fujitsu.com
    Cc: dipankar@in.ibm.com
    Cc: akpm@linux-foundation.org
    Cc: mathieu.desnoyers@polymtl.ca
    Cc: josht@linux.vnet.ibm.com
    Cc: dvhltc@us.ibm.com
    Cc: niv@us.ibm.com
    Cc: peterz@infradead.org
    Cc: rostedt@goodmis.org
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Paul E. McKenney