1. 05 6月, 2019 1 次提交
  2. 25 4月, 2019 1 次提交
    • E
      crypto: shash - remove shash_desc::flags · 877b5691
      Eric Biggers 提交于
      The flags field in 'struct shash_desc' never actually does anything.
      The only ostensibly supported flag is CRYPTO_TFM_REQ_MAY_SLEEP.
      However, no shash algorithm ever sleeps, making this flag a no-op.
      
      With this being the case, inevitably some users who can't sleep wrongly
      pass MAY_SLEEP.  These would all need to be fixed if any shash algorithm
      actually started sleeping.  For example, the shash_ahash_*() functions,
      which wrap a shash algorithm with the ahash API, pass through MAY_SLEEP
      from the ahash API to the shash API.  However, the shash functions are
      called under kmap_atomic(), so actually they're assumed to never sleep.
      
      Even if it turns out that some users do need preemption points while
      hashing large buffers, we could easily provide a helper function
      crypto_shash_update_large() which divides the data into smaller chunks
      and calls crypto_shash_update() and cond_resched() for each chunk.  It's
      not necessary to have a flag in 'struct shash_desc', nor is it necessary
      to make individual shash algorithms aware of this at all.
      
      Therefore, remove shash_desc::flags, and document that the
      crypto_shash_*() functions can be called from any context.
      Signed-off-by: NEric Biggers <ebiggers@google.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      877b5691
  3. 30 10月, 2017 1 次提交
  4. 13 4月, 2017 1 次提交
  5. 14 1月, 2017 1 次提交
    • P
      locking/atomic, kref: Add kref_read() · 2c935bc5
      Peter Zijlstra 提交于
      Since we need to change the implementation, stop exposing internals.
      
      Provide kref_read() to read the current reference count; typically
      used for debug messages.
      
      Kills two anti-patterns:
      
      	atomic_read(&kref->refcount)
      	kref->refcount.counter
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      2c935bc5
  6. 11 8月, 2015 1 次提交
  7. 30 7月, 2015 2 次提交
  8. 11 11月, 2014 1 次提交
    • J
      Bluetooth: Fix sparse warning in amp.c · 252670c4
      Johan Hedberg 提交于
      This fixes the following sparse warning:
      
      net/bluetooth/amp.c:152:53: warning: Variable length array is used.
      
      The warning itself is probably harmless since this kind of usage of
      shash_desc is present also in other places in the kernel (there's even a
      convenience macro SHASH_DESC_ON_STACK available for defining such stack
      variables). However, dynamically allocated versions are also used in
      several places of the kernel (e.g. kernel/kexec.c and lib/digsig.c)
      which have the benefit of not exhibiting the sparse warning.
      
      Since there are no more sparse warnings in the Bluetooth subsystem after
      fixing this one it is now easier to spot whenever new ones might get
      introduced by future patches.
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      252670c4
  9. 09 9月, 2014 1 次提交
  10. 21 7月, 2014 1 次提交
  11. 16 7月, 2014 1 次提交
    • J
      Bluetooth: Add a role parameter to hci_conn_add() · a5c4e309
      Johan Hedberg 提交于
      We need to be able to track slave vs master LE connections in
      hci_conn_hash, and to be able to do that we need to know the role of the
      connection by the time hci_conn_add_has() is called. This means in
      practice the hci_conn_add() call that creates the hci_conn_object.
      
      This patch adds a new role parameter to hci_conn_add() function to give
      the object its initial role value, and updates the callers to pass the
      appropriate role to it. Since the function now takes care of
      initializing both conn->role and conn->out values we can remove some
      other unnecessary assignments.
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      a5c4e309
  12. 13 10月, 2013 1 次提交
  13. 11 10月, 2013 2 次提交
  14. 10 1月, 2013 3 次提交
  15. 21 11月, 2012 1 次提交
  16. 20 11月, 2012 2 次提交
  17. 02 11月, 2012 5 次提交
  18. 18 10月, 2012 1 次提交
  19. 08 10月, 2012 3 次提交
  20. 28 9月, 2012 10 次提交