Re: [BUG] staging: android: ashmem: Deadlock during ashmem_shrink

From: Robert Love
Date: Tue Apr 23 2013 - 13:24:11 EST


On Tue, Apr 23, 2013 at 12:20 PM, Shankar Brahadeeswaran
<shankoo77@xxxxxxxxx> wrote:

> I'm unable to think of a straight forward way to fix this. If you have
> any suggestions please provide the same.
> If we are unable to solve this too with minor mods, as suggested by
> Dan we have to re-look at the locking in this driver.

This doesn't look insurmountable. It isn't necessary AFAICT to hold
ashmem_mutex across shmem_file_setup.

Patch attached (untested).

Robert

Attachment: ashmem-lock-fix.patch
Description: Binary data