Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 568271 - [QLogic 4.9 bug] qla2xxx: Fix srb cache destroy issue on driver unload and FDMI registration issue (8.02.10.01.04.09-d)
[QLogic 4.9 bug] qla2xxx: Fix srb cache destroy issue on driver unload and FD...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
4.9
All Linux
medium Severity medium
: alpha
: 4.9
Assigned To: Chad Dupuis (Cavium)
Storage QE
: OtherQA
Depends On:
Blocks: 583726 589295 626414
  Show dependency treegraph
 
Reported: 2010-02-25 04:05 EST by Lalit Chandivade
Modified: 2011-02-16 10:32 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-02-16 10:32:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to fix cache destroy issue and FDMI (1.79 KB, patch)
2010-02-25 04:05 EST, Lalit Chandivade
no flags Details | Diff
Fix cache destroy & FDMI registration (22.94 KB, patch)
2010-04-20 06:41 EDT, Lalit Chandivade
no flags Details | Diff
Updated version to 8.02.10.01.04.09-d (908 bytes, patch)
2010-04-20 06:43 EDT, Lalit Chandivade
no flags Details | Diff
Snapshot of RHEL 4.9 qla2xxx sources on 4.20.2010 (4.11 MB, application/octet-stream)
2010-04-20 16:09 EDT, Chad Dupuis (Cavium)
no flags Details
Update version to 8.02.10.01.04.09-d (840 bytes, patch)
2010-04-21 00:37 EDT, Lalit Chandivade
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0263 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 4.9 kernel security and bug fix update 2011-02-16 10:14:55 EST

  None (edit)
Description Lalit Chandivade 2010-02-25 04:05:17 EST
Created attachment 396238 [details]
Patch to fix cache destroy issue and FDMI

Description of problem:
1. Fix kmem_destroy_cache issue.

In IOCTL path mempool is used and not freed.
This causes following issue
Apr 22 23:06:54 localhost kernel: slab error in kmem_cache_destroy(): cache `qla2xxx_srbs': Can't free all objects
Apr 22 23:06:54 localhost kernel:
Apr 22 23:06:54 localhost kernel: Call Trace:<ffffffff801646e7>{kmem_cache_destroy+202} <ffffffffa004f5df>{:qla2xxx:qla2x00_module_exit+19}
Apr 22 23:06:54 localhost kernel:        <ffffffff8014f9f3>{sys_delete_module+487} <ffffffff80110e21>{error_exit+0}
Apr 22 23:06:55 localhost kernel:        <ffffffff801102f6>{system_call+126}
Apr 22 23:06:55 localhost kernel: qla2xxx: Unable to free SRB cache...Memory pools still active?

The reason is memory from mempool is allocated in function qim_ioctl_ms_queuecommand and is never
freed. Since this function is not fully incorporated return from this function as success .

2.Correct number of attribute passed in RHBA.

With incorrect number of attribute passed the switch
rejects the RHBA with following explanation code
“Invalid HBA Attribute Block Length”

3. Updated the driver version for 4.9 release to 8.02.09.00.04.09-d


How reproducible:
1. Load the driver, run QLogic SANsurfer. Close SANsurfer and unload the driver.
2. Load the module with ql2xfdmienable=1 and check FDMI on switch GUI



Actual results:
- Stack trace on driver unload
- Vendor information not visible on switch side.

Expected results:
- On unload  stack trace related to srb caches should not occur.
- If ql2xfdmienable is set to 1 then vendor information on switch FDMI page should be visible.
Comment 1 Rob Evers 2010-04-20 03:51:23 EDT
After reviewing the patch, the hunk below needs some explanation as to why simply returning from a function with QIM_SUCCESS is an acceptable solution to this problem.  If this turns out to be the correct solution after re-review by qlogic, please cleanup the function to eliminate all the un-needed code.

@@ -3871,6 +3871,8 @@ qim_ioctl_ms_queuecommand(struct qla_host_ioctl *ha, EXT_IOCTL *pext,
 	struct scsi_qla_host	*dr_ha = ha->dr_data;
 
 
+	return QIM_SUCCESS;
+
 	/* alloc sp */
 	if ((sp = qim_get_new_sp(dr_ha)) == NULL) {
 
Leaving this status as conditional nak pending more information from qlogic.  Reassigning to Chad Dupuis.
Comment 2 Lalit Chandivade 2010-04-20 06:41:43 EDT
Created attachment 407784 [details]
Fix cache destroy & FDMI registration

Removed the function qim_ioctl_ms_queuecommand as it is not completely implemented. Also removed other functions that were using qim_ioctl_ms_queuecommand function.
Comment 3 Lalit Chandivade 2010-04-20 06:43:50 EDT
Created attachment 407785 [details]
Updated version to 8.02.10.01.04.09-d

Updated version to 8.02.10.01.04.09-d
Comment 4 Chad Dupuis (Cavium) 2010-04-20 09:29:43 EDT
Lalit,

The patches that you submitted last night can be laid on top of the current RHEL 4.8 sources?

Thanks,
Chad
Comment 5 Lalit Chandivade 2010-04-20 09:46:58 EDT
(In reply to comment #4)
> Lalit,
> The patches that you submitted last night can be laid on top of the current
> RHEL 4.8 sources?
> Thanks,
> Chad    

Yes, the patches are on top of RHEL 4.8 qla2xxx driver source.
Comment 7 Chad Dupuis (Cavium) 2010-04-20 16:09:40 EDT
Created attachment 407917 [details]
Snapshot of RHEL 4.9 qla2xxx sources on 4.20.2010
Comment 8 Chad Dupuis (Cavium) 2010-04-20 16:12:11 EDT
Lalit,

My apologies, but can you regen your patches on the qla2xxx sources I just submitted?  These are the latest RHEL 4.9 sources which differ slightly from the RHEL 4.8 sources.

Thanks,
Chad
Comment 9 Lalit Chandivade 2010-04-21 00:37:47 EDT
Created attachment 407977 [details]
Update version to 8.02.10.01.04.09-d

All the patches apply to current qla2xxx source in 4.9 kernel.
Comment 10 Vivek Goyal 2010-09-13 16:21:54 EDT
Committed in 89.34.EL . RPMS are available at http://people.redhat.com/vgoyal/rhel4/
Comment 14 errata-xmlrpc 2011-02-16 10:32:22 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0263.html

Note You need to log in before you can comment on or make changes to this bug.