Re: [RFC PATCH 24/24] target: mark __rcu to avoid warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/20/21 1:41 PM, Chaitanya Kulkarni wrote:
> Mark struct fc_lport member prov with __rcu that fixes following
> warning :-
> 
> drivers/target/tcm_fc/tfc_sess.c:47:17: error: incompatible types in comparison expression (different address spaces):
> drivers/target/tcm_fc/tfc_sess.c:47:17:    void [noderef] __rcu *
> drivers/target/tcm_fc/tfc_sess.c:47:17:    void *
> drivers/target/tcm_fc/tfc_sess.c:72:9: error: incompatible types in comparison expression (different address spaces):
> drivers/target/tcm_fc/tfc_sess.c:72:9:    void [noderef] __rcu *
> drivers/target/tcm_fc/tfc_sess.c:72:9:    void *
> 
> Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
> ---
>  include/scsi/libfc.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
> index 9b87e1a1c646..0446513e46d8 100644
> --- a/include/scsi/libfc.h
> +++ b/include/scsi/libfc.h
> @@ -746,7 +746,7 @@ struct fc_lport {
>  	struct mutex		       lp_mutex;
>  	struct list_head	       list;
>  	struct delayed_work	       retry_work;
> -	void			       *prov[FC_FC4_PROV_SIZE];
> +	void			       __rcu *prov[FC_FC4_PROV_SIZE];
>  	struct list_head	       lport_list;
>  };

This patch looks suspicious to me. Although the tcm_fc driver uses RCU
to modify 'prov', this is a choice that has been made in the tcm_fc
driver and not something that other libfc users are required to do. In
other words, I think this should be fixed in the tcm_fc driver instead
of in the libfc header.

Bart.



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux