Return-Path: Received: from mail-qk0-f169.google.com ([209.85.220.169]:33286 "EHLO mail-qk0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754234AbcGKRIS (ORCPT ); Mon, 11 Jul 2016 13:08:18 -0400 Received: by mail-qk0-f169.google.com with SMTP id p74so63943530qka.0 for ; Mon, 11 Jul 2016 10:08:17 -0700 (PDT) Message-ID: <1468256894.2577.13.camel@redhat.com> Subject: Re: [PATCH] posix_acl: de-union a_refcount and a_rcu From: Jeff Layton To: Linus Torvalds , Andreas Gruenbacher Cc: Alexander Viro , Thorsten Leemhuis , linux-fsdevel Date: Mon, 11 Jul 2016 13:08:14 -0400 In-Reply-To: References: <1468249288-16086-1-git-send-email-agruenba@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, 2016-07-11 at 09:50 -0700, Linus Torvalds wrote: > On Mon, Jul 11, 2016 at 8:01 AM, Andreas Gruenbacher > wrote: > > From: Jeff Layton > > > > Currently the two are unioned together, but I don't think that's > > safe. > > Ack. That does look fishy. Almost anything else can probably be > unioned together with the rcu list, but *not* the refcount that we > might want to look at during the rcu grace period. > I looked at unioning the rcu_head it with something else, but there's nothing else that doesn't get peeked at in an rcu-critical section. So I think this is the only real fix, unfortunately. > Al, this is your code (from long long ago). Want to take it through > the vfs tree, or should I just apply direectly? I'd like to have your > ack regardless, but the fix looks ObviouslyCorrect(tm) to me. > I think this is a v4.7 regression. We've freed these things via RCU for a long time, but monkeying with the refcount under the rcu_read_lock is new with the patch in the "Fixes:" line, AFAICT. -- Jeff Layton