08 Jul, 2011

1 commit

  • …t-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

    * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    debugobjects: Fix boot crash when kmemleak and debugobjects enabled

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    jump_label: Fix jump_label update for modules
    oprofile, x86: Fix race in nmi handler while starting counters

    * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    sched: Disable (revert) SCHED_LOAD_SCALE increase
    sched, cgroups: Fix MIN_SHARES on 64-bit boxen

    Linus Torvalds
     

20 Jun, 2011

1 commit

  • Order of initialization look like this:
    ...
    debugobjects
    kmemleak
    ...(lots of other subsystems)...
    workqueues (through early initcall)
    ...

    debugobjects use schedule_work for batch freeing of its data and kmemleak
    heavily use debugobjects, so when it comes to freeing and workqueues were
    not initialized yet, kernel crashes:

    BUG: unable to handle kernel NULL pointer dereference at (null)
    IP: [] __queue_work+0x29/0x41a
    [] queue_work_on+0x16/0x1d
    [] queue_work+0x29/0x55
    [] schedule_work+0x13/0x15
    [] free_object+0x90/0x95
    [] debug_check_no_obj_freed+0x187/0x1d3
    [] ? _raw_spin_unlock_irqrestore+0x30/0x4d
    [] ? free_object_rcu+0x68/0x6d
    [] kmem_cache_free+0x64/0x12c
    [] free_object_rcu+0x68/0x6d
    [] __rcu_process_callbacks+0x1b6/0x2d9
    ...

    because system_wq is NULL.

    Fix it by checking if workqueues susbystem was initialized before using.

    Signed-off-by: Marcin Slusarz
    Cc: Catalin Marinas
    Cc: Tejun Heo
    Cc: Dipankar Sarma
    Cc: Paul E. McKenney
    Cc: stable@kernel.org
    Link: http://lkml.kernel.org/r/20110528112342.GA3068@joi.lan
    Signed-off-by: Thomas Gleixner

    Marcin Slusarz
     

17 Jun, 2011

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
    AFS: Use i_generation not i_version for the vnode uniquifier
    AFS: Set s_id in the superblock to the volume name
    vfs: Fix data corruption after failed write in __block_write_begin()
    afs: afs_fill_page reads too much, or wrong data
    VFS: Fix vfsmount overput on simultaneous automount
    fix wrong iput on d_inode introduced by e6bc45d65d
    Delay struct net freeing while there's a sysfs instance refering to it
    afs: fix sget() races, close leak on umount
    ubifs: fix sget races
    ubifs: split allocation of ubifs_info into a separate function
    fix leak in proc_set_super()

    Linus Torvalds
     

16 Jun, 2011

1 commit

  • Fix new kernel-doc warnings in lib/bitmap.c:

    Warning(lib/bitmap.c:596): No description found for parameter 'buf'
    Warning(lib/bitmap.c:596): Excess function parameter 'bp' description in '__bitmap_parselist'

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

    Randy Dunlap
     

13 Jun, 2011

1 commit

  • * new refcount in struct net, controlling actual freeing of the memory
    * new method in kobj_ns_type_operations (->drop_ns())
    * ->current_ns() semantics change - it's supposed to be followed by
    corresponding ->drop_ns(). For struct net in case of CONFIG_NET_NS it bumps
    the new refcount; net_drop_ns() decrements it and calls net_free() if the
    last reference has been dropped. Method renamed to ->grab_current_ns().
    * old net_free() callers call net_drop_ns() instead.
    * sysfs_exit_ns() is gone, along with a large part of callchain
    leading to it; now that the references stored in ->ns[...] stay valid we
    do not need to hunt them down and replace them with NULL. That fixes
    problems in sysfs_lookup() and sysfs_readdir(), along with getting rid
    of sb->s_instances abuse.

    Note that struct net *shutdown* logics has not changed - net_cleanup()
    is called exactly when it used to be called. The only thing postponed by
    having a sysfs instance refering to that struct net is actual freeing of
    memory occupied by struct net.

    Signed-off-by: Al Viro

    Al Viro
     

10 Jun, 2011

2 commits


07 Jun, 2011

1 commit

  • By default the io_tlb_nslabs is set to zero, and gets set to
    whatever value is passed in via swiotlb_init_with_tbl function.
    The default value passed in is 64MB. However, if the user provides
    the 'swiotlb=' the default value is ignored and
    the value provided by the user is used... Except when the SWIOTLB
    is used under Xen - there the default value of 64MB is used and
    the Xen-SWIOTLB has no mechanism to get the 'io_tlb_nslabs' filled
    out by setup_io_tlb_npages functions. This patch provides a function
    for the Xen-SWIOTLB to call to see if the io_tlb_nslabs is set
    and if so use that value.

    Signed-off-by: FUJITA Tomonori
    Signed-off-by: Konrad Rzeszutek Wilk

    FUJITA Tomonori
     

02 Jun, 2011

1 commit


28 May, 2011

1 commit


27 May, 2011

4 commits

  • By the previous style change, CONFIG_GENERIC_FIND_NEXT_BIT,
    CONFIG_GENERIC_FIND_BIT_LE, and CONFIG_GENERIC_FIND_LAST_BIT are not used
    to test for existence of find bitops anymore.

    Signed-off-by: Akinobu Mita
    Acked-by: Greg Ungerer
    Cc: Arnd Bergmann
    Cc: Russell King
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • The style that we normally use in asm-generic is to test the macro itself
    for existence, so in asm-generic, do:

    #ifndef find_next_zero_bit_le
    extern unsigned long find_next_zero_bit_le(const void *addr,
    unsigned long size, unsigned long offset);
    #endif

    and in the architectures, write

    static inline unsigned long find_next_zero_bit_le(const void *addr,
    unsigned long size, unsigned long offset)
    #define find_next_zero_bit_le find_next_zero_bit_le

    This adds the #ifndef for each of the find bitops in the generic header
    and source files.

    Suggested-by: Arnd Bergmann
    Signed-off-by: Akinobu Mita
    Acked-by: Russell King
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Greg Ungerer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • On most architectures division is an expensive operation and accessing an
    element currently requires four of them. This performance penalty
    effectively precludes flex arrays from being used on any kind of fast
    path. However, two of these divisions can be handled at creation time and
    the others can be replaced by a reciprocal divide, completely avoiding
    real divisions on access.

    [eparis@redhat.com: rebase on top of changes to support 0 len elements]
    [eparis@redhat.com: initialize part_nr when array fits entirely in base]
    Signed-off-by: Jesse Gross
    Signed-off-by: Eric Paris
    Cc: Dave Hansen
    Cc: David Rientjes
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesse Gross
     
  • HARDIRQ_ENTER() maps to irq_enter() which calls rcu_irq_enter().
    But HARDIRQ_EXIT() maps to __irq_exit() which doesn't call
    rcu_irq_exit().

    So for every locking selftest that simulates hardirq disabled,
    we create an imbalance in the rcu extended quiescent state
    internal state.

    As a result, after the first missing rcu_irq_exit(), subsequent
    irqs won't exit dyntick-idle mode after leaving the interrupt
    handler. This means that RCU won't see the affected CPU as being
    in an extended quiescent state, resulting in long grace-period
    delays (as in grace periods extending for hours).

    To fix this, just use __irq_enter() to simulate the hardirq
    context. This is sufficient for the locking selftests as we
    don't need to exit any extended quiescent state or perform
    any check that irqs normally do when they wake up from idle.

    As a side effect, this patch makes it possible to restore
    "rcu: Decrease memory-barrier usage based on semi-formal proof",
    which eventually helped finding this bug.

    Reported-and-tested-by: Yinghai Lu
    Signed-off-by: Frederic Weisbecker
    Cc: Paul E. McKenney
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Stable
    Signed-off-by: Paul E. McKenney

    Frederic Weisbecker
     

26 May, 2011

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: (26 commits)
    arch/tile: prefer "tilepro" as the name of the 32-bit architecture
    compat: include aio_abi.h for aio_context_t
    arch/tile: cleanups for tilegx compat mode
    arch/tile: allocate PCI IRQs later in boot
    arch/tile: support signal "exception-trace" hook
    arch/tile: use better definitions of xchg() and cmpxchg()
    include/linux/compat.h: coding-style fixes
    tile: add an RTC driver for the Tilera hypervisor
    arch/tile: finish enabling support for TILE-Gx 64-bit chip
    compat: fixes to allow working with tile arch
    arch/tile: update defconfig file to something more useful
    tile: do_hardwall_trap: do not play with task->sighand
    tile: replace mm->cpu_vm_mask with mm_cpumask()
    tile,mn10300: add device parameter to dma_cache_sync()
    audit: support the "standard"
    arch/tile: clarify flush_buffer()/finv_buffer() function names
    arch/tile: kernel-related cleanups from removing static page size
    arch/tile: various header improvements for building drivers
    arch/tile: disable GX prefetcher during cache flush
    arch/tile: tolerate disabling CONFIG_BLK_DEV_INITRD
    ...

    Linus Torvalds
     

25 May, 2011

8 commits

  • Most arches define CONFIG_DEBUG_STACK_USAGE exactly the same way. Move it
    to lib/Kconfig.debug so each arch doesn't have to define it. This
    obviously makes the option generic, but that's fine because the config is
    already used in generic code.

    It's not obvious to me that sysrq-P actually does anything caution by
    keeping the most inclusive wording.

    Signed-off-by: Stephen Boyd
    Cc: Chris Metcalf
    Acked-by: David S. Miller
    Acked-by: Richard Weinberger
    Acked-by: Mike Frysinger
    Cc: Russell King
    Cc: Hirokazu Takata
    Acked-by: Ralf Baechle
    Cc: Paul Mackerras
    Acked-by: Benjamin Herrenschmidt
    Cc: Chen Liqin
    Cc: Lennox Wu
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Boyd
     
  • So we can specify the virtual address as the base of the pool chunk and
    then get physical addresses for hardware IP.

    For example on at91 we will use this on spi, uart or macb

    Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD
    Cc: Nicolas Ferre
    Cc: Patrice VILCHEZ
    Cc: Jes Sorensen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jean-Christophe PLAGNIOL-VILLARD
     
  • DEBUG_PER_CPU_MAPS is used in lib/cpumask.c as well as in
    inlcude/linux/cpumask.h and thus it has outgrown its use within x86 and
    powerpc alone. Any arch with SMP support may want to get some more
    debugging, so make this option generic.

    Signed-off-by: Stephen Boyd
    Cc:
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Acked-by: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Boyd
     
  • There is quite a lot of code which does copy_from_user() + strict_strto*()
    or simple_strto*() combo in slightly different ways.

    Before doing conversions all over tree, let's get final API correct.

    Enter kstrtoull_from_user() and friends.

    Typical code which uses them looks very simple:

    TYPE val;
    int rv;

    rv = kstrtoTYPE_from_user(buf, count, 0, &val);
    if (rv < 0)
    return rv;
    [use val]
    return count;

    There is a tiny semantic difference from the plain kstrto*() API -- the
    latter allows any amount of leading zeroes, while the former copies data
    into buffer on stack and thus allows leading zeroes as long as it fits
    into buffer.

    This shouldn't be a problem for typical usecase "echo 42 > /proc/x".

    The point is to make reading one integer from userspace _very_ simple and
    very bug free.

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

    Alexey Dobriyan
     
  • This has no actual effect, since sizeof(struct hlist_head) ==
    sizeof(struct hlist_head *), but it's still the wrong type to use.

    The semantic match that finds this problem:
    //
    @@
    type T;
    identifier x;
    @@
    T *x;
    ...
    * x = kzalloc(... * sizeof(T*) * ..., ...);
    //

    [akpm@linux-foundation.org: use kcalloc()]
    Signed-off-by: Ilia Mirkin
    Acked-by: Lars Ellenberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ilia Mirkin
     
  • Otherwise, the warning at the top of vsnprintf() gets triggered by
    kvasprintf()'s first invocation (with NULL buffer and zero size) of
    vsnprintf().

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

    Jan Beulich
     
  • Manually adjusting the smp_affinity for IRQ's becomes unwieldy when the
    cpu count is large.

    Setting smp affinity to cpus 256 to 263 would be:

    echo 000000ff,00000000,00000000,00000000,00000000,00000000,00000000,00000000 > smp_affinity

    instead of:

    echo 256-263 > smp_affinity_list

    Think about what it looks like for cpus around say, 4088 to 4095.

    We already have many alternate "list" interfaces:

    /sys/devices/system/cpu/cpuX/indexY/shared_cpu_list
    /sys/devices/system/cpu/cpuX/topology/thread_siblings_list
    /sys/devices/system/cpu/cpuX/topology/core_siblings_list
    /sys/devices/system/node/nodeX/cpulist
    /sys/devices/pci***/***/local_cpulist

    Add a companion interface, smp_affinity_list to use cpu lists instead of
    cpu maps. This conforms to other companion interfaces where both a map
    and a list interface exists.

    This required adding a bitmap_parselist_user() function in a manner
    similar to the bitmap_parse_user() function.

    [akpm@linux-foundation.org: make __bitmap_parselist() static]
    Signed-off-by: Mike Travis
    Cc: Thomas Gleixner
    Cc: Jack Steiner
    Cc: Lee Schermerhorn
    Cc: Andy Shevchenko
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Travis
     
  • Architectures that implement their own show_mem() function did not pass
    the filter argument to show_free_areas() to appropriately avoid emitting
    the state of nodes that are disallowed in the current context. This patch
    now passes the filter argument to show_free_areas() so those nodes are now
    avoided.

    This patch also removes the show_free_areas() wrapper around
    __show_free_areas() and converts existing callers to pass an empty filter.

    ia64 emits additional information for each node, so skip_free_areas_zone()
    must be made global to filter disallowed nodes and it is converted to use
    a nid argument rather than a zone for this use case.

    Signed-off-by: David Rientjes
    Cc: Russell King
    Cc: Tony Luck
    Cc: Fenghua Yu
    Cc: Kyle McMartin
    Cc: Helge Deller
    Cc: James Bottomley
    Cc: "David S. Miller"
    Cc: Guan Xuetao
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     

24 May, 2011

2 commits

  • Conflicts:
    lib/flex_array.c
    security/selinux/avc.c
    security/selinux/hooks.c
    security/selinux/ss/policydb.c
    security/smack/smack_lsm.c

    Manually resolve conflicts.

    Signed-off-by: James Morris

    James Morris
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
    b43: fix comment typo reqest -> request
    Haavard Skinnemoen has left Atmel
    cris: typo in mach-fs Makefile
    Kconfig: fix copy/paste-ism for dell-wmi-aio driver
    doc: timers-howto: fix a typo ("unsgined")
    perf: Only include annotate.h once in tools/perf/util/ui/browsers/annotate.c
    md, raid5: Fix spelling error in comment ('Ofcourse' --> 'Of course').
    treewide: fix a few typos in comments
    regulator: change debug statement be consistent with the style of the rest
    Revert "arm: mach-u300/gpio: Fix mem_region resource size miscalculations"
    audit: acquire creds selectively to reduce atomic op overhead
    rtlwifi: don't touch with treewide double semicolon removal
    treewide: cleanup continuations and remove logging message whitespace
    ath9k_hw: don't touch with treewide double semicolon removal
    include/linux/leds-regulator.h: fix syntax in example code
    tty: fix typo in descripton of tty_termios_encode_baud_rate
    xtensa: remove obsolete BKL kernel option from defconfig
    m68k: fix comment typo 'occcured'
    arch:Kconfig.locks Remove unused config option.
    treewide: remove extra semicolons
    ...

    Linus Torvalds
     

20 May, 2011

6 commits

  • * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (78 commits)
    Revert "rcu: Decrease memory-barrier usage based on semi-formal proof"
    net,rcu: convert call_rcu(prl_entry_destroy_rcu) to kfree
    batman,rcu: convert call_rcu(softif_neigh_free_rcu) to kfree_rcu
    batman,rcu: convert call_rcu(neigh_node_free_rcu) to kfree()
    batman,rcu: convert call_rcu(gw_node_free_rcu) to kfree_rcu
    net,rcu: convert call_rcu(kfree_tid_tx) to kfree_rcu()
    net,rcu: convert call_rcu(xt_osf_finger_free_rcu) to kfree_rcu()
    net/mac80211,rcu: convert call_rcu(work_free_rcu) to kfree_rcu()
    net,rcu: convert call_rcu(wq_free_rcu) to kfree_rcu()
    net,rcu: convert call_rcu(phonet_device_rcu_free) to kfree_rcu()
    perf,rcu: convert call_rcu(swevent_hlist_release_rcu) to kfree_rcu()
    perf,rcu: convert call_rcu(free_ctx) to kfree_rcu()
    net,rcu: convert call_rcu(__nf_ct_ext_free_rcu) to kfree_rcu()
    net,rcu: convert call_rcu(net_generic_release) to kfree_rcu()
    net,rcu: convert call_rcu(netlbl_unlhsh_free_addr6) to kfree_rcu()
    net,rcu: convert call_rcu(netlbl_unlhsh_free_addr4) to kfree_rcu()
    security,rcu: convert call_rcu(sel_netif_free) to kfree_rcu()
    net,rcu: convert call_rcu(xps_dev_maps_release) to kfree_rcu()
    net,rcu: convert call_rcu(xps_map_release) to kfree_rcu()
    net,rcu: convert call_rcu(rps_map_release) to kfree_rcu()
    ...

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

    * 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    seqlock: Don't smp_rmb in seqlock reader spin loop
    watchdog, hung_task_timeout: Add Kconfig configurable default
    lockdep: Remove cmpxchg to update nr_chain_hlocks
    lockdep: Print a nicer description for simple irq lock inversions
    lockdep: Replace "Bad BFS generated tree" message with something less cryptic
    lockdep: Print a nicer description for irq inversion bugs
    lockdep: Print a nicer description for simple deadlocks
    lockdep: Print a nicer description for normal deadlocks
    lockdep: Print a nicer description for irq lock inversions

    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:
    x86, gart: Rename pci-gart_64.c to amd_gart_64.c
    x86/amd-iommu: Use threaded interupt handler
    arch/x86/kernel/pci-iommu_table.c: Convert sprintf_symbol to %pS
    x86/amd-iommu: Add support for invalidate_all command
    x86/amd-iommu: Add extended feature detection
    x86/amd-iommu: Add ATS enable/disable code
    x86/amd-iommu: Add flag to indicate IOTLB support
    x86/amd-iommu: Flush device IOTLB if ATS is enabled
    x86/amd-iommu: Select PCI_IOV with AMD IOMMU driver
    PCI: Move ATS declarations in seperate header file
    dma-debug: print information about leaked entry
    x86/amd-iommu: Flush all internal TLBs when IOMMUs are enabled
    x86/amd-iommu: Rename iommu_flush_device
    x86/amd-iommu: Improve handling of full command buffer
    x86/amd-iommu: Rename iommu_flush* to domain_flush*
    x86/amd-iommu: Remove command buffer resetting logic
    x86/amd-iommu: Cleanup completion-wait handling
    x86/amd-iommu: Cleanup inv_pages command handling
    x86/amd-iommu: Move inv-dte command building to own function
    x86/amd-iommu: Move compl-wait command building to own function

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-2.6-cm:
    kmemleak: Initialise kmemleak after debug_objects_mem_init()
    kmemleak: Select DEBUG_FS unconditionally in DEBUG_KMEMLEAK
    kmemleak: Do not return a pointer to an object that kmemleak did not get

    Linus Torvalds
     
  • * 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus: (48 commits)
    MIPS: Move arch_get_unmapped_area and gang to new file.
    MIPS: Cleanup arch_get_unmapped_area
    MIPS: Octeon: Don't request interrupts for unused IPI mailbox bits.
    Octeon: Fix interrupt irq settings for performance counters.
    MIPS: Fix build warnings on defconfigs
    MIPS: Lemote 2F, Malta: Fix build warning
    MIPS: Set ELF AT_PLATFORM string for Loongson2 processors
    MIPS: Set ELF AT_PLATFORM string for BMIPS processors
    MIPS: Introduce set_elf_platform() helper function
    MIPS: JZ4740: setup: Autodetect physical memory.
    MIPS: BCM47xx: Fix MAC address parsing.
    MIPS: BCM47xx: Extend the filling of SPROM from NVRAM
    MIPS: BCM47xx: Register SSB fallback sprom callback
    MIPS: BCM47xx: Extend bcm47xx_fill_sprom with prefix.
    SSB: Change fallback sprom to callback mechanism.
    MIPS: Alchemy: Clean up GPIO registers and accessors
    MIPS: Alchemy: Cleanup DMA addresses
    MIPS: Alchemy: Rewrite ethernet platform setup
    MIPS: Alchemy: Rewrite UART setup and constants.
    MIPS: Alchemy: Convert dbdma.c to syscore_ops
    ...

    Linus Torvalds
     
  • In the past DEBUG_FS used to depend on SYSFS and DEBUG_KMEMLEAK selected
    it conditionally. This is no longer the case, so always select DEBUG_FS
    via DEBUG_KMEMLEAK.

    Signed-off-by: Catalin Marinas

    Catalin Marinas
     

19 May, 2011

3 commits

  • Signed-off-by: Maxin B. John
    To: Catalin Marinas
    Cc: Daniel Baluta
    Cc: naveen yadav
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-mm@kvack.org
    Patchwork: https://patchwork.linux-mips.org/patch/2244/
    Signed-off-by: Ralf Baechle

    Maxin John
     
  • This is a rename of the usr_strtobool proposal, which was a renamed,
    relocated and fixed version of previous kstrtobool RFC

    Signed-off-by: Jonathan Cameron
    Signed-off-by: Rusty Russell

    Jonathan Cameron
     
  • There a large number hand-coded binary searches in the kernel (run
    "git grep search | grep binary" to find many of them). Since in my
    experience, hand-coding binary searches can be error-prone, it seems
    worth cleaning this up by providing a generic binary search function.

    This generic binary search implementation comes from Ksplice. It has
    the same basic API as the C library bsearch() function. Ksplice uses
    it in half a dozen places with 4 different comparison functions, and I
    think our code is substantially cleaner because of this.

    Signed-off-by: Tim Abbott
    Extra-bikeshedding-by: Alan Jenkins
    Extra-bikeshedding-by: André Goddard Rosa
    Extra-bikeshedding-by: Rusty Russell
    Signed-off-by: Rusty Russell
    Signed-off-by: Alessio Igor Bogani
    Signed-off-by: Rusty Russell

    Tim Abbott
     

13 May, 2011

1 commit

  • kptr_restrict has been triggering bugs in apps such as perf, and it also makes
    the system less useful by default, so turn it off by default.

    This is how we generally handle security features that remove functionality,
    such as firewall code or SELinux - they have to be configured and activated
    from user-space.

    Distributions can turn kptr_restrict on again via this line in
    /etc/sysctrl.conf:

    kernel.kptr_restrict = 1

    ( Also mark the variable __read_mostly while at it, as it's typically modified
    only once per bootup, or not at all. )

    Signed-off-by: Ingo Molnar
    Acked-by: David S. Miller
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     

10 May, 2011

1 commit


06 May, 2011

2 commits

  • The prohibition of DEBUG_OBJECTS_RCU_HEAD from !PREEMPT was due to the
    fixup actions. So just produce a warning from !PREEMPT.

    Signed-off-by: Mathieu Desnoyers
    Signed-off-by: Paul E. McKenney
    Reviewed-by: Josh Triplett

    Mathieu Desnoyers
     
  • The RCU CPU stall warnings can now be controlled using the
    rcu_cpu_stall_suppress boot-time parameter or via the same parameter
    from sysfs. There is therefore no longer any reason to have
    kernel config parameters for this feature. This commit therefore
    removes the RCU_CPU_STALL_DETECTOR and RCU_CPU_STALL_DETECTOR_RUNNABLE
    kernel config parameters. The RCU_CPU_STALL_TIMEOUT parameter remains
    to allow the timeout to be tuned and the RCU_CPU_STALL_VERBOSE parameter
    remains to allow task-stall information to be suppressed if desired.

    Signed-off-by: Paul E. McKenney
    Reviewed-by: Josh Triplett

    Paul E. McKenney
     

05 May, 2011

1 commit


04 May, 2011

1 commit