usb: gadget: f_fs: Prevent panic due to failure of huge size buffer allocation 25/268525/3 accepted/tizen/6.5/unified/20211228.140140 accepted/tizen/unified/20211228.140316 submit/tizen/20211228.015659 submit/tizen_6.5/20211228.015731
authorDongwoo Lee <dwoo08.lee@samsung.com>
Fri, 26 Oct 2018 01:41:41 +0000 (10:41 +0900)
committerDongwoo Lee <dwoo08.lee@samsung.com>
Fri, 24 Dec 2021 06:32:00 +0000 (15:32 +0900)
commit00399cdcc75633649bf7018565f35d3d9bbab73e
tree4cc1fdaf11770b647e3d6dabd0377cd63c1e9e8a
parentd20aa4c99b7a08c2761c45c1dffc100bddbad53c
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>
drivers/usb/gadget/function/f_fs.c