STRUCT KMOD_TEST_DEVICE_INFO(9)
πΈ STRUCT KMOD_TEST_DEVICE_INFO(9) πΈ
okay bestie, buckle up β this is a page from the Kernel API Manual and it's all about struct kmod_test_device_info, aka the thread info struct. lowkey iconic little record. let's get into it π
β¨ NAME β¨
struct kmod_test_device_info β thread info π§΅
π¦ SYNOPSIS π¦
here's the whole glow-up, character for character, no cap:
struct kmod_test_device_info {
int ret_sync;
struct file_system_type *fs_sync;
struct task_struct *task_sync;
unsigned int thread_idx;
struct kmod_test_device *test_dev;
bool need_mod_put;
};
π Members π
ret_syncβ the return value ifrequest_moduleis used, sync request forTEST_KMOD_DRIVERβ¨fs_syncβ the return value ofget_fs_typeforTEST_KMOD_FS_TYPEπΈtask_syncβ the kthread'stask_struct, orNULLif it's not running πthread_idxβ the thread ID, literally just the ID πtest_devβ the test device that the test is being performed under πneed_mod_putβ okay so some tests (get_fs_typeis one of them) require putting the module (module_put(fs_sync->owner)) when done β otherwise you will not be able to unload the respective modules and re-test π. We use this to keep accounting of when we need this, and to help out in case we need to error out and deal withmodule_puton error. it's giving responsible bookkeeping fr fr π
heads up bestie: skip that module_put and your modules stay stuck loaded β no unloading, no re-testing. so like, don't π«Ά
π SEE ALSO π
- Kernel file
./lib/test_kmod.c enum kmod_test_case(9)struct kmod_test_device(9)
and that's the whole page, bestie! π this lil masterpiece lives in ./lib, it's the October 2026 era, and it goes by struct kmod_..._device_info(9) ππ periodt.
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms