More NFS Client Bugfixes for Linux 5.19-rc
- Bugfixes: - Allocate a fattr for _nfs4_discover_trunking() - Fix module reference count leak in nfs4_run_state_manager() -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEnZ5MQTpR7cLU7KEp18tUv7ClQOsFAmK/NHYACgkQ18tUv7Cl QOtbXBAAhivn5bqZvrKz4WI4WjddTRcjyvITiW6m26GZZVgNHz1Sc2Tp6TA6QEL8 c7OLkj2SoA0SmO4kZX+gCpOzsapQA7FUWULFxpPxJFp/NCsgoxYqO5ZfX0qVpk6t 1w8lGFqsMve3LdRmcqvbaIrvzJPMdsVvixrZwXRQMe/atvtUMmgHo4pkBPuQ5nv9 FzWh0KRiohhEWSmncD0fjdYBCq4VOqrUEEn4BTeMoXwvg/noLj5GX3mS14CFH12Y +iOqQ05O48Ny8qhzeQ8bRat43t4cZoCpFUcwEPB0CWoNCqS4Qoqvn48Ic+4WMxpN nPg2CqkqaG2RUJozSJz8m+GQNbEohoGkruZXJh7TQaqWXrIJGRMBhKhI2b7hujBG meu0ypETzlbofjleCpevfvnNStoRTuakssMpcU/hfKjnfNIsHnADSYey0HWHWTAH ZaBT6N5Z3C6hRWz7wXIn3uTuWadZbDC9+HGvvyMpuP+PDQFM9exJfhoO0JQvQc/G dPB7SyINVj2Z9gguJaew4csRoSxZqxeLB28XHQ7yyYsmo7lbUWaeUgGGpynrrsZL Ysuh7JVoZyhSSdNb3b2vlnI7zK+F1qIkzg0/u2ZN8CLPfMaBCmPL031oFudpWJ2n TLnxoFHhsG2MTwua3CaOfk8QvNc2dT7ZsvxXHl7HxBlxGtBgSN4= =OYKI -----END PGP SIGNATURE----- Merge tag 'nfs-for-5.19-3' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client fixes from Anna Schumaker: - Allocate a fattr for _nfs4_discover_trunking() - Fix module reference count leak in nfs4_run_state_manager() * tag 'nfs-for-5.19-3' of git://git.linux-nfs.org/projects/anna/linux-nfs: NFSv4: Add an fattr allocation to _nfs4_discover_trunking() NFS: restore module put when manager exits.
This commit is contained in:
commit
76ff294e16
|
@ -4012,22 +4012,29 @@ static int _nfs4_discover_trunking(struct nfs_server *server,
|
|||
}
|
||||
|
||||
page = alloc_page(GFP_KERNEL);
|
||||
if (!page)
|
||||
return -ENOMEM;
|
||||
locations = kmalloc(sizeof(struct nfs4_fs_locations), GFP_KERNEL);
|
||||
if (page == NULL || locations == NULL)
|
||||
goto out;
|
||||
if (!locations)
|
||||
goto out_free;
|
||||
locations->fattr = nfs_alloc_fattr();
|
||||
if (!locations->fattr)
|
||||
goto out_free_2;
|
||||
|
||||
status = nfs4_proc_get_locations(server, fhandle, locations, page,
|
||||
cred);
|
||||
if (status)
|
||||
goto out;
|
||||
goto out_free_3;
|
||||
|
||||
for (i = 0; i < locations->nlocations; i++)
|
||||
test_fs_location_for_trunking(&locations->locations[i], clp,
|
||||
server);
|
||||
out:
|
||||
if (page)
|
||||
__free_page(page);
|
||||
out_free_3:
|
||||
kfree(locations->fattr);
|
||||
out_free_2:
|
||||
kfree(locations);
|
||||
out_free:
|
||||
__free_page(page);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
|
@ -2753,5 +2753,6 @@ again:
|
|||
goto again;
|
||||
|
||||
nfs_put_client(clp);
|
||||
module_put_and_kthread_exit(0);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue