NULL pointer in imx-sdma.c with from context arg in reject_firmware_nowait

Xavi Drudis Ferran xdrudis at tinet.cat
Sat Apr 14 17:23:44 UTC 2018


Hello. And thank you very much all for your work on linux-libre. 

When trying to compile GNU linux-libre 4.16.0 for a wandboard quad
(IMX6Q) I got a NULL pointer dereference. 

Aparently now sdma_load_firmware(NULL,NULL) 

in drivers/dma/imx-sdma.c

gets called from 

reject_firmware_nowait
request_firmware_nowait
request_firmware_work_func

and when it tries to print a nice error message that the 1st parameter
(fw) was NULL it tries to use context->dev as an argument, but context
is NULL too.

I'm trying to just change reject_firmware_nowait to pass context instead of 
NULL, but I wonder if this NULL was deliberate and I'll break something 
somewhere else ?

Thank you.  


More information about the linux-libre mailing list