Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / drivers / scsi / aacraid / commctrl.c
index 255421d..9f75144 100644 (file)
@@ -535,7 +535,7 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
        default:
                data_dir = DMA_NONE;
        }
-       if (user_srbcmd->sg.count > ARRAY_SIZE(sg_list)) {
+       if (user_srbcmd->sg.count > (sizeof(sg_list)/sizeof(sg_list[0]))) {
                dprintk((KERN_DEBUG"aacraid: too many sg entries %d\n",
                  le32_to_cpu(srbcmd->sg.count)));
                rcode = -EINVAL;