Re: [PATCH] drm/i915/kvmgt: avoid dereferencing a potentially null info pointer
On Thu, Mar 23, 2017 at 1:22 PM, Colin Kingwrote: > From: Colin Ian King > > info is being checked to see if it is a null pointer, however, vpgu is > dereferencing info before this check, leading to a potential null > pointer dereference. If info is null, then the error message being > printed by macro gvt_vgpu_err and this requires vpgu to exist. We can > use a null vpgu as the macro has a sanity check to see if vpgu is null, > so this is OK. > > Detected with CoverityScan, CID#1420672 ("Dereference nefore null check") s,nefore,before, > > Fixes: 695fbc08d80f ("drm/i915/gvt: replace the gvt_err with gvt_vgpu_err") > Signed-off-by: Colin Ian King > --- > drivers/gpu/drm/i915/gvt/kvmgt.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c > b/drivers/gpu/drm/i915/gvt/kvmgt.c > index 1ea3eb270de8..f8619a772c44 100644 > --- a/drivers/gpu/drm/i915/gvt/kvmgt.c > +++ b/drivers/gpu/drm/i915/gvt/kvmgt.c > @@ -1339,9 +1339,9 @@ static int kvmgt_guest_init(struct mdev_device *mdev) > > static bool kvmgt_guest_exit(struct kvmgt_guest_info *info) > { > - struct intel_vgpu *vgpu = info->vgpu; > - > if (!info) { > + struct intel_vgpu *vgpu = NULL; > + > gvt_vgpu_err("kvmgt_guest_info invalid\n"); > return false; > } Does this mean the original gvt_err() macro is no longer there? And apparently gvt_vgpu_err is a macro that depends on the specifics of its environment? Yikes. Cheers, Frans ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH 05/98] exynos_drm.h: use __u64 from linux/types.h
On Mon, Jun 1, 2015 at 11:08 AM, Christian König wrote: > Yeah, completely agree with Linus on the visibility problem and that's > exactly the reason why we don't include in the kernel header and > expect userspace to define the ISO types somewhere. > > But using the types from "include/linux/types.h" and especially including it > into the uapi headers doesn't make the situation better, but rather worse. > > With this step we not only make the headers depend on another header that > isn't part of the uapi, but also pollute the user space namespace with __sXX > and __uXX types which aren't defined anywhere else. These __uXX and __sXX types are defined in include/uapi/asm-generic/ll64.h and pulled in by include/uapi/linux/types.h. Including linux/types.h is therefore valid. Frans
[Spice-devel] [PATCH 00/11] Miscellaneous stability patches
On Thu, May 28, 2015 at 4:10 PM, Frediano Ziglio wrote: > >> also indicating in each patch what is a right now fix and what isn't. > > What do you mean by right fix or not ? He probably meant indicating whether it is an urgent fix. Frans
[bisected] nouveau dual monitor setup broken
On Fri, Oct 31, 2014 at 11:34:45AM +0100, Roy Spliet wrote: > > It does ring a tiny bell: please check out > https://bugs.freedesktop.org/show_bug.cgi?id=85160 and try the fix proposed > in comment #7. Yup, that seems to fix things. As far as I'm concerned, that patch is Tested-by: Frans Klaver Thanks, Frans
[bisected] nouveau dual monitor setup broken
Hi there, My dual monitor setup on the Dell Precision M4500 is broken by commit 1dce6264045cd23e9c07574ed0bb31c7dce9354f ("drm/nv50/kms: Set VBLANK time in modeset script"). I am no longer able to have more than one monitor active. Full dmesg can be found at http://pastebin.com/7e68yMRy, but I've included an excerpt as well. [0.00] Linux version 3.18.0-rc2-00106-ga7ca10f (frans at bwaark) (gcc version 4.8.2 (Gentoo 4.8.2 p1.3r1, pie-0.5.8r1) ) #27 SMP Fri Oct 31 08:30:15 CET 2014 ... [1.920869] fb: switching to nouveaufb from VESA VGA [1.953160] Console: switching to colour dummy device 80x25 [1.965235] nouveau [ DEVICE][:01:00.0] BOOT0 : 0x0a5e00a2 [1.965247] nouveau [ DEVICE][:01:00.0] Chipset: GT216 (NVA5) [1.965255] nouveau [ DEVICE][:01:00.0] Family : NV50 [1.965303] nouveau [ VBIOS][:01:00.0] checking PRAMIN for image... [2.017175] tsc: Refined TSC clocksource calibration: 1595.999 MHz [2.060360] nouveau [ VBIOS][:01:00.0] ... appears to be valid [2.060369] nouveau [ VBIOS][:01:00.0] using image from PRAMIN [2.060704] nouveau [ VBIOS][:01:00.0] BIT signature found [2.060713] nouveau [ VBIOS][:01:00.0] version 70.16.5c.01.06 [2.075227] ACPI: Battery Slot [BAT1] (battery absent) [2.075329] nouveau :01:00.0: irq 29 for MSI/MSI-X [2.075342] nouveau [ PMC][:01:00.0] MSI interrupts enabled [2.075376] nouveau [ PFB][:01:00.0] RAM type: DDR3 [2.075380] nouveau [ PFB][:01:00.0] RAM size: 1024 MiB [2.075384] nouveau [ PFB][:01:00.0]ZCOMP: 1920 tags [2.079057] nouveau [VOLT][:01:00.0] GPU voltage: 93uv [2.108300] nouveau [ PTHERM][:01:00.0] FAN control: none / external [2.108328] nouveau [ PTHERM][:01:00.0] fan management: automatic [2.108338] nouveau [ PTHERM][:01:00.0] internal sensor: yes [2.128401] nouveau [ CLK][:01:00.0] 03: core 135 MHz shader 270 MHz memory 135 MHz [2.128414] nouveau [ CLK][:01:00.0] 07: core 405 MHz shader 810 MHz memory 324 MHz [2.128426] nouveau [ CLK][:01:00.0] 0f: core 550 MHz shader 1210 MHz memory 790 MHz [2.128469] nouveau [ CLK][:01:00.0] --: core 405 MHz shader 810 MHz memory 324 MHz [2.129501] [TTM] Zone kernel: Available graphics memory: 4080170 kiB [2.129514] [TTM] Zone dma32: Available graphics memory: 2097152 kiB [2.129522] [TTM] Initializing pool allocator [2.129540] [TTM] Initializing DMA pool allocator [2.129575] nouveau [ DRM] VRAM: 1024 MiB [2.129584] nouveau [ DRM] GART: 1048576 MiB [2.129596] nouveau [ DRM] TMDS table version 2.0 [2.129605] nouveau [ DRM] DCB version 4.0 [2.129615] nouveau [ DRM] DCB outp 00: 048003b6 0f220014 [2.129626] nouveau [ DRM] DCB outp 01: 02033300 [2.129637] nouveau [ DRM] DCB outp 02: 028113a6 0f220010 [2.129647] nouveau [ DRM] DCB outp 03: 02011362 00020010 [2.129657] nouveau [ DRM] DCB outp 04: 088223c6 0f220010 [2.129667] nouveau [ DRM] DCB outp 05: 08022382 00020010 [2.129676] nouveau [ DRM] DCB conn 00: 2047 [2.129687] nouveau [ DRM] DCB conn 01: 00101146 [2.129696] nouveau [ DRM] DCB conn 02: 00410246 [2.129705] nouveau [ DRM] DCB conn 03: 0300 [2.183136] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013). [2.183142] [drm] Driver supports precise vblank timestamp query. [2.229885] nouveau [ DRM] MM: using COPY for buffer copies [2.545100] nouveau [ DRM] allocated 1920x1080 fb: 0x7, bo 880225962c00 [2.545330] fbcon: nouveaufb (fb0) is primary device [2.596432] nouveau E[ PDISP][:01:00.0] INVALID_STATE [UNK05] chid 0 mthd 0x0080 data 0x [2.596435] nouveau E[ PDISP][:01:00.0] Core: [2.596441] nouveau E[ PDISP][:01:00.0]0x0084: 0x01e00280 -> 0x [2.596447] nouveau E[ PDISP][:01:00.0]0x0088: 0xf000 [2.596450] nouveau E[ PDISP][:01:00.0] Core - DAC 0: [2.596455] nouveau E[ PDISP][:01:00.0]0x0400: 0x [2.596460] nouveau E[ PDISP][:01:00.0]0x0404: 0x [2.596465] nouveau E[ PDISP][:01:00.0]0x0420: 0x0001 [2.596468] nouveau E[ PDISP][:01:00.0] Core - DAC 1: [2.596473] nouveau E[ PDISP][:01:00.0]0x0480: 0x [2.596477] nouveau E[ PDISP][:01:00.0]0x0484: 0x [2.596482] nouveau E[ PDISP][:01:00.0]0x04a0: 0x0001 [2.596484] nouveau E[ PDISP][:01:00.0] Core - DAC 2: [2.596489] nouveau E[ PDISP][:01:00.0]0x0500: 0x [2.596494] nouveau E[ PDISP][:01:00.0]0x0504: