In some cases SCST needs to take multiple locks recursivly, e.g. to lock
all tgt_devs in a session. For this case SCST takes those locks in their
current sort order, e.g. by LUN for tgt_devs, then releases in the
opposite order. Unfortunately, lockdep complains on such actions as
recursive locking, then disables itself. The disabling itself action is
the most unpleasant one leading to lockdep being useless after this point.
Unfortunately, nested locking annotations can't help, because after
free, then alloc again, or after LUN change (in case of tgt_devs) order
of locks can change.
So, this patch implements a way to annotate some lock and unlock actions
as "no lockdep", so lockdep will not track them. It contains related
kernel patches for some kernels.
This is a debug aid only useful only with lockdep enabled kernels.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7065 d57e44dd-8a1f-0410-8b47-8ef2f437770f
r7050 did not change any behavior so revert it. Note for myself: in the
ib_srpt driver the port number is set by the ib_modify_qp() call in
srpt_init_ch_qp().
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7061 d57e44dd-8a1f-0410-8b47-8ef2f437770f
It is likely that ib_device.dma_ops will be removed sooner or later.
Hence make sure that the ib_srpt driver does not depend on it.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7049 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This avoids that the SCST RPM conflicts with other kernel RPMs
that install kernel modules in the "extra" directory. Reported
and suggested by Consus <consus@gmx.com>.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7043 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Otherwise there is non-fatal error like: No such file or directory
grep: /lib/modules/<current_running_kernel>/build/.config: Permission denied
This is a better version of r7022 suggested by Bart
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7037 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Running "make install" ensures that the kernel config file is available
in $(KDIR)/.config. However, that file is not available if $(KDIR) points
at a kernel that comes from a Linux distributor. Hence change the
$(INFINIBAND_ENABLED) test to check $(KDIR)/../modules.symbols.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7034 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Revert r7022 because:
* Changing $kver3 into $kver is wrong for 2.x kernels.
* Building include/iscsi_scst_itf_ver.h must not depend on the kernel version.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7032 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Otherwise there is non-fatal error like: No such file or directory
grep: /lib/modules/<current_running_kernel>/build/.config: Permission denied
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7022 d57e44dd-8a1f-0410-8b47-8ef2f437770f
It's false positive, because responses live in the parent request's list
until last put for the parent.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7009 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Initialize port information before registering the CM ID. One of
the functions called by the CM handler (srpt_cm_req_recv())
namely uses the SCST target pointer so that pointer must be
initialized before the CM ID is registered. This patch avoids that
SRP login during ib_srpt initialization sporadically triggers the
following bug:
ib_srpt: Rejecting login with reason 0x10001
BUG: unable to handle kernel NULL pointer dereference at 0000000000000100
IP: [<ffffffffa09f1ccf>] srpt_cm_req_recv+0xf3f/0xf60 [ib_srpt]
Call Trace:
[<ffffffffa09f1dd5>] srpt_ib_cm_req_recv+0xe5/0x110 [ib_srpt]
[<ffffffffa06c6fae>] cm_process_work+0x1e/0x130 [ib_cm]
[<ffffffffa06c9ca8>] cm_req_handler+0x398/0x460 [ib_cm]
[<ffffffffa06c9e25>] cm_work_handler+0xb5/0x208 [ib_cm]
[<ffffffff8107d2fc>] process_one_work+0x16c/0x350
[<ffffffff8108002a>] worker_thread+0x17a/0x410
[<ffffffff810843f6>] kthread+0x96/0xa0
[<ffffffff8146f364>] kernel_thread_helper+0x4/0x10
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7003 d57e44dd-8a1f-0410-8b47-8ef2f437770f