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

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/crypto/io/dprov.c
          +++ new/usr/src/uts/common/crypto/io/dprov.c
↓ open down ↓ 9130 lines elided ↑ open up ↑
9131 9131  
9132 9132          if (!force) {
9133 9133                  /* verify that object can be created */
9134 9134                  if ((error = dprov_template_can_create(session, template,
9135 9135                      nattr, check_for_secret)) != CRYPTO_SUCCESS)
9136 9136                          return (error);
9137 9137          }
9138 9138  
9139 9139          /* allocate new object */
9140 9140          object = kmem_zalloc(sizeof (dprov_object_t), KM_SLEEP);
9141      -        if (object == NULL)
9142      -                return (CRYPTO_HOST_MEMORY);
9143 9141  
9144 9142          /* is it a token object? */
9145 9143          /* check CKA_TOKEN attribute value */
9146 9144          error = dprov_get_template_attr_boolean(template, nattr,
9147 9145              DPROV_CKA_TOKEN, &is_token);
9148 9146          if (error == CRYPTO_SUCCESS && is_token) {
9149 9147                  /* token object, add it to the per-instance object table */
9150 9148                  for (i = 0; i < DPROV_MAX_OBJECTS; i++)
9151 9149                          if (softc->ds_objects[i] == NULL)
9152 9150                                  break;
↓ open down ↓ 653 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX