diff options
author | Paul Moore <pmoore@redhat.com> | 2013-07-24 01:38:40 +0400 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2013-07-25 21:02:13 +0400 |
commit | bed4d7efb31fd81b3a3c83dc8540197cd0fe81c0 (patch) | |
tree | 186fe2daebcea0115afe0b45f540a346c2c700a8 /security/selinux/include/xfrm.h | |
parent | d1b17b09f390369271ecfbc7e4a4d0d0dcff1b1b (diff) | |
download | linux-bed4d7efb31fd81b3a3c83dc8540197cd0fe81c0.tar.xz |
selinux: remove the BUG_ON() from selinux_skb_xfrm_sid()
Remove the BUG_ON() from selinux_skb_xfrm_sid() and propogate the
error code up to the caller. Also check the return values in the
only caller function, selinux_skb_peerlbl_sid().
Signed-off-by: Paul Moore <pmoore@redhat.com>
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'security/selinux/include/xfrm.h')
-rw-r--r-- | security/selinux/include/xfrm.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/security/selinux/include/xfrm.h b/security/selinux/include/xfrm.h index 60774bcf61b3..7605251936f5 100644 --- a/security/selinux/include/xfrm.h +++ b/security/selinux/include/xfrm.h @@ -76,10 +76,9 @@ static inline void selinux_xfrm_notify_policyload(void) } #endif -static inline void selinux_skb_xfrm_sid(struct sk_buff *skb, u32 *sid) +static inline int selinux_skb_xfrm_sid(struct sk_buff *skb, u32 *sid) { - int err = selinux_xfrm_decode_session(skb, sid, 0); - BUG_ON(err); + return selinux_xfrm_decode_session(skb, sid, 0); } #endif /* _SELINUX_XFRM_H_ */ |