Function report |
Source Code:kernel\kexec_file.c |
Create Date:2022-07-28 11:04:09 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:kimage_file_alloc_init
Proto:static int kimage_file_alloc_init(struct kimage **rimage, int kernel_fd, int initrd_fd, const char __user *cmdline_ptr, unsigned long cmdline_len, unsigned long flags)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct kimage ** | rimage | |
int | kernel_fd | |
int | initrd_fd | |
const char __user * | cmdline_ptr | |
unsigned long | cmdline_len | |
unsigned long | flags |
320 | kexec_on_panic = flags & KEXEC_FILE_ON_CRASH |
322 | image = do_kimage_alloc_init() |
328 | If kexec_on_panic Then |
334 | ret = In file mode list of segments is prepared by kernel. Copy relevant* data from user space, do error checking, prepare segment list |
336 | If ret Then Go to out_free_image |
339 | ret = sanity_check_segment_list(image) |
340 | If ret Then Go to out_free_post_load_bufs |
346 | If Not control_code_page Then |
347 | pr_err("Could not allocate control_code_buffer\n") |
348 | Go to out_free_post_load_bufs |
351 | If Not kexec_on_panic Then |
352 | swap_page = kimage_alloc_control_pages(image, 0) |
353 | If Not swap_page Then |
354 | pr_err("Could not allocate swap buffer\n") |
355 | Go to out_free_control_pages |
360 | Return 0 |
361 | out_free_control_pages : |
362 | kimage_free_page_list( & control_pages) |
363 | out_free_post_load_bufs : |
365 | out_free_image : |
367 | Return ret |
Name | Describe |
---|---|
SYSCALL_DEFINE5 |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |