mm: Fix permission checks