Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build on 6.1 kernel #7

Merged
merged 2 commits into from Jan 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion binder/binder.c
Expand Up @@ -4109,10 +4109,12 @@ static int binder_wait_for_work(struct binder_thread *thread,
struct binder_proc *proc = thread->proc;
int ret = 0;

#if LINUX_VERSION_CODE <= KERNEL_VERSION(6,0,0)
freezer_do_not_count();
#endif
binder_inner_proc_lock(proc);
for (;;) {
prepare_to_wait(&thread->wait, &wait, TASK_INTERRUPTIBLE);
prepare_to_wait(&thread->wait, &wait, TASK_INTERRUPTIBLE|TASK_FREEZABLE);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also needs to be guarded, TASK_FREEZABLE was introduced in kernel 6.1.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, too bad I missed that :-(

Please feel free to set a PR that fixes it; else I will try to fix it, but this might take some days, since I am really busy at the moment..

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#8

if (binder_has_work_ilocked(thread, do_proc_work))
break;
if (do_proc_work)
Expand All @@ -4129,7 +4131,9 @@ static int binder_wait_for_work(struct binder_thread *thread,
}
finish_wait(&thread->wait, &wait);
binder_inner_proc_unlock(proc);
#if LINUX_VERSION_CODE <= KERNEL_VERSION(6,0,0)
freezer_count();
#endif

return ret;
}
Expand Down