Re: [PATCH AUTOSEL 5.6 080/606] i2c: dev: Fix the race between the release of i2c_dev and cdev

2020-06-10 Thread Ben Hutchings
On Mon, 2020-06-08 at 19:03 -0400, Sasha Levin wrote: > From: Kevin Hao > > commit 1413ef638abae4ab5621901cf4d8ef08a4a48ba6 upstream. [...] This was already applied in 5.6.15. Ben. -- Ben Hutchings, Software Developer Codethink Ltd https://www.codethink.co.uk/

[PATCH AUTOSEL 5.6 080/606] i2c: dev: Fix the race between the release of i2c_dev and cdev

2020-06-08 Thread Sasha Levin
From: Kevin Hao commit 1413ef638abae4ab5621901cf4d8ef08a4a48ba6 upstream. The struct cdev is embedded in the struct i2c_dev. In the current code, we would free the i2c_dev struct directly in put_i2c_dev(), but the cdev is manged by a kobject, and the release of it is not predictable. So it is