Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void handle_scheduler_pipe_show_remote_value(struct rpc_desc *desc, void *msgIn, size_t size)
- {
- struct config_item *item;
- struct scheduler_probe_source *source;
- char *page;
- ssize_t r;
- printk(KERN_INFO "Entering handle_scheduler_pipe_show_remote_value\n");
- item = kmalloc(sizeof(struct config_item), GFP_KERNEL);
- if (!item)
- goto exit;
- source = kmalloc(sizeof(struct scheduler_probe_source), GFP_KERNEL);
- if (!source)
- goto exit_source;
- printk(KERN_INFO "Unpacking config_titem\n");
- item = global_config_unpack_get_item(desc);
- if (!item)
- goto exit_unpack_item;
- source = to_scheduler_probe_source(item);
- if (!source)
- goto exit_to_source;
- page = kmalloc(SCHEDULER_PROBE_SOURCE_ATTR_SIZE, GFP_KERNEL);
- if (!page)
- goto exit_page;
- printk(KERN_INFO "About to make show_value\n");
- r = source->source.type->show_value(&source->source, page);
- rpc_pack_type(desc, r);
- printk(KERN_INFO "Probe source returned %d bytes.\n", r);
- if (r > 0) {
- rpc_pack(desc, 0, page, r);
- }
- printk(KERN_INFO "Exiting handle_scheduler_pipe_show_remote_value\n");
- kfree(page);
- kfree(source);
- kfree(item);
- exit_page:
- exit_to_source:
- exit_unpack_item:
- kfree(source);
- exit_source:
- kfree(item);
- exit:
- printk(KERN_ERR "not enough memory to handle remote pipe show value.\n");
- }
Add Comment
Please, Sign In to add comment