19 Aug, 2010

2 commits

  • * 'for-linus' of git://neil.brown.name/md:
    md raid-1/10 Fix bio_rw bit manipulations again
    md: provide appropriate return value for spare_active functions.
    md: Notify sysfs when RAID1/5/10 disk is In_sync.
    Update recovery_offset even when external metadata is used.

    Linus Torvalds
     
  • * 'merge-devicetree' of git://git.secretlab.ca/git/linux-2.6:
    spi.h: missing kernel-doc notation, please fix
    of: fix missing headers for of_address_to_resource() in MTD and SysACE drivers
    of: Fix missing includes
    ata: update for of_device to platform_device replacement
    microblaze: Fix of: eliminate of_device->node and dev_archdata->{of,prom}_node
    microblaze: Fix of/address: Merge all of the bus translation code
    booting-without-of: Remove nonexistent chapters from TOC, fix numbering

    Linus Torvalds
     

18 Aug, 2010

23 commits

  • commit 7b6d91daee5cac6402186ff224c3af39d79f4a0e changed the behaviour
    of a few variables in raid1 and raid10 from flags to bit-sets, but
    left them as type 'bool' so they did not work.

    Change them (back) to unsigned long.
    (historical note: see 1ef04fefe2241087d9db7e9615c3f11b516e36cf)

    Signed-off-by: NeilBrown
    Reported-by: Jiri Slaby and many others

    NeilBrown
     
  • Added comments in kernel-doc notation for previously added struct fields.

    Signed-off-by: Ernst Schwab
    Acked-by: Randy Dunlap
    Signed-off-by: Grant Likely

    Ernst Schwab
     
  • md_check_recovery expects ->spare_active to return 'true' if any
    spares were activated, but none of them do, so the consequent change
    in 'degraded' is not notified through sysfs.

    So count the number of spares activated, subtract it from 'degraded'
    just once, and return it.

    Reported-by: Adrian Drzewiecki
    Signed-off-by: NeilBrown

    NeilBrown
     
  • When RAID1 is done syncing disks, it'll update the state
    of synced rdevs to In_sync. But it neglected to notify
    sysfs that the attribute changed. So any programs that
    are waiting for an rdev's state to change will not be
    woken.

    (raid5/raid10 added by neilb)

    Signed-off-by: Adrian Drzewiecki
    Signed-off-by: NeilBrown

    Adrian Drzewiecki
     
  • The update of ->recovery_offset in sync_sbs is appropriate even then external
    metadata is in use. However sync_sbs is only called when native
    metadata is used.

    So move that update in to the top of md_update_sb (which is the only
    caller of sync_sbs) before the test on ->external.

    This moves the update out of ->write_lock protection, but those fields
    only need ->reconfig_mutex protection which they still have.

    Also move the test on ->persistent up to where ->external is set as
    for metadata update purposes they are the same.

    Clear MD_CHANGE_DEVS and MD_CHANGE_CLEAN as they can only be confusing
    if ->external is set or ->persistent isn't.

    Finally move the update of ->utime down as it is only relevent (like
    the ->events update) for native metadata.

    Signed-off-by: NeilBrown
    Reported-by: "Kwolek, Adam"

    NeilBrown
     
  • …s/security-testing-2.6

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
    AppArmor: fix task_setrlimit prototype

    Linus Torvalds
     
  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb:
    vt,console,kdb: preserve console_blanked while in kdb
    vt: fix regression warnings from KMS merge
    arm,kgdb: fix GDB_MAX_REGS no longer used
    kgdb: add missing __percpu markup in arch/x86/kernel/kgdb.c
    kdb: fix compile error without CONFIG_KALLSYMS

    Linus Torvalds
     
  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86:
    platform/x86: move rfkill for Dell Mini 1012 to compal-laptop
    thinkpad-acpi: Add KEY_CAMERA (Fn-F6) for Lenovo keyboards
    thinkpad-acpi: add support for model-specific keymaps
    thinkpad-acpi: lock down size of hotkey keymap
    thinkpad-acpi: untangle ACPI/vendor backlight selection
    thinkpad-acpi: find ACPI video device by synthetic HID
    intel_ips: potential null dereference
    drivers/platform/x86: Adjust confusing if indentation
    x86: intel_ips: do not use PCI resources before pci_enable_device()

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2:
    nilfs2: fix false warning saying one of two super blocks is broken
    nilfs2: fix list corruption after ifile creation failure

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    net: Fix a memmove bug in dev_gro_receive()
    net sched: fix some kernel memory leaks
    netfilter: {ip,ip6,arp}_tables: avoid lockdep false positive
    Revert "netlink: netlink_recvmsg() fix"
    ipv6: remove sysctl jiffies conversion on gc_elasticity and min_adv_mss
    xfrm: Use GFP_ATOMIC in xfrm_compile_policy
    ath5k: disable ASPM L0s for all cards
    ath9k_htc: load proper firmware for device ID 7015
    wl1251: fix trigger scan timeout usage
    ath9k_htc: Fix disconnect issue in HT40 mode.
    ath9k_htc: fix panic on packet injection using airbase-ng tool.
    ipw2100: register pm_qos request before registering pci driver

    Linus Torvalds
     
  • list_add() corruption messages reported from shmem_fill_super()'s recently
    introduced percpu_counter_init(): shmem_put_super() needs to remember to
    percpu_counter_destroy(). And also check error from percpu_counter_init().

    Reported-bisected-and-tested-by: Tetsuo Handa
    Signed-off-by: Hugh Dickins
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
    sparc64: Fix atomic64_t routine return values.
    sparc64: Fix rwsem constant bug leading to hangs.
    sparc: Hook up new fanotify and prlimit64 syscalls.
    sparc: Really fix "console=" for serial consoles.

    Linus Torvalds
     
  • * master.kernel.org:/home/rmk/linux-2.6-arm:
    VIDEO: amba clcd: don't disable an already disabled clock
    ARM: Tighten check for allowable CPSR values
    ARM: 6329/1: wire up sys_accept4() on ARM
    ARM: 6328/1: Build with -fno-dwarf2-cfi-asm
    ARM: 6326/1: kgdb: fix GDB_MAX_REGS no longer used

    Linus Torvalds
     
  • Signed-off-by: David S. Miller
    Signed-off-by: Linus Torvalds

    David Miller
     
  • Using a program like the following:

    #include
    #include
    #include
    #include

    int main() {
    id_t id;
    siginfo_t infop;
    pid_t res;

    id = fork();
    if (id == 0) { sleep(1); exit(0); }
    kill(id, SIGSTOP);
    alarm(1);
    waitid(P_PID, id, &infop, WCONTINUED);
    return 0;
    }

    to call waitid() on a stopped process results in access to the child task's
    credentials without the RCU read lock being held - which may be replaced in the
    meantime - eliciting the following warning:

    ===================================================
    [ INFO: suspicious rcu_dereference_check() usage. ]
    ---------------------------------------------------
    kernel/exit.c:1460 invoked rcu_dereference_check() without protection!

    other info that might help us debug this:

    rcu_scheduler_active = 1, debug_locks = 1
    2 locks held by waitid02/22252:
    #0: (tasklist_lock){.?.?..}, at: [] do_wait+0xc5/0x310
    #1: (&(&sighand->siglock)->rlock){-.-...}, at: []
    wait_consider_task+0x19a/0xbe0

    stack backtrace:
    Pid: 22252, comm: waitid02 Not tainted 2.6.35-323cd+ #3
    Call Trace:
    [] lockdep_rcu_dereference+0xa4/0xc0
    [] wait_consider_task+0xaf1/0xbe0
    [] do_wait+0xf5/0x310
    [] sys_waitid+0x86/0x1f0
    [] ? child_wait_callback+0x0/0x70
    [] system_call_fastpath+0x16/0x1b

    This is fixed by holding the RCU read lock in wait_task_continued() to ensure
    that the task's current credentials aren't destroyed between us reading the
    cred pointer and us reading the UID from those credentials.

    Furthermore, protect wait_task_stopped() in the same way.

    We don't need to keep holding the RCU read lock once we've read the UID from
    the credentials as holding the RCU read lock doesn't stop the target task from
    changing its creds under us - so the credentials may be outdated immediately
    after we've read the pointer, lock or no lock.

    Signed-off-by: Daniel J Blueman
    Signed-off-by: David Howells
    Acked-by: Paul E. McKenney
    Acked-by: Oleg Nesterov
    Signed-off-by: Linus Torvalds

    Daniel J Blueman
     
  • Make do_execve() take a const filename pointer so that kernel_execve() compiles
    correctly on ARM:

    arch/arm/kernel/sys_arm.c:88: warning: passing argument 1 of 'do_execve' discards qualifiers from pointer target type

    This also requires the argv and envp arguments to be consted twice, once for
    the pointer array and once for the strings the array points to. This is
    because do_execve() passes a pointer to the filename (now const) to
    copy_strings_kernel(). A simpler alternative would be to cast the filename
    pointer in do_execve() when it's passed to copy_strings_kernel().

    do_execve() may not change any of the strings it is passed as part of the argv
    or envp lists as they are some of them in .rodata, so marking these strings as
    const should be fine.

    Further kernel_execve() and sys_execve() need to be changed to match.

    This has been test built on x86_64, frv, arm and mips.

    Signed-off-by: David Howells
    Tested-by: Ralf Baechle
    Acked-by: Russell King
    Signed-off-by: Linus Torvalds

    David Howells
     
  • >Xin Xiaohui wrote:
    > I looked into the code dev_gro_receive(), found the code here:
    > if the frags[0] is pulled to 0, then the page will be released,
    > and memmove() frags left.
    > Is that right? I'm not sure if memmove do right or not, but
    > frags[0].size is never set after memove at least. what I think
    > a simple way is not to do anything if we found frags[0].size == 0.
    > The patch is as followed.
    ...

    This version of the patch fixes the bug directly in memmove.

    Reported-by: "Xin, Xiaohui"
    Signed-off-by: Jarek Poplawski
    Signed-off-by: David S. Miller

    Jarek Poplawski
     
  • Should return 'long' instead of 'int'.

    Thanks to Dimitris Michailidis and Tony Luck.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • As noticed by Linus, it is critical that some of the
    rwsem constants be signed. Yet, hex constants are
    unsigned unless explicitly casted or negated.

    The most critical one is RWSEM_WAITING_BIAS.

    This bug was exacerbated by commit
    424acaaeb3a3932d64a9b4bd59df6cf72c22d8f3 ("rwsem: wake queued readers
    when writer blocks on active read lock")

    Signed-off-by: David S. Miller

    David S. Miller
     
  • We leak at least 32bits of kernel memory to user land in tc dump,
    because we dont init all fields (capab ?) of the dumped structure.

    Use C99 initializers so that holes and non explicit fields are zeroed.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • After commit 24b36f019 (netfilter: {ip,ip6,arp}_tables: dont block
    bottom half more than necessary), lockdep can raise a warning
    because we attempt to lock a spinlock with BH enabled, while
    the same lock is usually locked by another cpu in a softirq context.

    Disable again BH to avoid these lockdep warnings.

    Reported-by: Linus Torvalds
    Diagnosed-by: David S. Miller
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Fix the clock enable/disable tracking in the AMBA CLCD driver so
    that the driver doesn't try to disable an already disabled clock,
    thereby causing the clock (if shared) to become unbalanced.

    This resolves a problem with CLCD on LPC32xx ARM platforms.

    Reported-by: Kevin Wells
    Signed-off-by: Russell King

    Russell King
     
  • The drivers for Xilinx' SystemACE and physically mapped MTDs were missing
    prototypes for of_address_to_resource(). This patch adds the necessary
    headers.

    Signed-off-by: Graeme Smecher
    Signed-off-by: Grant Likely

    Graeme Smecher
     

17 Aug, 2010

15 commits

  • This patch fixes missing includes from a number of .c files because
    the code (wrongfully) depended on prom.h including them. The include
    of linux/of_address.h was removed in microblaze prom.h in commit
    "of/address: Clean up function declarations" (sha1 id 22ae782f8), but
    not fixed in some callers. This patch fixes them up.

    Signed-off-by: Grant Likely
    Tested-by: Michal Simek

    Grant Likely
     
  • After rlimits tree was merged we get the following errors:
    security/apparmor/lsm.c:663:2: warning: initialization from incompatible pointer type

    It is because AppArmor was merged in the meantime, but uses the old
    prototype. So fix it by adding struct task_struct as a first parameter
    of apparmor_task_setrlimit.

    NOTE that this is ONLY a compilation warning fix (and crashes caused
    by that). It needs proper handling in AppArmor depending on who is the
    'task'.

    Signed-off-by: Jiri Slaby
    Signed-off-by: John Johansen
    Signed-off-by: James Morris

    Jiri Slaby
     
  • The only tricky bit is the compat version of fanotify_mark, which
    which on 32-bit the 64-bit mark argument is passed in as "high32",
    "low32".

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Signed-off-by: Stephen Rothwell
    Signed-off-by: Grant Likely

    Stephen Rothwell
     
  • David S. Miller
     
  • Commit b45cfba4e9005d64d419718e7ff7f7cab44c1994 (vt,console,kdb:
    implement atomic console enter/leave functions) introduced the ability
    to atomically change the console mode with kernel mode setting but did
    not preserve the state of the console_blanked variable.

    The console_blanked variable must be restored when executing the
    con_debug_leave() or further kernel mode set changes (such as using
    chvt X) will fail to correctly set the state of console.

    Signed-off-by: Jason Wessel
    Reviewed-by: Jesse Barnes
    CC: Andrew Morton

    Jason Wessel
     
  • Fix the following new sparse warnings in vt.c introduced by the commit
    b45cfba4e9005d64d419718e7ff7f7cab44c1994 (vt,console,kdb: implement
    atomic console enter/leave functions):

    drivers/char/vt.c:197:5: warning: symbol 'saved_fg_console' was not declared. Should it be static?
    drivers/char/vt.c:198:5: warning: symbol 'saved_last_console' was not declared. Should it be static?
    drivers/char/vt.c:199:5: warning: symbol 'saved_want_console' was not declared. Should it be static?
    drivers/char/vt.c:200:5: warning: symbol 'saved_vc_mode' was not declared. Should it be static?

    Signed-off-by: Jason Wessel
    Reviewed-by: Jesse Barnes
    CC: Andrew Morton

    Jason Wessel
     
  • According to commit 22eeef4bb2a7fd225089c0044060ed1fbf091958

    kgdb,arm: Individual register get/set for arm

    It's now replaced by DBG_MAX_REG_NUM.

    Signed-off-by: Eric Miao
    Signed-off-by: Jason Wessel

    Eric Miao
     
  • breakinfo->pev is a pointer to percpu pointer but was missing __percpu markup.
    Add it.

    Signed-off-by: Namhyung Kim
    Signed-off-by: Jason Wessel

    Namhyung Kim
     
  • If CONFIG_KGDB_KDB is set and CONFIG_KALLSYMS is not set the kernel
    will fail to build with the error:

    kernel/built-in.o: In function `kallsyms_symbol_next':
    kernel/debug/kdb/kdb_support.c:237: undefined reference to `kdb_walk_kallsyms'
    kernel/built-in.o: In function `kallsyms_symbol_complete':
    kernel/debug/kdb/kdb_support.c:193: undefined reference to `kdb_walk_kallsyms'

    The kdb_walk_kallsyms needs a #ifdef proper header to match the C
    implementation. This patch also fixes the compiler warnings in
    kdb_support.c when compiling without CONFIG_KALLSYMS set. The
    compiler warnings are a result of the kallsyms_lookup() macro not
    initializing the two of the pass by reference variables.

    Signed-off-by: Jason Wessel
    Reported-by: Michal Simek

    Jason Wessel
     
  • David S. Miller
     
  • Commit 58f9b0b02414062eaff46716bc04b47d7e79add5 should
    contain this fix too.

    Signed-off-by: Michal Simek
    Signed-off-by: Grant Likely

    Michal Simek
     
  • Commit dbbdee94734bf6f1db7af42008a53655e77cab8f removed
    of_irq_pci_swizzle but didn't use pci_swizzle_interrupt_pin
    instead.

    Signed-off-by: Michal Simek
    Signed-off-by: Grant Likely

    Michal Simek
     
  • Marvell and GPIO bindings live in their own files, so the TOC should not
    mention them.

    Also fix chapters numbering.

    Signed-off-by: Anton Vorontsov
    Signed-off-by: Grant Likely

    Anton Vorontsov
     
  • If a video head and keyboard are hooked up, specifying "console=ttyS0"
    or similar to use a serial console will not work properly.

    The key issue is that we must register all serial console capable
    devices with register_console(), otherwise the command line specified
    device won't be found. The sun serial drivers would only register
    themselves as console devices if the OpenFirmware specified console
    device node matched. To fix this part we now unconditionally get
    the serial console register by setting serial_drv->cons always.

    Secondarily we must not add_preferred_console() using the firmware
    provided console setting if the user gaven an override on the kernel
    command line using "console=" The "primary framebuffer" matching
    logic was always triggering o n openfirmware device node match, make
    it not when a command line override was given.

    Reported-by: Frans Pop
    Tested-by: Frans Pop
    Signed-off-by: David S. Miller

    David S. Miller