- if (req_capsule_get_size(info->mti_pill, &RMF_CAPA1, RCL_CLIENT))
- mdt_set_capainfo(info, 0, &info->mti_body->fid1,
- req_capsule_client_get(info->mti_pill, &RMF_CAPA1));
+ /* Detect out-of range masks */
+ if ((hss->hss_setmask | hss->hss_clearmask) & ~HSM_FLAGS_MASK) {
+ CDEBUG(D_HSM, "Incompatible masks provided (set %#llx"
+ ", clear %#llx) vs supported set (%#x).\n",
+ hss->hss_setmask, hss->hss_clearmask, HSM_FLAGS_MASK);
+ GOTO(out_unlock, rc = -EINVAL);
+ }