[<prev] [next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1009131701590.26813@pobox.suse.cz>
Date: Mon, 13 Sep 2010 17:02:32 +0200 (CEST)
From: Jiri Kosina <jkosina@...e.cz>
To: anil joshi <anilsjoshi123@...il.com>
Cc: Jiri Slaby <jslaby@...e.cz>, arnd@...db.de,
Peter Júnoš <petoju@...il.com>,
linux-input@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
markus@...ppelsdorf.de
Subject: Re: HIDDEV: potential NULL dereference
On Thu, 9 Sep 2010, anil joshi wrote:
>
>
> On Thu, Sep 9, 2010 at 7:59 PM, anil joshi <anilsjoshi123@...il.com> wrote:
> hid->dev.parent is "usb_interfae" pointer is kfree in usb_release_interfece
> hid_to_usb_dev(dev) accessing hid->dev.parent
>
> I have tested this,while removing hid device
>
> usb_release_interfece is belonging to khubd process
>
> I get many use full information from Jiri Kosina, Markus Trippelsdorf, regarding this issue
> from http://kerneltrap.org/mailarchive/linux-kernel/2010/8/12/4606155/thread#mid-4606155
>
> To avoid NULL deference problem
>
> hiddev->exist is zero before usb_deregister_dev call in hiddev_disconnected function there fore
> we could use
> static long hiddev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
> {
>
>
> if (hiddev->exist) {
> hid_to_usb_dev(dev);
> } else {
> return -EIO
> }
>
>
> Thanks to Markus Trippelsdorf , Jiri Kosina
Hi Anil,
could you please send a proper patch (diff against current kernel) and a
short changelog entry with the explanation, so that I could easily
understand what you are proposing?
Thanks!
--
Jiri Kosina
SUSE Labs, Novell Inc.
--
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