Thanks for the patch!
It seems correct, and I've added it to the fbdev git tree.
Did you actually ran into a problem, or how did you find this
optimization?
Hi Helge,
Thanks for reviewing and applying the patch!
To answer your question: this wasn't triggered on production hardware.
It was found while using our DevGen virtual device framework together
with syzkaller to fuzz legacy fbdev drivers.
DevGen triggered several OOB crashes in fbdev, and during the manual
code audit to root-cause them, I noticed the src pointer desynchronization
in fb_io_read(). It was a clear logic bug, so I extracted it as a
standalone fix.
Thanks again for your time and for maintaining the subsystem!
Best regards,
Mingyu Wang