https://github.com/torvalds/linux
Revision 2d5c57d7fbfaa642fb7f0673df24f32b83d9066c authored by Jack Morgenstein on 25 November 2014, 09:54:31 UTC, committed by David S. Miller on 26 November 2014, 17:04:49 UTC
Some VF drivers use the upper byte of "param1" (the qp count field)
in mlx4_qp_reserve_range() to pass flags which are used to optimize
the range allocation.

Under the current code, if any of these flags are set, the 32-bit
count field yields a count greater than 2^24, which is out of range,
and this VF fails.

As these flags represent a "best-effort" allocation hint anyway, they may
safely be ignored. Therefore, the PF driver may simply mask out the bits.

Fixes: c82e9aa0a8 "mlx4_core: resource tracking for HCA resources used by guests"
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent fbe4d0d
History
Tip revision: 2d5c57d7fbfaa642fb7f0673df24f32b83d9066c authored by Jack Morgenstein on 25 November 2014, 09:54:31 UTC
net/mlx4_core: Limit count field to 24 bits in qp_alloc_res
Tip revision: 2d5c57d
File Mode Size
Kconfig -rw-r--r-- 20.9 KB
Kconfig.debug -rw-r--r-- 1015 bytes
Makefile -rw-r--r-- 2.3 KB
backing-dev.c -rw-r--r-- 16.9 KB
balloon_compaction.c -rw-r--r-- 6.8 KB
bootmem.c -rw-r--r-- 20.8 KB
cleancache.c -rw-r--r-- 12.7 KB
cma.c -rw-r--r-- 10.9 KB
compaction.c -rw-r--r-- 42.0 KB
debug-pagealloc.c -rw-r--r-- 2.1 KB
debug.c -rw-r--r-- 6.4 KB
dmapool.c -rw-r--r-- 13.7 KB
early_ioremap.c -rw-r--r-- 5.4 KB
fadvise.c -rw-r--r-- 3.6 KB
failslab.c -rw-r--r-- 1.3 KB
filemap.c -rw-r--r-- 70.7 KB
filemap_xip.c -rw-r--r-- 11.3 KB
fremap.c -rw-r--r-- 7.3 KB
frontswap.c -rw-r--r-- 13.4 KB
gup.c -rw-r--r-- 29.5 KB
highmem.c -rw-r--r-- 11.8 KB
huge_memory.c -rw-r--r-- 78.2 KB
hugetlb.c -rw-r--r-- 98.1 KB
hugetlb_cgroup.c -rw-r--r-- 10.3 KB
hwpoison-inject.c -rw-r--r-- 3.3 KB
init-mm.c -rw-r--r-- 619 bytes
internal.h -rw-r--r-- 12.8 KB
interval_tree.c -rw-r--r-- 3.2 KB
iov_iter.c -rw-r--r-- 21.0 KB
kmemcheck.c -rw-r--r-- 2.9 KB
kmemleak-test.c -rw-r--r-- 3.2 KB
kmemleak.c -rw-r--r-- 53.2 KB
ksm.c -rw-r--r-- 63.3 KB
list_lru.c -rw-r--r-- 3.4 KB
maccess.c -rw-r--r-- 1.6 KB
madvise.c -rw-r--r-- 14.1 KB
memblock.c -rw-r--r-- 44.7 KB
memcontrol.c -rw-r--r-- 173.8 KB
memory-failure.c -rw-r--r-- 47.8 KB
memory.c -rw-r--r-- 102.3 KB
memory_hotplug.c -rw-r--r-- 51.4 KB
mempolicy.c -rw-r--r-- 71.0 KB
mempool.c -rw-r--r-- 10.7 KB
migrate.c -rw-r--r-- 48.9 KB
mincore.c -rw-r--r-- 7.8 KB
mlock.c -rw-r--r-- 22.8 KB
mm_init.c -rw-r--r-- 5.0 KB
mmap.c -rw-r--r-- 88.5 KB
mmu_context.c -rw-r--r-- 1.3 KB
mmu_notifier.c -rw-r--r-- 10.5 KB
mmzone.c -rw-r--r-- 2.4 KB
mprotect.c -rw-r--r-- 10.5 KB
mremap.c -rw-r--r-- 15.1 KB
msync.c -rw-r--r-- 2.7 KB
nobootmem.c -rw-r--r-- 10.7 KB
nommu.c -rw-r--r-- 53.4 KB
oom_kill.c -rw-r--r-- 20.0 KB
page-writeback.c -rw-r--r-- 74.2 KB
page_alloc.c -rw-r--r-- 181.9 KB
page_cgroup.c -rw-r--r-- 12.0 KB
page_io.c -rw-r--r-- 9.5 KB
page_isolation.c -rw-r--r-- 8.6 KB
pagewalk.c -rw-r--r-- 5.9 KB
percpu-km.c -rw-r--r-- 2.8 KB
percpu-vm.c -rw-r--r-- 10.0 KB
percpu.c -rw-r--r-- 66.2 KB
pgtable-generic.c -rw-r--r-- 5.2 KB
process_vm_access.c -rw-r--r-- 10.2 KB
quicklist.c -rw-r--r-- 2.4 KB
readahead.c -rw-r--r-- 15.6 KB
rmap.c -rw-r--r-- 48.6 KB
shmem.c -rw-r--r-- 89.7 KB
slab.c -rw-r--r-- 106.8 KB
slab.h -rw-r--r-- 9.9 KB
slab_common.c -rw-r--r-- 23.7 KB
slob.c -rw-r--r-- 15.7 KB
slub.c -rw-r--r-- 125.0 KB
sparse-vmemmap.c -rw-r--r-- 6.0 KB
sparse.c -rw-r--r-- 20.9 KB
swap.c -rw-r--r-- 31.8 KB
swap_state.c -rw-r--r-- 12.9 KB
swapfile.c -rw-r--r-- 77.0 KB
truncate.c -rw-r--r-- 24.4 KB
util.c -rw-r--r-- 9.4 KB
vmacache.c -rw-r--r-- 3.1 KB
vmalloc.c -rw-r--r-- 68.1 KB
vmpressure.c -rw-r--r-- 11.4 KB
vmscan.c -rw-r--r-- 108.6 KB
vmstat.c -rw-r--r-- 38.1 KB
workingset.c -rw-r--r-- 13.6 KB
zbud.c -rw-r--r-- 17.9 KB
zpool.c -rw-r--r-- 9.5 KB
zsmalloc.c -rw-r--r-- 30.1 KB
zswap.c -rw-r--r-- 24.9 KB

back to top