lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 25 May 2015 14:59:46 -0700
From:	"Nicholas A. Bellinger" <nab@...ux-iscsi.org>
To:	Bart Van Assche <bart.vanassche@...disk.com>
Cc:	"Nicholas A. Bellinger" <nab@...erainc.com>,
	target-devel <target-devel@...r.kernel.org>,
	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>
Subject: Re: [PATCH-v2 2/9] target/pr: Use atomic bitop for
 se_dev_entry->pr_reg reservation check

On Fri, 2015-05-22 at 12:12 +0200, Bart Van Assche wrote:
> 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() ?
> 

FYI, these assignments are done in patch #1.

This __rcu notation should be included there instead.

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ