mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: Race condition in kobject_get_path()
       [not found] <abc55eae-1e78-4389-e60c-db984ad8ed50@quicinc.com>
@ 2022-03-30  9:22 ` Greg KH
  2022-03-30  9:24   ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Greg KH @ 2022-03-30  9:22 UTC (permalink / raw)
  To: Mukesh Ojha; +Cc: Rafael J. Wysocki, linux-kernel

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

What drivers are doing this so we can see the code?  This should be
happening in order and not at the same time.

> 
> Can we get your suggestion here ? is this case of a race here ?
> 
> 
> p1 p2
> 
> *kobject_get_path* <https://opengrok.qualcomm.com/source/s?refs=kobject_get_path&project=KERNEL.PLATFORM.1.0>
> 
> 
>                             =>  get_kobj_path_length  (length is calculated
> from this path)
>                                dev_set_name(same dev name)
>                                  => fill_kobj_path  (path is copied here)

I do not understand this trace, sorry.  What code are you referring to?

confused,

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Race condition in kobject_get_path()
  2022-03-30  9:22 ` Race condition in kobject_get_path() Greg KH
@ 2022-03-30  9:24   ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2022-03-30  9:24 UTC (permalink / raw)
  To: Mukesh Ojha; +Cc: Rafael J. Wysocki, linux-kernel

On Wed, Mar 30, 2022 at 11:22:59AM +0200, Greg KH wrote:
> On Wed, Mar 30, 2022 at 02:47:20PM +0530, Mukesh Ojha wrote:
> > Hi All,
> > 
> > We are facing one issue where one driver is trying to register its device
> > from driver probe
> > and from another path  dev_set_name() done from driver probe of the added
> > device whose
> > length can be more than earlier which could result in redzone overwritten
> > issue.
> 
> What drivers are doing this so we can see the code?  This should be
> happening in order and not at the same time.
> 
> > 
> > Can we get your suggestion here ? is this case of a race here ?
> > 
> > 
> > p1 p2
> > 
> > *kobject_get_path* <https://opengrok.qualcomm.com/source/s?refs=kobject_get_path&project=KERNEL.PLATFORM.1.0>
> > 
> > 
> >                             =>  get_kobj_path_length  (length is calculated
> > from this path)
> >                                dev_set_name(same dev name)
> >                                  => fill_kobj_path  (path is copied here)
> 
> I do not understand this trace, sorry.  What code are you referring to?

Also, the above link does not work for me :(

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-30  9:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <abc55eae-1e78-4389-e60c-db984ad8ed50@quicinc.com>
2022-03-30  9:22 ` Race condition in kobject_get_path() Greg KH
2022-03-30  9:24   ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®