1. 25 9月, 2019 6 次提交
  2. 21 9月, 2019 1 次提交
  3. 16 9月, 2019 1 次提交
    • R
      lib/zstd/mem.h: replace __inline by inline · 4bd92428
      Rasmus Villemoes 提交于
      Currently, compiler_types.h #defines __inline as inline (and further
      #defines inline to automatically attach some attributes), so this does
      not change functionality. It serves as preparation for removing the
      #define of __inline.
      
      While at it, also remove the __attribute__((unused)) - it's already
      included in the definition of the inline macro, and "open-coded"
      __attribute__(()) should be avoided.
      
      Since commit a95b37e2 (kbuild: get <linux/compiler_types.h> out of
      <linux/kconfig.h>), compiler_types.h is automatically included by all
      kernel C code - i.e., the definition of inline including the unused
      attribute is guaranteed to be in effect whenever ZSTD_STATIC is
      expanded.
      Signed-off-by: NRasmus Villemoes <linux@rasmusvillemoes.dk>
      Signed-off-by: NMiguel Ojeda <miguel.ojeda.sandonis@gmail.com>
      4bd92428
  4. 12 9月, 2019 1 次提交
  5. 11 9月, 2019 1 次提交
  6. 05 9月, 2019 2 次提交
  7. 04 9月, 2019 1 次提交
  8. 31 8月, 2019 1 次提交
    • L
      Partially revert "kfifo: fix kfifo_alloc() and kfifo_init()" · ab9bb631
      Linus Torvalds 提交于
      Commit dfe2a77f ("kfifo: fix kfifo_alloc() and kfifo_init()") made
      the kfifo code round the number of elements up.  That was good for
      __kfifo_alloc(), but it's actually wrong for __kfifo_init().
      
      The difference? __kfifo_alloc() will allocate the rounded-up number of
      elements, but __kfifo_init() uses an allocation done by the caller.  We
      can't just say "use more elements than the caller allocated", and have
      to round down.
      
      The good news? All the normal cases will be using power-of-two arrays
      anyway, and most users of kfifo's don't use kfifo_init() at all, but one
      of the helper macros to declare a KFIFO that enforce the proper
      power-of-two behavior.  But it looks like at least ibmvscsis might be
      affected.
      
      The bad news? Will Deacon refers to an old thread and points points out
      that the memory ordering in kfifo's is questionable.  See
      
        https://lore.kernel.org/lkml/20181211034032.32338-1-yuleixzhang@tencent.com/
      
      for more.
      
      Fixes: dfe2a77f ("kfifo: fix kfifo_alloc() and kfifo_init()")
      Reported-by: Nlaokz <laokz@foxmail.com>
      Cc: Stefani Seibold <stefani@seibold.net>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Dan Carpenter <dan.carpenter@oracle.com>
      Cc: Greg KH <greg@kroah.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Will Deacon <will@kernel.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ab9bb631
  9. 30 8月, 2019 1 次提交
  10. 22 8月, 2019 7 次提交
  11. 20 8月, 2019 2 次提交
  12. 19 8月, 2019 1 次提交
  13. 15 8月, 2019 3 次提交
  14. 14 8月, 2019 1 次提交
    • M
      lib: Remove redundant ftrace flag removal · 41b57d1b
      Mark Rutland 提交于
      Since architectures can implement ftrace using a variety of mechanisms,
      generic code should always use CC_FLAGS_FTRACE rather than assuming that
      ftrace is built using -pg.
      
      Since commit:
      
        2464a609 ("ftrace: do not trace library functions")
      
      ... lib/Makefile has removed CC_FLAGS_FTRACE from KBUILD_CFLAGS, so ftrace is
      disabled for all files under lib/.
      
      Given that, we shouldn't explicitly remove -pg when building
      lib/string.o, as this is redundant and bad form.
      
      Clean things up accordingly.
      
      There should be no functional change as a result of this patch.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Coly Li <colyli@suse.de>
      Cc: Gary R Hook <gary.hook@amd.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Kent Overstreet <kent.overstreet@gmail.com>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Link: https://lkml.kernel.org/r/20190806162539.51918-1-mark.rutland@arm.com
      41b57d1b
  15. 13 8月, 2019 3 次提交
    • J
      lib: logic_pio: Add logic_pio_unregister_range() · b884e2de
      John Garry 提交于
      Add a function to unregister a logical PIO range.
      
      Logical PIO space can still be leaked when unregistering certain
      LOGIC_PIO_CPU_MMIO regions, but this acceptable for now since there are no
      callers to unregister LOGIC_PIO_CPU_MMIO regions, and the logical PIO
      region allocation scheme would need significant work to improve this.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NJohn Garry <john.garry@huawei.com>
      Signed-off-by: NWei Xu <xuwei5@hisilicon.com>
      b884e2de
    • J
      lib: logic_pio: Avoid possible overlap for unregistering regions · 0a27142b
      John Garry 提交于
      The code was originally written to not support unregistering logical PIO
      regions.
      
      To accommodate supporting unregistering logical PIO regions, subtly modify
      LOGIC_PIO_CPU_MMIO region registration code, such that the "end" of the
      registered regions is the "end" of the last region, and not the sum of
      the sizes of all the registered regions.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NJohn Garry <john.garry@huawei.com>
      Signed-off-by: NWei Xu <xuwei5@hisilicon.com>
      0a27142b
    • J
      lib: logic_pio: Fix RCU usage · 06709e81
      John Garry 提交于
      The traversing of io_range_list with list_for_each_entry_rcu()
      is not properly protected by rcu_read_lock() and rcu_read_unlock(),
      so add them.
      
      These functions mark the critical section scope where the list is
      protected for the reader, it cannot be  "reclaimed". Any updater - in
      this case, the logical PIO registration functions - cannot update the
      list until the reader exits this critical section.
      
      In addition, the list traversing used in logic_pio_register_range()
      does not need to use the rcu variant.
      
      This is because we are already using io_range_mutex to guarantee mutual
      exclusion from mutating the list.
      
      Cc: stable@vger.kernel.org
      Fixes: 031e3601 ("lib: Add generic PIO mapping method")
      Signed-off-by: NJohn Garry <john.garry@huawei.com>
      Signed-off-by: NWei Xu <xuwei5@hisilicon.com>
      06709e81
  16. 09 8月, 2019 1 次提交
  17. 08 8月, 2019 1 次提交
  18. 03 8月, 2019 3 次提交
  19. 31 7月, 2019 3 次提交