Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1355870

Re: [PATCH 02/18] mm: make vm_mmap killable

From Michal Hocko <mhocko@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 02/18] mm: make vm_mmap killable
Date 2016-03-11 13:20 +0100
Message-ID <rbucV-69h-9@gated-at.bofh.it> (permalink)
References <r7w3D-3yu-3@gated-at.bofh.it> <r7wdm-3Cq-37@gated-at.bofh.it> <rbs1s-4bm-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri 11-03-16 10:59:30, Vlastimil Babka wrote:
> On 02/29/2016 02:26 PM, Michal Hocko wrote:
> >From: Michal Hocko <mhocko@suse.com>
> >
> >All the callers of vm_mmap seem to check for the failure already
> >and bail out in one way or another on the error which means that
> 
> Hmm I'm not that sure about this one:
>   17   1071  fs/binfmt_elf.c <<load_elf_binary>>
> 
> Assigns result of vm_mmap() to "error" variable which is never checked.

Yes it is not checked but not used either. If the current got killed
then it wouldn't return to the userspace so my understanding is that not
checking this value is not a problem. At least that is my understanding.

> Shouldn't __must_check trigger here?

well, __must_check is a misleading name. It doesn't actually enforce the
value is checked. It just has to be used and an assignment is
sufficient. I was discussing this without our gcc guy and he promissed
to look and try to come up with a different attribute which would
actually work like __must_check.

-- 
Michal Hocko
SUSE Labs

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 02/18] mm: make vm_mmap killable Vlastimil Babka <vbabka@suse.cz> - 2016-03-11 11:00 +0100
  Re: [PATCH 02/18] mm: make vm_mmap killable Michal Hocko <mhocko@kernel.org> - 2016-03-11 13:20 +0100
    Re: [PATCH 02/18] mm: make vm_mmap killable Vlastimil Babka <vbabka@suse.cz> - 2016-03-11 13:50 +0100
      Re: [PATCH 02/18] mm: make vm_mmap killable Michal Hocko <mhocko@kernel.org> - 2016-03-11 14:00 +0100

csiph-web