lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YXB5/TnA0qnGB+YA@nyarly.rlyeh.local>
Date:   Wed, 20 Oct 2021 17:20:13 -0300
From:   Thiago Rafael Becker <trbecker@...il.com>
To:     Trond Myklebust <trondmy@...merspace.com>
Cc:     "linux-nfs@...r.kernel.org" <linux-nfs@...r.kernel.org>,
        "tbecker@...hat.com" <tbecker@...hat.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "chuck.lever@...cle.com" <chuck.lever@...cle.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "bfields@...ldses.org" <bfields@...ldses.org>,
        "anna.schumaker@...app.com" <anna.schumaker@...app.com>
Subject: Re: [PATCH] sunrpc: bug on rpc_task_set_client when no client is
 present.

On Wed, Oct 20, 2021 at 07:04:35PM +0000, Trond Myklebust wrote:
Hello,

> I'm not seeing the point of this BUG_ON(). Why not just change this
> code to not check for clnt == NULL, and let the thing Oops when it
> tries to dereference clnt?

This was changed in 58f9612c6ea85, prior to that, this was not tested. I'm
not sure why this test exists, the only reason I can imagine is to keep
the previous task's rpc_client in case the new client is NULL. Decided
to go conservative on this, and BUG_ON() when no client is available.

Inside the linux source, I don't see how this may happen unless the code
has a bug, so I think it's possible to remove this test.

-- Thiago
 
> -- 
> Trond Myklebust
> Linux NFS client maintainer, Hammerspace
> trond.myklebust@...merspace.com
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ