Linux NFS development
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Benny Halevy <bhalevy@panasas.com>
Cc: NFS list <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH RFC] nfs: initialize timeout variable in nfs4_proc_setclientid_confirm
Date: Tue, 24 Jun 2008 14:50:59 -0400	[thread overview]
Message-ID: <1214333459.7156.39.camel@localhost> (raw)
In-Reply-To: <48612E25.8050405@panasas.com>

On Tue, 2008-06-24 at 20:25 +0300, Benny Halevy wrote:
> gcc (4.3.0) rightfully warns about this:
> /usr0/export/dev/bhalevy/git/linux-pnfs-bh-nfs41/fs/nfs/nfs4proc.c: I=
n function =E2=80=98nfs4_proc_setclientid_confirm=E2=80=99:
> /usr0/export/dev/bhalevy/git/linux-pnfs-bh-nfs41/fs/nfs/nfs4proc.c:29=
36: warning: =E2=80=98timeout=E2=80=99 may be used uninitialized in thi=
s function
>=20
> nfs4_delay that's passed a pointer to 'timeout' is looking at its val=
ue
> and sets it up to some value in the range: NFS4_POLL_RETRY_MIN..NFS4_=
POLL_RETRY_MAX
> 	if (*timeout <=3D 0)
> 		*timeout =3D NFS4_POLL_RETRY_MIN;
> 	if (*timeout > NFS4_POLL_RETRY_MAX)
> 		*timeout =3D NFS4_POLL_RETRY_MAX;
>=20
> Therefore it will end up set to some sane, though rather indeterminis=
tic, value.
>=20
> Signed-off-by: Benny Halevy <bhalevy@panasas.com>
> ---
>=20
> Trond, this patch merely initializes timeout to 0 which will
> result in it set eventually to NFS4_POLL_RETRY_MIN.
> Is this appropriate?

ACK. Since the existing will always return sane values, and nobody has
complained yet, I'll queue this up for 2.6.27 rather than pushing it as
a hotfix.

Thanks!
  Trond


      reply	other threads:[~2008-06-24 18:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-24 17:25 [PATCH RFC] nfs: initialize timeout variable in nfs4_proc_setclientid_confirm Benny Halevy
2008-06-24 18:50 ` Trond Myklebust [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=1214333459.7156.39.camel@localhost \
    --to=trond.myklebust@fys.uio.no \
    --cc=bhalevy@panasas.com \
    --cc=linux-nfs@vger.kernel.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