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]
Message-ID: <45F60482.6010501@rtr.ca>
Date:	Mon, 12 Mar 2007 21:55:14 -0400
From:	Mark Lord <lkml@....ca>
To:	Jim Radford <radford@...ckbean.org>
Cc:	Greg KH <greg@...ah.com>, linux-usb-devel@...ts.sourceforge.net,
	Oliver Neukum <oneukum@...e.de>, Adrian Bunk <bunk@...sta.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] usb-serial regression fix

Jim Radford wrote:
> On Mon, Mar 12, 2007 at 05:18:19PM -0700, Greg KH wrote:
>> On Mon, Mar 12, 2007 at 03:59:22PM -0700, Jim Radford wrote:
>>> On Mon, Mar 12, 2007 at 03:42:35PM -0700, Jim Radford wrote:
>>>> On Mon, Mar 12, 2007 at 01:33:31PM -0700, Greg KH wrote:
>>>>> On Mon, Mar 12, 2007 at 04:22:22PM -0400, Mark Lord wrote:
>>>>>> Oliver Neukum wrote:
>>>>>>>> Mark Lord wrote:
>>>>>>>>> Okay, from that part (above), the problem is obvious:
>>>>>>>>> in that the "MCT U232 converter now disconnected"
>>>>>>>>> appears, and then we continue to try and call the
>>>>>>>>> driver's method.. Oops!
> 
>>>>>>> IMHO shutdown() is using serial->port[] and bombs.
>>>>>>> Could you reverse the order here?
> 
>>> Do not NULL serial->port[i] since it is used in ->shutdown().
>>> This wasn't an issue until the order or ->shutdown() and
>>> device_unregister was corrected.
> 
>>>         for (i = 0; i < serial->num_ports; ++i)
>>>                 if (serial->port[i]->dev.parent != NULL) {
>>>                         device_unregister(&serial->port[i]->dev);
>>> -                       serial->port[i] = NULL;
>>>                 }
> 
>> But shouldn't you null it out somewhere?  It will be an "empty"
>> pointer at some point in time...
> 
> Not as far as I can see. The serial structure that ->port[i] is in
> gets kfree()ed soon after, in the same function, and nothing in
> between, other than ->shutdown(), uses ->port[].  I assume it was
> someone being overly cautious.

So where does the memory get freed -- the structure pointed at
by the serial->port[i] thingie ?  It's not a leak, is it?

???
-
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