diff options
author | Alistair Popple <apopple@nvidia.com> | 2022-11-11 03:51:35 +0300 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2022-11-23 05:50:43 +0300 |
commit | 44af0b45d58d7b6f09ebb9081aa89b8bdc33a630 (patch) | |
tree | eacade4974dd134b4dc4d02490ea742d71bde44e /lib/ubsan.h | |
parent | 50c697215a8cc22f0e58c88f06f2716c05a26e85 (diff) | |
download | linux-44af0b45d58d7b6f09ebb9081aa89b8bdc33a630.tar.xz |
mm/migrate_device: return number of migrating pages in args->cpages
migrate_vma->cpages originally contained a count of the number of pages
migrating including non-present pages which can be populated directly on
the target.
Commit 241f68859656 ("mm/migrate_device.c: refactor migrate_vma and
migrate_device_coherent_page()") inadvertantly changed this to contain
just the number of pages that were unmapped. Usage of migrate_vma->cpages
isn't documented, but most drivers use it to see if all the requested
addresses can be migrated so restore the original behaviour.
Link: https://lkml.kernel.org/r/20221111005135.1344004-1-apopple@nvidia.com
Fixes: 241f68859656 ("mm/migrate_device.c: refactor migrate_vma and migrate_deivce_coherent_page()")
Signed-off-by: Alistair Popple <apopple@nvidia.com>
Reported-by: Ralph Campbell <rcampbell@nvidia.com>
Reviewed-by: Ralph Campbell <rcampbell@nvidia.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Alex Sierra <alex.sierra@amd.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Felix Kuehling <Felix.Kuehling@amd.com>
Cc: Lyude Paul <lyude@redhat.com>
Cc: Jason Gunthorpe <jgg@nvidia.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'lib/ubsan.h')
0 files changed, 0 insertions, 0 deletions