[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1429650413.18561.10.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Tue, 21 Apr 2015 14:06:53 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Mateusz Guzik <mguzik@...hat.com>
Cc: Al Viro <viro@...IV.linux.org.uk>,
Andrew Morton <akpm@...ux-foundation.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Yann Droneaud <ydroneaud@...eya.com>,
Konstantin Khlebnikov <khlebnikov@...dex-team.ru>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] fs: use a sequence counter instead of file_lock in
fd_install
On Tue, 2015-04-21 at 22:12 +0200, Mateusz Guzik wrote:
> in dup_fd:
> for (i = open_files; i != 0; i--) {
> struct file *f = *old_fds++;
> if (f) {
> get_file(f);
>
I see no new requirement here. f is either NULL or not.
multi threaded programs never had a guarantee dup_fd() would catch a non
NULL pointer here.
> at least a data dependency barrier, or maybe smp_rmb for peace of mind
>
> similarly in do_dup2:
> tofree = fdt->fd[fd];
> if (!tofree && fd_is_open(fd, fdt))
> goto Ebusy;
Same here.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists