mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Boris Belyavtsev <bbelyavtsev@usergate.com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>, <hare@suse.com>
Cc: <linux-scsi@vger.kernel.org>,<linux-kernel@vger.kernel.org>,<lvc-project@linuxtesting.org>
Subject: Re: [PATCH 6.1 v2 0/3] aic79xx: Add some non-NULL checks
Date: Mon, 28 Apr 2025 11:32:44 +0700	[thread overview]
Message-ID: <D9HZOMWGZGA4.2IADJWTQC9M6W@usergate.com> (raw)
In-Reply-To: <c3fc938af6662c00b57e93f2cc7e48d62e6572df.camel@HansenPartnership.com>

On Mon Apr 21, 2025 at 7:12 PM +07, James Bottomley wrote:
> On Mon, 2025-04-21 at 15:16 +0700, Boris Belyavtsev wrote:
> > Add non-NULL checks for ahd_lookup_scb return value.
> >
> > scb could be NULL if faulty hardware return certain incorrect values
> > to the driver.
>
> It's a general principle that we trust values coming from the card ...
> you are, after all, trusting it with your data.  If there's a fault in
> the way the card is operating, we can work around that, so if you have
> a card which is producing these NULLs, can you provide details so we
> can investigate?
>
> Regards,
>
> James

Well, to be honest, I do not have such a device/card which would
represent the problem. These checks are more about defensive programming
(in case of an accident fault in a card for example).

I agree this checks could be excessive, especially in ahd_linux_queue_abort_cmd()
at aic_79xx_osm.c NULL value is unexpected.

What do you think about that?

Anyways it is up to maintainer if this checks could be valuable here or
not.

  reply	other threads:[~2025-04-28  4:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-21  8:16 Boris Belyavtsev
2025-04-21  8:16 ` [PATCH 6.1 v2 1/3] scsi: aic79xx: check for non-NULL scb in ahd_handle_seqint Boris Belyavtsev
2025-04-21  8:16 ` [PATCH 6.1 v2 2/3] scsi: aic79xx: check for non-NULL scb in ahd_handle_pkt_busfree Boris Belyavtsev
2025-04-21  8:16 ` [PATCH 6.1 v2 3/3] scsi: aic79xx: check for non-NULL scb in ahd_linux_queue_abort_cmd Boris Belyavtsev
2025-04-21 12:12 ` [PATCH 6.1 v2 0/3] aic79xx: Add some non-NULL checks James Bottomley
2025-04-28  4:32   ` Boris Belyavtsev [this message]
2025-04-28 12:07     ` James Bottomley

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=D9HZOMWGZGA4.2IADJWTQC9M6W@usergate.com \
    --to=bbelyavtsev@usergate.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=hare@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=lvc-project@linuxtesting.org \
    /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®