linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] drivers/scsi/dc395x.c - msgin_qtag()
@ 2013-11-15 19:53 Geyslan Gregório Bem
  2013-11-18  7:53 ` Oliver Neukum
  0 siblings, 1 reply; 2+ messages in thread
From: Geyslan Gregório Bem @ 2013-11-15 19:53 UTC (permalink / raw)
  To: Oliver Neukum, Ali Akcaagac, Jamie Lenehan, James E.J. Bottomley,
	dc395x
  Cc: LKML, linux-scsi, hch

Hi guys,

In the function msgin_qtag() [line 2632], this dereference was intentional?

static struct ScsiReqBlk *msgin_qtag(struct AdapterCtlBlk *acb,
        struct DeviceCtlBlk *dcb, u8 tag)
{
    struct ScsiReqBlk *srb = NULL;
    struct ScsiReqBlk *i;
    dprintkdbg(DBG_0, "msgin_qtag: (0x%p) tag=%i srb=%p\n",
           srb->cmd, tag, srb);
...

There is a srb (NULL) dereference in the dprintkdbg() parameteres.

If not, what approach do you suggest me for a patch?

-- 
Regards,

Geyslan G. Bem
hackingbits.com

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

* Re: [RFC] drivers/scsi/dc395x.c - msgin_qtag()
  2013-11-15 19:53 [RFC] drivers/scsi/dc395x.c - msgin_qtag() Geyslan Gregório Bem
@ 2013-11-18  7:53 ` Oliver Neukum
  0 siblings, 0 replies; 2+ messages in thread
From: Oliver Neukum @ 2013-11-18  7:53 UTC (permalink / raw)
  To: Geyslan Gregório Bem
  Cc: Ali Akcaagac, Jamie Lenehan, James E.J. Bottomley, dc395x, LKML,
	linux-scsi, hch

On Fri, 2013-11-15 at 17:53 -0200, Geyslan Gregório Bem wrote:

Hi,

> Hi guys,
> 
> In the function msgin_qtag() [line 2632], this dereference was intentional?
> 
> static struct ScsiReqBlk *msgin_qtag(struct AdapterCtlBlk *acb,
>         struct DeviceCtlBlk *dcb, u8 tag)
> {
>     struct ScsiReqBlk *srb = NULL;
>     struct ScsiReqBlk *i;
>     dprintkdbg(DBG_0, "msgin_qtag: (0x%p) tag=%i srb=%p\n",
>            srb->cmd, tag, srb);
> ...
> 
> There is a srb (NULL) dereference in the dprintkdbg() parameteres.

That is a bad bug.

> If not, what approach do you suggest me for a patch?

Merge it with
        dprintkdbg(DBG_0, "msgin_qtag: (0x%p) <%02i-%i>\n",
                srb->cmd, srb->dcb->target_id, srb->dcb->target_lun);
later in the function.

	Regards
		Oliver


--
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

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

end of thread, other threads:[~2013-11-18  7:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-15 19:53 [RFC] drivers/scsi/dc395x.c - msgin_qtag() Geyslan Gregório Bem
2013-11-18  7:53 ` Oliver Neukum

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).