mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-23 23:40:53 +07:00
9p pull request for inclusion in 5.13
Two small fixes to properly cleanup the 9p transports list if virtio/xen module initialization fail. 9p might otherwise try to access memory from a module that failed to register got freed. -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE/IPbcYBuWt0zoYhOq06b7GqY5nAFAl0oKGcACgkQq06b7GqY 5nAfgw//TQNozxgNjwTndpDtVP8R992DcHeTf/S6X7jIu2HArD8tJe516fmkR3T/ ZNMMEiRQhhOjy1h3I2Z/tG0uo90Y6Q4CjWFQKC3pWVILBHb2rWpkgmDtS6jI6KZM ogScIkLwgLucfYmS/ST5JB1zS1c/DCbCWKTpwaDDt3WFdIVd2gfITo7BB0mC16an OjZLpQahSKpyTz2IFh3FWWTO7PjPcuXUQMmlOfcxT8udNwMiVWs39hu186V2kAhx mohAooN0lfHGfQnfu4Kqpy0WSbsMjjLdk0W9jMWIEQ4svv88hbVn8+q5cnW/MWcP w9C3rXsutj3E+9ShEnKiq42MFJ0g9Tis8wcqa90soVHteIK/VD5vJrrIA9RmyAer OPnED8qJzJtyyD4BDgQnlH6nepHDPD0ar2287eRrLb8CHFrKhzh4D1Lt2WP4+mHM o7QZjDsgY24SJeYy7UZTFRN4k36av1PyGKtSBpTWnMabRiWP9CKRIRAM5P+Wu++h T70p5CS8XcBEisrj3w4ejR/fF1geAvXZvBM8+1dBWrmdSk2q6wvALPIaBKBE+Gxn rM2kJHVN5QTDoSXsUPoGb2E+Ab8rkT6oHm3+2z91YKeVT8xFGJneH9+6miv6rp1/ 5Fv/cjxK91vPwxFWxNqE42LI+xOqoRkl1/AXWFY0wsRevXNe/kk= =yAcL -----END PGP SIGNATURE----- Merge tag '9p-for-5.3' of git://github.com/martinetd/linux Pull 9p updates from Dominique Martinet: "Two small fixes to properly cleanup the 9p transports list if virtio/xen module initialization fail. 9p might otherwise try to access memory from a module that failed to register got freed" * tag '9p-for-5.3' of git://github.com/martinetd/linux: 9p/xen: Add cleanup path in p9_trans_xen_init 9p/virtio: Add cleanup path in p9_virtio_init
This commit is contained in:
commit
23bbbf5c1f
@ -767,10 +767,16 @@ static struct p9_trans_module p9_virtio_trans = {
|
||||
/* The standard init function */
|
||||
static int __init p9_virtio_init(void)
|
||||
{
|
||||
int rc;
|
||||
|
||||
INIT_LIST_HEAD(&virtio_chan_list);
|
||||
|
||||
v9fs_register_trans(&p9_virtio_trans);
|
||||
return register_virtio_driver(&p9_virtio_drv);
|
||||
rc = register_virtio_driver(&p9_virtio_drv);
|
||||
if (rc)
|
||||
v9fs_unregister_trans(&p9_virtio_trans);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
static void __exit p9_virtio_cleanup(void)
|
||||
|
@ -530,13 +530,19 @@ static struct xenbus_driver xen_9pfs_front_driver = {
|
||||
|
||||
static int p9_trans_xen_init(void)
|
||||
{
|
||||
int rc;
|
||||
|
||||
if (!xen_domain())
|
||||
return -ENODEV;
|
||||
|
||||
pr_info("Initialising Xen transport for 9pfs\n");
|
||||
|
||||
v9fs_register_trans(&p9_xen_trans);
|
||||
return xenbus_register_frontend(&xen_9pfs_front_driver);
|
||||
rc = xenbus_register_frontend(&xen_9pfs_front_driver);
|
||||
if (rc)
|
||||
v9fs_unregister_trans(&p9_xen_trans);
|
||||
|
||||
return rc;
|
||||
}
|
||||
module_init(p9_trans_xen_init);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user