mm/migrate_device: fix double unlock
Subsystems (3)
PATCH 1/1 mm/migrate_device: fix double unlock
migrate_vma_collect_huge_pmd() calls spin_unlock(ptl) after softleaf_entry_wait_on_locked(), which already releases the ptl.
--- mm/migrate_device.c | 1 - 1 file changed, 1 deletion(-)
mm/migrate_device.c +0 -1
@@ -177,7 +177,6 @@ static int migrate_vma_collect_huge_pmd(pmd_t *pmdp, unsigned long start,if (softleaf_is_migration (entry)) {softleaf_entry_wait_on_locked (entry, ptl); -spin_unlock (ptl);return -EAGAIN ; }
Signature · 1 line
2.43.0
David Hildenbrand (Arm)
maintainerQuoted 17 lines · Sunny Patel
migrate_vma_collect_huge_pmd()callsspin_unlock(ptl)aftersoftleaf_entry_wait_on_locked(), which already releases the ptl.Fixes a30b48bf1b24 ("mm/migrate_device: implement THP migration of zone device pages")Signed-off-by Sunny Patel <[email protected]>--- mm/migrate_device.c | 1 - 1 file changed, 1 deletion(-)mm/migrate_device.c +0
-0
mm/migrate_device.c static int migrate_vma_collect_huge_pmd(pmd_t *pmdp, unsigned long start, · line 182
Quoted 7 lines
mm/migrate_device.c +0
-1@@ -177,7 +177,6 @@ static int migrate_vma_collect_huge_pmd(pmd_t *pmdp, unsigned long start,if (softleaf_is_migration (entry)) {softleaf_entry_wait_on_locked (entry, ptl); -spin_unlock (ptl);return -EAGAIN ; }
As raised by Matthew, the entire code block is dead code:
https://lore.kernel.org/linux-mm/[email protected]/
And I even Ack'ed it /facepalm
So we should take that (cleanup) patch instead. Thanks!
Signature · 3 lines
Cheers, David
Quoted 28 lines · David Hildenbrand (Arm)
Quoted 17 lines · Sunny Patel
migrate_vma_collect_huge_pmd()callsspin_unlock(ptl)aftersoftleaf_entry_wait_on_locked(), which already releases the ptl.Fixes a30b48bf1b24 ("mm/migrate_device: implement THP migration of zone device pages")Signed-off-by Sunny Patel <[email protected]>--- mm/migrate_device.c | 1 - 1 file changed, 1 deletion(-)mm/migrate_device.c +0
-0mm/migrate_device.c static int migrate_vma_collect_huge_pmd(pmd_t *pmdp, unsigned long start, · line 182
Quoted 7 lines
mm/migrate_device.c +0
-1@@ -177,7 +177,6 @@ static int migrate_vma_collect_huge_pmd(pmd_t *pmdp, unsigned long start,if (softleaf_is_migration (entry)) {softleaf_entry_wait_on_locked (entry, ptl); -spin_unlock (ptl);return -EAGAIN ; }As raised by Matthew, the entire code block is dead code:
Quoted 6 lines
https://lore.kernel.org/linux-mm/[email protected]/
And I even Ack'ed it /facepalm
So we should take that (cleanup) patch instead. Thanks!
+1
Balbir
Quoted 4 lines · David Hildenbrand (Arm)
As raised by Matthew, the entire code block is dead code:
https://lore.kernel.org/linux-mm/[email protected]/
And I even Ack'ed it /facepalm
So we should take that (cleanup) patch instead. Thanks!
+1
Thanks for the pointer. I will drop my cleanup patch and defer to above patch at the above link instead since it already addresses the same dead code block and has your Ack.
Thanks,
Sunny Patel