On Tue, 2012-12-04 at 18:44 +0100, Sebastian Andrzej Siewior wrote: > Hi, > > I just triggered > BUG: unable to handle kernel paging request at 5f6273f9 > IP: [<f8341914>] core_dev_add_lun+0x14/0x140 [target_core_mod] > > most likely because the dev parameter comming from > target_fabric_port_link() was not NULL but still crap. To get there > you just need to find the perfect match: > > <<>> > #!/bin/sh > > for t in $(find /sys/kernel/config/target/) > do > echo $t > ln -sv $t > /sys/kernel/config/target/loopback/naa.6001405c3214b06a/tpgt_1/lun/lun_0/virtual_scsi_port > if [ $? -eq 0 ] > then > exit 0 > fi > done > <<>> > > will support you to find one :) :) > Some attempts will fail with errors like > > |Unable to export struct se_device while dev_access_obj: -19953795812 > > so you have to try. > Anyway, I don't consider this critical because only root can bug the > kernel but this is still ugly and should be fixed. There are two > allow_link users and I both should be affected. > <nod> > The root cause is that you do not ensure that the second config_item > is what you expect it is. Any suggestions how to fix this? I see two > possible candidates: > #1 add a type member to config_item to make sure it is the type you > want it to be. > #2 hold a list_head of all config_item which may used a config_item > candidate and iterate over the list. > > I am for #1 right now. Any opinion from you two? > #1 sounds perfectly reasonable for the two effected allow_link users in target_core_fabric_configfs.c code. Care to generate a patch for this, or shall I..? --nab -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html