Re: usb serial driver: private data already deallocated when release function is called

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 8 Jan 2013, Tilman wrote:

> I added an addition port_probe, and port_remove function that do nothing but a
> "return 0". The bahavior is unchanged. The private data is already deallocated
> once the release function is called

Of course.  Changes you make in your driver aren't going to affect the
behavior of code elsewhere.

You have to do what I said in my previous email: Take the stuff in the
release function that uses the private data, and move it into the
port_remove function.  The port_remove function gets called before the
private data pointer is cleared.

> Now, i have 2 follow up questions:
> 1) When I load and unload the kernel model, I get an error message Device
> 'usbrsatest' does not have a release() function, it is broken and must be fixed.
> I have a release function. What does this message tries to tell me ? I do have a
> release function.

Maybe you have a release function for the device, but neither 
dev->release, dev->type->release, nor dev->class->release contains a 
pointer to that function.

> 2) In the meanwhile, the dynamic debug feature was introduced. I left dev_dbg-
> messages in my module functions, and set the CONFIG_DYNCAMIC_DEBUG flag. And I
> issued  a command to enable all debug statements ( echo "file usbrsatest.c +p" >
> /sys/kernel/debug/dynamic_debug/control). I would now expect to see my dev_dbg
> statments in the syslog. I do not find any message in the system log or using
> dmesg. Am i looking into the wrong files ?

I don't know; I have never used dynamic debug.  You should ask the 
person who maintains it, not the USB list.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux