From: Jens Axboe <axboe@kernel.dk>
To: Stephen Kitt <steve@sk2.org>,
Philipp Reisner <philipp.reisner@linbit.com>,
Lars Ellenberg <lars.ellenberg@linbit.com>,
drbd-dev@lists.linbit.com
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drbd fifo_alloc: use struct_size
Date: Wed, 29 Jan 2020 21:04:09 -0700 [thread overview]
Message-ID: <a74b5267-5eb5-a050-75ea-e108a5115805@kernel.dk> (raw)
In-Reply-To: <20200124200307.1808593-1-steve@sk2.org>
On 1/24/20 1:03 PM, Stephen Kitt wrote:
> Switching to struct_size for the allocation in fifo_alloc avoids
> hard-coding the type of fifo_buffer.values in fifo_alloc. It also
> provides overflow protection; to avoid pessimistic code being
> generated by the compiler as a result, this patch also switches
> fifo_size to unsigned, propagating the change as appropriate.
Applied, thanks.
--
Jens Axboe
prev parent reply other threads:[~2020-01-30 4:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-24 20:03 [PATCH] drbd fifo_alloc: use struct_size Stephen Kitt
2020-01-24 21:12 ` Gustavo A. R. Silva
2020-01-30 4:04 ` 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=a74b5267-5eb5-a050-75ea-e108a5115805@kernel.dk \
--to=axboe@kernel.dk \
--cc=drbd-dev@lists.linbit.com \
--cc=lars.ellenberg@linbit.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=philipp.reisner@linbit.com \
--cc=steve@sk2.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