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>
Fri, 22 Sep 2023 19:34:15 +0000 (19:34 +0000)
commit3ac075735c191bb69c2d841a44c6e9c3bf75d3bf
tree9389c7f6b5404368b8727205248d9b9c37c7ae49
parentd70374c347953d64e9a6cf56db178d42f985227d
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