key_spdget uses key_setdumpsp() without SPTREE_RLOCK held (it uses

referenced pointer to sp). Remove SPTREE_RLOCK_ASSERT from
key_setdumpsp() to fix wrong assertion.

Reported by:	Emeric POUPON
Obtained from:	Yandex LLC
Sponsored by:	Yandex LLC
This commit is contained in:
Andrey V. Elsukov 2015-01-27 17:46:55 +00:00
parent 85f95fffd7
commit b489a49fc0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=277797

View File

@ -2421,8 +2421,6 @@ key_setdumpsp(struct secpolicy *sp, u_int8_t type, u_int32_t seq,
struct mbuf *result = NULL, *m;
struct seclifetime lt;
SPTREE_RLOCK_ASSERT();
m = key_setsadbmsg(type, 0, SADB_SATYPE_UNSPEC, seq, pid, sp->refcnt);
if (!m)
goto fail;