All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix potential return of uninitialized variable in scsi_scan   (resend)
@ 2006-03-18 21:42 Jesper Juhl
  2006-03-18 23:10 ` James Bottomley
  0 siblings, 1 reply; 3+ messages in thread
From: Jesper Juhl @ 2006-03-18 21:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: Eric Youngdale, James E. J. Bottomley, linux-scsi, Andrew Morton,
	Jesper Juhl

( The patch below was already send on March 9, 2006. )
( This is a resend, re-diff'ed against 2.6.16-rc6    )


The coverity checker found out that we potentially return sdev uninitialized.
This should fix coverity #879

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---

 drivers/scsi/scsi_scan.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

--- linux-2.6.16-rc6-orig/drivers/scsi/scsi_scan.c	2006-03-12 14:19:00.000000000 +0100
+++ linux-2.6.16-rc6/drivers/scsi/scsi_scan.c	2006-03-18 22:37:53.000000000 +0100
@@ -1277,7 +1277,9 @@ struct scsi_device *__scsi_add_device(st
 					     hostdata);
 		if (res != SCSI_SCAN_LUN_PRESENT)
 			sdev = ERR_PTR(-ENODEV);
-	}
+	} else 
+		sdev = ERR_PTR(-EACCES);
+
 	mutex_unlock(&shost->scan_mutex);
 	scsi_target_reap(starget);
 	put_device(&starget->dev);



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

* Re: [PATCH] fix potential return of uninitialized variable in scsi_scan   (resend)
  2006-03-18 21:42 [PATCH] fix potential return of uninitialized variable in scsi_scan (resend) Jesper Juhl
@ 2006-03-18 23:10 ` James Bottomley
  2006-03-18 23:22   ` Jesper Juhl
  0 siblings, 1 reply; 3+ messages in thread
From: James Bottomley @ 2006-03-18 23:10 UTC (permalink / raw)
  To: Jesper Juhl; +Cc: linux-kernel, Eric Youngdale, linux-scsi, Andrew Morton

On Sat, 2006-03-18 at 22:42 +0100, Jesper Juhl wrote:
> ( The patch below was already send on March 9, 2006. )
> ( This is a resend, re-diff'ed against 2.6.16-rc6    )
> 
> 
> The coverity checker found out that we potentially return sdev uninitialized.
> This should fix coverity #879

The fix for this is already in scsi-misc.

http://www.kernel.org/git/?p=linux/kernel/git/jejb/scsi-misc-2.6.git;a=commit;h=a97a83a06b44d4d1cb01191423caf9813a150b95

James

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

* Re: [PATCH] fix potential return of uninitialized variable in scsi_scan (resend)
  2006-03-18 23:10 ` James Bottomley
@ 2006-03-18 23:22   ` Jesper Juhl
  0 siblings, 0 replies; 3+ messages in thread
From: Jesper Juhl @ 2006-03-18 23:22 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-kernel, Eric Youngdale, linux-scsi, Andrew Morton

On 3/19/06, James Bottomley <James.Bottomley@hansenpartnership.com> wrote:
> On Sat, 2006-03-18 at 22:42 +0100, Jesper Juhl wrote:
> > ( The patch below was already send on March 9, 2006. )
> > ( This is a resend, re-diff'ed against 2.6.16-rc6    )
> >
> >
> > The coverity checker found out that we potentially return sdev uninitialized.
> > This should fix coverity #879
>
> The fix for this is already in scsi-misc.
>
Ok, I was unaware of that.
I'll try to remember to check that git tree in the future.

Thanks.


--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html

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

end of thread, other threads:[~2006-03-18 23:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-18 21:42 [PATCH] fix potential return of uninitialized variable in scsi_scan (resend) Jesper Juhl
2006-03-18 23:10 ` James Bottomley
2006-03-18 23:22   ` Jesper Juhl

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.