+111
−209
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
commit cc5d01e1 ("usb: gadget: gsi: Defer freeing memory on free_inst if in use") overwrite file pointer private data in gsi_ctrl_dev_open(). If char device node gets re-opened container_of in gsi_ctrl_dev_open() may result into unmapped memory access. Since this commit is trying to fix use after free issue therefore allocate all gsi protocol instances upon module init. Update protocol id and create misc device node upon set_instance. Also allocate one ipc_log context with NUM_LOG_PAGES as 15. Add protocol id as part of the log in order to distinguishe different protocol logging. Change-Id: I784fb1e3a36b45e8cdca6747ec9fe9bae5a3f5ad Signed-off-by:Hemant Kumar <hemantk@codeaurora.org>