diff options
author | JP Abgrall <jpa@google.com> | 2011-09-20 14:23:39 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:39:07 -0800 |
commit | 13a64b2007ea68795d06d869f55d4087b9acf0d6 (patch) | |
tree | 411c371a1fe82741cb604624a19a14ba5a0a5982 /net | |
parent | 21aefc18f6de2ca9675e568cb32174b454d01b8e (diff) |
netfilter: xt_qtaguid: change WARN_ONCE into pr_warn_once
Make the warning less scary.
Change-Id: I0276c5413e37ec991f24db57aeb90333fb1b5a65
Signed-off-by: JP Abgrall <jpa@google.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/xt_qtaguid.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/net/netfilter/xt_qtaguid.c b/net/netfilter/xt_qtaguid.c index 9b9b809b9960..c42e486c5cbe 100644 --- a/net/netfilter/xt_qtaguid.c +++ b/net/netfilter/xt_qtaguid.c @@ -2113,14 +2113,16 @@ static int ctrl_cmd_tag(const char *input) * At first, we want to catch user-space code that is not * opening the /dev/xt_qtaguid. */ - WARN_ONCE(IS_ERR_OR_NULL(pqd_entry), - "qtaguid: User space forgot to open /dev/xt_qtaguid? " - "pid=%u tgid=%u uid=%u\n", - current->pid, current->tgid, current_fsuid()); - if (!IS_ERR_OR_NULL(pqd_entry)) { + if (IS_ERR_OR_NULL(pqd_entry)) + pr_warn_once( + "qtaguid: %s(): " + "User space forgot to open /dev/xt_qtaguid? " + "pid=%u tgid=%u uid=%u\n", __func__, + current->pid, current->tgid, + current_fsuid()); + else list_add(&sock_tag_entry->list, &pqd_entry->sock_tag_list); - } spin_unlock_bh(&uid_tag_data_tree_lock); sock_tag_tree_insert(sock_tag_entry, &sock_tag_tree); @@ -2200,11 +2202,12 @@ static int ctrl_cmd_untag(const char *input) * At first, we want to catch user-space code that is not * opening the /dev/xt_qtaguid. */ - WARN_ONCE(IS_ERR_OR_NULL(pqd_entry), - "qtaguid: User space forgot to open /dev/xt_qtaguid? " - "pid=%u tgid=%u uid=%u\n", - current->pid, current->tgid, current_fsuid()); - if (!IS_ERR_OR_NULL(pqd_entry)) + if (IS_ERR_OR_NULL(pqd_entry)) + pr_warn_once("qtaguid: %s(): " + "User space forgot to open /dev/xt_qtaguid? " + "pid=%u tgid=%u uid=%u\n", __func__, + current->pid, current->tgid, current_fsuid()); + else list_del(&sock_tag_entry->list); spin_unlock_bh(&uid_tag_data_tree_lock); /* |