Re: [PATCH v6 5/7] virt: tdx-guest: Expose TDX MRs as sysfs attributes

From
Dan Williams <hidden>
Date
2025-05-08 00:46:19
Also in
lkml
Reply to
Cedric Xing, 2025-05-06
Cedric Xing wrote:
quoted hunk ↗ jump to hunk
@@ -339,6 +485,7 @@ module_init(tdx_guest_init);
 
 static void __exit tdx_guest_exit(void)
 {
+	tdx_mr_deinit(tdx_attr_groups[0]);
 	tsm_unregister(&tdx_tsm_ops);
 	free_quote_buf(quote_data);
 	misc_deregister(&tdx_misc_dev);
One thing I noticed when merging this series for linux-next is that the
exit release order is broken.  tdx_mr_deinit cannot be called while the
attributes are still live. The order needs to be:

        tsm_unregister(&tdx_tsm_ops);
        free_quote_buf(quote_data);
        misc_deregister(&tdx_misc_dev);
        tdx_mr_deinit(tdx_attr_groups[0]);

...I will send an incremental patch to fix this up.
Thread (13 messages) 13 messages, 3 authors, last reply 2025-05-15
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help