diff options
| -rw-r--r-- | mm/hmm.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -246,11 +246,11 @@ static const struct mmu_notifier_ops hmm_mmu_notifier_ops = { | |||
| 246 | * | 246 | * |
| 247 | * To start mirroring a process address space, the device driver must register | 247 | * To start mirroring a process address space, the device driver must register |
| 248 | * an HMM mirror struct. | 248 | * an HMM mirror struct. |
| 249 | * | ||
| 250 | * THE mm->mmap_sem MUST BE HELD IN WRITE MODE ! | ||
| 251 | */ | 249 | */ |
| 252 | int hmm_mirror_register(struct hmm_mirror *mirror, struct mm_struct *mm) | 250 | int hmm_mirror_register(struct hmm_mirror *mirror, struct mm_struct *mm) |
| 253 | { | 251 | { |
| 252 | lockdep_assert_held_exclusive(&mm->mmap_sem); | ||
| 253 | |||
| 254 | /* Sanity check */ | 254 | /* Sanity check */ |
| 255 | if (!mm || !mirror || !mirror->ops) | 255 | if (!mm || !mirror || !mirror->ops) |
| 256 | return -EINVAL; | 256 | return -EINVAL; |
