some fixes for screwups i made in the 2.4.22 kernel release.
[atm]: if clip isn't a module don't __MOD_DEC_USE_COUNT()
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.1129 -> 1.1130
# net/atm/proc.c 1.8 -> 1.9
# net/atm/common.c 1.16 -> 1.17
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/09/03 chas@xxxxxxxxxxxxxxxxxxxxxx 1.1130
# if clip isn't a module don't __MOD_DEC_USE_COUNT()
# --------------------------------------------
#
diff -Nru a/net/atm/common.c b/net/atm/common.c
--- a/net/atm/common.c Wed Sep 3 12:31:05 2003
+++ b/net/atm/common.c Wed Sep 3 12:31:05 2003
@@ -672,7 +672,8 @@
}
if (try_atm_clip_ops()) {
ret_val = atm_clip_ops->clip_create(arg);
- __MOD_DEC_USE_COUNT(atm_clip_ops->owner);
+ if (atm_clip_ops->owner)
+
__MOD_DEC_USE_COUNT(atm_clip_ops->owner);
} else
ret_val = -ENOSYS;
goto done;
@@ -687,7 +688,8 @@
#endif
if (try_atm_clip_ops()) {
error = atm_clip_ops->atm_init_atmarp(vcc);
- __MOD_DEC_USE_COUNT(atm_clip_ops->owner);
+ if (atm_clip_ops->owner)
+
__MOD_DEC_USE_COUNT(atm_clip_ops->owner);
if (!error)
sock->state = SS_CONNECTED;
ret_val = error;
@@ -701,7 +703,8 @@
}
if (try_atm_clip_ops()) {
ret_val = atm_clip_ops->clip_mkip(vcc, arg);
- __MOD_DEC_USE_COUNT(atm_clip_ops->owner);
+ if (atm_clip_ops->owner)
+
__MOD_DEC_USE_COUNT(atm_clip_ops->owner);
} else
ret_val = -ENOSYS;
goto done;
@@ -712,7 +715,8 @@
}
if (try_atm_clip_ops()) {
ret_val = atm_clip_ops->clip_setentry(vcc, arg);
- __MOD_DEC_USE_COUNT(atm_clip_ops->owner);
+ if (atm_clip_ops->owner)
+
__MOD_DEC_USE_COUNT(atm_clip_ops->owner);
} else
ret_val = -ENOSYS;
goto done;
@@ -723,7 +727,8 @@
}
if (try_atm_clip_ops()) {
ret_val = atm_clip_ops->clip_encap(vcc, arg);
- __MOD_DEC_USE_COUNT(atm_clip_ops->owner);
+ if (atm_clip_ops->owner)
+
__MOD_DEC_USE_COUNT(atm_clip_ops->owner);
} else
ret_val = -ENOSYS;
goto done;
diff -Nru a/net/atm/proc.c b/net/atm/proc.c
--- a/net/atm/proc.c Wed Sep 3 12:31:05 2003
+++ b/net/atm/proc.c Wed Sep 3 12:31:05 2003
@@ -358,7 +358,7 @@
spin_unlock_irqrestore(&dev->lock, flags);
spin_unlock(&atm_dev_lock);
#if defined(CONFIG_ATM_CLIP) || defined(CONFIG_ATM_CLIP_MODULE)
- if (clip_info)
+ if (clip_info && atm_clip_ops->owner)
__MOD_DEC_USE_COUNT(atm_clip_ops->owner);
#endif
return strlen(buf);
@@ -367,8 +367,8 @@
}
spin_unlock(&atm_dev_lock);
#if defined(CONFIG_ATM_CLIP) || defined(CONFIG_ATM_CLIP_MODULE)
- if (clip_info)
- __MOD_DEC_USE_COUNT(atm_clip_ops->owner);
+ if (clip_info && atm_clip_ops->owner)
+ __MOD_DEC_USE_COUNT(atm_clip_ops->owner);
#endif
return 0;
}
@@ -458,7 +458,8 @@
if (--count) continue;
atmarp_info(n->dev,entry,NULL,buf);
read_unlock_bh(&clip_tbl_hook->lock);
- __MOD_DEC_USE_COUNT(atm_clip_ops->owner);
+ if (atm_clip_ops->owner)
+
__MOD_DEC_USE_COUNT(atm_clip_ops->owner);
return strlen(buf);
}
for (vcc = entry->vccs; vcc;
@@ -466,12 +467,14 @@
if (--count) continue;
atmarp_info(n->dev,entry,vcc,buf);
read_unlock_bh(&clip_tbl_hook->lock);
- __MOD_DEC_USE_COUNT(atm_clip_ops->owner);
+ if (atm_clip_ops->owner)
+
__MOD_DEC_USE_COUNT(atm_clip_ops->owner);
return strlen(buf);
}
}
read_unlock_bh(&clip_tbl_hook->lock);
- __MOD_DEC_USE_COUNT(atm_clip_ops->owner);
+ if (atm_clip_ops->owner)
+ __MOD_DEC_USE_COUNT(atm_clip_ops->owner);
return 0;
}
#endif
[atm]: #define'ing pci_pool_create() breaks CONFIG_MODVERSION
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.1130 -> 1.1131
# drivers/atm/he.c 1.4 -> 1.5
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/09/03 chas@xxxxxxxxxxxxxxxxxxxxxx 1.1131
# #define'ing pci_pool_create() breaks CONFIG_MODVERSION
# --------------------------------------------
#
diff -Nru a/drivers/atm/he.c b/drivers/atm/he.c
--- a/drivers/atm/he.c Wed Sep 3 12:33:07 2003
+++ b/drivers/atm/he.c Wed Sep 3 12:33:07 2003
@@ -109,10 +109,6 @@
#define pci_get_drvdata(pci_dev) (pci_dev)->driver_data
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,44)
-#define pci_pool_create(a, b, c, d, e) pci_pool_create(a, b, c, d, e,
SLAB_KERNEL)
-#endif
-
#include "he.h"
#include "suni.h"
@@ -785,7 +781,7 @@
/* small buffer pool */
#ifdef USE_RBPS_POOL
he_dev->rbps_pool = pci_pool_create("rbps", he_dev->pci_dev,
- CONFIG_RBPS_BUFSIZE, 8, 0);
+ CONFIG_RBPS_BUFSIZE, 8, 0, SLAB_KERNEL);
if (he_dev->rbps_pool == NULL) {
hprintk("unable to create rbps pages\n");
return -ENOMEM;
@@ -849,7 +845,7 @@
/* large buffer pool */
#ifdef USE_RBPL_POOL
he_dev->rbpl_pool = pci_pool_create("rbpl", he_dev->pci_dev,
- CONFIG_RBPL_BUFSIZE, 8, 0);
+ CONFIG_RBPL_BUFSIZE, 8, 0, SLAB_KERNEL);
if (he_dev->rbpl_pool == NULL) {
hprintk("unable to create rbpl pool\n");
return -ENOMEM;
@@ -1475,7 +1471,7 @@
#ifdef USE_TPD_POOL
he_dev->tpd_pool = pci_pool_create("tpd", he_dev->pci_dev,
- sizeof(struct he_tpd), TPD_ALIGNMENT, 0);
+ sizeof(struct he_tpd), TPD_ALIGNMENT, 0, SLAB_KERNEL);
if (he_dev->tpd_pool == NULL) {
hprintk("unable to create tpd pci_pool\n");
return -ENOMEM;
|