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


Groups > linux.kernel > #1728469

Re: [PATCH v3 14/15] fs/files: export close_fd() symbol

From Al Viro <viro@ZenIV.linux.org.uk>
Newsgroups linux.kernel
Subject Re: [PATCH v3 14/15] fs/files: export close_fd() symbol
Date 2017-09-08 00:10 +0200
Message-ID <und9L-69J-5@gated-at.bofh.it> (permalink)
References <una2d-3SJ-3@gated-at.bofh.it> <una2f-3SJ-43@gated-at.bofh.it> <unbKH-57b-23@gated-at.bofh.it> <uncx4-5G0-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Sep 07, 2017 at 06:22:45PM -0300, Gustavo Padovan wrote:

> Sorry for my lack of knowledge here and thank you for the explanation,
> things are a lot clear to me. For some reasons I were trying to delay
> the sharing of the fd to a event later. I can delay the install of it
> but that my require __fd_install() to be available and exportedi as it
> may happen in a thread, but I believe you wouldn't be okay with that either,
> is that so?

Only if it has been given a reference to descriptor table to start with.
Which reference should've been acquired by the target process itself.

Why bother, anyway?  You need to handle the case when the stream has
ended just after you'd copied the value to userland; at that point you
obviously can't go hunting for all references to struct file in question,
so you have to guaratee that methods will start giving an error from
that point on.  What's the problem with just leaving it installed?

Both userland and kernel must cope with that sort of thing anyway, so
what does removing it from descriptor table and not reporting it buy
you?  AFAICS, it's an extra layer of complexity for no good reason -
you are not getting it offset by simplifications anywhere else...

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


Thread

[PATCH v3 00/15] V4L2 Explicit Synchronization support Gustavo Padovan <gustavo@padovan.org> - 2017-09-07 20:50 +0200
  [PATCH v3 14/15] fs/files: export close_fd() symbol Gustavo Padovan <gustavo@padovan.org> - 2017-09-07 20:50 +0200
    Re: [PATCH v3 14/15] fs/files: export close_fd() symbol Eric Biggers <ebiggers3@gmail.com> - 2017-09-07 21:00 +0200
    Re: [PATCH v3 14/15] fs/files: export close_fd() symbol Al Viro <viro@ZenIV.linux.org.uk> - 2017-09-07 22:40 +0200
      Re: [PATCH v3 14/15] fs/files: export close_fd() symbol Gustavo Padovan <gustavo@padovan.org> - 2017-09-07 23:30 +0200
        Re: [PATCH v3 14/15] fs/files: export close_fd() symbol Al Viro <viro@ZenIV.linux.org.uk> - 2017-09-08 00:10 +0200
    Re: [PATCH v3 14/15] fs/files: export close_fd() symbol Hans Verkuil <hverkuil@xs4all.nl> - 2017-09-08 00:10 +0200
      Re: [PATCH v3 14/15] fs/files: export close_fd() symbol Gustavo Padovan <gustavo.padovan@collabora.com> - 2017-09-08 00:20 +0200
  [PATCH v3 08/15] [media] vb2: add .buffer_queued() to notify queueing in the driver Gustavo Padovan <gustavo@padovan.org> - 2017-09-07 20:50 +0200
  [PATCH v3 03/15] [media] vb2: check earlier if stream can be started Gustavo Padovan <gustavo@padovan.org> - 2017-09-07 20:50 +0200
  [PATCH v3 07/15] [media] v4l: add V4L2_EVENT_BUF_QUEUED event Gustavo Padovan <gustavo@padovan.org> - 2017-09-07 20:50 +0200
  [PATCH v3 12/15] [media] vb2: add videobuf2 dma-buf fence helpers Gustavo Padovan <gustavo@padovan.org> - 2017-09-07 20:50 +0200
  [PATCH v3 09/15] [media] v4l: add support to BUF_QUEUED event Gustavo Padovan <gustavo@padovan.org> - 2017-09-07 20:50 +0200
  [PATCH v3 02/15] [media] vb2: add explicit fence user API Gustavo Padovan <gustavo@padovan.org> - 2017-09-07 20:50 +0200
  [PATCH v3 13/15] [media] vb2: add infrastructure to support out-fences Gustavo Padovan <gustavo@padovan.org> - 2017-09-07 20:50 +0200

csiph-web