lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 19 Jun 2019 13:27:23 +0200
From:   Gerd Hoffmann <kraxel@...hat.com>
To:     Emil Velikov <emil.l.velikov@...il.com>
Cc:     dri-devel@...ts.freedesktop.org,
        Maxime Ripard <maxime.ripard@...tlin.com>,
        open list <linux-kernel@...r.kernel.org>,
        David Airlie <airlied@...ux.ie>, Sean Paul <sean@...rly.run>
Subject: Re: [PATCH v3 01/12] drm: add gem array helpers

> > +struct drm_gem_object_array*
> > +drm_gem_array_from_handles(struct drm_file *drm_file, u32 *handles, u32 nents)
> > +{
> > +	struct drm_gem_object_array *objs;
> > +	u32 i;
> > +
> > +	objs = drm_gem_array_alloc(nents);
> > +	if (!objs)
> > +		return NULL;
> > +
> > +	for (i = 0; i < nents; i++) {
> > +		objs->objs[i] = drm_gem_object_lookup(drm_file, handles[i]);
> > +		if (!objs->objs[i]) {
> Missing object put for the 0..i-1 handles. Personally I would:

No. drm_gem_array_alloc initializes objs->nents and
drm_gem_array_put_free() loops over the whole array,
skipping NULL pointers.

> > +			drm_gem_array_put_free(objs);
> > +			return NULL;
> > +		}
> > +	}
> > +	return objs;
> > +}
> Missing EXPORT_SYMBOL?

Oops.  I had that fixed.  Possibly squashed into the wrong patch.

> Ditto?

Yes.

cheers,
  Gerd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ