Commit b7bd29b5 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'apparmor-pr-2019-02-01' of...

Merge tag 'apparmor-pr-2019-02-01' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor

Pull apparmor bug fixes from John Johansen:
 "Two bug fixes for apparmor:

   - Fix aa_label_build() error handling for failed merges

   - Fix warning about unused function apparmor_ipv6_postroute"

* tag 'apparmor-pr-2019-02-01' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor:
  apparmor: Fix aa_label_build() error handling for failed merges
  apparmor: Fix warning about unused function apparmor_ipv6_postroute
parents 5eeb6335 d6d478ae
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -1444,6 +1444,9 @@ check:
			new = aa_label_merge(label, target, GFP_KERNEL);
			new = aa_label_merge(label, target, GFP_KERNEL);
		if (IS_ERR_OR_NULL(new)) {
		if (IS_ERR_OR_NULL(new)) {
			info = "failed to build target label";
			info = "failed to build target label";
			if (!new)
				error = -ENOMEM;
			else
				error = PTR_ERR(new);
				error = PTR_ERR(new);
			new = NULL;
			new = NULL;
			perms.allow = 0;
			perms.allow = 0;
+2 −0
Original line number Original line Diff line number Diff line
@@ -1599,12 +1599,14 @@ static unsigned int apparmor_ipv4_postroute(void *priv,
	return apparmor_ip_postroute(priv, skb, state);
	return apparmor_ip_postroute(priv, skb, state);
}
}


#if IS_ENABLED(CONFIG_IPV6)
static unsigned int apparmor_ipv6_postroute(void *priv,
static unsigned int apparmor_ipv6_postroute(void *priv,
					    struct sk_buff *skb,
					    struct sk_buff *skb,
					    const struct nf_hook_state *state)
					    const struct nf_hook_state *state)
{
{
	return apparmor_ip_postroute(priv, skb, state);
	return apparmor_ip_postroute(priv, skb, state);
}
}
#endif


static const struct nf_hook_ops apparmor_nf_ops[] = {
static const struct nf_hook_ops apparmor_nf_ops[] = {
	{
	{