1. 24 Mar, 2023 3 commits
    • Herbert Xu's avatar
      crypto: hash - Fix kdoc errors about HASH_ALG_COMMON · 083a7e87
      Herbert Xu authored
      The HASH_ALG_COMMON macro cannot be parsed by kdoc so mark it as
      a normal comment instead of kdoc.  Also add HASH_ALG_COMMON as a
      structure member of shash_alg.
      
      Fixes: 0e4e6d7094df ("crypto: hash - Count error stats differently")
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      083a7e87
    • Randy Dunlap's avatar
      async_tx: fix kernel-doc notation warnings · 0dee6cd2
      Randy Dunlap authored
      Fix kernel-doc warnings by adding "struct" keyword or "enum" keyword.
      Also fix 2 function parameter descriptions.
      Change some functions and structs from kernel-doc /** notation
      to regular /* comment notation.
      
      async_pq.c:18: warning: cannot understand function prototype: 'struct page *pq_scribble_page; '
      async_pq.c:18: error: Cannot parse struct or union!
      async_pq.c:40: warning: No description found for return value of 'do_async_gen_syndrome'
      async_pq.c:109: warning: Function parameter or member 'blocks' not described in 'do_sync_gen_syndrome'
      async_pq.c:109: warning: Function parameter or member 'offsets' not described in 'do_sync_gen_syndrome'
      async_pq.c:109: warning: Function parameter or member 'disks' not described in 'do_sync_gen_syndrome'
      async_pq.c:109: warning: Function parameter or member 'len' not described in 'do_sync_gen_syndrome'
      async_pq.c:109: warning: Function parameter or member 'submit' not described in 'do_sync_gen_syndrome'
      
      async_tx.c:136: warning: cannot understand function prototype: 'enum submit_disposition '
      async_tx.c:264: warning: Function parameter or member 'tx' not described in 'async_tx_quiesce'
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: linux-crypto@vger.kernel.org
      Reviewed-by: default avatarDan Williams <dan.j.williams@intel.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      0dee6cd2
    • Toke Høiland-Jørgensen's avatar
      crypto: api - Demote BUG_ON() in crypto_unregister_alg() to a WARN_ON() · a543ada7
      Toke Høiland-Jørgensen authored
      The crypto_unregister_alg() function expects callers to ensure that any
      algorithm that is unregistered has a refcnt of exactly 1, and issues a
      BUG_ON() if this is not the case. However, there are in fact drivers that
      will call crypto_unregister_alg() without ensuring that the refcnt has been
      lowered first, most notably on system shutdown. This causes the BUG_ON() to
      trigger, which prevents a clean shutdown and hangs the system.
      
      To avoid such hangs on shutdown, demote the BUG_ON() in
      crypto_unregister_alg() to a WARN_ON() with early return. Cc stable because
      this problem was observed on a 6.2 kernel, cf the link below.
      
      Link: https://lore.kernel.org/r/87r0tyq8ph.fsf@toke.dk
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarToke Høiland-Jørgensen <toke@redhat.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      a543ada7
  2. 17 Mar, 2023 23 commits
  3. 14 Mar, 2023 14 commits