summaryrefslogtreecommitdiffstats
path: root/runtime/transport/procfs.c
diff options
context:
space:
mode:
authorhunt <hunt>2005-12-02 17:41:56 +0000
committerhunt <hunt>2005-12-02 17:41:56 +0000
commit1e665ba9d06c7eae745416c6d04b78adae37f7c0 (patch)
treef11302d99615be8acb9b920d653c4a84ff7ba620 /runtime/transport/procfs.c
parentc0518f8409564c6a3c85ea99d32b8a334c73c3c0 (diff)
downloadsystemtap-steved-1e665ba9d06c7eae745416c6d04b78adae37f7c0.tar.gz
systemtap-steved-1e665ba9d06c7eae745416c6d04b78adae37f7c0.tar.xz
systemtap-steved-1e665ba9d06c7eae745416c6d04b78adae37f7c0.zip
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.
Diffstat (limited to 'runtime/transport/procfs.c')
-rw-r--r--runtime/transport/procfs.c12
1 files changed, 6 insertions, 6 deletions
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);
}
}