Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 812c6796 authored by Amir Samuelov's avatar Amir Samuelov
Browse files

dm: dm-req-crypt: fix null pointer reference



When dm_get_device(&dev) fails the "dev" variable is NULL,
so calling dm_put_device(dev) crash the device.

[  125.744115] [<ffffffc000837ecc>] dm_put_device+0x14/0x58
[  125.749408] [<ffffffc000843794>] req_crypt_dtr+0xa8/0xbc
[  125.754696] [<ffffffc000843bc0>] req_crypt_ctr+0x418/0x440
[  125.760176] [<ffffffc0008387fc>] dm_table_add_target+0x24c/0x2f8
[  125.766167] [<ffffffc00083bfac>] table_load+0x27c/0x2b0
[  125.771377] [<ffffffc00083b90c>] ctl_ioctl+0x3a8/0x448
[  125.776496] [<ffffffc00083b9bc>] dm_ctl_ioctl+0x10/0x20
[  125.781706] [<ffffffc000301cd0>] vfs_ioctl+0x20/0x3c
[  125.786648] [<ffffffc000302618>] do_vfs_ioctl+0x49c/0x568
[  125.792031] [<ffffffc000302740>] SyS_ioctl+0x5c/0x88

Change-Id: Icef2841b1aede259ee0f697f21b1976cd4485991
Signed-off-by: default avatarAmir Samuelov <amirs@codeaurora.org>
parent 7446700f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment