From: Jason Gunthorpe <jgg@ziepe.ca>
To: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, arnd@arndb.de
Subject: Re: [PATCH] IB/cma: use strlcpy() instead of strncpy()
Date: Mon, 15 Jan 2018 16:04:51 -0700 [thread overview]
Message-ID: <20180115230451.GA1867@ziepe.ca> (raw)
In-Reply-To: <1515743765-116090-1-git-send-email-wangxiongfeng2@huawei.com>
On Fri, Jan 12, 2018 at 03:56:05PM +0800, Xiongfeng Wang wrote:
> From: Xiongfeng Wang <xiongfeng.wang@linaro.org>
>
> gcc-8 reports
>
> drivers/infiniband/core/cma_configfs.c: In function 'make_cma_dev':
> ./include/linux/string.h:245:9: warning: '__builtin_strncpy' specified
> bound 64 equals destination size [-Wstringop-truncation]
>
> We need to use strlcpy() to make sure the string is nul-terminated.
>
> Signed-off-by: Xiongfeng Wang <xiongfeng.wang@linaro.org>
> Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
> drivers/infiniband/core/cma_configfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to rdma for-next, thanks
Jason
prev parent reply other threads:[~2018-01-15 23:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-12 7:56 [PATCH] IB/cma: use strlcpy() instead of strncpy() Xiongfeng Wang
2018-01-12 11:43 ` Leon Romanovsky
2018-01-15 23:04 ` Jason Gunthorpe [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=20180115230451.GA1867@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=wangxiongfeng2@huawei.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