Function report | 
Source Code:kernel\livepatch\transition.c | 
Create Date:2022-07-28 10:31:59 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:Try to safely switch a task to the target patch state. If it's currently* running, or it's sleeping on a to-be-patched or to-be-unpatched function, or* if the stack is unreliable, return false.
Proto:static bool klp_try_switch_task(struct task_struct *task)
Type:bool
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct task_struct * | task | 
| 287 | bool success = false | 
| 289 | err_buf[0] = '\0' | 
| 292 | If patch_state == klp_target_state Then Return true | 
| 299 | If Not klp_have_reliable_stack() Then Return false | 
| 309 | If task_running(rq, task) && task != current process Then | 
| 313 | Go to done | 
| 316 | ret = Determine whether it's safe to transition the task to the target patch state* by looking for any to-be-patched or to-be-unpatched functions on its stack. | 
| 320 | success = true | 
| 323 | patch_state = klp_target_state | 
| 325 | done : | 
| 326 | task_rq_unlock(rq, task, & flags) | 
| 336 | Return success | 
| Name | Describe | 
|---|---|
| klp_try_complete_transition | Try to switch all remaining tasks to the target patch state by walking the* stacks of sleeping tasks and looking for any to-be-patched or* to-be-unpatched functions. If such functions are found, the task can't be* switched yet. | 
| 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  |