All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: Tom Rix <trix@redhat.com>,
	tim@cyberelk.net, nathan@kernel.org, ndesaulniers@google.com,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	llvm@lists.linux.dev
Subject: Re: [PATCH v2] paride/pcd: return earlier when an error happens in pcd_atapi()
Date: Sun, 22 Jan 2023 15:27:53 -0700	[thread overview]
Message-ID: <1ce4f09a-f4c3-ccd5-556e-3eb3aaa143f1@kernel.dk> (raw)
In-Reply-To: <Y820PCtcJv12fJpI@ZenIV>

On 1/22/23 3:10 PM, Al Viro wrote:
> On Sun, Jan 22, 2023 at 01:49:00PM -0700, Jens Axboe wrote:
>> On 1/22/23 8:49 AM, Tom Rix wrote:
>>> clang static analysis reports
>>> drivers/block/paride/pcd.c:856:36: warning: The left operand of '&'
>>>   is a garbage value [core.UndefinedBinaryOperatorResult]
>>>   tocentry->cdte_ctrl = buffer[5] & 0xf;
>>>                         ~~~~~~~~~ ^
>>
>> Has this one been compiled? I'm guessing not tested...
>>
>> In any case, this code is going away hopefully shortly, so let's not
>> bother with changes like this.
> 
> 	Look at the callers - the value left in entry is discarded if
> ->audio_ioctl(..., CDROMREADTOCENTRY, &entry) returns non-zero.  Sure,
> it's a nasal daemon territory, but realistically it's not going to be
> caught by testing.

I don't expect anyone really to be able to test it, but v1 had a pretty
basic issue that would've surely triggered a compiler warning had it
been compiled.

-- 
Jens Axboe



      reply	other threads:[~2023-01-22 22:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-22 15:49 [PATCH v2] paride/pcd: return earlier when an error happens in pcd_atapi() Tom Rix
2023-01-22 20:49 ` Jens Axboe
2023-01-22 21:57   ` Tom Rix
2023-01-22 22:10   ` Al Viro
2023-01-22 22:27     ` Jens Axboe [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=1ce4f09a-f4c3-ccd5-556e-3eb3aaa143f1@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=tim@cyberelk.net \
    --cc=trix@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    /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.