Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 4a0ddd27 authored by Hemant Kumar's avatar Hemant Kumar
Browse files

usb: f_gsi: Instantiate all gsi protocols upon module init



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: default avatarHemant Kumar <hemantk@codeaurora.org>
parent ee50fe6e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment