Avoid that gcc reports the following compiler warning:
message.c:197:44: warning: 'rsp_data_sz' may be used uninitialized in this function [-Wmaybe-uninitialized]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6386 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This patch does not change any functionality. See also the upstream
patch "qla2xxx: Help Coverity with analyzing ct_sns_pkt
initialization".
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6383 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Introduce a function for looking up the driver major number.
This patch does not change any functionality but makes the source
code easier to read and also makes it easier for Coverity to
analyze this code.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6368 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Reset 'devn' if the sscanf() return value is lower than two.
Based on a Coverity report.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6367 d57e44dd-8a1f-0410-8b47-8ef2f437770f
kthread_stop() not only stops a thread but also frees the associated
task struct. Avoid that functions that iterate over the thread list
can encounter an invalid task structure pointer. This patch fixes the
following kernel crash:
general protection fault: 0000 [#2] PREEMPT SMP
RIP: 0010:[<ffffffff81080e9c>] [<ffffffff81080e9c>] __task_pid_nr_ns+0x9c/0x1b0
Call Trace:
[<ffffffffa045ed7d>] task_pid_vnr+0xd/0x10 [scst]
[<ffffffffa0460418>] scst_tgt_dev_thread_pid_show+0x78/0xd0 [scst]
[<ffffffffa045929f>] scst_show+0xf/0x20 [scst]
[<ffffffff81231acb>] sysfs_kf_seq_show+0xab/0x130
[<ffffffff81230176>] kernfs_seq_show+0x26/0x30
[<ffffffff811daf10>] seq_read+0xe0/0x3e0
[<ffffffff81230ab5>] kernfs_fop_read+0x125/0x180
[<ffffffff811b0138>] __vfs_read+0x28/0xe0
[<ffffffff811b07ca>] vfs_read+0x8a/0x140
[<ffffffff811b1669>] SyS_read+0x49/0xb0
[<ffffffff814ffd32>] system_call_fastpath+0x16/0x7a
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6359 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Use lockdep to verify that the caller holds scst_mutex if the
scst_mutex_held argument has not been set.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6357 d57e44dd-8a1f-0410-8b47-8ef2f437770f
scst_free_tgt_dev() frees the memory tgt_dev points at which means
that list_for_each_entry_safe() is needed here.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6356 d57e44dd-8a1f-0410-8b47-8ef2f437770f
If while attaching a pass-through device the READ CAPACITY command
reports an invalid sector size, log an error message.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6355 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Fix the argument of the second kunmap() call. Detected by smatch.
See also patch "scst_lib: Improve WRITE SAME performance" (commit
ID a15628d683). Note: this patch does not have any impact on
64-bit architectures since kunmap() doesn't to anything on such
architectures.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6350 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Add instructions for how to download and install the 16 Gb/s FC HBA
driver. Remove the "optional step" since this step should not be
needed after various recent fixes in the SCST makefiles. Recommend
to blacklist the distro QLA initiator driver even if the kernel is
not being rebuilt.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6349 d57e44dd-8a1f-0410-8b47-8ef2f437770f
If a data length mismatch has been detected, report the LBA and
the lengths that do not match.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6346 d57e44dd-8a1f-0410-8b47-8ef2f437770f
The BUG_ON(handler == NULL) statement at the start of this function
guarantees that handler != NULL. Hence remove the remaining tests of
the 'handler' pointer. Detected by Coverity.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6341 d57e44dd-8a1f-0410-8b47-8ef2f437770f
The put_page_callback patch only improves performance on single
socket systems but not on systems with multiple CPU sockets.
Since this message is confusing to SCST users, do not print a
warning if the put_page_callback patch has not been applied.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6340 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Avoid that unknown parameters cause __vdev_load_mode_pages() to
return 0 instead of -EINVAL. Detected by Coverity.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6338 d57e44dd-8a1f-0410-8b47-8ef2f437770f