diff options
author | Dave Airlie <airlied@redhat.com> | 2018-01-18 09:32:15 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2018-01-18 09:32:15 +1000 |
commit | 567eef3a35d08d4bfb49057c9779bce7a66a6908 (patch) | |
tree | 2bf17da93b86508fe2f66e87f39897a1d4b403dc /crypto/algapi.c | |
parent | bc77326f864263acbf6f8e6ac6be2d647ac9cc78 (diff) | |
parent | 21864b027d847a6d91903a5ba219770403ba8aad (diff) | |
download | linux-crypto-567eef3a35d08d4bfb49057c9779bce7a66a6908.tar.gz linux-crypto-567eef3a35d08d4bfb49057c9779bce7a66a6908.zip |
BackMerge tag 'v4.15-rc8' into drm-next
Linux 4.15-rc8
Daniel requested this for so the intel CI won't fall over on drm-next
so often.
Diffstat (limited to '')
-rw-r--r-- | crypto/algapi.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/crypto/algapi.c b/crypto/algapi.c index 60d7366e..9a636f96 100644 --- a/crypto/algapi.c +++ b/crypto/algapi.c @@ -167,6 +167,18 @@ void crypto_remove_spawns(struct crypto_alg *alg, struct list_head *list, spawn->alg = NULL; spawns = &inst->alg.cra_users; + + /* + * We may encounter an unregistered instance here, since + * an instance's spawns are set up prior to the instance + * being registered. An unregistered instance will have + * NULL ->cra_users.next, since ->cra_users isn't + * properly initialized until registration. But an + * unregistered instance cannot have any users, so treat + * it the same as ->cra_users being empty. + */ + if (spawns->next == NULL) + break; } } while ((spawns = crypto_more_spawns(alg, &stack, &top, &secondary_spawns))); |