Commit:     239a87c87660d3b97a467a661eec927f0dfa9891
Parent:     e34efe3b100d0fbdf053128956c3dd0bc68754d6
Author:     Patrick McHardy <[EMAIL PROTECTED]>
AuthorDate: Fri Feb 2 00:40:36 2007 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Fri Feb 2 00:40:36 2007 -0800

    [NET_SCHED]: act_ipt: fix regression in ipt action
    The x_tables patch broke target module autoloading in the ipt action
    by replacing the ipt_find_target call (which does autoloading) by
    xt_find_target (which doesn't do autoloading). Additionally xt_find_target
    may return ERR_PTR values in case of an error, which are not handled.
    Use xt_request_find_target, which does both autoloading and ERR_PTR
    handling properly. Also don't forget to drop the target module reference
    again when xt_check_target fails.
    Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
 net/sched/act_ipt.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c
index a960806..01e6913 100644
--- a/net/sched/act_ipt.c
+++ b/net/sched/act_ipt.c
@@ -55,7 +55,8 @@ static int ipt_init_target(struct ipt_entry_target *t, char 
*table, unsigned int
        struct ipt_target *target;
        int ret = 0;
-       target = xt_find_target(AF_INET, t->, t->u.user.revision);
+       target = xt_request_find_target(AF_INET, t->,
+                                       t->u.user.revision);
        if (!target)
                return -ENOENT;
@@ -63,9 +64,10 @@ static int ipt_init_target(struct ipt_entry_target *t, char 
*table, unsigned int
        ret = xt_check_target(target, AF_INET, t->u.target_size - sizeof(*t),
                              table, hook, 0, 0);
-       if (ret)
+       if (ret) {
+               module_put(t->>me);
                return ret;
+       }
        if (t->>checkentry
            && !t->>checkentry(table, NULL,
                                               t->, t->data,
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to