Age | Commit message (Collapse) | Author |
|
The register_chrdev and cdev_add will both add cdev device. They can't
be used at the same time. This code will cause a race condition as well.
When register_chrdev and device_create were run and before running
cdev_add, the char devcie already can be opened. But we can't get
correct offload context inside touch_offload_open at this moment. We can
only get correct offload context after running cdev_add. So this is a
race condition. If twoshay open offload dev before running cdev_add, the
code will use an invalid pointer to run mutex_init.
So we must run cdev_add before device_create. This can prevent the code
to access an invalid pointer.
Bug: 255257453
Bug: 237225174
Test: Run setprop ctl.stop twoshay ; rmmod touch_driver ;
setprop ctl.start twoshay ; insmod touch_driver
Change-Id: I8d9cb9ec23b8621a800127f0140e40a11d4f5e02
Signed-off-by: Wendly Li <wendlyli@google.com>
|
|
Bug: 201610482
Signed-off-by: Super Liu <supercjliu@google.com>
Change-Id: If5a28dfdcecc3b8b87280e85d4f43d659df1803b
|
|
Bug: 200769195
Test: build pass.
Signed-off-by: davidycchen <davidycchen@google.com>
Change-Id: Ic79a185272847e805bcb5abb062bbdf48d521b33
|
|
Bug: 174191163
Signed-off-by: Steve Pfetsch <spfetsch@google.com>
Change-Id: I55381beb2079a7d65ca25bdc08af02b1d08d47b4
|
|
Bug: 173331163
Test: touch_offload module is built from the external module.
Signed-off-by: Tai Kuo <taikuo@google.com>
Change-Id: I0de609638e0b30de2673d7599e1529081763b0cf
|