aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
diff options
context:
space:
mode:
authorMartin KaFai Lau <[email protected]>2019-04-30 17:45:12 +0000
committerDavid S. Miller <[email protected]>2019-05-01 21:17:54 +0000
commit886b7a50100a50f1cbd08a6f8ec5884dfbe082dc (patch)
treef18e97f6f5ac9054af65539f00e52c6160470a20 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.h
parentrds: ib: force endiannes annotation (diff)
downloadkernel-886b7a50100a50f1cbd08a6f8ec5884dfbe082dc.tar.gz
kernel-886b7a50100a50f1cbd08a6f8ec5884dfbe082dc.zip
ipv6: A few fixes on dereferencing rt->from
It is a followup after the fix in commit 9c69a1320515 ("route: Avoid crash from dereferencing NULL rt->from") rt6_do_redirect(): 1. NULL checking is needed on rt->from because a parallel fib6_info delete could happen that sets rt->from to NULL. (e.g. rt6_remove_exception() and fib6_drop_pcpu_from()). 2. fib6_info_hold() is not enough. Same reason as (1). Meaning, holding dst->__refcnt cannot ensure rt->from is not NULL or rt->from->fib6_ref is not 0. Instead of using fib6_info_hold_safe() which ip6_rt_cache_alloc() is already doing, this patch chooses to extend the rcu section to keep "from" dereference-able after checking for NULL. inet6_rtm_getroute(): 1. NULL checking is also needed on rt->from for a similar reason. Note that inet6_rtm_getroute() is using RTNL_FLAG_DOIT_UNLOCKED. Fixes: a68886a69180 ("net/ipv6: Make from in rt6_info rcu protected") Signed-off-by: Martin KaFai Lau <[email protected]> Acked-by: Wei Wang <[email protected]> Reviewed-by: David Ahern <[email protected]> Reviewed-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.h')
0 files changed, 0 insertions, 0 deletions