maru: eeprom: fix crash issue when using eprom ioctl on AMD CPU 40/304840/1
authorJianhua Bi <jianhua.bi@samsung.com>
Wed, 24 Jan 2024 07:32:58 +0000 (16:32 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 24 Jan 2024 07:32:58 +0000 (16:32 +0900)
commit3a866074e0e62eac0ce528b475b69cf76f5a05eb
tree6fbae20727db690827f7a9899451e09aed537efe
parent5b65b75d006dbabb23a1f69619ac3cf465f7101f
maru: eeprom: fix crash issue when using eprom ioctl on AMD CPU

AMD CPU has user memory protection, so direct accessing user
address causes memory segment fault. To avoid the crash, use
copy_{to/from}_user() for user addresses.

Change-Id: I11d88050bfdc712d762c72903e6ca34699b72963
Signed-off-by: Jianhua Bi <jianhua.bi@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
drivers/maru/tv/maru_eeprom.c