diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-28 21:38:50 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-28 21:38:50 +0200 |
commit | 4e8440b3b6b801953b2e53c55491cf98fc8f6c01 (patch) | |
tree | 2326bb4c6998e8f44f0b9236954569adc15bb8e3 | |
parent | Merge tag 'chrome-platform' of git://git.kernel.org/pub/scm/linux/kernel/git/... (diff) | |
parent | i2c: dev: use after free in detach (diff) | |
download | linux-4e8440b3b6b801953b2e53c55491cf98fc8f6c01.tar.xz linux-4e8440b3b6b801953b2e53c55491cf98fc8f6c01.zip |
Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c fix from Wolfram Sang:
"A fix for a regression introduced yesterday.
The regression didn't show up here locally because I did not have
PAGE_POISONING enabled. And buildbots discovered this only after it
hit your tree. Thanks to Dan for the quick response"
* 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
i2c: dev: use after free in detach
-rw-r--r-- | drivers/i2c/i2c-dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c index 89593dcb79f0..6ecfd76270f2 100644 --- a/drivers/i2c/i2c-dev.c +++ b/drivers/i2c/i2c-dev.c @@ -592,9 +592,9 @@ static int i2cdev_detach_adapter(struct device *dev, void *dummy) if (!i2c_dev) /* attach_adapter must have failed */ return 0; + cdev_del(&i2c_dev->cdev); put_i2c_dev(i2c_dev); device_destroy(i2c_dev_class, MKDEV(I2C_MAJOR, adap->nr)); - cdev_del(&i2c_dev->cdev); pr_debug("i2c-dev: adapter [%s] unregistered\n", adap->name); return 0; |