public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Willem Riede <wriede@home.com>
To: Junfeng Yang <yjf@Stanford.EDU>
Cc: Dawson Engler <engler@csl.stanford.edu>,
	linux-kernel@vger.kernel.org, mc@CS.Stanford.EDU
Subject: Re: [CHECKER] null bugs in 2.4.4 and 2.4.4-ac8
Date: Thu, 24 May 2001 20:00:58 -0400	[thread overview]
Message-ID: <3B0DA0BA.5895592F@home.com> (raw)
In-Reply-To: <Pine.GSO.4.31.0105241532450.11846-100000@elaine24.Stanford.EDU>

Junfeng Yang wrote:
> 
> On Thu, 24 May 2001, Willem Riede wrote:
> 
> > Dawson Engler wrote:
> > >
> > > Hi All,
> > >
> > > Enclosed are 103 potential errors where code gets a pointer from a
> > > possibly-failing routine (kmalloc, etc) and dereferences it without
> > >
> > > [BUG] osst_do_scsi will never return NULL if argument SRpnt isn't NULL. But they copy SRpnt back by *aSRpnt, implies it could be NULL
> >
> > No. It implies SRpnt could have changed. The functions flagged
> > (osst_read_back_buffer_and_rewrite and osst_reposition_and_retry)
> > cannot be reached with SRpnt == NULL. So these are false alarms.
> 
> these are false positives if osst_read_back_buffer_and rewrite can't be
> reached with SRpnt == NULL. It seems that osst_do_scsi will not change
> SRpnt unless it is NULL though.

That is currently true, and the re-assignment of SRpnt is superfluous but
harmless. It is not a design constraint though that SRpnt cannot change
(except it can't change to NULL), so I prefer to leave the code as is.

>                                 In other words, SRpnt is changed by
> osst_do_scsi <=> the initial argument SRpnt == NULL. Probabaly the pointer
> aSRpnt is useless.
> 
The pointer aSRpnt is not useless, it's used to communicate the current
value of SRpnt throughout the driver.

Regards, Willem Riede.

  reply	other threads:[~2001-05-25  0:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-24 21:09 [CHECKER] null bugs in 2.4.4 and 2.4.4-ac8 Dawson Engler
2001-05-24 22:06 ` Willem Riede
2001-05-24 22:38   ` Junfeng Yang
2001-05-25  0:00     ` Willem Riede [this message]
2001-05-24 22:26 ` Anton Altaparmakov

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=3B0DA0BA.5895592F@home.com \
    --to=wriede@home.com \
    --cc=engler@csl.stanford.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mc@CS.Stanford.EDU \
    --cc=yjf@Stanford.EDU \
    /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