archive mirror
 help / color / mirror / Atom feed
From: Dan Williams <>
To: Rayagonda Kokatanur <>
Cc: Herbert Xu <>,
	"David S . Miller" <>,
	Allison Randal <>,
	Kate Stewart <>,
	Thomas Gleixner <>,
	Greg Kroah-Hartman <>,
	linux-crypto <>,
	Linux Kernel Mailing List <>
Subject: Re: [PATCH v1 1/2] async_tx: return error instead of BUG_ON
Date: Tue, 17 Mar 2020 10:34:48 -0700	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Mon, Mar 16, 2020 at 11:16 PM Rayagonda Kokatanur
<> wrote:
> Return error upon failure instead of using BUG_ON().
> BUG_ON() will crash the kernel.
> Signed-off-by: Rayagonda Kokatanur <>

I don't think this patch is worth it, it has 2 problems:

- These conversions are buggy. Upper layers assume that the calls will
fall back to synchronous operation internally if they return NULL.

- These assertions indicate a major programming error that should not
be silently ignored. They need to be WARN_ON_ONCE() at a minimum, but
only if the above issue is solved.

These assertions are validating the raid implementation in raid5.c
which has been correctly handling this path for several years. The
risk of the code reorganization to "fix" this is higher than the
benefit given zero reports of these actually triggering in production.

  reply	other threads:[~2020-03-17 17:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-17  6:15 [PATCH v1 0/2] Remove BUG_ON() and fix -ve array indexing Rayagonda Kokatanur
2020-03-17  6:15 ` [PATCH v1 1/2] async_tx: return error instead of BUG_ON Rayagonda Kokatanur
2020-03-17 17:34   ` Dan Williams [this message]
2020-03-17  6:15 ` [PATCH v1 2/2] async_tx: fix possible negative array indexing Rayagonda Kokatanur
2020-03-17 17:36   ` Dan Williams
2020-03-18  7:17     ` Rayagonda Kokatanur
2020-03-18 15:53       ` Dan Williams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='' \ \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH v1 1/2] async_tx: return error instead of BUG_ON' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).