[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <555F0107.6030102@sandisk.com>
Date: Fri, 22 May 2015 12:12:23 +0200
From: Bart Van Assche <bart.vanassche@...disk.com>
To: "Nicholas A. Bellinger" <nab@...erainc.com>,
target-devel <target-devel@...r.kernel.org>
CC: linux-scsi <linux-scsi@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Hannes Reinecke <hare@...e.de>,
"Christoph Hellwig" <hch@....de>,
Sagi Grimberg <sagig@...lanox.com>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Nicholas Bellinger <nab@...ux-iscsi.org>
Subject: Re: [PATCH-v2 2/9] target/pr: Use atomic bitop for se_dev_entry->pr_reg
reservation check
On 05/22/15 08:11, Nicholas A. Bellinger wrote:
> diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
> index e2c0eaf..def5bc8 100644
> --- a/include/target/target_core_base.h
> +++ b/include/target/target_core_base.h
> @@ -638,7 +638,6 @@ struct se_lun_acl {
> };
>
> struct se_dev_entry {
> - bool def_pr_registered;
> /* See transport_lunflags_table */
> u32 lun_flags;
> u32 mapped_lun;
> @@ -655,7 +654,8 @@ struct se_dev_entry {
> struct se_node_acl *se_node_acl;
> struct se_lun_acl __rcu *se_lun_acl;
> spinlock_t ua_lock;
> - struct se_lun *se_lun;
> + struct se_lun __rcu *se_lun;
> + unsigned long pr_reg;
> struct list_head alua_port_list;
> struct list_head ua_list;
> struct hlist_node link;
Hello Nic,
This change causes the "se_lun = deve->se_lun" assignment in
transport_lookup_cmd_lun() to assign an RCU pointer to a non-RCU
pointer. Shouldn't such an assignment be protected via rcu_dereference() ?
Thanks,
Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists