Re: [PATCH 2/5] proc: use down_read_killable for /proc/pid/smaps_rollup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun 09-06-19 12:07:36, Konstantin Khlebnikov wrote:
[...]
> > > diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
> > > index 2bf210229daf..781879a91e3b 100644
> > > --- a/fs/proc/task_mmu.c
> > > +++ b/fs/proc/task_mmu.c
> > > @@ -832,7 +832,10 @@ static int show_smaps_rollup(struct seq_file *m, void *v)
> > >   	memset(&mss, 0, sizeof(mss));
> > > -	down_read(&mm->mmap_sem);
> > > +	ret = down_read_killable(&mm->mmap_sem);
> > > +	if (ret)
> > > +		goto out_put_mm;
> > 
> > Why not ret = -EINTR. The seq_file code seems to be handling all errors
> > AFAICS.
> > 
> 
> I've missed your comment. Sorry.
> 
> down_read_killable returns 0 for success and exactly -EINTR for failure.

You are right of course. I must have misread the code at the time. Sorry
about that.
-- 
Michal Hocko
SUSE Labs




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux