Skip to contentSkip to conversation

Use of mmap_sem in map_user_kiobuf

DISCUSSION Adrian Cox 2 participants 2 messages Jul 6, 2001 Memory management

lore
Share & tools
lore

Adrian Cox

author
#0 lore raw

Does map_user_kiobuf really need to get a write lock on the mmap_sem? From examination of the code, all it can do is expand_stack(), fault in pages, and increment the count on a page.

Is there anything I've missed? Would it be safe to use down_read(), up_read() instead?

Signature · 6 lines
Adrian Cox   http://www.humboldt.co.uk/

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/
#1 lore raw
Quoted 6 lines · Adrian Cox

Does map_user_kiobuf really need to get a write lock on the mmap_sem?
From examination of the code, all it can do is expand_stack(), fault in
pages, and increment the count on a page.

Is there anything I've missed? Would it be safe to use down_read(), up_read() instead?

yes, it should be ok.

Andrea
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/