Skip to content

Commit

Permalink
critical_partition_protect: Fix wrong branch predict
Browse files Browse the repository at this point in the history
Signed-off-by: GarfieldHan <2652609017@qq.com>
  • Loading branch information
pomelohan committed May 7, 2024
1 parent 10454cc commit 3cc770a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ hook_func_no_info(do_filp_open);
static struct file *hook_replace(do_filp_open)(int dfd, struct filename *pathname, const struct open_flags *op)
{
struct file *filp = hook_call_backup(do_filp_open, dfd, pathname, op);
if (unlikely(!IS_ERR(filp))) {
if (likely(!IS_ERR(filp))) {
char buf[PATH_MAX];
memset(&buf, 0, PATH_MAX);
char *currPath = skfunc(d_path)(&filp->f_path, buf, PATH_MAX);
Expand Down

0 comments on commit 3cc770a

Please sign in to comment.