diff options
| author | 2016-06-15 13:07:51 +0200 | |
|---|---|---|
| committer | 2016-12-14 16:33:41 +0100 | |
| commit | 0b7589ecca2b6f962cf3314a3a5a675deeefb624 (patch) | |
| tree | 0e76f58c9d6f5ae9cd9d172d3d6f9f11e29f8ba4 /arch/s390/pci/pci.c | |
| parent | s390/zcrypt: add missing memory clobber to ap_qci inline assembly (diff) | |
| download | linux-dev-0b7589ecca2b6f962cf3314a3a5a675deeefb624.tar.xz linux-dev-0b7589ecca2b6f962cf3314a3a5a675deeefb624.zip | |
s390/pci: query fmb length
Query the length of the fmb and abort fmb registration if the
size of the associated measurement block is too small.
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/pci/pci.c')
| -rw-r--r-- | arch/s390/pci/pci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c index 64e1734bebb7..38e17d4d9884 100644 --- a/arch/s390/pci/pci.c +++ b/arch/s390/pci/pci.c @@ -180,7 +180,7 @@ int zpci_fmb_enable_device(struct zpci_dev *zdev) { struct mod_pci_args args = { 0, 0, 0, 0 }; - if (zdev->fmb) + if (zdev->fmb || sizeof(*zdev->fmb) < zdev->fmb_length) return -EINVAL; zdev->fmb = kmem_cache_zalloc(zdev_fmb_cache, GFP_KERNEL); |
