Print this page
5253 kmem_alloc/kmem_zalloc won't fail with KM_SLEEP
5254 getrbuf won't fail with KM_SLEEP


1836 {
1837         return (0);
1838 }
1839 
1840 /*
1841  * Add retransmit entry to the context cache entry for a new xid.
1842  * If there is already an entry, delete it before adding the new one.
1843  */
1844 static void retrans_add(client, xid, result)
1845         svc_rpc_gss_data *client;
1846         uint32_t        xid;
1847         rpc_gss_init_res *result;
1848 {
1849         retrans_entry   *rdata;
1850 
1851         if (client->retrans_data && client->retrans_data->xid == xid)
1852                 return;
1853 
1854         rdata = kmem_zalloc(sizeof (*rdata), KM_SLEEP);
1855 
1856         if (rdata == NULL)
1857                 return;
1858 
1859         rdata->xid = xid;
1860         rdata->result = *result;
1861 
1862         if (result->token.length != 0) {
1863                 GSS_DUP_BUFFER(rdata->result.token, result->token);
1864         }
1865 
1866         if (client->retrans_data)
1867                 retrans_del(client);
1868 
1869         client->retrans_data = rdata;
1870 }
1871 
1872 /*
1873  * Delete the retransmit data from the context cache entry.
1874  */
1875 static void retrans_del(client)
1876         svc_rpc_gss_data *client;
1877 {
1878         retrans_entry *rdata;




1836 {
1837         return (0);
1838 }
1839 
1840 /*
1841  * Add retransmit entry to the context cache entry for a new xid.
1842  * If there is already an entry, delete it before adding the new one.
1843  */
1844 static void retrans_add(client, xid, result)
1845         svc_rpc_gss_data *client;
1846         uint32_t        xid;
1847         rpc_gss_init_res *result;
1848 {
1849         retrans_entry   *rdata;
1850 
1851         if (client->retrans_data && client->retrans_data->xid == xid)
1852                 return;
1853 
1854         rdata = kmem_zalloc(sizeof (*rdata), KM_SLEEP);
1855 



1856         rdata->xid = xid;
1857         rdata->result = *result;
1858 
1859         if (result->token.length != 0) {
1860                 GSS_DUP_BUFFER(rdata->result.token, result->token);
1861         }
1862 
1863         if (client->retrans_data)
1864                 retrans_del(client);
1865 
1866         client->retrans_data = rdata;
1867 }
1868 
1869 /*
1870  * Delete the retransmit data from the context cache entry.
1871  */
1872 static void retrans_del(client)
1873         svc_rpc_gss_data *client;
1874 {
1875         retrans_entry *rdata;