All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] Avoid usb reset crashes by making tty_io cdevs truly dynamic
@ 2015-05-19 15:04 Richard Watts
  0 siblings, 0 replies; only message in thread
From: Richard Watts @ 2015-05-19 15:04 UTC (permalink / raw)
  To: linux-kernel, gregkh

Sometimes, usb buses on which CDC ACM devices sit encounter a usb reset.

When this happens, particularly when CONFIG_DEBUG_KOBJECT_RELEASE is on,
we attempt to destroy the cdev for the associated tty and then
rapidly re-initialise it. Since kobject destruction is not immediate,
this potentially leaves us with cdev_init() calling kobject_init() on a
kobject that is about to be destroyed.

This turns out not to be such a good thing and this patch solves the
problem by making the cdevs tty_operations->cdevs dynamically
allocated.

This may not be a problem in the wild (though I have some circumstantial
evidence that it is), but I submit that we might want to think about
fixing it anyway, since it makes debugging on systems with
CONFIG_DEBUG_KOBJECT_RELEASE=y and USB resets rather difficult
(guess what I have been doing lately .. ).

Patch is against e26081808edadfd257c6c9d81014e3b25e9a6118 (head of
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git ).

  (in fact, you will still get an oops - which is the subject of
another, more controversial, patchset ..)



Richard.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-05-19 15:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-19 15:04 [PATCH 0/1] Avoid usb reset crashes by making tty_io cdevs truly dynamic Richard Watts

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.