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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5552697B.8050008@redhat.com>
Date:	Tue, 12 May 2015 13:58:35 -0700
From:	Andy Grover <agrover@...hat.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>,
	Nicholas Bellinger <nab@...ux-iscsi.org>
Subject: Re: [PATCH 03/12] target/configfs: Convert mappedlun + SCSI MIBs
 to RCU reader

On 05/12/2015 02:25 AM, Nicholas A. Bellinger wrote:
> From: Nicholas Bellinger <nab@...ux-iscsi.org>
>
> This patch converts fabric independent configfs link/unlink to use
> RCU read path macros for se_node_acl->lun_entry_hlist access.
>
> It also converts SCSI MIB configfs show attribute code to use
> RCU read path macros for se_node_acl->lun_entry_hlist access.
>
> Cc: Hannes Reinecke <hare@...e.de>
> Cc: Christoph Hellwig <hch@....de>
> Cc: Sagi Grimberg <sagig@...lanox.com>
> Signed-off-by: Nicholas Bellinger <nab@...ux-iscsi.org>
> ---
>   drivers/target/target_core_fabric_configfs.c |  35 +++---
>   drivers/target/target_core_stat.c            | 180 +++++++++++++--------------
>   2 files changed, 110 insertions(+), 105 deletions(-)
>
> diff --git a/drivers/target/target_core_fabric_configfs.c b/drivers/target/target_core_fabric_configfs.c
> index 6cb4828..0dab6d5 100644
> --- a/drivers/target/target_core_fabric_configfs.c
> +++ b/drivers/target/target_core_fabric_configfs.c
> @@ -123,16 +123,16 @@ static int target_fabric_mappedlun_link(
>   	 * which be will write protected (READ-ONLY) when
>   	 * tpg_1/attrib/demo_mode_write_protect=1
>   	 */
> -	spin_lock_irq(&lacl->se_lun_nacl->device_list_lock);
> -	deve = lacl->se_lun_nacl->device_list[lacl->mapped_lun];
> -	if (deve->lun_flags & TRANSPORT_LUNFLAGS_INITIATOR_ACCESS)
> +	rcu_read_lock();
> +	deve = target_nacl_find_deve(lacl->se_lun_nacl, lacl->mapped_lun);
> +	if (deve && deve->lun_flags & TRANSPORT_LUNFLAGS_INITIATOR_ACCESS)

Why do we still need TRANSPORT_LUNFLAGS_INITIATOR_ACCESS? Isn't deve 
being not-NULL enough?

-- Andy

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