NULL pointer in imx-sdma.c with from context arg in reject_firmware_nowait
Xavi Drudis Ferran
xdrudis at tinet.cat
Mon May 28 21:14:53 UTC 2018
El Mon, May 28, 2018 at 06:31:53PM +0200, Denis 'GNUtoo' Carikli deia:
> On Tue, 17 Apr 2018 10:41:29 +0200
> Xavi Drudis Ferran <xdrudis at tinet.cat> wrote:
> The patch below seem sensible to me:
> > request_firmware_nowait(module, uevent, NONFREE_FIRMWARE,
> > - device, gfp, NULL, cont);
> > + device, gfp, context, cont);
> However merging the patch without finding why the NULL was put there
> doesn't seem a good idea as it could break many drivers along the way.
> Would it be possible to try to find this information by:
> - Finding when it was first introduced
> - By looking at the ChangeLogs of the version introducing it
> Note that I'm not a Linux-libre maintainer, here I'm just helping to
> review the patch.
Thank you. As far as I can see, the NULL was introduced in firmware.h by
the 4.16 linux-libre deblob script. The reason for the general change
was to allow hardware which could work without loading proprietary firmware
to work. Before that it was prevented to work just because the linux driver
loaded some not really needed firmware.
The reason why it had to be null is beyond me. I once thought it might
be to try to avoid people advising someone to rename the proprietary
firmware file in a way that could be loaded by linux-libre, but that
does not make much sense to me, and there would be better ways to
avoid that if it was a concern. So it might also be just an error.
Or there might be a good reason I don't know. Possibly about hardware
I haven't tried. I know this change is bad for imx6q but it could
be somehow good for something else.
That's the question I posted to ask, really.
More information about the linux-libre