mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
RDMA/restrack: Rewrite PID namespace check to be reliable
task_active_pid_ns() is wrong API to check PID namespace because it posses some restrictions and return PID namespace where the process was allocated. It created mismatches with current namespace, which can be different. Rewrite whole rdma_is_visible_in_pid_ns() logic to provide reliable results without any relation to allocated PID namespace. Fixes:8be565e65f("RDMA/nldev: Factor out the PID namespace check") Fixes:6a6c306a09("RDMA/restrack: Make is_visible_in_pid_ns() as an API") Reviewed-by: Mark Zhang <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Doug Ledford <[email protected]>
This commit is contained in:
parent
c8b32408b4
commit
60c78668ae
3 changed files with 9 additions and 12 deletions
|
|
@ -105,8 +105,7 @@ struct rdma_restrack_entry {
|
|||
};
|
||||
|
||||
int rdma_restrack_count(struct ib_device *dev,
|
||||
enum rdma_restrack_type type,
|
||||
struct pid_namespace *ns);
|
||||
enum rdma_restrack_type type);
|
||||
|
||||
void rdma_restrack_kadd(struct rdma_restrack_entry *res);
|
||||
void rdma_restrack_uadd(struct rdma_restrack_entry *res);
|
||||
|
|
|
|||
Loading…
Reference in a new issue