All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Saud Farooqui <farooqui_saud@hotmail.com>
Cc: bjorn.andersson@linaro.org, linux-remoteproc@vger.kernel.org,
	linux-kernel@vger.kernel.org, lkp@intel.com
Subject: Re: [PATCH v1] rpmsg: strcpy is not safe, use strscpy_pad() instead
Date: Fri, 24 Jun 2022 11:38:10 -0600	[thread overview]
Message-ID: <20220624173810.GD1736477@p14s> (raw)
In-Reply-To: <PA4P189MB14210AA95DCA3715AFA7F4A68BB59@PA4P189MB1421.EURP189.PROD.OUTLOOK.COM>

On Thu, Jun 23, 2022 at 02:20:47PM +0500, Saud Farooqui wrote:
> Replace strcpy() with strscpy_pad() for copying the rpmsg
> device name in rpmsg_register_device_override().
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Saud Farooqui <farooqui_saud@hotmail.com>
> ---
>  drivers/rpmsg/rpmsg_core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/rpmsg/rpmsg_core.c b/drivers/rpmsg/rpmsg_core.c
> index 290c1f02da10..a4bad4b00414 100644
> --- a/drivers/rpmsg/rpmsg_core.c
> +++ b/drivers/rpmsg/rpmsg_core.c
> @@ -604,7 +604,7 @@ int rpmsg_register_device_override(struct rpmsg_device *rpdev,
>  	int ret;
>  
>  	if (driver_override)
> -		strcpy(rpdev->id.name, driver_override);
> +		strscpy_pad(rpdev->id.name, driver_override, RPMSG_NAME_SIZE);

Applied.

Thanks,
Mathieu

>  
>  	dev_set_name(dev, "%s.%s.%d.%d", dev_name(dev->parent),
>  		     rpdev->id.name, rpdev->src, rpdev->dst);
> -- 
> 2.25.1
> 

      reply	other threads:[~2022-06-24 17:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-08 18:43 [PATCH] rpmsg: strcpy is not safe, use strncpy Saud Farooqui
2022-06-09 21:08 ` kernel test robot
2022-06-22 17:46 ` Mathieu Poirier
2022-06-23  9:20   ` [PATCH v1] rpmsg: strcpy is not safe, use strscpy_pad() instead Saud Farooqui
2022-06-24 17:38     ` Mathieu Poirier [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=20220624173810.GD1736477@p14s \
    --to=mathieu.poirier@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=farooqui_saud@hotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=lkp@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.