Re: [PATCH v2 2/6] libceph: introduce reference counted string

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

 



> +#define ceph_try_get_string(x)					\
> +({								\
> +	struct ceph_string *___str;				\
> +	rcu_read_lock();					\
> +	___str = rcu_dereference(x);				\
> +	if (___str && !kref_get_unless_zero(&___str->kref))	\
> +		___str = NULL;					\
> +	rcu_read_unlock();					\
> +	(___str);						\

Isn’t this an unsafe use of __str? As I understand it, it could be updated after rcu_read_unlock().

> +})

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux