]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "base: dd: don't remove driver_data in -EPROBE_DEFER case"
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 May 2016 15:06:06 +0000 (08:06 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 May 2016 15:06:06 +0000 (08:06 -0700)
commit901dbf2af4b9b92db3fb468303e8239ccde34d47
tree456fa050698cb190002244a43f5cd9ec2582a29e
parentb32c60e976b920e36e8b0f612cae8ddcadcea891
Revert "base: dd: don't remove driver_data in -EPROBE_DEFER case"

This reverts commit abdaa76ede148d8d046b2b40b521c4ee3900a534.

Thierry Reding writes:
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?

Reported-by: Thierry Reding <thierry.reding@gmail.com>
Cc: Yi Zhang <yizhang_hust@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/dd.c