mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 08:44:41 +00:00 
			
		
		
		
	bpf: Fix uprobe_multi get_pid_task error path
Dan reported Smatch static checker warning due to missing error value set in uprobe multi link's get_pid_task error path. Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/bpf/c5ffa7c0-6b06-40d5-aca2-63833b5cd9af@moroto.mountain/ Signed-off-by: Jiri Olsa <jolsa@kernel.org> Reviewed-by: Song Liu <song@kernel.org> Link: https://lore.kernel.org/r/20230915101420.1193800-1-jolsa@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
		
							parent
							
								
									dca7acd84e
								
							
						
					
					
						commit
						57eb5e1c5c
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -3223,9 +3223,11 @@ int bpf_uprobe_multi_link_attach(const union bpf_attr *attr, struct bpf_prog *pr | |||
| 		rcu_read_lock(); | ||||
| 		task = get_pid_task(find_vpid(pid), PIDTYPE_PID); | ||||
| 		rcu_read_unlock(); | ||||
| 		if (!task) | ||||
| 		if (!task) { | ||||
| 			err = -ESRCH; | ||||
| 			goto error_path_put; | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	err = -ENOMEM; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Jiri Olsa
						Jiri Olsa