1. 16 3月, 2013 4 次提交
  2. 15 3月, 2013 6 次提交
    • A
      mfd: twl4030-madc: Remove __exit_p annotation · 03715410
      Arnd Bergmann 提交于
      4740f73f "mfd: remove use of __devexit" removed the __devexit annotation
      on the twl4030_madc_remove function, but left an __exit_p() present on the
      pointer to this function. Using __exit_p was as wrong with the devexit in
      place as it is now, but now we get a gcc warning about an unused function.
      
      In order for the twl4030_madc_remove to work correctly in built-in code, we
      have to remove the __exit_p.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      03715410
    • M
      mm/fremap.c: fix possible oops on error path · a2362d24
      Michel Lespinasse 提交于
      The vm_flags introduced in 6d7825b1 ("mm/fremap.c: fix oops on error
      path") is supposed to avoid a compiler warning about unitialized
      vm_flags without changing the generated code.
      
      However I am concerned that this is going to be very brittle, and fail
      with some compiler versions. The failure could be either of:
      
      - compiler could actually load vma->vm_flags before checking for the
        !vma condition, thus reintroducing the oops
      
      - compiler could optimize out the !vma check, since the pointer just got
        dereferenced shortly before (so the compiler knows it can't be NULL!)
      
      I propose reversing this part of the change and initializing vm_flags to 0
      just to avoid the bogus uninitialized use warning.
      Signed-off-by: NMichel Lespinasse <walken@google.com>
      Cc: Tommi Rantala <tt.rantala@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a2362d24
    • L
      Merge branch 'rcu/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu · f4846e52
      Linus Torvalds 提交于
      Pull fix for hlist_entry_safe() regression from Paul McKenney:
       "This contains a single commit that fixes a regression in
        hlist_entry_safe().  This macro references its argument twice, which
        can cause NULL-pointer errors.  This commit applies a gcc statement
        expression, creating a temporary variable to avoid the double
        reference.  This has been posted to LKML at
      
          https://lkml.org/lkml/2013/3/9/75.
      
        Kudos to CAI Qian, whose testing uncovered this, to Eric Dumazet, who
        spotted root cause, and to Li Zefan, who tested this commit."
      
      * 'rcu/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu:
        list: Fix double fetch of pointer in hlist_entry_safe()
      f4846e52
    • P
      list: Fix double fetch of pointer in hlist_entry_safe() · f65846a1
      Paul E. McKenney 提交于
      The current version of hlist_entry_safe() fetches the pointer twice,
      once to test for NULL and the other to compute the offset back to the
      enclosing structure.  This is OK for normal lock-based use because in
      that case, the pointer cannot change.  However, when the pointer is
      protected by RCU (as in "rcu_dereference(p)"), then the pointer can
      change at any time.  This use case can result in the following sequence
      of events:
      
      1.	CPU 0 invokes hlist_entry_safe(), fetches the RCU-protected
      	pointer as sees that it is non-NULL.
      
      2.	CPU 1 invokes hlist_del_rcu(), deleting the entry that CPU 0
      	just fetched a pointer to.  Because this is the last entry
      	in the list, the pointer fetched by CPU 0 is now NULL.
      
      3.	CPU 0 refetches the pointer, obtains NULL, and then gets a
      	NULL-pointer crash.
      
      This commit therefore applies gcc's "({ })" statement expression to
      create a temporary variable so that the specified pointer is fetched
      only once, avoiding the above sequence of events.  Please note that
      it is the caller's responsibility to use rcu_dereference() as needed.
      This allows RCU-protected uses to work correctly without imposing
      any additional overhead on the non-RCU case.
      
      Many thanks to Eric Dumazet for spotting root cause!
      Reported-by: NCAI Qian <caiqian@redhat.com>
      Reported-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Tested-by: NLi Zefan <lizefan@huawei.com>
      f65846a1
    • L
      Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · 40e4591d
      Linus Torvalds 提交于
      Pull ext2, ext3, reiserfs, quota fixes from Jan Kara:
       "A fix for regression in ext2, and a format string issue in ext3.  The
        rest isn't too serious."
      
      * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        ext2: Fix BUG_ON in evict() on inode deletion
        reiserfs: Use kstrdup instead of kmalloc/strcpy
        ext3: Fix format string issues
        quota: add missing use of dq_data_lock in __dquot_initialize
      40e4591d
    • G
      hwmon: (pmbus/ltc2978) Fix temperature reporting · 8c958c70
      Guenter Roeck 提交于
      On LTC2978, only READ_TEMPERATURE is supported. It reports
      the internal junction temperature. This register is unpaged.
      
      On LTC3880, READ_TEMPERATURE and READ_TEMPERATURE2 are supported.
      READ_TEMPERATURE is paged and reports external temperatures.
      READ_TEMPERATURE2 is unpaged and reports the internal junction
      temperature.
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Cc: stable@vger.kernel.org # 3.2+
      Acked-by: NJean Delvare <khali@linux-fr.org>
      8c958c70
  3. 14 3月, 2013 28 次提交
  4. 13 3月, 2013 2 次提交