Re: Buggy rwsem locking code in fs/smb/client/file.c

From: Peter Zijlstra
Date: Mon Jul 03 2023 - 14:29:21 EST


On Mon, Jul 03, 2023 at 11:43:18AM -0400, Steven Rostedt wrote:
> I just reviewed a patch that copied a solution from
> fs/smb/client/file.c (original was fs/cifs/file.c), which is really
> just hiding a bug. And because this code could have possibly caused
> this buggy solution to be repeated, I believe it should be fixed,
> before others use it as precedent in other areas of the kernel.
>
> Commit d46b0da7a33dd ("cifs: Fix cifsInodeInfo lock_sem deadlock when
> reconnect occurs") has in its change log:

Oh man, that's .... I gotta go buy a new WTF'o'meter again :/