netdev
[Top] [All Lists]

[PATCH PKT_SCHED 2/4]: cls_api.c: fix module reference leak on module lo

To: "David S. Miller" <davem@xxxxxxxxxxxxx>
Subject: [PATCH PKT_SCHED 2/4]: cls_api.c: fix module reference leak on module load
From: Patrick McHardy <kaber@xxxxxxxxx>
Date: Wed, 19 Jan 2005 05:38:44 +0100
Cc: Maillist netdev <netdev@xxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.3) Gecko/20041008 Debian/1.7.3-5

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2005/01/19 03:58:05+01:00 kaber@xxxxxxxxxxxx 
#   [PKT_SCHED]: cls_api.c: fix module reference leak on module load
#   
#   Signed-off-by: Patrick McHardy <kaber@xxxxxxxxx>
# 
# net/sched/cls_api.c
#   2005/01/19 03:57:58+01:00 kaber@xxxxxxxxxxxx +3 -1
#   [PKT_SCHED]: cls_api.c: fix module reference leak on module load
#   
#   Signed-off-by: Patrick McHardy <kaber@xxxxxxxxx>
# 
diff -Nru a/net/sched/cls_api.c b/net/sched/cls_api.c
--- a/net/sched/cls_api.c       2005-01-19 05:29:50 +01:00
+++ b/net/sched/cls_api.c       2005-01-19 05:29:50 +01:00
@@ -239,8 +239,10 @@
                                 * replay the request.  We indicate this using
                                 * -EAGAIN.
                                 */
-                               if (tp_ops != NULL)
+                               if (tp_ops != NULL) {
+                                       module_put(tp_ops->owner);
                                        err = -EAGAIN;
+                               }
                        }
 #endif
                        kfree(tp);
<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH PKT_SCHED 2/4]: cls_api.c: fix module reference leak on module load, Patrick McHardy <=