From: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Yi Zhang <yizhang_hust-9Onoh4P/yGk@public.gmane.org>
Cc: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] base: dd: don't remove driver_data in -EPROBE_DEFER case
Date: Tue, 3 May 2016 15:11:26 +0200 [thread overview]
Message-ID: <20160503131126.GA18494@ulmo.ba.sec> (raw)
In-Reply-To: <1457450122-5792-1-git-send-email-yizhang_hust-9Onoh4P/yGk@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1065 bytes --]
On Tue, Mar 08, 2016 at 11:15:22PM +0800, Yi Zhang wrote:
> the driver_data may be used for sanity check, it fails the
> probe() if driver_data is NULL after it is re-triggered.
> for example, soc_probe() in sound/soc/soc-core.c
>
> Signed-off-by: Yi Zhang <yizhang_hust-9Onoh4P/yGk@public.gmane.org>
> ---
> drivers/base/dd.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Hi Greg,
This causes a boot regression on at least one board, caused by one of
the drivers looking at driver data to check whether or not the driver
has properly loaded. If the code encounters a non-NULL pointer it
tries to dereference it, but because it's already been freed there is
no memory backing it and things crash.
I don't think keeping stale pointers around is a good idea. The whole
point of setting this to NULL in the core is so that probe failures
result in the same starting conditions no matter what.
Can we please get this reverted?
Cc'ing linux-tegra for visibility since that's where the boot regression
is observed.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next parent reply other threads:[~2016-05-03 13:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1457450122-5792-1-git-send-email-yizhang_hust@163.com>
[not found] ` <1457450122-5792-1-git-send-email-yizhang_hust-9Onoh4P/yGk@public.gmane.org>
2016-05-03 13:11 ` Thierry Reding [this message]
[not found] ` <20160503131126.GA18494-EkSeR96xj6Pcmrwk2tT4+A@public.gmane.org>
2016-05-03 15:07 ` [PATCH] base: dd: don't remove driver_data in -EPROBE_DEFER case Greg KH
2016-05-03 15:14 ` Thierry Reding
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=20160503131126.GA18494@ulmo.ba.sec \
--to=thierry.reding-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=yizhang_hust-9Onoh4P/yGk@public.gmane.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