linux-remoteproc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Mukesh Ojha <quic_mojha@quicinc.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	linux-remoteproc@vger.kernel.org
Subject: Re: Possible case of Race in kobject_get_path()
Date: Wed, 30 Mar 2022 12:16:54 +0200	[thread overview]
Message-ID: <YkQuFohIp2jSLCcz@kroah.com> (raw)
In-Reply-To: <0410ceda-cbdd-43a9-7d9b-4079bcdb6237@quicinc.com>

On Wed, Mar 30, 2022 at 03:41:04PM +0530, Mukesh Ojha wrote:
> Hi All,
> 
> We are facing one issue where one driver (p1) is trying to register its
> device from driver probe
> and from another path (p2) dev_set_name(new name) done from driver probe of
> the added device whose
> new name length can be more than earlier done in (p1 path) which could
> result in redzone overwritten issue.

I do not understand, what specific driver is doing this so that we can
see an example of this problem?

> Can we get your suggestion here ? is this case of a race here ?
> 
>             p1                                                   p2
> 
>  device_register()
>     kobject_get_path()
>             =>  get_kobj_path_length
>             (length is calculated from this path)
> 
>                                                  dev_set_name()
> 
>             => fill_kobj_path
>               (path is copied here)
> 

I can not understand this example, any specific code you can point me
at?

thanks,

greg k-h

      reply	other threads:[~2022-03-30 10:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-30 10:11 Possible case of Race in kobject_get_path() Mukesh Ojha
2022-03-30 10:16 ` Greg KH [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=YkQuFohIp2jSLCcz@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=quic_mojha@quicinc.com \
    --cc=rafael@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;
as well as URLs for NNTP newsgroup(s).