From: Matt Roper <matthew.d.roper@intel.com>
To: Emil Velikov <emil.l.velikov@gmail.com>
Cc: ML dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH libdrm 2/2] xf86drm: Handle unrecognized subsystems safely in drmGetDevice[s]()
Date: Fri, 16 Oct 2015 15:31:46 -0700 [thread overview]
Message-ID: <20151016223146.GA17127@intel.com> (raw)
In-Reply-To: <CACvgo5123ETgkC=q-D_jJx=0cFe+2PQF2ocZtzg1v14N0N6MjQ@mail.gmail.com>
On Fri, Oct 16, 2015 at 11:27:10PM +0100, Emil Velikov wrote:
> On 16 October 2015 at 23:11, Matt Roper <matthew.d.roper@intel.com> wrote:
> > Both drmGetDevice() and drmGetDevices() currently print a warning when
> > they encounter an unknown (non-PCI) subsystem type for a device node,
> > but they still proceed to assume that the drmDevicePtr was initialized
> > and try to add it to the local device array. Add a 'continue' to the
> > error case handling to bypass the rest of the processing for devices we
> > can't handle.
> >
> > Cc: Emil Velikov <emil.l.velikov@gmail.com>
> Looks like a left over as I moved the realloc() after the switch statement.
>
> For the series:
> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
>
> Out of curiosity did you notice these while going through the code or
> do you actually have (work on) platform drm devices ? Can I volunteer
> you to add support for them ;-)
Naw, these were just caught by some static analysis tools we run
internally. We're not doing anything with platform devices, but the
whole libdrm source tree gets run through the tool, and I figured it was
easy enough to just go ahead and write the fixes.
Matt
>
> Thanks
> Emil
--
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-10-16 22:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-16 22:11 [PATCH libdrm 1/2] xf86drm: Fix error handling for drmGetDevice() Matt Roper
2015-10-16 22:11 ` [PATCH libdrm 2/2] xf86drm: Handle unrecognized subsystems safely in drmGetDevice[s]() Matt Roper
2015-10-16 22:14 ` Alex Deucher
2015-10-16 22:27 ` Emil Velikov
2015-10-16 22:31 ` Matt Roper [this message]
2015-10-20 17:50 ` Emil Velikov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151016223146.GA17127@intel.com \
--to=matthew.d.roper@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=emil.l.velikov@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.