From: Daniil Stas <daniil.stas@posteo.net>
To: Guenter Roeck <linux@roeck-us.net>
Cc: linux-hwmon@vger.kernel.org, Chris Healy <cphealy@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Bart Van Assche <bvanassche@acm.org>,
linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
linux-ide@vger.kernel.org
Subject: Re: [PATCH] hwmon: drivetemp: Fix driver producing garbage data when SCSI errors occur
Date: Mon, 6 Jan 2025 18:42:54 +0000 [thread overview]
Message-ID: <20250106204254.28b79000@pc> (raw)
In-Reply-To: <89d05805-74e4-4cf4-97e3-4d25314be013@roeck-us.net>
On Mon, 6 Jan 2025 08:43:54 -0800
Guenter Roeck <linux@roeck-us.net> wrote:
> On Sun, Jan 05, 2025 at 09:36:18PM +0000, Daniil Stas wrote:
> > scsi_execute_cmd() function can return both negative (linux codes)
> > and positive (scsi_cmnd result field) error codes.
> >
> > Currently the driver just passes error codes of scsi_execute_cmd()
> > to hwmon core, which is incorrect because hwmon only checks for
> > negative error codes. This leads to hwmon reporting uninitialized
> > data to userspace in case of SCSI errors (for example if the disk
> > drive was disconnected).
> >
> > This patch checks scsi_execute_cmd() output and returns -EIO if it's
> > error code is positive.
> >
>
> Applied.
>
> Thanks,
> Guenter
Thanks!
prev parent reply other threads:[~2025-01-06 18:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-05 21:36 [PATCH] hwmon: drivetemp: Fix driver producing garbage data when SCSI errors occur Daniil Stas
2025-01-05 22:37 ` Guenter Roeck
2025-01-06 16:43 ` Guenter Roeck
2025-01-06 18:42 ` Daniil Stas [this message]
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=20250106204254.28b79000@pc \
--to=daniil.stas@posteo.net \
--cc=bvanassche@acm.org \
--cc=cphealy@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=martin.petersen@oracle.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.