| 6905 | } |
| 6906 | |
| 6907 | static struct secspacq * |
| 6908 | key_getspacq(struct secpolicyindex *spidx) |
| 6909 | { |
| 6910 | struct secspacq *acq; |
| 6911 | |
| 6912 | SPACQ_LOCK(); |
| 6913 | LIST_FOREACH(acq, &V_spacqtree, chain) { |
| 6914 | if (key_cmpspidx_exactly(spidx, &acq->spidx)) { |
| 6915 | /* NB: return holding spacq_lock */ |
| 6916 | return acq; |
| 6917 | } |
| 6918 | } |
| 6919 | SPACQ_UNLOCK(); |
| 6920 | |
| 6921 | return NULL; |
| 6922 | } |
| 6923 | |
| 6924 | /* |
| 6925 | * SADB_ACQUIRE processing, |
no test coverage detected