1. 27 12月, 2012 2 次提交
    • R
      cpts: fix build error by removing useless code. · cbc44dbe
      Richard Cochran 提交于
      The cpts driver tries to obtain the input clock frequency by calling the
      clock's internal 'recalc' method. Since <plat/clock.h> has been removed,
      this code can no longer compile.
      
      However, the driver never makes use of the frequency value, so this patch
      fixes the issue by removing the offending code altogether.
      Signed-off-by: NRichard Cochran <richardcochran@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cbc44dbe
    • A
      batman-adv: fix random jitter calculation · 143cdd8f
      Akinobu Mita 提交于
      batadv_iv_ogm_emit_send_time() attempts to calculates a random integer
      in the range of 'orig_interval +- BATADV_JITTER' by the below lines.
      
              msecs = atomic_read(&bat_priv->orig_interval) - BATADV_JITTER;
              msecs += (random32() % 2 * BATADV_JITTER);
      
      But it actually gets 'orig_interval' or 'orig_interval - BATADV_JITTER'
      because '%' and '*' have same precedence and associativity is
      left-to-right.
      
      This adds the parentheses at the appropriate position so that it matches
      original intension.
      Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Acked-by: NAntonio Quartulli <ordex@autistici.org>
      Cc: Marek Lindner <lindner_marek@yahoo.de>
      Cc: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
      Cc: Antonio Quartulli <ordex@autistici.org>
      Cc: b.a.t.m.a.n@lists.open-mesh.org
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: netdev@vger.kernel.org
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      143cdd8f
  2. 25 12月, 2012 1 次提交
  3. 22 12月, 2012 12 次提交
  4. 21 12月, 2012 25 次提交
    • L
      Merge tag 'vfio-for-v3.8-v2' of git://github.com/awilliam/linux-vfio · 54e37b8d
      Linus Torvalds 提交于
      Pull vfio update from Alex Williamson.
      
      * tag 'vfio-for-v3.8-v2' of git://github.com/awilliam/linux-vfio:
        vfio-pci: Enable device before attempting reset
        VFIO: fix out of order labels for error recovery in vfio_pci_init()
        VFIO: use ACCESS_ONCE() to guard access to dev->driver
        VFIO: unregister IOMMU notifier on error recovery path
        vfio-pci: Re-order device reset
        vfio: simplify kmalloc+copy_from_user to memdup_user
      54e37b8d
    • L
      Merge branch 'for-next' of git://git.infradead.org/users/eparis/notify · 96680d2b
      Linus Torvalds 提交于
      Pull filesystem notification updates from Eric Paris:
       "This pull mostly is about locking changes in the fsnotify system.  By
        switching the group lock from a spin_lock() to a mutex() we can now
        hold the lock across things like iput().  This fixes a problem
        involving unmounting a fs and having inodes be busy, first pointed out
        by FAT, but reproducible with tmpfs.
      
        This also restores signal driven I/O for inotify, which has been
        broken since about 2.6.32."
      
      Ugh.  I *hate* the timing of this.  It was rebased after the merge
      window opened, and then left to sit with the pull request coming the day
      before the merge window closes.  That's just crap.  But apparently the
      patches themselves have been around for over a year, just gathering
      dust, so now it's suddenly critical.
      
      Fixed up semantic conflict in fs/notify/fdinfo.c as per Stephen
      Rothwell's fixes from -next.
      
      * 'for-next' of git://git.infradead.org/users/eparis/notify:
        inotify: automatically restart syscalls
        inotify: dont skip removal of watch descriptor if creation of ignored event failed
        fanotify: dont merge permission events
        fsnotify: make fasync generic for both inotify and fanotify
        fsnotify: change locking order
        fsnotify: dont put marks on temporary list when clearing marks by group
        fsnotify: introduce locked versions of fsnotify_add_mark() and fsnotify_remove_mark()
        fsnotify: pass group to fsnotify_destroy_mark()
        fsnotify: use a mutex instead of a spinlock to protect a groups mark list
        fanotify: add an extra flag to mark_remove_from_mask that indicates wheather a mark should be destroyed
        fsnotify: take groups mark_lock before mark lock
        fsnotify: use reference counting for groups
        fsnotify: introduce fsnotify_get_group()
        inotify, fanotify: replace fsnotify_put_group() with fsnotify_destroy_group()
      96680d2b
    • L
      Merge branch 'akpm' (Andrew's patch-bomb) · 4c9a44ae
      Linus Torvalds 提交于
      Merge the rest of Andrew's patches for -rc1:
       "A bunch of fixes and misc missed-out-on things.
      
        That'll do for -rc1.  I still have a batch of IPC patches which still
        have a possible bug report which I'm chasing down."
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (25 commits)
        keys: use keyring_alloc() to create module signing keyring
        keys: fix unreachable code
        sendfile: allows bypassing of notifier events
        SGI-XP: handle non-fatal traps
        fat: fix incorrect function comment
        Documentation: ABI: remove testing/sysfs-devices-node
        proc: fix inconsistent lock state
        linux/kernel.h: fix DIV_ROUND_CLOSEST with unsigned divisors
        memcg: don't register hotcpu notifier from ->css_alloc()
        checkpatch: warn on uapi #includes that #include <uapi/...
        revert "rtc: recycle id when unloading a rtc driver"
        mm: clean up transparent hugepage sysfs error messages
        hfsplus: add error message for the case of failure of sync fs in delayed_sync_fs() method
        hfsplus: rework processing of hfs_btree_write() returned error
        hfsplus: rework processing errors in hfsplus_free_extents()
        hfsplus: avoid crash on failed block map free
        kcmp: include linux/ptrace.h
        drivers/rtc/rtc-imxdi.c: must include <linux/spinlock.h>
        mm: cma: WARN if freed memory is still in use
        exec: do not leave bprm->interp on stack
        ...
      4c9a44ae
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 1f0377ff
      Linus Torvalds 提交于
      Pull VFS update from Al Viro:
       "fscache fixes, ESTALE patchset, vmtruncate removal series, assorted
        misc stuff."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (79 commits)
        vfs: make lremovexattr retry once on ESTALE error
        vfs: make removexattr retry once on ESTALE
        vfs: make llistxattr retry once on ESTALE error
        vfs: make listxattr retry once on ESTALE error
        vfs: make lgetxattr retry once on ESTALE
        vfs: make getxattr retry once on an ESTALE error
        vfs: allow lsetxattr() to retry once on ESTALE errors
        vfs: allow setxattr to retry once on ESTALE errors
        vfs: allow utimensat() calls to retry once on an ESTALE error
        vfs: fix user_statfs to retry once on ESTALE errors
        vfs: make fchownat retry once on ESTALE errors
        vfs: make fchmodat retry once on ESTALE errors
        vfs: have chroot retry once on ESTALE error
        vfs: have chdir retry lookup and call once on ESTALE error
        vfs: have faccessat retry once on an ESTALE error
        vfs: have do_sys_truncate retry once on an ESTALE error
        vfs: fix renameat to retry on ESTALE errors
        vfs: make do_unlinkat retry once on ESTALE errors
        vfs: make do_rmdir retry once on ESTALE errors
        vfs: add a flags argument to user_path_parent
        ...
      1f0377ff
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal · 54d46ea9
      Linus Torvalds 提交于
      Pull signal handling cleanups from Al Viro:
       "sigaltstack infrastructure + conversion for x86, alpha and um,
        COMPAT_SYSCALL_DEFINE infrastructure.
      
        Note that there are several conflicts between "unify
        SS_ONSTACK/SS_DISABLE definitions" and UAPI patches in mainline;
        resolution is trivial - just remove definitions of SS_ONSTACK and
        SS_DISABLED from arch/*/uapi/asm/signal.h; they are all identical and
        include/uapi/linux/signal.h contains the unified variant."
      
      Fixed up conflicts as per Al.
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal:
        alpha: switch to generic sigaltstack
        new helpers: __save_altstack/__compat_save_altstack, switch x86 and um to those
        generic compat_sys_sigaltstack()
        introduce generic sys_sigaltstack(), switch x86 and um to it
        new helper: compat_user_stack_pointer()
        new helper: restore_altstack()
        unify SS_ONSTACK/SS_DISABLE definitions
        new helper: current_user_stack_pointer()
        missing user_stack_pointer() instances
        Bury the conditionals from kernel_thread/kernel_execve series
        COMPAT_SYSCALL_DEFINE: infrastructure
      54d46ea9
    • L
      Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm · f59dc2bb
      Linus Torvalds 提交于
      Pull ARM fixes from Russell King:
       "A number of smallish fixes scattered around the ARM code.  Probably
        the most serious one is the one from Al addressing the missing locking
        in the swap emulation code."
      
      * 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
        ARM: 7607/1: realview: fix private peripheral memory base for EB rev. B boards
        ARM: 7606/1: cache: flush to LoUU instead of LoUIS on uniprocessor CPUs
        ARM: missing ->mmap_sem around find_vma() in swp_emulate.c
        ARM: 7605/1: vmlinux.lds: Move .notes section next to the rodata
        ARM: 7602/1: Pass real "__machine_arch_type" variable to setup_machine_tags() procedure
        ARM: 7600/1: include CONFIG_DEBUG_LL_INCLUDE rather than mach/debug-macro.S
      f59dc2bb
    • L
      Merge tag 'fixes2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · f3dc1294
      Linus Torvalds 提交于
      Pull ARM SoC fixes part 2 from Olof Johansson:
       "Here are a few more fixes for 3.8.  Two branches of fixes for Samsung
        platforms, including fixes for the audio build errors on all non-DT
        platforms.  There's also a fixup to the sunxi device-tree file renames
        due to a bad patch application by me, and a fix for OMAP due to
        function renames merged through the powerpc tree."
      
      * tag 'fixes2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        ARM: OMAP2+: Fix compillation error in mach-omap2/timer.c
        ARM: sunxi: rename device tree source files
        ARM: EXYNOS: Avoid passing the clks through platform data
        ARM: S5PV210: Avoid passing the clks through platform data
        ARM: S5P64X0: Add I2S clkdev support
        ARM: S5PC100: Add I2S clkdev support
        ARM: S3C64XX: Add I2S clkdev support
        ARM: EXYNOS: Fix MSHC clocks instance names
        ARM: EXYNOS: Fix NULL pointer dereference bug in SMDKV310
        ARM: EXYNOS: Fix NULL pointer dereference bug in SMDK4X12
        ARM: EXYNOS: Fix NULL pointer dereference bug in Origen
        ARM: SAMSUNG: Add missing include guard to gpio-core.h
        pinctrl: exynos5440/samsung: Staticize pcfgs
        pinctrl: samsung: Fix a typo in pinctrl-samsung.h
        ARM: EXYNOS: fix skip scu_enable() for EXYNOS5440
        ARM: EXYNOS: fix GIC using for EXYNOS5440
        ARM: EXYNOS: fix build error when MFC is not selected
      f3dc1294
    • L
      Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild · af487e42
      Linus Torvalds 提交于
      Pull kbuild misc changes from Michal Marek:
       "This is the non-critical part of kbuild
      
         - scripts/kernel-doc requires a "Return:" section for non-void
           functions
         - ARCH=arm SUBARCH=... support for make tags
         - COMPILED_SOURCE=1 support for make tags (only indexes .c files for
           which a .o exists)
         - New coccinelle check
         - Option parsing fix for scripts/config"
      
      * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
        scripts/config: Fix wrong "shift" for --keep-case
        scripts/tags.sh: Support compiled source
        scripts/tags.sh: Support subarch for ARM
        scripts/coccinelle/misc/warn.cocci: use WARN
        scripts/kernel-doc: check that non-void fcts describe their return value
        Kernel-doc: Convention: Use a "Return" section to describe return values
      af487e42
    • D
      keys: use keyring_alloc() to create module signing keyring · cfde8190
      David Howells 提交于
      Use keyring_alloc() to create special keyrings now that it has
      a permissions parameter rather than using key_alloc() +
      key_instantiate_and_link().
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cfde8190
    • A
      keys: fix unreachable code · e67eab39
      Alan Cox 提交于
      We set ret to NULL then test it. Remove the bogus test
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e67eab39
    • S
      sendfile: allows bypassing of notifier events · a68c2f12
      Scott Wolchok 提交于
      do_sendfile() in fs/read_write.c does not call the fsnotify functions,
      unlike its neighbors.  This manifests as a lack of inotify ACCESS events
      when a file is sent using sendfile(2).
      
      Addresses
        https://bugzilla.kernel.org/show_bug.cgi?id=12812
      
      [akpm@linux-foundation.org: use fsnotify_modify(out.file), not fsnotify_access(), per Dave]
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Cc: Dave Chinner <david@fromorbit.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Scott Wolchok <swolchok@umich.edu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a68c2f12
    • R
      SGI-XP: handle non-fatal traps · 891348ca
      Robin Holt 提交于
      We found a user code which was raising a divide-by-zero trap.  That trap
      would lead to XPC connections between system-partitions being torn down
      due to the die_chain notifier callouts it received.
      
      This also revealed a different issue where multiple callers into
      xpc_die_deactivate() would all attempt to do the disconnect in parallel
      which would sometimes lock up but often overwhelm the console on very
      large machines as each would print at least one line of output at the
      end of the deactivate.
      
      I reviewed all the users of the die_chain notifier and changed the code
      to ignore the notifier callouts for reasons which will not actually lead
      to a system to continue on to call die().
      
      [akpm@linux-foundation.org: fix ia64]
      Signed-off-by: NRobin Holt <holt@sgi.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      891348ca
    • R
      fat: fix incorrect function comment · c39540c6
      Ravishankar N 提交于
      fat_search_long() returns 0 on success, -ENOENT/ENOMEM on failure.
      Change the function comment accordingly.
      
      While at it, fix some trivial typos.
      Signed-off-by: NRavishankar N <cyberax82@gmail.com>
      Signed-off-by: NNamjae Jeon <linkinjeon@gmail.com>
      Acked-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c39540c6
    • D
      Documentation: ABI: remove testing/sysfs-devices-node · 99bbb2b0
      Davidlohr Bueso 提交于
      This file is already documented in the stable ABI (see commit
      5bbe1ec1).
      Signed-off-by: NDavidlohr Bueso <davidlohr.bueso@hp.com>
      Cc: Greg KH <greg@kroah.com>
      Cc: Mel Gorman <mel@csn.ul.ie>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      99bbb2b0
    • X
      proc: fix inconsistent lock state · ee297209
      Xiaotian Feng 提交于
      Lockdep found an inconsistent lock state when rcu is processing delayed
      work in softirq.  Currently, kernel is using spin_lock/spin_unlock to
      protect proc_inum_ida, but proc_free_inum is called by rcu in softirq
      context.
      
      Use spin_lock_bh/spin_unlock_bh fix following lockdep warning.
      
        =================================
        [ INFO: inconsistent lock state ]
        3.7.0 #36 Not tainted
        ---------------------------------
        inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
        swapper/1/0 [HC0[0]:SC1[1]:HE1:SE0] takes:
         (proc_inum_lock){+.?...}, at: proc_free_inum+0x1c/0x50
        {SOFTIRQ-ON-W} state was registered at:
           __lock_acquire+0x8ae/0xca0
           lock_acquire+0x199/0x200
           _raw_spin_lock+0x41/0x50
           proc_alloc_inum+0x4c/0xd0
           alloc_mnt_ns+0x49/0xc0
           create_mnt_ns+0x25/0x70
           mnt_init+0x161/0x1c7
           vfs_caches_init+0x107/0x11a
           start_kernel+0x348/0x38c
           x86_64_start_reservations+0x131/0x136
           x86_64_start_kernel+0x103/0x112
        irq event stamp: 2993422
        hardirqs last  enabled at (2993422):  _raw_spin_unlock_irqrestore+0x55/0x80
        hardirqs last disabled at (2993421):  _raw_spin_lock_irqsave+0x29/0x70
        softirqs last  enabled at (2993394):  _local_bh_enable+0x13/0x20
        softirqs last disabled at (2993395):  call_softirq+0x1c/0x30
      
        other info that might help us debug this:
         Possible unsafe locking scenario:
      
               CPU0
               ----
          lock(proc_inum_lock);
          <Interrupt>
            lock(proc_inum_lock);
      
         *** DEADLOCK ***
      
        no locks held by swapper/1/0.
      
        stack backtrace:
        Pid: 0, comm: swapper/1 Not tainted 3.7.0 #36
        Call Trace:
         <IRQ>  [<ffffffff810a40f1>] ? vprintk_emit+0x471/0x510
          print_usage_bug+0x2a5/0x2c0
          mark_lock+0x33b/0x5e0
          __lock_acquire+0x813/0xca0
          lock_acquire+0x199/0x200
          _raw_spin_lock+0x41/0x50
          proc_free_inum+0x1c/0x50
          free_pid_ns+0x1c/0x50
          put_pid_ns+0x2e/0x50
          put_pid+0x4a/0x60
          delayed_put_pid+0x12/0x20
          rcu_process_callbacks+0x462/0x790
          __do_softirq+0x1b4/0x3b0
          call_softirq+0x1c/0x30
          do_softirq+0x59/0xd0
          irq_exit+0x54/0xd0
          smp_apic_timer_interrupt+0x95/0xa3
          apic_timer_interrupt+0x72/0x80
          cpuidle_enter_tk+0x10/0x20
          cpuidle_enter_state+0x17/0x50
          cpuidle_idle_call+0x287/0x520
          cpu_idle+0xba/0x130
          start_secondary+0x2b3/0x2bc
      Signed-off-by: NXiaotian Feng <dannyfeng@tencent.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ee297209
    • G
      linux/kernel.h: fix DIV_ROUND_CLOSEST with unsigned divisors · c4e18497
      Guenter Roeck 提交于
      Commit 263a523d ("linux/kernel.h: Fix warning seen with W=1 due to
      change in DIV_ROUND_CLOSEST") fixes a warning seen with W=1 due to
      change in DIV_ROUND_CLOSEST.
      
      Unfortunately, the C compiler converts divide operations with unsigned
      divisors to unsigned, even if the dividend is signed and negative (for
      example, -10 / 5U = 858993457).  The C standard says "If one operand has
      unsigned int type, the other operand is converted to unsigned int", so
      the compiler is not to blame.  As a result, DIV_ROUND_CLOSEST(0, 2U) and
      similar operations now return bad values, since the automatic conversion
      of expressions such as "0 - 2U/2" to unsigned was not taken into
      account.
      
      Fix by checking for the divisor variable type when deciding which
      operation to perform.  This fixes DIV_ROUND_CLOSEST(0, 2U), but still
      returns bad values for negative dividends divided by unsigned divisors.
      Mark the latter case as unsupported.
      
      One observed effect of this problem is that the s2c_hwmon driver reports
      a value of 4198403 instead of 0 if the ADC reads 0.
      
      Other impact is unpredictable.  Problem is seen if the divisor is an
      unsigned variable or constant and the dividend is less than (divisor/2).
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Reported-by: NJuergen Beisert <jbe@pengutronix.de>
      Tested-by: NJuergen Beisert <jbe@pengutronix.de>
      Cc: Jean Delvare <khali@linux-fr.org>
      Cc: <stable@vger.kernel.org>	[3.7.x]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c4e18497
    • T
      memcg: don't register hotcpu notifier from ->css_alloc() · 154b454e
      Tejun Heo 提交于
      Commit 648bb56d ("cgroup: lock cgroup_mutex in cgroup_init_subsys()")
      made cgroup_init_subsys() grab cgroup_mutex before invoking
      ->css_alloc() for the root css.  Because memcg registers hotcpu notifier
      from ->css_alloc() for the root css, this introduced circular locking
      dependency between cgroup_mutex and cpu hotplug.
      
      Fix it by moving hotcpu notifier registration to a subsys initcall.
      
        ======================================================
        [ INFO: possible circular locking dependency detected ]
        3.7.0-rc4-work+ #42 Not tainted
        -------------------------------------------------------
        bash/645 is trying to acquire lock:
         (cgroup_mutex){+.+.+.}, at: [<ffffffff8110c5b7>] cgroup_lock+0x17/0x20
      
        but task is already holding lock:
         (cpu_hotplug.lock){+.+.+.}, at: [<ffffffff8109300f>] cpu_hotplug_begin+0x2f/0x60
      
        which lock already depends on the new lock.
      
        the existing dependency chain (in reverse order) is:
      
       -> #1 (cpu_hotplug.lock){+.+.+.}:
               lock_acquire+0x97/0x1e0
               mutex_lock_nested+0x61/0x3b0
               get_online_cpus+0x3c/0x60
               rebuild_sched_domains_locked+0x1b/0x70
               cpuset_write_resmask+0x298/0x2c0
               cgroup_file_write+0x1ef/0x300
               vfs_write+0xa8/0x160
               sys_write+0x52/0xa0
               system_call_fastpath+0x16/0x1b
      
       -> #0 (cgroup_mutex){+.+.+.}:
               __lock_acquire+0x14ce/0x1d20
               lock_acquire+0x97/0x1e0
               mutex_lock_nested+0x61/0x3b0
               cgroup_lock+0x17/0x20
               cpuset_handle_hotplug+0x1b/0x560
               cpuset_update_active_cpus+0xe/0x10
               cpuset_cpu_inactive+0x47/0x50
               notifier_call_chain+0x66/0x150
               __raw_notifier_call_chain+0xe/0x10
               __cpu_notify+0x20/0x40
               _cpu_down+0x7e/0x2f0
               cpu_down+0x36/0x50
               store_online+0x5d/0xe0
               dev_attr_store+0x18/0x30
               sysfs_write_file+0xe0/0x150
               vfs_write+0xa8/0x160
               sys_write+0x52/0xa0
               system_call_fastpath+0x16/0x1b
        other info that might help us debug this:
      
         Possible unsafe locking scenario:
      
               CPU0                    CPU1
               ----                    ----
          lock(cpu_hotplug.lock);
                                       lock(cgroup_mutex);
                                       lock(cpu_hotplug.lock);
          lock(cgroup_mutex);
      
         *** DEADLOCK ***
      
        5 locks held by bash/645:
         #0:  (&buffer->mutex){+.+.+.}, at: [<ffffffff8123bab8>] sysfs_write_file+0x48/0x150
         #1:  (s_active#42){.+.+.+}, at: [<ffffffff8123bb38>] sysfs_write_file+0xc8/0x150
         #2:  (x86_cpu_hotplug_driver_mutex){+.+...}, at: [<ffffffff81079277>] cpu_hotplug_driver_lock+0x1
      +7/0x20
         #3:  (cpu_add_remove_lock){+.+.+.}, at: [<ffffffff81093157>] cpu_maps_update_begin+0x17/0x20
         #4:  (cpu_hotplug.lock){+.+.+.}, at: [<ffffffff8109300f>] cpu_hotplug_begin+0x2f/0x60
      
        stack backtrace:
        Pid: 645, comm: bash Not tainted 3.7.0-rc4-work+ #42
        Call Trace:
         print_circular_bug+0x28e/0x29f
         __lock_acquire+0x14ce/0x1d20
         lock_acquire+0x97/0x1e0
         mutex_lock_nested+0x61/0x3b0
         cgroup_lock+0x17/0x20
         cpuset_handle_hotplug+0x1b/0x560
         cpuset_update_active_cpus+0xe/0x10
         cpuset_cpu_inactive+0x47/0x50
         notifier_call_chain+0x66/0x150
         __raw_notifier_call_chain+0xe/0x10
         __cpu_notify+0x20/0x40
         _cpu_down+0x7e/0x2f0
         cpu_down+0x36/0x50
         store_online+0x5d/0xe0
         dev_attr_store+0x18/0x30
         sysfs_write_file+0xe0/0x150
         vfs_write+0xa8/0x160
         sys_write+0x52/0xa0
         system_call_fastpath+0x16/0x1b
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-by: NFengguang Wu <fengguang.wu@intel.com>
      Acked-by: NMichal Hocko <mhocko@suse.cz>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      154b454e
    • J
      checkpatch: warn on uapi #includes that #include <uapi/... · 495e9d84
      Joe Perches 提交于
      Avoid specifying internal uapi #include paths with uapi/...  as
      userspace should not use and never see that.
      
      Neaten message line wrapping above.
      Signed-off-by: NJoe Perches <joe@perches.com>
      Acked-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NAndy Whitcroft <apw@canonical.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      495e9d84
    • A
      revert "rtc: recycle id when unloading a rtc driver" · 5abe257a
      Andrew Morton 提交于
      Revert commit 2830a6d2.
      
      We already perform the ida_simple_remove() in rtc_device_release(),
      which is an appropriate place.  Commit 2830a6d2 ("rtc: recycle id when
      unloading a rtc driver") caused the kernel to emit
      
      	ida_remove called for id=0 which is not allocated.
      
      warnings when rtc_device_release() tries to release an alread-released
      ID.
      
      Let's restore things to their previous state and then work out why
      Vincent's kernel wasn't calling rtc_device_release() - presumably a bug
      in a specific sub-driver.
      Reported-by: NLothar Waßmann <LW@KARO-electronics.de>
      Acked-by: NAlexander Holler <holler@ahsoftware.de>
      Cc: Vincent Palatin <vpalatin@chromium.org>
      Cc: <stable@vger.kernel.org>		[3.7.x]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5abe257a
    • J
      mm: clean up transparent hugepage sysfs error messages · 2c79737a
      Jeremy Eder 提交于
      Clarify error messages and correct a few typos in the transparent hugepage
      sysfs init code.
      Signed-off-by: NJeremy Eder <jeder@redhat.com>
      Acked-by: NRafael Aquini <aquini@redhat.com>
      Acked-by: NDavid Rientjes <rientjes@google.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2c79737a
    • V
      hfsplus: add error message for the case of failure of sync fs in delayed_sync_fs() method · bffdd661
      Vyacheslav Dubeyko 提交于
      Add an error message for the case of failure of sync fs in
      delayed_sync_fs() method.
      Signed-off-by: NVyacheslav Dubeyko <slava@dubeyko.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Hin-Tak Leung <htl10@users.sourceforge.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bffdd661
    • V
      hfsplus: rework processing of hfs_btree_write() returned error · 81cc7fad
      Vyacheslav Dubeyko 提交于
      Add to hfs_btree_write() a return of -EIO on failure of b-tree node
      searching.  Also add logic ofor processing errors from hfs_btree_write()
      in hfsplus_system_write_inode() with a message about b-tree writing
      failure.
      
      [akpm@linux-foundation.org: reduce scope of `err', print errno on error]
      Signed-off-by: NVyacheslav Dubeyko <slava@dubeyko.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Acked-by: NHin-Tak Leung <htl10@users.sourceforge.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      81cc7fad
    • V
      hfsplus: rework processing errors in hfsplus_free_extents() · 1b243fd3
      Vyacheslav Dubeyko 提交于
      Currently, it doesn't process error codes from the hfsplus_block_free()
      call in hfsplus_free_extents() method.  Add some error code processing.
      Signed-off-by: NVyacheslav Dubeyko <slava@dubeyko.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Hin-Tak Leung <htl10@users.sourceforge.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1b243fd3
    • A
      hfsplus: avoid crash on failed block map free · 5daa669c
      Alan Cox 提交于
      If the read fails we kmap an error code.  This doesn't end well.  Instead
      print a critical error and pray.  This mirrors the rest of the fs
      behaviour with critical error cases.
      Acked-by: NVyacheslav Dubeyko <slava@dubeyko.com>
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NVyacheslav Dubeyko <slava@dubeyko.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Jan Kara <jack@suse.cz>
      Acked-by: NHin-Tak Leung <htl10@users.sourceforge.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5daa669c
    • C
      kcmp: include linux/ptrace.h · 44fd07e9
      Cyrill Gorcunov 提交于
      This makes it compile on s390. After all the ptrace_may_access
      (which we use this file) is declared exactly in linux/ptrace.h.
      
      This is preparatory work to wire this syscall up on all archs.
      Signed-off-by: NCyrill Gorcunov <gorcunov@openvz.org>
      Signed-off-by: NAlexander Kartashov <alekskartashov@parallels.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      44fd07e9