В ядре Linux была устранена следующая уязвимость: RDMA/cxgb4: Free debugfs on registration failure c4iw_alloc() создаёт дерево debugfs для каждого устройства (dev->debugfs_root via setup_debugfs()), но оно удаляется только в c4iw_remove(), а не в c4iw_dealloc(). Когда регистрация устройства RDMA терпит неудачу, путь err_dealloc_ctx сотрудника регистрации вызывает c4iw_dealloc() напрямую, минуя c4iw_remove(), поэтому отладочные зубы протекают и переживают освобожденный c4iw_dev. Переместите debugfs_remove_recursive() в c4iw_dealloc(), чтобы каждый путь, освобождающий ctx->dev, также удалял свое дерево отладки.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: RDMA/cxgb4: Free debugfs on registration failure c4iw_alloc() creates the per-device debugfs tree (dev->debugfs_root via setup_debugfs()), but it is removed only in c4iw_remove(), not in c4iw_dealloc(). When RDMA device registration fails, the registration worker's err_dealloc_ctx path calls c4iw_dealloc() directly, bypassing c4iw_remove(), so the debugfs dentries leak and outlive the freed c4iw_dev. Move debugfs_remove_recursive() into c4iw_dealloc() so every path that frees ctx->dev also removes its debugfs tree.