lkml.org 
[lkml]   [2019]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/5] proc: use down_read_killable for /proc/pid/pagemap
On Wed 15-05-19 11:41:19, Konstantin Khlebnikov wrote:
> Ditto.

ditto to the previous patch, including -EINTR.

>
> Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
> ---
> fs/proc/task_mmu.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
> index 781879a91e3b..78bed6adc62d 100644
> --- a/fs/proc/task_mmu.c
> +++ b/fs/proc/task_mmu.c
> @@ -1547,7 +1547,9 @@ static ssize_t pagemap_read(struct file *file, char __user *buf,
> /* overflow ? */
> if (end < start_vaddr || end > end_vaddr)
> end = end_vaddr;
> - down_read(&mm->mmap_sem);
> + ret = down_read_killable(&mm->mmap_sem);
> + if (ret)
> + goto out_free;
> ret = walk_page_range(start_vaddr, end, &pagemap_walk);
> up_read(&mm->mmap_sem);
> start_vaddr = end;

--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2019-05-17 14:47    [W:0.100 / U:24.008 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site