]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/block/cciss.c
cciss: fix info leak in cciss_ioctl32_passthru()
[karo-tx-linux.git] / drivers / block / cciss.c
index 62b6c2cc80b5e9d7ef68a7ff84a447e24bb7ade5..edfa2515bc8613f952c448194bfcebf7835d75c1 100644 (file)
@@ -1189,6 +1189,7 @@ static int cciss_ioctl32_passthru(struct block_device *bdev, fmode_t mode,
        int err;
        u32 cp;
 
+       memset(&arg64, 0, sizeof(arg64));
        err = 0;
        err |=
            copy_from_user(&arg64.LUN_info, &arg32->LUN_info,
@@ -4257,6 +4258,13 @@ static void cciss_find_board_params(ctlr_info_t *h)
        cciss_get_max_perf_mode_cmds(h);
        h->nr_cmds = h->max_commands - 4 - cciss_tape_cmds;
        h->maxsgentries = readl(&(h->cfgtable->MaxSGElements));
+       /*
+        * The P600 may exhibit poor performnace under some workloads
+        * if we use the value in the configuration table. Limit this
+        * controller to MAXSGENTRIES (32) instead.
+        */
+       if (h->board_id == 0x3225103C)
+               h->maxsgentries = MAXSGENTRIES;
        /*
         * Limit in-command s/g elements to 32 save dma'able memory.
         * Howvever spec says if 0, use 31