The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Xiang Zhang <hawkxiang.cpp@gmail.com>,
	lduncan@suse.com, cleech@redhat.com, michael.christie@oracle.com,
	ames.Bottomley@hansenpartnership.com, martin.petersen@oracle.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	open-iscsi@googlegroups.com, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Xiang Zhang <hawkxiang.cpp@gmail.com>
Subject: Re: [PATCH] scsi: libiscsi: Set expecting_cc_ua flag when stop_conn
Date: Sat, 12 Oct 2024 22:41:36 +0800	[thread overview]
Message-ID: <202410122213.bq19EI34-lkp@intel.com> (raw)
In-Reply-To: <20241011081807.65027-1-hawkxiang.cpp@gmail.com>

Hi Xiang,

kernel test robot noticed the following build warnings:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on jejb-scsi/for-next linus/master v6.12-rc2 next-20241011]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Xiang-Zhang/scsi-libiscsi-Set-expecting_cc_ua-flag-when-stop_conn/20241011-161915
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
patch link:    https://lore.kernel.org/r/20241011081807.65027-1-hawkxiang.cpp%40gmail.com
patch subject: [PATCH] scsi: libiscsi: Set expecting_cc_ua flag when stop_conn
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20241012/202410122213.bq19EI34-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241012/202410122213.bq19EI34-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410122213.bq19EI34-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/scsi/libiscsi.c:634:3: warning: variable 'sc' is uninitialized when used here [-Wuninitialized]
     634 |                 sc->device->expecting_cc_ua = 1;
         |                 ^~
   drivers/scsi/libiscsi.c:618:22: note: initialize the variable 'sc' to silence this warning
     618 |         struct scsi_cmnd *sc;
         |                             ^
         |                              = NULL
   1 warning generated.


vim +/sc +634 drivers/scsi/libiscsi.c

   610	
   611	/*
   612	 * session back and frwd lock must be held and if not called for a task that
   613	 * is still pending or from the xmit thread, then xmit thread must be suspended
   614	 */
   615	static void __fail_scsi_task(struct iscsi_task *task, int err)
   616	{
   617		struct iscsi_conn *conn = task->conn;
   618		struct scsi_cmnd *sc;
   619		int state;
   620	
   621		if (cleanup_queued_task(task))
   622			return;
   623	
   624		if (task->state == ISCSI_TASK_PENDING) {
   625			/*
   626			 * cmd never made it to the xmit thread, so we should not count
   627			 * the cmd in the sequencing
   628			 */
   629			conn->session->queued_cmdsn--;
   630			/* it was never sent so just complete like normal */
   631			state = ISCSI_TASK_COMPLETED;
   632		} else if (err == DID_TRANSPORT_DISRUPTED) {
   633			state = ISCSI_TASK_ABRT_SESS_RECOV;
 > 634			sc->device->expecting_cc_ua = 1;
   635		} else
   636			state = ISCSI_TASK_ABRT_TMF;
   637	
   638		sc = task->sc;
   639		sc->result = err << 16;
   640		scsi_set_resid(sc, scsi_bufflen(sc));
   641		iscsi_complete_task(task, state);
   642	}
   643	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

      parent reply	other threads:[~2024-10-12 14:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-11  8:18 [PATCH] scsi: libiscsi: Set expecting_cc_ua flag when stop_conn Xiang Zhang
2024-10-11 14:48 ` michael.christie
     [not found]   ` <CAHmG-mrmBYuxNOTVg+QUa6264isEwp53awnAcGGRwEU2bNSV3Q@mail.gmail.com>
2024-10-14 15:34     ` Mike Christie
2024-10-12 14:41 ` kernel test robot [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=202410122213.bq19EI34-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ames.Bottomley@hansenpartnership.com \
    --cc=cleech@redhat.com \
    --cc=hawkxiang.cpp@gmail.com \
    --cc=lduncan@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=martin.petersen@oracle.com \
    --cc=michael.christie@oracle.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=open-iscsi@googlegroups.com \
    /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