Re: [PATCH 01/12] target: Convert se_node_acl->device_list[] to RCU hlist

From: Christoph Hellwig
Date: Thu May 21 2015 - 13:03:20 EST


On Tue, May 19, 2015 at 08:22:31AM +0200, Christoph Hellwig wrote:
> On Mon, May 18, 2015 at 11:05:47PM -0700, Nicholas A. Bellinger wrote:
> > > [ 12.830576] kernel BUG at ../drivers/target/target_core_device.c:337!
> > >
> >
> > How did you hit this..?
>
> tcm_node --block iblock_0/array /dev/sda
>
> line=$(tcm_loop --createnexus=0)
> wwn=$(echo $line | awk '{print $15}')
> tcm_loop --addlun=$wwn 0 0 iblock_0/array

And here is the fix. Seems like anything using dynamic node ACLs was
broken the same way (I could reproduce it with vhost as well).

I don't really like how HBA_FLAGS_INTERNAL_USE means this is a virtual
lun0, so I'll send another patch to replace it with a per-device flag
eventually.

---