linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* re: libiscsi: Use scsi helper to set information descriptor
@ 2016-04-13 13:14 Dan Carpenter
  2016-04-13 14:53 ` Sagi Grimberg
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2016-04-13 13:14 UTC (permalink / raw)
  To: sagig; +Cc: open-iscsi, linux-scsi

Hello Sagi Grimberg,

The patch a73c2a2f9123: "libiscsi: Use scsi helper to set information
descriptor" from Jul 15, 2015, leads to the following static checker
warning:

	drivers/scsi/libiscsi.c:858 iscsi_scsi_cmd_rsp()
	error: XXX uninitialized symbol 'sector'.

drivers/scsi/libiscsi.c
   850                  ascq = session->tt->check_protection(task, &sector);

If "ascq" is 0x1 then there sector might not be initialized.  The
documentation is not clear on how that works.  Har dee har har.  The
oldest jokes are still the best...  :P

   851                  if (ascq) {
   852                          sc->result = DRIVER_SENSE << 24 |
   853                                       SAM_STAT_CHECK_CONDITION;
   854                          scsi_build_sense_buffer(1, sc->sense_buffer,
   855                                                  ILLEGAL_REQUEST, 0x10, ascq);
   856                          scsi_set_sense_information(sc->sense_buffer,
   857                                                     SCSI_SENSE_BUFFERSIZE,
   858                                                     sector);
   859                          goto out;
   860                  }

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-05-04 11:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-13 13:14 libiscsi: Use scsi helper to set information descriptor Dan Carpenter
2016-04-13 14:53 ` Sagi Grimberg
2016-04-13 16:30   ` Dan Carpenter
2016-05-04 11:45     ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).