From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965038AbXAJTym (ORCPT ); Wed, 10 Jan 2007 14:54:42 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965048AbXAJTym (ORCPT ); Wed, 10 Jan 2007 14:54:42 -0500 Received: from smtp-out001.kontent.com ([81.88.40.215]:57703 "EHLO smtp-out.kontent.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965038AbXAJTyl convert rfc822-to-8bit (ORCPT ); Wed, 10 Jan 2007 14:54:41 -0500 From: Oliver Neukum To: Alan Stern Subject: Re: [linux-usb-devel] 2.6.20-rc4: null pointer deref in khubd Date: Wed, 10 Jan 2007 20:54:56 +0100 User-Agent: KMail/1.8 Cc: linux-usb-devel@lists.sourceforge.net, Andrew Morton , Greg KH , Pavel Machek , kernel list References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT Content-Disposition: inline Message-Id: <200701102054.57303.oliver@neukum.org> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Am Mittwoch, 10. Januar 2007 18:31 schrieb Alan Stern: > > Regarding the bug this device uncovers, it seems to me that this in drivers/base/core.c > >       if (parent) > >               klist_add_tail(&dev->knode_parent, &parent->klist_children); > > should make knode_parent a valid node under all circumstances. > > Hm. > > I haven't seen the original bug report.  Where does the NULL pointer deref > occur? Apparently here: drivers/base/core.c: void device_del(struct device * dev) { struct device * parent = dev->parent; struct class_interface *class_intf; if (parent) klist_del(&dev->knode_parent); The obvious change with this device is that usb_set_configuration() is never called, but that should not matter. Regards Oliver