diff options
author | JP Abgrall <jpa@google.com> | 2012-10-09 20:38:21 -0700 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2013-01-30 03:22:36 +0000 |
commit | 5ac7a303b643a38d346b1f9d9ccd9988787de7f1 (patch) | |
tree | 7a5bc2fb987a47a71f2887945456d8ef239e998e /net/netfilter | |
parent | e411d31419b6fab38f7f0268028bdfd18c55d9a6 (diff) | |
download | kernel_samsung_tuna-5ac7a303b643a38d346b1f9d9ccd9988787de7f1.zip kernel_samsung_tuna-5ac7a303b643a38d346b1f9d9ccd9988787de7f1.tar.gz kernel_samsung_tuna-5ac7a303b643a38d346b1f9d9ccd9988787de7f1.tar.bz2 |
netfilter: xt_qtaguid: fix error exit that would keep a spinlock.
qtudev_open() could return with a uid_tag_data_tree_lock held
when an kzalloc(..., GFP_ATOMIC) would fail.
Very unlikely to get triggered AND survive the mayhem of running out of mem.
Signed-off-by: JP Abgrall <jpa@google.com>
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/xt_qtaguid.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/xt_qtaguid.c b/net/netfilter/xt_qtaguid.c index ea716b3..7efbab9 100644 --- a/net/netfilter/xt_qtaguid.c +++ b/net/netfilter/xt_qtaguid.c @@ -2752,7 +2752,7 @@ static int qtudev_open(struct inode *inode, struct file *file) utd_entry = get_uid_data(current_fsuid(), &utd_entry_found); if (IS_ERR_OR_NULL(utd_entry)) { res = PTR_ERR(utd_entry); - goto err; + goto err_unlock; } /* Look for existing PID based proc_data */ @@ -2794,8 +2794,8 @@ err_unlock_free_utd: rb_erase(&utd_entry->node, &uid_tag_data_tree); kfree(utd_entry); } +err_unlock: spin_unlock_bh(&uid_tag_data_tree_lock); -err: return res; } |