Loading
Fix the issue that the debugfs query inconsistency.
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IAKMX4 CVE: NA ---------------------------------------------------------------------- This patch modifies the implementation of debugfs: When the user process stops unexpectedly, not all data of debugfs is read. In this case, the save_buf pointer is not released. When the user process is called next time, save_buf is used to copy the cached data to the user space. As a result, the queried data is inconsistent. To solve this problem, determine whether the function is invoked for the first time based on the value of *ppos. If *ppos is 0, obtain the actual data. Fixes: 97d2f809 ("UNIC: Debugfs supports query of ip and guid table's list and specification") Signed-off-by:Guangwei Zhang <zhangwangwei6@huawei.com>