mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Isaac J. Manjarres" <isaacmanjarres@google.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Tomeu Vizoso <tomeu.vizoso@collabora.com>,
	Russell King <rmk+kernel@arm.linux.org.uk>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	stable@vger.kernel.org, Saravana Kannan <saravanak@google.com>,
	Guenter Roeck <linux@roeck-us.net>,
	Linus Walleij <linus.walleij@linaro.org>,
	kernel-team@android.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH stable-4.19/4.14/4.9] driver core: Don't probe devices after bus_type.match() probe deferral
Date: Thu, 8 Sep 2022 13:54:29 +0200	[thread overview]
Message-ID: <YxnX9TsxuSi9L9GD@kroah.com> (raw)
In-Reply-To: <20220906172933.410698-1-isaacmanjarres@google.com>

On Tue, Sep 06, 2022 at 10:29:33AM -0700, Isaac J. Manjarres wrote:
> commit 25e9fbf0fd38868a429feabc38abebfc6dbf6542 upstream.
> 
> Both __device_attach_driver() and __driver_attach() check the return
> code of the bus_type.match() function to see if the device needs to be
> added to the deferred probe list. After adding the device to the list,
> the logic attempts to bind the device to the driver anyway, as if the
> device had matched with the driver, which is not correct.
> 
> If __device_attach_driver() detects that the device in question is not
> ready to match with a driver on the bus, then it doesn't make sense for
> the device to attempt to bind with the current driver or continue
> attempting to match with any of the other drivers on the bus. So, update
> the logic in __device_attach_driver() to reflect this.
> 
> If __driver_attach() detects that a driver tried to match with a device
> that is not ready to match yet, then the driver should not attempt to bind
> with the device. However, the driver can still attempt to match and bind
> with other devices on the bus, as drivers can be bound to multiple
> devices. So, update the logic in __driver_attach() to reflect this.
> 
> Fixes: 656b8035b0ee ("ARM: 8524/1: driver cohandle -EPROBE_DEFER from bus_type.match()")
> Cc: stable@vger.kernel.org
> Cc: Saravana Kannan <saravanak@google.com>
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Tested-by: Guenter Roeck <linux@roeck-us.net>
> Tested-by: Linus Walleij <linus.walleij@linaro.org>
> Reviewed-by: Saravana Kannan <saravanak@google.com>
> Signed-off-by: Isaac J. Manjarres <isaacmanjarres@google.com>
> ---
>  drivers/base/dd.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)

Applied to 4.19.y, but did not apply to 4.14.y or 4.9.y :(

  reply	other threads:[~2022-09-08 11:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-06 17:29 Isaac J. Manjarres
2022-09-08 11:54 ` Greg Kroah-Hartman [this message]
2022-09-08 18:55   ` Isaac Manjarres

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=YxnX9TsxuSi9L9GD@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=isaacmanjarres@google.com \
    --cc=kernel-team@android.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=m.szyprowski@samsung.com \
    --cc=rafael@kernel.org \
    --cc=rmk+kernel@arm.linux.org.uk \
    --cc=saravanak@google.com \
    --cc=stable@vger.kernel.org \
    --cc=tomeu.vizoso@collabora.com \
    --cc=ulf.hansson@linaro.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

all inboxes | Powered by JetHome®