All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladislav Bolkhovitin <vst@vlnb.net>
To: linux-scsi@vger.kernel.org
Cc: Andrew Vasquez <andrew.vasquez@qlogic.com>, linux-driver@qlogic.com
Subject: Re: Question about scsi_qla_host_t.fcports list protection (qla2xxx)
Date: Tue, 05 Sep 2006 15:30:27 +0400	[thread overview]
Message-ID: <44FD5FD3.5000407@vlnb.net> (raw)
In-Reply-To: <44FD4C99.9060308@vlnb.net>

Vladislav Bolkhovitin wrote:
> Andrew Vasquez wrote:
> 
>> On Tue, 15 Aug 2006, Vladislav Bolkhovitin wrote:
>>
>>
>>> Looking at the qla2xxx driver source code I noticed that 
>>> scsi_qla_host_t.fcports is used without any protection. For instance, 
>>> qla2x00_loop_reset() walks over this list. This function is called 
>>> from qla2xxx_eh_bus_reset(), which could be called at any time. What 
>>> does protect fcports from being changed, eg, by some async loop event 
>>> during the walking and eventually oops'ing? Do I miss something? 
>>> There are many such unprotected fcports list usages in the driver.
>>
>>
>>
>> Nothing is ever removed from the fcports list during driver execution.
>> fcports are also only added from a single context (post init-time)
>> within the DPC thread. 
> 
> 
> How about qla2x00_send_login_iocb_cb(), where an entry is added to 
> fcports list and which is called from IRQ context from 
> qla2x00_process_iodesc()?

Sorry for the noise, I just checked in 2.6.18-rc6 and from it all that 
code was removed. Anyway, the problem with unsafe fcports list iterating 
remains valid.

Vlad

>> We are safe here.
> 
> 
>> Regards,
>> Andrew Vasquez
>>
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


      reply	other threads:[~2006-09-05 11:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-15 10:18 Question about scsi_qla_host_t.fcports list protection (qla2xxx) Vladislav Bolkhovitin
2006-08-16 17:57 ` [Suspected Spam:#] " Andrew Vasquez
2006-08-17  9:58   ` Vladislav Bolkhovitin
2006-09-05 10:08   ` [Suspected Spam:#] " Vladislav Bolkhovitin
2006-09-05 11:30     ` Vladislav Bolkhovitin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44FD5FD3.5000407@vlnb.net \
    --to=vst@vlnb.net \
    --cc=andrew.vasquez@qlogic.com \
    --cc=linux-driver@qlogic.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.