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


Groups > linux.kernel > #1443911

Re: [PATCH] KVM: release anon file in failure path of vm creation

From Liu Shuo <shuo.a.liu@intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH] KVM: release anon file in failure path of vm creation
Date 2016-07-15 05:20 +0200
Message-ID <rV1Pr-1AM-9@gated-at.bofh.it> (permalink)
References <rU2kx-32M-15@gated-at.bofh.it> <rU36W-3AD-11@gated-at.bofh.it> <rURZM-3En-31@gated-at.bofh.it> <rV133-14j-3@gated-at.bofh.it> <rV133-14j-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri 15.Jul'16 at  3:26:03 +0100, Al Viro wrote:
>On Fri, Jul 15, 2016 at 10:22:04AM +0800, Liu Shuo wrote:
>> > You have no warranty whatsoever that descriptor table has not been changed
>> > by that point.  You should *NEVER* use sys_close() on failure exit paths
>> Could you please elaborate why we're not sure descriptor table's changing at the point?
>
>Because that could be called by one thread while another (having guessed the
>descriptor you are about to get) does close()/dup2()/etc.
If there is no such thread (who operates the descriptor based on
guessing), i can think the changing is safe at the point. As the fd has
not been delivered to userspace. Am i right?

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


Thread

[PATCH] KVM: release anon file in failure path of vm creation Liu Shuo <shuo.a.liu@intel.com> - 2016-07-12 11:40 +0200
  Re: [PATCH] KVM: release anon file in failure path of vm creation Paolo Bonzini <pbonzini@redhat.com> - 2016-07-12 12:30 +0200
    Re: [PATCH] KVM: release anon file in failure path of vm creation Al Viro <viro@ZenIV.linux.org.uk> - 2016-07-14 18:50 +0200
      Re: [PATCH] KVM: release anon file in failure path of vm creation Paolo Bonzini <pbonzini@redhat.com> - 2016-07-14 19:00 +0200
      Re: [PATCH] KVM: release anon file in failure path of vm creation Al Viro <viro@ZenIV.linux.org.uk> - 2016-07-15 04:30 +0200
        Re: [PATCH] KVM: release anon file in failure path of vm creation Liu Shuo <shuo.a.liu@intel.com> - 2016-07-15 05:20 +0200
          Re: [PATCH] KVM: release anon file in failure path of vm creation Al Viro <viro@ZenIV.linux.org.uk> - 2016-07-15 07:20 +0200
            Re: [PATCH] KVM: release anon file in failure path of vm creation Liu Shuo <shuo.a.liu@intel.com> - 2016-07-15 09:10 +0200
      Re: [PATCH] KVM: release anon file in failure path of vm creation Liu Shuo <shuo.a.liu@intel.com> - 2016-07-15 04:30 +0200

csiph-web