Just looking at it a bit blindly :
-
debug_read_status()
is fromdrivers/usb/gadget/u_serial.c
in the kernel sources, see Index of /sources/4.0.1.48/ (Jolla where are the sources for 4.3 ?) and the kernel-adaptation tarball. - in this function there are various accesses done to members of structures referenced by a pointer, namely
ui_dev
,tty
andgser
. We can discardtty
since it is protected by aif (tty)
whenever used. If I assume thatui_dev
is properly defined, I end up withgser
that may be NULL. Looking here and there in the file, it seems that it could be the case and its various usages are all protected. But not in here. There is aif (gser->get_dtr)
that should have beenif (gser && gser->get_dtr)
.
I’ve no idea where to submit a patch for kernel adaptation. Moreover, I even don’t know how to test this hypothesis because I’ve no idea how to recompile a kernel for my JollaC. And even if I know, I’ve no idea how to put it properly on the phone and recover in case it’s not working. I’ll ask on IRC #sailfishos-porter channel.