s3: smbd: Add some DEVELOPER-only code to panic if the destructor for an aio_lnk...
authorJeremy Allison <jra@samba.org>
Mon, 18 Sep 2023 21:43:23 +0000 (14:43 -0700)
committerJule Anger <janger@samba.org>
Wed, 20 Sep 2023 20:35:15 +0000 (20:35 +0000)
commit4baff9de6b2dc93d81c25874c78f31f91b16d260
tree461fbd4a87bee42a3d237015fca0251b7694c05d
parent82d6f8a6ce3918b51a9422101823328084a27ffa
s3: smbd: Add some DEVELOPER-only code to panic if the destructor for an aio_lnk is called and the associated fsp doesn't exist.

Make this DEVELOPER-only as it walks the entire open
file list on every file close (with associated aio).

This helps catch really subtle problems with orphaned
aio lnk structs.

Reproducer test case to follow.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15423

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 82e88f70f181300f6f98691f6680839a94470e13)
source3/smbd/smb2_aio.c