usb: gadget: f_fs: Prevent panic due to failure of huge size buffer allocation
authorDongwoo Lee <dwoo08.lee@samsung.com>
Fri, 26 Oct 2018 01:41:41 +0000 (10:41 +0900)
committerHoegeun Kwon <hoegeun.kwon@samsung.com>
Thu, 3 Aug 2023 08:47:25 +0000 (17:47 +0900)
commit730eb56585384916dd24c121af6e57e485825aff
tree0369a17ac4aa71acfc9aa6aba8920c67101840f4
parent3ec813d7118309ed4c29716179fc66bf54a2c3d7
usb: gadget: f_fs: Prevent panic due to failure of huge size buffer allocation

The f_fs daemons usually use large size buffer for increasing transfer
performance, but it can cause memory allocation failure in case of
that buddy space is fragmented. Since this, instead of just returning
error in this case, give the chance to retry to allocate memory with
a half length in order to prevent daemon crash due to failure of
buffer allocation.

Change-Id: I4df1987a6f07e558772dcc5f6f020cc550fb1b13
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
 Conflicts:
drivers/usb/gadget/function/f_fs.c

Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
drivers/usb/gadget/function/f_fs.c