From: Mark Haverkamp Date: Wed, 11 Jan 2006 17:28:07 +0000 (-0800) Subject: [SCSI] aacraid: Fix default FIB size X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6e289a9023d589c24f86b29186d324215cdc9947;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git [SCSI] aacraid: Fix default FIB size Received from Mark Salyzyn. If the adapter has not instructed us otherwise that it can handle a 'large' FIB, then it can handle at most a 2KB FIB. Signed-off-by: Mark Haverkamp Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c index ef623bd965f..4fe79cd7c95 100644 --- a/drivers/scsi/aacraid/commctrl.c +++ b/drivers/scsi/aacraid/commctrl.c @@ -85,6 +85,10 @@ static int ioctl_send_fib(struct aac_dev * dev, void __user *arg) if (size < le16_to_cpu(kfib->header.SenderSize)) size = le16_to_cpu(kfib->header.SenderSize); if (size > dev->max_fib_size) { + if (size > 2048) { + retval = -EINVAL; + goto cleanup; + } /* Highjack the hw_fib */ hw_fib = fibptr->hw_fib; hw_fib_pa = fibptr->hw_fib_pa;