usb: gadget: f_fs: Fix NULL pointer issues in ffs driver
commit e4ed11d670ed ("usb: gadget: f_fs: Support multi-instance IPC
logging") moved the ipc_log context create from functionfs_init to
ffs_data_new, ffs_data_new() function will be called from the userspace
to mount the ffs function. In case of mount happening multiple times
from the userspace on same device node. ipc_log context destroyed
from the second mount failure path and causing crashes by using freed
ipc_log context for ffs_log().
Hence fix this issue by adding proper check in ffs_data_new() before
mounting the device node so that driver can fail the second time mount
happens from userspace on same device node.
Change-Id: Icb80c69222cd2b15aba612e2624756afd8dde803
Signed-off-by:
Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
Loading
Please register or sign in to comment