diff options
| author | Andrew Morton <akpm@linux-foundation.org> | 2023-02-10 15:34:48 -0800 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2023-02-10 15:34:48 -0800 |
| commit | f67d6b26649379f8520abe6a6c7ed335310bf01e (patch) | |
| tree | c161fce6517753dcacdcea21804f6e2c90164a33 /fs/aio.c | |
| parent | 223ec6ab265ead0b319bc2f15d0d1be05078a74b (diff) | |
| parent | ce4d9a1ea35ac5429e822c4106cb2859d5c71f3e (diff) | |
| download | net-f67d6b26649379f8520abe6a6c7ed335310bf01e.tar.gz | |
Merge branch 'mm-hotfixes-stable' into mm-stable
To pick up depended-upon changes
Diffstat (limited to 'fs/aio.c')
| -rw-r--r-- | fs/aio.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/aio.c b/fs/aio.c index 5a88caf52be4ea..b0b17bd098bbc2 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -361,6 +361,9 @@ static int aio_ring_mremap(struct vm_area_struct *vma) spin_lock(&mm->ioctx_lock); rcu_read_lock(); table = rcu_dereference(mm->ioctx_table); + if (!table) + goto out_unlock; + for (i = 0; i < table->nr; i++) { struct kioctx *ctx; @@ -374,6 +377,7 @@ static int aio_ring_mremap(struct vm_area_struct *vma) } } +out_unlock: rcu_read_unlock(); spin_unlock(&mm->ioctx_lock); return res; |
