]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] libfc: call ddp setup for only FCP reads to avoid accessing junk fsp pointer
authorVasu Dev <vasu.dev@intel.com>
Thu, 21 Jan 2010 18:15:44 +0000 (10:15 -0800)
committerJames Bottomley <James.Bottomley@suse.de>
Wed, 17 Feb 2010 15:56:57 +0000 (09:56 -0600)
commit40fa95fc31efd510192b26f231300b501f11bdc0
tree1521dd75fa922bd42e8a91dc2d82ec6b06a7c696
parent094895077c45da0dfcf998e146d32cfea9d8b211
[SCSI] libfc: call ddp setup for only FCP reads to avoid accessing junk fsp pointer

Adds check to call fc_fcp_ddp_setup for only FCP read cmds to avoid
accessing junk fsp pointer at least in ESX since non FCP frame had
junk fsp value, though fsp is implicitly initialized to null
by __alloc_skb but with this patch no more relying on fsp
initialized to null value and hitting junk fsp ptr access.

Removes fsp pointer checking in fc_fcp_ddp_setup as this is not
needed any more since its only caller for FCP read will always
have a valid fsp.

Reported by: Frank Zhang <frank_1.zhang@intel.com>
Reported by: Rob Love <robert.w.love@intel.com>
Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/libfc/fc_exch.c
drivers/scsi/libfc/fc_fcp.c