summaryrefslogtreecommitdiffstats
path: root/drivers/dio
diff options
context:
space:
mode:
authorRoland Dreier <roland@purestorage.com>2011-12-01 01:30:33 +0100
committerJames Bottomley <JBottomley@Parallels.com>2011-12-15 07:57:40 +0100
commit2f73b9a896634dd0ce68b5af9ae5f475e24ce51e (patch)
tree60c51ea8f5580a6caa8060f32756adfa63ff8d1a /drivers/dio
parent[SCSI] mpt2sas: Fix leak on mpt2sas_base_attach() error path (diff)
downloadlinux-2f73b9a896634dd0ce68b5af9ae5f475e24ce51e.tar.xz
linux-2f73b9a896634dd0ce68b5af9ae5f475e24ce51e.zip
[SCSI] mpt2sas: Fix possible integer truncation of cpu_count
When computing reply_queue_count (the number of MSI-X vectors to use), the driver does ioc->reply_queue_count = min_t(u8, ioc->cpu_count, ioc->msix_vector_count); However, on a big machine, ioc->cpu_count could be outside the range that fits in a u8; eg a system with 256 CPUs will end up reply_queue_count set to 0. Fix this by calculating the minimum as ints and then letting the assignment to reply_queue_count handle integer demotion. Signed-off-by: Roland Dreier <roland@purestorage.com> Acked-by: "Nandigama, Nagalakshmi" <Nagalakshmi.Nandigama@lsi.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/dio')
0 files changed, 0 insertions, 0 deletions