Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 450862 - scsi_add_host() returns success even if the work_q was not created
Summary: scsi_add_host() returns success even if the work_q was not created
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.2
Hardware: ppc64
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Mike Christie
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-06-11 14:15 UTC by carl.lajeunesse
Modified: 2009-09-02 09:00 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-02 09:00:04 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2009:1243 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 5.4 kernel security and bug fix update 2009-09-01 08:53:34 UTC

Description carl.lajeunesse 2008-06-11 14:15:43 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 1.1.4322)

Description of problem:
User sees a new host was added and later a dump stack on the console will be displayed during a scsi scan.

error is zero at this point.
        if (shost->transportt->create_work_queue) {
                snprintf(shost->work_q_name, KOBJ_NAME_LEN, "scsi_wq_%d",
                        shost->host_no);
                shost->work_q = create_singlethread_workqueue(
                                        shost->work_q_name);
                if (!shost->work_q)
                        goto out_free_shost_data;
        }
So the goto out_free_shost_data will return success.
Change:
if (!shost->work_q)
    goto out_free_shost_data;

To:
if (!shost->work_q) {
    error = -ENOMEM;
    goto out_free_shost_data;
}


Version-Release number of selected component (if applicable):
kernel-2.6.18-92.el5

How reproducible:
Sometimes


Steps to Reproduce:
1. Install an NPIV capable Fibre Channel adapter.
2. Create and delete 1000s of vports.
3. Need a system low on kernel memory so that the work_q cannot be allocated.

Actual Results:
lpfc 0007:01:00.0: 2:(1):1825 Vport Created.
ERROR: FC host 'lpfc' attempted to flush work, when no workqueue created.
Call Trace:
[C0000000220E76A0] [C000000000010378] .show_stack+0x68/0x1b0 (unreliable)
[C0000000220E7740] [D00000000025051C] .fc_flush_work+0x44/0x68 [scsi_transport_f
c]
[C0000000220E77C0] [D000000000253334] .fc_remote_port_add+0x40/0x3f8 [scsi_trans
port_fc]
[C0000000220E7870] [D0000000003DB908] .lpfc_nlp_state_cleanup+0x25c/0x3f4 [lpfc]
[C0000000220E7940] [D0000000003DAF48] .lpfc_nlp_set_state+0x1f0/0x22c [lpfc]
[C0000000220E7A30] [D0000000003EA3B8] .lpfc_cmpl_prli_prli_issue+0x1c4/0x1e8 [lp
fc]
[C0000000220E7AC0] [D0000000003E71F4] .lpfc_disc_state_machine+0x104/0x228 [lpfc
]
[C0000000220E7B80] [D0000000003D7374] .lpfc_cmpl_els_prli+0x1a8/0x1e4 [lpfc]
[C0000000220E7C40] [D0000000003C9D04] .lpfc_sli_handle_slow_ring_event+0x4b0/0x9
1c [lpfc]
[C0000000220E7DF0] [D0000000003DDFD8] .lpfc_do_work+0x94c/0xe34 [lpfc]
[C0000000220E7EE0] [C000000000086DC4] .kthread+0x128/0x178
[C0000000220E7F90] [C000000000026FFC] .kernel_thread+0x4c/0x68
Unable to handle kernel paging request for data at address 0x00000010
Faulting instruction address: 0xc000000000152dac
cpu 0x0: Vector: 300 (Data Access) at [c0000000220e72c0]
    pc: c000000000152dac: .create_dir+0x38/0x2a8
    lr: c0000000001535c4: .sysfs_create_dir+0x78/0xa0
    sp: c0000000220e7540
   msr: 8000000000009032
   dar: 10
dsisr: 40000000
  current = 0xc0000000250b2d80
  paca    = 0xc0000000004d4e80
    pid   = 3986, comm = lpfc_worker_2
enter ? for help
0:mon>



Expected Results:
-ENOMEM from scsi_add_host() if work_q not created.

Additional info:
The debug stack occurs much later and is the symptom of the problem. The problem is with scsi_add_host() failing to return an error to the LLD when the fiber channel port was being added. Can effect any scsi adapter that fails to create a work_q.

Comment 1 carl.lajeunesse 2008-06-13 18:46:30 UTC
It's fixed upstream.  Here's the git commit:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-
2.6.git;a=commitdiff;h=77cca462c69d827fabee0ef3fdab86109c2fe8d8



Comment 4 RHEL Product and Program Management 2009-02-11 21:00:31 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 5 RHEL Product and Program Management 2009-02-16 15:44:34 UTC
Updating PM score.

Comment 6 Don Zickus 2009-03-04 19:59:24 UTC
in kernel-2.6.18-133.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5

Please do NOT transition this bugzilla state to VERIFIED until our QE team
has sent specific instructions indicating when to do so.  However feel free
to provide a comment indicating that this fix has been verified.

Comment 8 Chris Ward 2009-07-03 18:03:37 UTC
~~ Attention - RHEL 5.4 Beta Released! ~~

RHEL 5.4 Beta has been released! There should be a fix present in the Beta release that addresses this particular request. Please test and report back results here, at your earliest convenience. RHEL 5.4 General Availability release is just around the corner!

If you encounter any issues while testing Beta, please describe the issues you have encountered and set the bug into NEED_INFO. If you encounter new issues, please clone this bug to open a new issue and request it be reviewed for inclusion in RHEL 5.4 or a later update, if it is not of urgent severity.

Please do not flip the bug status to VERIFIED. Only post your verification results, and if available, update Verified field with the appropriate value.

Questions can be posted to this bug or your customer or partner representative.

Comment 10 errata-xmlrpc 2009-09-02 09:00:04 UTC
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-2009-1243.html


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