Commit graph

3 commits

Author SHA1 Message Date
Tianjie Xu
71e182bc38 Check an edge case when read(2) returns 0
We might end up in an infinite loop if read(2) reached EOF unexpectedly.
The problematic code in uncrypt mentioned in the bug has been fixed
by switching to libbase ReadFully(). So I grepped through the recovery
code and fixed some other occurences of the issue.

Bug: 31073201
Change-Id: Ib867029158ba23363b8f85d61c25058a635c5a6b
2016-08-31 19:11:41 -07:00
Tao Bao
cdcf28f54f recovery: Fork a process for fuse when sideloading from SD card.
For applying update from SD card, we used to use a thread to serve the
file with fuse. Since accessing through fuse involves going from kernel
to userspace to kernel, it may run into deadlock (e.g. for mmap_sem)
when a page fault occurs. Switch to using a process instead.

Bug: 23783099
Bug: 26313124
Change-Id: Iac0f55b1bdb078cadb520cfe1133e70fbb26eadd
2016-01-13 21:29:20 -08:00
Tao Bao
0d4e002670 recovery: Switch fuse_* to C++.
Change-Id: Id50c3e6febd0ab61f10a654b9b265cf21a2d1701
(cherry picked from commit 71dc365f25)
2015-07-24 11:22:05 -07:00
Renamed from fuse_sdcard_provider.c (Browse further)