summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--runtime/transport/ChangeLog7
-rw-r--r--runtime/transport/procfs.c12
2 files changed, 13 insertions, 6 deletions
diff --git a/runtime/transport/ChangeLog b/runtime/transport/ChangeLog
index 4353fb93..677a22ab 100644
--- a/runtime/transport/ChangeLog
+++ b/runtime/transport/ChangeLog
@@ -1,3 +1,10 @@
+2005-12-02 Martin Hunt <hunt@redhat.com>
+
+ * procfs.c (_stp_set_buffers): kmalloc the buffers instead
+ of vmalloc.
+ (_stp_register_procfs): Ditto.
+ (_stp_unregister_procfs): kfree the buffers.
+
2005-11-30 Martin Hunt <hunt@redhat.com>
* transport.h (STP_WORK_TIMER): Declare.
diff --git a/runtime/transport/procfs.c b/runtime/transport/procfs.c
index 7db6e658..7818c491 100644
--- a/runtime/transport/procfs.c
+++ b/runtime/transport/procfs.c
@@ -237,7 +237,7 @@ static int _stp_set_buffers(int num)
spin_lock(&_stp_pool_lock);
if (num > _stp_current_buffers) {
for (i = 0; i < num - _stp_current_buffers; i++) {
- p = (struct list_head *)vmalloc(sizeof(struct _stp_buffer));
+ p = (struct list_head *)kmalloc(sizeof(struct _stp_buffer),GFP_KERNEL);
if (!p) {
_stp_current_buffers += i;
goto err;
@@ -248,7 +248,7 @@ static int _stp_set_buffers(int num)
for (i = 0; i < _stp_current_buffers - num; i++) {
p = _stp_pool_q.next;
list_del(p);
- vfree(p);
+ kfree(p);
}
}
_stp_current_buffers = num;
@@ -273,7 +273,7 @@ static int _stp_register_procfs (void)
/* allocate buffers */
for (i = 0; i < STP_DEFAULT_BUFFERS; i++) {
- p = (struct list_head *)vmalloc(sizeof(struct _stp_buffer));
+ p = (struct list_head *)kmalloc(sizeof(struct _stp_buffer),GFP_KERNEL);
// printk("allocated buffer at %lx\n", (long)p);
if (!p)
goto err2;
@@ -328,7 +328,7 @@ static int _stp_register_procfs (void)
err2:
list_for_each_safe(p, tmp, &_stp_pool_q) {
list_del(p);
- vfree(p);
+ kfree(p);
}
err1:
@@ -372,11 +372,11 @@ static void _stp_unregister_procfs (void)
/* free memory pools */
list_for_each_safe(p, tmp, &_stp_pool_q) {
list_del(p);
- vfree(p);
+ kfree(p);
}
list_for_each_safe(p, tmp, &_stp_ready_q) {
list_del(p);
- vfree(p);
+ kfree(p);
}
}