]> git.karo-electronics.de Git - karo-tx-linux.git/commit
SCSI: libiscsi: fix iscsi pool error path again
authorJean Delvare <jdelvare@suse.de>
Wed, 1 Apr 2009 18:11:29 +0000 (13:11 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 2 May 2009 17:24:15 +0000 (10:24 -0700)
commit14ccf7620aad576505bbd545788009eeaed9e848
tree9ba8cf19ca11f9a8c984a0bf201113107e857b72
parent0578833e27eb361c3d569fcb654a3c6d4183bc94
SCSI: libiscsi: fix iscsi pool error path again

upstream commit: fd6e1c14b73dbab89cb76af895d5612e4a8b5522

Le lundi 30 mars 2009, Chris Wright a écrit :
> q->queue could be ERR_PTR(-ENOMEM) which will break unwinding
> on error.  Make iscsi_pool_free more defensive.
>

Making the freeing of q->queue dependent on q->pool being set looks
really weird (although it is correct at the moment. But this seems
to be fixable in a much simpler way.

With the benefit that only the error case is slowed down. In both
cases we have a problem if q->queue contains an error value but it's
not -ENOMEM. Apparently this can't happen today, but it doesn't feel
right to assume this will always be true. Maybe it's the right time
to fix this as well.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
[chrisw: this is a fixlet to f474a37b, also in -stable]
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/scsi/libiscsi.c