Re: [PATCH] sunrpc: bug on rpc_task_set_client when no client is present.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
> 
> 



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux