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:	Wed, 4 Mar 2015 09:21:12 +0900
From:	Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
	Minchan Kim <minchan@...nel.org>,
	Nitin Gupta <ngupta@...are.org>, linux-kernel@...r.kernel.org,
	Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Subject: Re: [PATCH 2/8] zram: use idr instead of `zram_devices' array

On (03/03/15 14:01), Andrew Morton wrote:
> > This patch makes some preparations for dynamic device ADD/REMOVE functionality
> > via /dev/zram-control interface.
> > 
> > Remove `zram_devices' array and switch to id-to-pointer translation (idr).
> > idr doesn't bloat zram struct with additional members, f.e. list_head, yet
> > still provides ability to match the device_id with the device pointer.
> > No user-space visible changes.
> > 
> > ...
> >
> > +static DEFINE_IDR(zram_index_idr);
> 
> There is no locking protecting this idr?
> 

correct. there is no concurrent idr index modification at this point.
add/remove functionality and concurrent idr modification will be intoriduced
in the patch 0005 zram add dynamic device add remove functionality (along
with `static DEFINE_MUTEX(zram_index_mutex)' idr protection).

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