Created attachment 257547 [details] Relevant dmesg output and kernel config I am getting a Kernel Oops from a NULL pointer dereference in rt5677_i2c_probe() on boot ever since I upgraded to kernel v4.13.0-rc1. Using git-bisect, I found the first offending commit to be a36afb0ab6488eaa2c9672d6c20a966a7c08ef65, which introduces ACPI table for the rt5677 module. It is unclear to me why the commit results in NULL pointer dereference though. However, I did look at the objdump of rt5677.o and find that the null dereference is happening at the `rt5677->type = id->driver_data;' statement, so it seems perhaps the i2c_device_id is NULL when it is passed to rt5677_i2c_probe() somehow. Anyway of course, the end result is that sound no longer works. It is reproducible every boot so far. Please let me know if I can provide more information to help. Attached is both the relevant output from dmesg and following that, my kernel config.
FYI: This issues is tracked in the regression reports for Linux 4.13 (http://bit.ly/lnxregrep413 ) with this id: Linux-Regression-ID: lr#96bd63 Please include this line in the comment section of patches that are supposed to fix the issue. Please also mention the string once in other mailinglist threads or different bug tracking entries if you or someone else start to discuss the issue there. By including that string you make it a whole lot easier to track where an issue gets discussed and how far patches to fix it have made it. More details on this: http://bit.ly/lnxregtrackid Thx for your help.
(In reply to Genki Sky from comment #0) > > I am getting a Kernel Oops from a NULL pointer dereference in > rt5677_i2c_probe() on boot ever since I upgraded to kernel v4.13.0-rc1. > Using git-bisect, I found the first offending commit to be > a36afb0ab6488eaa2c9672d6c20a966a7c08ef65, which introduces ACPI table for > the rt5677 module. Any progress on this? Did you try to get in contact with the developers from above commit by mail?
This seems to have fallen out of my radar, sorry. Yes, the issue looks like a NULL dereference of id->driver_data when the driver is bound via ACPI table. Putting Andy to Cc. Meanwhile, could you try the patch below (totally untested)?
Created attachment 257727 [details] Test fix patch
Can you try if commit ddc9e69b9dc2 ("ASoC: rt5677: Hide platform data in the module sources") fixes the issue? P.S. It's in ASoC next tree.
(In reply to Andy Shevchenko from comment #5) > Can you try if commit > ddc9e69b9dc2 ("ASoC: rt5677: Hide platform data in the module sources") > fixes the issue? > > P.S. It's in ASoC next tree. Thanks, yes, I just tried it and it resolves the issue. (In reply to Takashi Iwai from comment #3) > Putting Andy to Cc. Thanks for doing so.