mirror of
https://github.com/genesi/linux-legacy.git
synced 2026-05-19 13:06:19 +00:00
NetLabel: fix a cache race condition
Testing revealed a problem with the NetLabel cache where a cached entry could be freed while in use by the LSM layer causing an oops and other problems. This patch fixes that problem by introducing a reference counter to the cache entry so that it is only freed when it is no longer in use. Signed-off-by: Paul Moore <paul.moore@hp.com> Signed-off-by: James Morris <jmorris@namei.org>
This commit is contained in:
committed by
David S. Miller
parent
c25d518044
commit
ffb733c650
@@ -200,7 +200,7 @@ void netlbl_cache_invalidate(void)
|
||||
int netlbl_cache_add(const struct sk_buff *skb,
|
||||
const struct netlbl_lsm_secattr *secattr)
|
||||
{
|
||||
if (secattr->cache.data == NULL)
|
||||
if (secattr->cache == NULL)
|
||||
return -ENOMSG;
|
||||
|
||||
if (CIPSO_V4_OPTEXIST(skb))
|
||||
|
||||
Reference in New Issue
Block a user