From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74503C3A59F for ; Mon, 26 Aug 2019 13:39:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 528CF21848 for ; Mon, 26 Aug 2019 13:39:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728922AbfHZNjv (ORCPT ); Mon, 26 Aug 2019 09:39:51 -0400 Received: from fieldses.org ([173.255.197.46]:46568 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728862AbfHZNjv (ORCPT ); Mon, 26 Aug 2019 09:39:51 -0400 Received: by fieldses.org (Postfix, from userid 2815) id 112331CB3; Mon, 26 Aug 2019 09:39:51 -0400 (EDT) Date: Mon, 26 Aug 2019 09:39:51 -0400 From: "J. Bruce Fields" To: Alex Lyakas Cc: chuck.lever@oracle.com, linux-nfs@vger.kernel.org, Shyam Kaushik Subject: Re: [RFC-PATCH] nfsd: when unhashing openowners, increment openowner's refcount Message-ID: <20190826133951.GC22759@fieldses.org> References: <1566406146-7887-1-git-send-email-alex@zadara.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Sun, Aug 25, 2019 at 01:12:34PM +0300, Alex Lyakas wrote: > You are listed as maintainers of nfsd. Can you please take a look at > the below patch? Thanks! I take it this was found by some kind of code analysis or fuzzing, not use in production? Asking because I've been considering just deprecating it, so: > > After we fixed this, we confirmed that the openowner is not freed > > prematurely. It is freed by release_openowner() final call > > to nfs4_put_stateowner(). > > > > However, we still get (other) random crashes and memory corruptions > > when nfsd_inject_forget_client_openowners() and > > nfsd_inject_forget_openowners(). > > According to our analysis, we don't see any other refcount issues. > > Can anybody from the community review these flows for other potentials issues? I'm wondering how much effort we want to put into tracking all that down. --b.