diff options
author | David S. Miller | 2017-08-07 19:42:09 +0200 |
---|---|---|
committer | David S. Miller | 2017-08-07 19:42:09 +0200 |
commit | fde6af4729b005dc9dc936b0ed9f1b27b5b2d0f4 (patch) | |
tree | fb52e170a7b2130b8a5266ac665d4314447fef95 /mm/page_io.c | |
parent | Merge branch 'net-sched-summer-cleanup-part-2-ndo_setup_tc' (diff) | |
parent | net/mlx5: Increase the maximum flow counters supported (diff) | |
download | kernel-qcow2-linux-fde6af4729b005dc9dc936b0ed9f1b27b5b2d0f4.tar.gz kernel-qcow2-linux-fde6af4729b005dc9dc936b0ed9f1b27b5b2d0f4.tar.xz kernel-qcow2-linux-fde6af4729b005dc9dc936b0ed9f1b27b5b2d0f4.zip |
Merge tag 'mlx5-shared-2017-08-07' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux
Saeed Mahameed says:
====================
mlx5-shared-2017-08-07
This series includes some mlx5 updates for both net-next and rdma trees.
From Saeed,
Core driver updates to allow selectively building the driver with
or without some large driver components, such as
- E-Switch (Ethernet SRIOV support).
- Multi-Physical Function Switch (MPFs) support.
For that we split E-Switch and MPFs functionalities into separate files.
From Erez,
Delay mlx5_core events when mlx5 interfaces, namely mlx5_ib, registration
is taking place and until it completes.
From Rabie,
Increase the maximum supported flow counters.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'mm/page_io.c')
-rw-r--r-- | mm/page_io.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/page_io.c b/mm/page_io.c index b6c4ac388209..5f61b54ee1f3 100644 --- a/mm/page_io.c +++ b/mm/page_io.c @@ -22,6 +22,7 @@ #include <linux/frontswap.h> #include <linux/blkdev.h> #include <linux/uio.h> +#include <linux/sched/task.h> #include <asm/pgtable.h> static struct bio *get_swap_bio(gfp_t gfp_flags, @@ -136,6 +137,7 @@ out: WRITE_ONCE(bio->bi_private, NULL); bio_put(bio); wake_up_process(waiter); + put_task_struct(waiter); } int generic_swapfile_activate(struct swap_info_struct *sis, @@ -378,6 +380,11 @@ int swap_readpage(struct page *page, bool do_poll) goto out; } bdev = bio->bi_bdev; + /* + * Keep this task valid during swap readpage because the oom killer may + * attempt to access it in the page fault retry time check. + */ + get_task_struct(current); bio->bi_private = current; bio_set_op_attrs(bio, REQ_OP_READ, 0); count_vm_event(PSWPIN); |