msm: ipa3: Fix incorrect copy size in debugfs drop stats node

GCC complains about this:

In file included from ../arch/arm64/include/asm/preempt.h:5,
                 from ../include/linux/preempt.h:78,
                 from ../include/linux/spinlock.h:51,
                 from ../include/linux/wait.h:9,
                 from ../include/linux/wait_bit.h:8,
                 from ../include/linux/fs.h:6,
                 from ../include/linux/debugfs.h:18,
                 from ../drivers/platform/msm/ipa/ipa_v3/ipa_hw_stats.c:13:
In function 'check_copy_size',
    inlined from 'ipa_debugfs_enable_disable_drop_stats' at ../include/linux/uaccess.h:146:6:
../include/linux/thread_info.h:136:4: error: call to '__bad_copy_to' declared with attribute error: copy destination size is too small
  136 |    __bad_copy_to();
      |    ^~~~~~~~~~~~~~~

Signed-off-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: KenHV <yo@kenharris.xyz>
Change-Id: I00117609f6d97e1fb75ffd65f9b651e1daddfa71
Signed-off-by: starlight5234 <starlight5234@protonmail.ch>
This commit is contained in:
Danny Lin 2020-08-28 01:21:17 -07:00 committed by Gagan Malvi
parent ebcf79c8ee
commit 55c0ec3a96
No known key found for this signature in database
GPG key ID: B932A7CE71E9198F

View file

@ -2248,7 +2248,7 @@ static ssize_t ipa_debugfs_enable_disable_drop_stats(struct file *file,
ssize_t ret;
mutex_lock(&ipa3_ctx->lock);
if (sizeof(dbg_buff) < count + 1) {
if (sizeof(dbg_buff) < count) {
ret = -EFAULT;
goto bail;
}