Reliable crash SfOS through grep command

Just looking at it a bit blindly :

  • debug_read_status() is from drivers/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 and gser. We can discard tty since it is protected by a if (tty) whenever used. If I assume that ui_dev is properly defined, I end up with gser 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 a if (gser->get_dtr) that should have been if (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.

2 Likes