Kirill A. Shutemov
461c7fa126
drivers/scsi/sg.c: mark VMA as VM_IO to prevent migration
...
Reduced testcase:
#include <fcntl.h>
#include <unistd.h>
#include <sys/mman.h>
#include <numaif.h>
#define SIZE 0x2000
int main()
{
int fd;
void *p;
fd = open("/dev/sg0", O_RDWR);
p = mmap(NULL, SIZE, PROT_EXEC, MAP_PRIVATE | MAP_LOCKED, fd, 0);
mbind(p, SIZE, 0, NULL, 0, MPOL_MF_MOVE);
return 0;
}
We shouldn't try to migrate pages in sg VMA as we don't have a way to
update Sg_scatter_hold::pages accordingly from mm core.
Let's mark the VMA as VM_IO to indicate to mm core that the VMA is not
migratable.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Doug Gilbert <dgilbert@interlog.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Shiraz Hashim <shashim@codeaurora.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: syzkaller <syzkaller@googlegroups.com>
Cc: Kostya Serebryany <kcc@google.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-02-03 08:28:43 -08:00
..
2015-11-25 22:27:30 -05:00
2016-01-05 22:10:35 +01:00
2015-11-25 22:12:50 -05:00
2015-11-30 18:51:20 -05:00
2016-01-06 21:43:09 -05:00
2015-12-11 11:52:26 -08:00
2015-12-02 17:07:57 -05:00
2015-11-09 17:32:34 -08:00
2015-06-02 17:15:24 -07:00
2015-11-09 17:11:57 -08:00
2016-01-08 12:51:04 -05:00
2016-01-06 20:58:29 -05:00
2015-12-07 20:11:25 -05:00
2015-11-09 17:11:57 -08:00
2015-12-15 16:49:58 -05:00
2015-11-09 17:11:57 -08:00
2016-01-26 17:44:42 -08:00
2015-11-12 07:06:18 -05:00
2015-11-12 07:06:18 -05:00
2015-11-09 17:15:52 -08:00
2015-03-24 17:08:29 -07:00
2015-12-21 22:08:49 -05:00
2016-01-08 13:03:53 -05:00
2016-01-07 15:51:13 -08:00
2016-01-07 15:51:13 -08:00
2015-12-10 13:14:56 -05:00
2015-05-31 18:06:28 -07:00
2015-11-12 07:06:18 -05:00
2016-01-20 17:20:53 -08:00
2015-11-13 20:35:54 -08:00
2015-11-13 20:35:54 -08:00
2014-11-24 14:45:27 +01:00
2015-11-30 20:52:33 -05:00
2015-10-07 10:24:48 -07:00
2015-04-27 10:10:19 -07:00
2015-04-27 10:04:39 -07:00
2015-04-27 10:04:39 -07:00
2016-01-08 12:51:03 -05:00
2015-04-27 10:05:55 -07:00
2015-11-09 17:11:57 -08:00
2015-08-07 15:03:42 +02:00
2013-11-26 11:09:07 +01:00
2014-10-20 16:21:33 +02:00
2014-10-20 16:21:33 +02:00
2015-12-03 09:32:33 -08:00
2015-05-31 18:06:28 -07:00
2015-05-31 18:06:28 -07:00
2015-04-09 18:08:31 -07:00
2015-05-31 18:06:28 -07:00
2015-05-31 18:06:28 -07:00
2015-04-17 10:13:56 -07:00
2016-01-06 21:43:10 -05:00
2016-01-06 21:43:08 -05:00
2015-11-25 22:08:55 -05:00
2015-11-25 22:08:52 -05:00
2015-02-02 09:57:45 -08:00
2013-06-26 18:32:47 -07:00
2014-10-20 16:21:33 +02:00
2015-04-14 09:50:27 -07:00
2015-01-09 15:44:31 +01:00
2015-02-02 09:57:46 -08:00
2016-01-06 21:43:09 -05:00
2015-07-31 13:31:10 +02:00
2014-07-17 22:07:37 +02:00
2016-01-06 21:43:09 -05:00
2016-01-06 21:43:03 -05:00
2015-02-02 09:57:45 -08:00
2014-11-24 14:45:27 +01:00
2015-11-09 17:11:57 -08:00
2014-11-24 16:13:16 +01:00
2015-05-31 18:06:28 -07:00
2015-11-09 16:32:14 -08:00
2016-01-06 21:43:13 -05:00
2016-01-06 21:43:13 -05:00
2015-02-02 09:57:45 -08:00
2013-04-09 14:13:16 -04:00
2014-11-24 20:01:40 +01:00
2013-04-09 14:13:16 -04:00
2013-11-26 11:09:07 +01:00
2015-12-03 09:32:33 -08:00
2016-01-06 15:10:36 -05:00
2016-01-07 15:51:13 -08:00
2016-01-06 15:10:35 -05:00
2015-08-12 13:14:57 -07:00
2015-08-12 13:14:57 -07:00
2016-01-08 13:08:15 -05:00
2015-02-02 09:57:46 -08:00
2015-11-20 11:39:03 -05:00
2016-01-23 18:45:06 -08:00
2015-12-11 11:52:24 -08:00
2015-06-02 17:24:54 -07:00
2013-04-09 14:13:27 -04:00
2014-03-15 10:19:19 -07:00
2014-11-24 14:45:27 +01:00
2014-04-11 16:15:36 -04:00
2014-10-20 16:21:33 +02:00
2016-01-23 18:45:06 -08:00
2014-03-15 10:19:18 -07:00
2015-09-17 07:25:02 -07:00
2015-05-31 18:06:28 -07:00
2014-10-20 16:21:33 +02:00
2016-01-06 21:43:09 -05:00
2015-11-25 22:12:51 -05:00
2015-08-26 07:23:04 -07:00
2014-03-27 08:26:31 -07:00
2015-03-23 14:29:40 +11:00
2014-10-20 16:21:33 +02:00
2013-04-09 14:13:15 -04:00
2015-11-11 20:45:23 -05:00
2013-04-15 14:30:44 -06:00
2014-11-24 14:45:27 +01:00
2014-07-17 22:07:35 +02:00
2015-05-31 18:06:28 -07:00
2016-01-06 21:43:10 -05:00
2016-01-06 21:43:10 -05:00
2015-05-31 18:06:28 -07:00
2014-11-24 20:01:28 +01:00
2016-01-06 21:43:09 -05:00
2016-01-06 21:43:03 -05:00
2015-11-12 07:06:18 -05:00
2015-05-31 18:06:28 -07:00
2015-05-31 18:06:28 -07:00
2015-05-31 18:06:28 -07:00
2015-05-31 18:06:28 -07:00
2015-05-31 18:06:28 -07:00
2015-07-23 22:53:05 -07:00
2016-01-07 15:51:13 -08:00
2016-01-07 21:43:26 -05:00
2015-12-02 16:29:19 -05:00
2015-11-06 17:50:42 -08:00
2014-11-12 11:16:12 +01:00
2015-12-02 16:43:11 -05:00
2015-02-04 08:00:24 -08:00
2014-11-12 11:16:05 +01:00
2014-04-24 13:44:54 -04:00
2015-12-10 12:24:44 -05:00
2015-12-02 16:29:19 -05:00
2015-02-02 09:57:46 -08:00
2016-01-07 15:51:13 -08:00
2014-06-06 16:08:16 -07:00
2016-01-07 15:51:13 -08:00
2015-02-02 09:57:46 -08:00
2015-11-30 17:43:55 -05:00
2015-09-02 12:22:54 -07:00
2015-12-18 19:29:50 -08:00
2015-08-07 14:28:45 +02:00
2015-07-14 13:20:09 -04:00
2015-11-30 11:23:45 -05:00
2014-11-12 11:15:54 +01:00
2015-10-21 14:42:38 -06:00
2016-01-26 17:44:42 -08:00
2015-11-25 21:38:58 -05:00
2015-12-18 19:29:50 -08:00
2016-02-03 08:28:43 -08:00
2014-10-20 16:21:33 +02:00
2014-10-20 16:21:33 +02:00
2015-01-20 19:43:24 +01:00
2014-07-17 22:07:39 +02:00
2016-01-26 17:24:16 -08:00
2014-11-12 11:15:57 +01:00
2015-12-03 09:32:33 -08:00
2015-11-18 11:59:09 -05:00
2015-11-09 17:42:19 -08:00
2016-01-08 12:51:04 -05:00
2014-05-28 12:16:28 +02:00
2016-01-06 21:43:08 -05:00
2014-11-20 09:11:15 +01:00
2015-08-10 23:07:05 -04:00
2014-10-20 16:21:33 +02:00
2015-05-31 18:06:28 -07:00
2016-01-06 21:43:09 -05:00
2016-01-06 21:43:03 -05:00
2014-11-24 14:45:27 +01:00
2015-07-23 13:07:04 -07:00
2015-12-10 12:57:04 -05:00
2015-12-10 12:57:04 -05:00
2015-02-02 09:57:46 -08:00
2013-04-09 14:13:15 -04:00
2015-08-07 14:28:45 +02:00
2015-05-31 18:06:28 -07:00
2015-02-02 09:57:45 -08:00
2015-09-08 18:03:49 +01:00
2013-11-26 11:09:07 +01:00