]> git.baikalelectronics.ru Git - kernel.git/commit
xen-pciback: reject out of range inputs
authorJan Beulich <JBeulich@suse.com>
Fri, 2 Nov 2012 14:37:13 +0000 (14:37 +0000)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 2 Nov 2012 15:04:03 +0000 (11:04 -0400)
commit95accaef07175489037fc65134601b240852c80c
tree67b38a9e693d4af602b1c05e867c0487c5fc9cf5
parent860a220c1c4e017743f496232ecf8ae46772ce1f
xen-pciback: reject out of range inputs

This add checks for out of range numbers (including in cases where the
folding of slot and function into a single value could yield false
matches).

It also removes the bogus field width restrictions in str_to_quirk() -
nowhere else in the driver this is being done, and hence this function
could reject input the equivalent of which would be happily accepted
in other places (in particular, "0x" prefixes causing the effective
width of the actual number to be either zero or less than what would be
required to cover the full range of valid values). Note that for the
moment this second part is cosmetic only, as the kernel's sscanf()
currently ignores the field widths, but a patch to overcome this is on
its way.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/xen/xen-pciback/pci_stub.c