Revert "netfilter: nf_log: avoid oops in (un)bind with invalid nfproto values"

This reverts commit 895493dad6.
This commit is contained in:
tytung 2011-03-26 13:01:49 +08:00
parent 1b9449e9a4
commit a22bca12d1

View File

@ -83,8 +83,6 @@ EXPORT_SYMBOL(nf_log_unregister);
int nf_log_bind_pf(u_int8_t pf, const struct nf_logger *logger)
{
if (pf >= ARRAY_SIZE(nf_loggers))
return -EINVAL;
mutex_lock(&nf_log_mutex);
if (__find_logger(pf, logger->name) == NULL) {
mutex_unlock(&nf_log_mutex);
@ -98,8 +96,6 @@ EXPORT_SYMBOL(nf_log_bind_pf);
void nf_log_unbind_pf(u_int8_t pf)
{
if (pf >= ARRAY_SIZE(nf_loggers))
return;
mutex_lock(&nf_log_mutex);
rcu_assign_pointer(nf_loggers[pf], NULL);
mutex_unlock(&nf_log_mutex);