Linux-NFS Archive mirror
 help / color / mirror / Atom feed
From: Benjamin Coddington <bcodding@redhat.com>
To: Sergey Shtylyov <s.shtylyov@omp.ru>
Cc: Trond Myklebust <trond.myklebust@hammerspace.com>,
	Anna Schumaker <anna@kernel.org>,
	linux-nfs@vger.kernel.org
Subject: Re: [PATCH] nfs: fix undefined behavior in nfs_block_bits()
Date: Mon, 13 May 2024 07:16:51 -0400	[thread overview]
Message-ID: <DBAC970F-9FB0-4872-97F5-5CFE5B8A1191@redhat.com> (raw)
In-Reply-To: <69333a8c-a5a7-5c76-bc39-8835f11b8dcf@omp.ru>

On 10 May 2024, at 16:24, Sergey Shtylyov wrote:

> Shifting *signed int* typed constant 1 left by 31 bits causes undefined
> behavior. Specify the correct *unsigned long* type by using 1UL instead.
>
> Found by Linux Verification Center (linuxtesting.org) with the Svace static
> analysis tool.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>

Reviewed-by: Benjamin Coddington <bcodding@redhat.com>

Ben


      reply	other threads:[~2024-05-13 11:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-10 20:24 [PATCH] nfs: fix undefined behavior in nfs_block_bits() Sergey Shtylyov
2024-05-13 11:16 ` Benjamin Coddington [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=DBAC970F-9FB0-4872-97F5-5CFE5B8A1191@redhat.com \
    --to=bcodding@redhat.com \
    --cc=anna@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=s.shtylyov@omp.ru \
    --cc=trond.myklebust@hammerspace.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).