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)
committerJeremy Allison <jra@samba.org>
Wed, 20 Sep 2023 01:49:34 +0000 (01:49 +0000)
commit82e88f70f181300f6f98691f6680839a94470e13
treee259f2e464dd46c2ec2bd81fdf0facd4f43b54e9
parent05291d2bd40a50a026df2caf8bf9f4c762238362
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>
source3/smbd/smb2_aio.c