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] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 29 Oct 2012 15:12:20 -0700
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Henrik Rydberg <rydberg@...omail.se>
Cc:	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
	Tejun Heo <tj@...nel.org>
Subject: Re: [PATCH] Input: introduce managed input devices (add devres support)

On Monday, October 29, 2012 10:32:54 PM Henrik Rydberg wrote:
> > > Either way, the code looks functional to me.
> > 
> > So is that "reviewed-by"?
> 
> I was thinking about this hunk:
> > @@ -1972,7 +2084,20 @@ int input_register_device(struct input_dev *dev)
> > 
> >         mutex_unlock(&input_mutex);
> > 
> > +       if (dev->devres_managed) {
> > +               dev_info(dev->dev.parent, "%s: registerign %s with
> > devres.\n", +                       __func__, dev->name ?: "N/A");
> > +               devres_add(dev->dev.parent, devres);
> > +       }
> > 
> >         return 0;
> > 
> > +
> > +err_device_del:
> > +       device_del(&dev->dev);
> > +err_free_vals:
> > +       kfree(dev->vals);
> 
> Won't this yield a double free once we reach release()?

Nicely spotted, we need "dev->vals = NULL;" here.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ