don't access dlclose'd dynamic ioengine object after close
Alexey reported this bug when using dynamically loaded IO engines;
a segfault on the line where we set the dlhandle to NULL after
I think this is because ops points to the thing we obtained from dlsym:
ops = dlsym(dlhandle, engine_lib);
and after the final dlclose, the object no longer exists and efforts
to set the handle within it will fail for obvious reasons.
I'm not sure why I hadn't seen this before.
Reported-by: Alexey Dobriyan <firstname.lastname@example.org>
Fixes: f6931a1 ("fio: move dynamic library handle to io_ops structure")
Tested-by: Alexey Dobriyan <email@example.com>
Signed-off-by: Eric Sandeen <firstname.lastname@example.org>
Signed-off-by: Jens Axboe <email@example.com>
1 file changed