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

2017-09-07 Thread Al Viro
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

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

2017-09-07 Thread Al Viro
On Thu, Sep 07, 2017 at 03:42:25PM -0300, Gustavo Padovan wrote: > From: Gustavo Padovan > > Rename __close_fd() to close_fd() and export it to be able close files > in modules using file descriptors. > > The usecase that motivates this change happens in V4L2

Re: [RFC 0/6] Module for tracking/accounting shared memory buffers

2016-10-11 Thread Al Viro
On Tue, Oct 11, 2016 at 04:50:04PM -0700, Ruchi Kandoi wrote: > memtrack maintains a per-process list of shared buffer references, which is > exported to userspace as /proc/[pid]/memtrack. Buffers can be optionally > "tagged" with a short string: for example, Android userspace would use this >

Re: [PATCH] remove lots of IS_ERR_VALUE abuses

2016-05-27 Thread Al Viro
On Fri, May 27, 2016 at 11:23:25PM +0200, Arnd Bergmann wrote: > @@ -837,7 +837,7 @@ static int load_flat_shared_library(int id, struct > lib_info *libs) > > res = prepare_binprm(); > > - if (!IS_ERR_VALUE(res)) > + if (res >= 0) if (res == 0), please -

Re: [PATCH][davinci] ccdc_update_raw_params() frees the wrong thing

2016-01-06 Thread Al Viro
On Tue, Jan 05, 2016 at 05:37:06PM +, Lad, Prabhakar wrote: > On Sun, Dec 13, 2015 at 12:32 AM, Al Viro <v...@zeniv.linux.org.uk> wrote: > > Passing a physical address to free_pages() is a bad idea. > > config_params->fault_pxl.fpc_table_add

[PATCH][davinci] ccdc_update_raw_params() frees the wrong thing

2015-12-12 Thread Al Viro
n't. Signed-off-by: Al Viro <v...@zeniv.linux.org.uk> diff --git a/drivers/media/platform/davinci/dm644x_ccdc.c b/drivers/media/platform/davinci/dm644x_ccdc.c index ffbefdf..6fba32b 100644 --- a/drivers/media/platform/davinci/dm644x_ccdc.c +++ b/drivers/media/platform/davinci/dm644x_ccdc.c

Re: ->poll() instances shouldn't be indefinitely blocking

2015-11-29 Thread Al Viro
ueue was originally done back in March and last week I'd ported it to current mainline, the last commit being the annotations in the code that had been added since then. The current summary follows: Shortlog: Al Viro (20): switch poll.h to generic-y where possible annotate POLL... constants a

videobuf_vm_{open,close} race fixes

2013-05-09 Thread Al Viro
just use videobuf_queue_lock(map-q) to protect map-count; vm_area_operations -open() and -close() are called just under vma-vm_mm-mmap_sem, which doesn't help the drivers at all, since clonal VMAs are normally in different address spaces... Signed-off-by: Al Viro v...@zeniv.linux.org.uk

Re: [PATCH] omap_vout: find_vma() needs -mmap_sem held

2012-12-16 Thread Al Viro
. Mea culpa... Signed-off-by: Al Viro v...@zeniv.linux.org.uk --- diff --git a/drivers/media/platform/omap/omap_vout.c b/drivers/media/platform/omap/omap_vout.c index 9935040..cb564d0 100644 --- a/drivers/media/platform/omap/omap_vout.c +++ b/drivers/media/platform/omap/omap_vout.c @@ -207,19

[PATCH] omap_vout: find_vma() needs -mmap_sem held

2012-12-15 Thread Al Viro
don't even look at its result). Cc: sta...@vger.kernel.org [2.6.35] Signed-off-by: Al Viro v...@zeniv.linux.org.uk --- diff --git a/drivers/media/platform/omap/omap_vout.c b/drivers/media/platform/omap/omap_vout.c index 9935040..984512f 100644 --- a/drivers/media/platform/omap/omap_vout.c +++ b

Re: [PATCH] omap_vout: find_vma() needs -mmap_sem held

2012-12-15 Thread Al Viro
On Sat, Dec 15, 2012 at 08:12:37PM +, Al Viro wrote: Walking rbtree while it's modified is a Bad Idea(tm); besides, the result of find_vma() can be freed just as it's getting returned to caller. Fortunately, it's easy to fix - just take -mmap_sem a bit earlier (and don't bother

Re: udev breakages - was: Re: Need of an .async_probe() type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Al Viro
On Wed, Oct 03, 2012 at 09:38:52AM -0700, Linus Torvalds wrote: Yeah, that bugzilla shows the problem with Kay as a maintainer too, not willing to own up to problems he caused. Can you actually see the problem? I did add the attached patch as an attachment to the bugzilla, so the reporter

Re: udev breakages - was: Re: Need of an .async_probe() type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-03 Thread Al Viro
On Wed, Oct 03, 2012 at 10:32:08AM -0700, Linus Torvalds wrote: On Wed, Oct 3, 2012 at 10:09 AM, Al Viro v...@zeniv.linux.org.uk wrote: + if (!S_ISREG(inode-i_mode)) + return false; + size = i_size_read(inode); Probably better to do vfs_getattr() and check

Re: Can you review or ack this patch?

2011-08-23 Thread Al Viro
On Tue, Aug 23, 2011 at 08:33:25AM +0200, Hans Verkuil wrote: (and resent again, this time with the correct linux-fsdevel mail address) (Resent as requested by Andrew Morton since this is still stuck) Hi Al, Andrew, Can you take a look at this patch and send an Ack or review comments? Not