misc: mods: use mutex instead of a spinlock
authorChris Dragan <kdragan@nvidia.com>
Fri, 7 Nov 2014 13:59:09 +0000 (05:59 -0800)
committerBharat Nihalani <bnihalani@nvidia.com>
Mon, 10 Nov 2014 06:44:13 +0000 (22:44 -0800)
commitee223d76b1805fa0e8dc271b77f654b0b2fbf26c
tree9b253e05757aeb1a07375bcfbe7e20ee2ad6c868
parentcffebeabc44169984acc1679edb4eb092ce7d91e
misc: mods: use mutex instead of a spinlock

Calling functions which can sleep, like remap_pfn_range(),
is illegal when holding a spin lock, so use mutex instead.

Guard against mutex lock failure. Mutex lock can fail when
there is a signal.

Bug 1574276

Change-Id: I48781a5388459d799097cda9e328ab29fdcfd788
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: http://git-master/r/596004
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Lael Jones <lajones@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
drivers/misc/mods/mods_internal.h
drivers/misc/mods/mods_krnl.c
drivers/misc/mods/mods_mem.c