Commit d15128eb authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] selinux: fix struct type

From: Stephen Smalley <sds@epoch.ncsc.mil>

This patch fixes the type of the ssec pointer in the sk_free_security
function.  This has no current impact as the magic element is the top of each
structure.  Thanks to Chad Hanson of TCS for discovering the bug and
submitting the patch.
parent 25c1c70b
...@@ -272,7 +272,7 @@ static int sk_alloc_security(struct sock *sk, int family, int priority) ...@@ -272,7 +272,7 @@ static int sk_alloc_security(struct sock *sk, int family, int priority)
static void sk_free_security(struct sock *sk) static void sk_free_security(struct sock *sk)
{ {
struct task_security_struct *ssec = sk->sk_security; struct sk_security_struct *ssec = sk->sk_security;
if (sk->sk_family != PF_UNIX || ssec->magic != SELINUX_MAGIC) if (sk->sk_family != PF_UNIX || ssec->magic != SELINUX_MAGIC)
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment