From: Sergei Shtylyov <sergei.shtylyov@gmail.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
cassel@kernel.org, dlemoal@kernel.org, linux-ide@vger.kernel.org,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-ppc@kolla.no, vidra@ufal.mff.cuni.cz
Subject: Re: [PATCH v2] ata: pata_macio: Use WARN instead of BUG
Date: Thu, 22 Aug 2024 23:39:13 +0300 [thread overview]
Message-ID: <95c3cc5d-17e3-d19b-22f6-6a519f480143@gmail.com> (raw)
In-Reply-To: <20240822025952.GA32067@lst.de>
On 8/22/24 5:59 AM, Christoph Hellwig wrote:
[...]
>>> The overflow/underflow conditions in pata_macio_qc_prep() should never
>>> happen. But if they do there's no need to kill the system entirely, a
>>> WARN and failing the IO request should be sufficient and might allow the
>>> system to keep running.
>>
>> WARN*() can kill your system with panic_on_warn -- Android is particularly
>> fond of this kernel parameter but I guess it's not your case... :-)
>> Greg KH usually advices against using these macros. :-)
>
> And in this case he is simply totally wrong. The whole poing of WARN_ON
Greg does have a point: on billions of Linux systems (Android phones) that
all use panic_on_warn=1, WARN*() is pretty much equivalent to panic()... :-/
> is to have a standardized way to assert conditions.
Hm, makes me remember assert() in C aborts a program... :-)
MBR, Sergey
next prev parent reply other threads:[~2024-08-22 20:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-20 3:04 Michael Ellerman
2024-08-21 5:36 ` Damien Le Moal
2024-08-21 21:13 ` Sergei Shtylyov
2024-08-22 2:59 ` Christoph Hellwig
2024-08-22 20:39 ` Sergei Shtylyov [this message]
2024-08-27 6:11 ` Michael Ellerman
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=95c3cc5d-17e3-d19b-22f6-6a519f480143@gmail.com \
--to=sergei.shtylyov@gmail.com \
--cc=cassel@kernel.org \
--cc=dlemoal@kernel.org \
--cc=hch@lst.de \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-ppc@kolla.no \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=vidra@ufal.mff.cuni.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®