-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Update dkms.mkconf #4
base: master
Are you sure you want to change the base?
Conversation
Fixed bug: given name of correct directories for finding the kernel modules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the change.
This GitHub repo is a read-only clone (see repo description).
Please follow https://wiki.lustre.org/Submitting_Changes to submit fixes for Lustre.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see the mkconf was not updated when these shifted.
The debian/dkms.conf.in will also need updating for the same reason.
Allocation of net (struct lnet_net) is done under lnet_dyn_add_ni(). When adding and starting net there is a check if the net is unique or not. If it is not unique (it is a duplicate or already added before) the net cleanup is done under lnet_startup_lndnet() and -EEXISTS is return. This breaks the order of allocation. The allocation order is struct lnet_ni is part of struct lnet_net. Therefore lnet_net cannot be deallocated before lnet_ni. This patch removes lnet_net_free() call only when the net is found to be duplicate. The cleanup of net (lnet_net_free()) is called from lnet_dyn_add_ni() where it is actually allocated. This is locally tested and no KASAN error was reported. Lustre: DEBUG MARKER: lnetctl net add --net tcp --if ens2 LNet: Added LNI 192.168.205.1@tcp [8/256/0/180] LNet: Accept secure, port 988 Lustre: DEBUG MARKER: lnetctl net add --net tcp --if ens2 ================================================================== BUG: KASAN: use-after-free in lnet_net_remove_cpts.constprop.0+0x774/0x7f0 [lnet] Read of size 8 at addr ffff888005be7a50 by task lnetctl/79304 CPU: 1 PID: 79304 Comm: lnetctl Kdump: loaded Tainted: G W OE ------- --- 5.14.0rocky93-debug #4 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-1.fc39 04/01/2014 Call Trace: <TASK> ? lnet_net_remove_cpts.constprop.0+0x774/0x7f0 [lnet] dump_stack_lvl+0x57/0x7d print_address_description.constprop.0+0x1f/0x1e0 ? lnet_net_remove_cpts.constprop.0+0x774/0x7f0 [lnet] print_report.cold+0x55/0x240 kasan_report+0xc8/0x200 ? lnet_net_remove_cpts.constprop.0+0x774/0x7f0 [lnet] lnet_net_remove_cpts.constprop.0+0x774/0x7f0 [lnet] lnet_ni_free+0x6a/0x620 [lnet] lnet_dyn_add_ni+0x29d/0x370 [lnet] Test-Parameters: trivial testlist=sanity-lnet Change-Id: I2c751a1bfeb583b86d9b68241607cf90c69f4277 Signed-off-by: James Simmons <jsimmons@infradead.org> Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57861 Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com> Reviewed-by: Frank Sehr <fsehr@whamcloud.com> Reviewed-by: Chris Horn <chris.horn@hpe.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
Fixed bug: given name of correct directories for finding the kernel modules.