+33
−21
Loading
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IB5UKT -------------------------------- After installing the anonymous fd, we can now see it in userland and close it. However, at this point we may not have gotten the reference count of the cache, but we will put it in the close fd, so this may cause a cache UAF. To avoid this, we will make the anonymous fd accessible to the userland by executing fd_install() after copy_to_user() has succeeded, and by this point we will have already grabbed the reference count of the cache. Signed-off-by:Baokun Li <libaokun1@huawei.com>