mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
tcm_fc: Resolve suspicious RCU usage warnings
Use rcu_dereference_protected to tell rcu that the ft_lport_lock is held during ft_lport_create. This resolved "suspicious RCU usage" warnings when debugging options are turned on. Signed-off-by: Mark Rustad <[email protected]> Tested-by: Ross Brattain <[email protected]> Cc: <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
This commit is contained in:
parent
5134de2815
commit
863555be0c
1 changed files with 2 additions and 1 deletions
|
|
@ -58,7 +58,8 @@ static struct ft_tport *ft_tport_create(struct fc_lport *lport)
|
|||
struct ft_tport *tport;
|
||||
int i;
|
||||
|
||||
tport = rcu_dereference(lport->prov[FC_TYPE_FCP]);
|
||||
tport = rcu_dereference_protected(lport->prov[FC_TYPE_FCP],
|
||||
lockdep_is_held(&ft_lport_lock));
|
||||
if (tport && tport->tpg)
|
||||
return tport;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue