public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Chen Gang <gang.chen@asianux.com>
To: Chris Boot <bootc@bootc.net>
Cc: nab@linux-iscsi.org, linux-scsi@vger.kernel.org,
	target-devel@vger.kernel.org,
	linux1394-devel@lists.sourceforge.net
Subject: Re: [Suggestion] drivers/target/sbp/ : set tport->tpg to NULL when clean up for failure.
Date: Thu, 06 Dec 2012 16:40:34 +0800	[thread overview]
Message-ID: <50C05A02.6080401@asianux.com> (raw)
In-Reply-To: <50C058A4.7030403@bootc.net>

于 2012年12月06日 16:34, Chris Boot 写道:
> On 06/12/12 04:24, Chen Gang wrote:
>> Hello Maintainers: 
>>
>> in drivers/target/sbp/sbp_target.c:
>>
>>    tport->tpg must be NULL before process it in function sbp_make_tpg. (line 2185..2188)
>>    tport->tpg assigned a ptr (line 2198)
>>    if processing failed, not set tport->tpg = NULL (line 2208..2212, 2217..2221)
>>
>>    we have done: when free tport->tpg, set it to NULL (line 2233..2234)
>>
>>    is it valuable to let tport->tpg = NULL, when clean up for failure ?
>>
> <snip>
> 
> Yes, that's a good catch. The way it is now, if we fail to set up the
> TPG, the port will be left in an inconsistent state. I'll prepare a
> patch ASAP unless you'd rather do it yourself.
> 
> Thanks,
> Chris
> 

  please help do it (better to mark me as Reported-by in your patch).

  thanks.

  :-)


-- 
Chen Gang

Asianux Corporation
--
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:[~2012-12-06  8:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-06  4:24 [Suggestion] drivers/target/sbp/ : set tport->tpg to NULL when clean up for failure Chen Gang
2012-12-06  8:34 ` Chris Boot
2012-12-06  8:40   ` Chen Gang [this message]
2012-12-10  2:39     ` Chen Gang
2012-12-10  8:02       ` Chris Boot
2012-12-10  8:07         ` Chen Gang
2012-12-14  2:59         ` Chen Gang
2012-12-14  6:57           ` Stefan Richter
2012-12-14  7:22             ` Chen Gang
2012-12-15  0:33               ` Nicholas A. Bellinger
2012-12-15  6:26                 ` Chen Gang

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=50C05A02.6080401@asianux.com \
    --to=gang.chen@asianux.com \
    --cc=bootc@bootc.net \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=nab@linux-iscsi.org \
    --cc=target-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox