Re: [syzbot] [udf?] BUG: unable to handle kernel NULL pointer dereference in __writepage

From: Christoph Hellwig
Date: Mon Jan 23 2023 - 02:36:18 EST


I looked into this and got really confused. We should never end
up in generic_writepages if ->writepages is set, which this patch
obviously does.

Then I took a closer look at udf, and it seems to switch a_aops around
at run time, and it seems like we're hitting just that case, and the
patch just seems to narrow down that window.

I suspect the right fix is to remove this runtime switching of aops,
and just do conditionals inside the methods.