]> xenbits.xensource.com Git - people/aperard/linux-chromebook.git/commit
CHROMIUM: gobi: Keep struct qcusbnet alive while cdev is alive
authorMichael Spang <spang@chromium.org>
Thu, 1 Nov 2012 20:52:46 +0000 (16:52 -0400)
committerGerrit <chrome-bot@google.com>
Fri, 2 Nov 2012 17:47:24 +0000 (10:47 -0700)
commitae884f341c47a26482e77aa8cf1ef20a38432d0c
tree100b8f9a6baa311d906510f23e3a5df4eeaa484f
parent0389bf5d192fb822271e5e63068a84775a2c7c79
CHROMIUM: gobi: Keep struct qcusbnet alive while cdev is alive

This fixes an issue where struct qcusbnet is freed while the embedded
character device is still alive.

This uses the ability of cdev to pin an arbitrary kobject by setting
cdev.kobj.parent. We have to switch from kref to kobject to use that.
This is arguably misuse of kobject, but char_dev requires it.t t

BUG=chrome-os-partner:15849
TEST=suspend_stress_test

Change-Id: I309e80c6ec91e491d30ea0bfcb062ae7e55f7198
Signed-off-by: Michael Spang <spang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/37135
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
drivers/net/usb/gobi/qcusbnet.c
drivers/net/usb/gobi/qmidevice.c
drivers/net/usb/gobi/structs.h