diff options
| author | Martin Schiller | 2024-04-11 18:31:01 +0000 |
|---|---|---|
| committer | Martin Schiller | 2024-05-15 06:54:58 +0000 |
| commit | 7bc487c12eefc53a4f7b67cba6f590ce9807a968 (patch) | |
| tree | 274ca6f302c2954a9cf8316392830d620387fc05 | |
| parent | 83fccc42df36071e99627745b2321b2eda0087e0 (diff) | |
| download | openwrt-7bc487c12eefc53a4f7b67cba6f590ce9807a968.tar.gz | |
kernel: ltq-vdsl-vr9-mei: fix warning about field-spanning write
We need to use unsafe_memcpy() here, because the code do the field-
spanning write intentionally.
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
| -rw-r--r-- | package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/401-use-unsafe_memcpy-for-intentional-field-spanning-write.patch | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/401-use-unsafe_memcpy-for-intentional-field-spanning-write.patch b/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/401-use-unsafe_memcpy-for-intentional-field-spanning-write.patch new file mode 100644 index 0000000000..1542ace44f --- /dev/null +++ b/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/401-use-unsafe_memcpy-for-intentional-field-spanning-write.patch @@ -0,0 +1,15 @@ +--- a/src/drv_mei_cpe_msg_process.c ++++ b/src/drv_mei_cpe_msg_process.c +@@ -3524,7 +3524,12 @@ IFX_int32_t MEI_IoctlCmdMsgWrite( + { + if (bInternCall) + { ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,19,0)) + memcpy(pDestPtr, pUserMsg->pPayload, pUserMsg->paylSize_byte); ++#else ++ unsafe_memcpy(pDestPtr, pUserMsg->pPayload, pUserMsg->paylSize_byte, ++ /* field-spanning writing is used here intentionally */); ++#endif + } + else + { |