Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 207bc118 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge branch 'freezer'

* freezer:
  af_unix: use freezable blocking calls in read
  sigtimedwait: use freezable blocking call
  nanosleep: use freezable blocking call
  futex: use freezable blocking call
  select: use freezable blocking call
  epoll: use freezable blocking call
  binder: use freezable blocking calls
  freezer: add new freezable helpers using freezer_do_not_count()
  freezer: convert freezable helpers to static inline where possible
  freezer: convert freezable helpers to freezer_do_not_count()
  freezer: skip waking up tasks with PF_FREEZER_SKIP set
  freezer: shorten freezer sleep time using exponential backoff
  lockdep: check that no locks held at freeze time
  lockdep: remove task argument from debug_check_no_locks_held
  freezer: add unsafe versions of freezable helpers for CIFS
  freezer: add unsafe versions of freezable helpers for NFS
parents e8b6cb39 2b15af6f
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -20,6 +20,7 @@
#include <asm/cacheflush.h>
#include <asm/cacheflush.h>
#include <linux/fdtable.h>
#include <linux/fdtable.h>
#include <linux/file.h>
#include <linux/file.h>
#include <linux/freezer.h>
#include <linux/fs.h>
#include <linux/fs.h>
#include <linux/list.h>
#include <linux/list.h>
#include <linux/miscdevice.h>
#include <linux/miscdevice.h>
@@ -2140,13 +2141,13 @@ static int binder_thread_read(struct binder_proc *proc,
			if (!binder_has_proc_work(proc, thread))
			if (!binder_has_proc_work(proc, thread))
				ret = -EAGAIN;
				ret = -EAGAIN;
		} else
		} else
			ret = wait_event_interruptible_exclusive(proc->wait, binder_has_proc_work(proc, thread));
			ret = wait_event_freezable_exclusive(proc->wait, binder_has_proc_work(proc, thread));
	} else {
	} else {
		if (non_block) {
		if (non_block) {
			if (!binder_has_thread_work(thread))
			if (!binder_has_thread_work(thread))
				ret = -EAGAIN;
				ret = -EAGAIN;
		} else
		} else
			ret = wait_event_interruptible(thread->wait, binder_has_thread_work(thread));
			ret = wait_event_freezable(thread->wait, binder_has_thread_work(thread));
	}
	}


	binder_lock(__func__);
	binder_lock(__func__);
+1 −1
Original line number Original line Diff line number Diff line
@@ -447,7 +447,7 @@ wait_for_response(struct TCP_Server_Info *server, struct mid_q_entry *midQ)
{
{
	int error;
	int error;


	error = wait_event_freezekillable(server->response_q,
	error = wait_event_freezekillable_unsafe(server->response_q,
				    midQ->mid_state != MID_REQUEST_SUBMITTED);
				    midQ->mid_state != MID_REQUEST_SUBMITTED);
	if (error < 0)
	if (error < 0)
		return -ERESTARTSYS;
		return -ERESTARTSYS;
+3 −1
Original line number Original line Diff line number Diff line
@@ -34,6 +34,7 @@
#include <linux/mutex.h>
#include <linux/mutex.h>
#include <linux/anon_inodes.h>
#include <linux/anon_inodes.h>
#include <linux/device.h>
#include <linux/device.h>
#include <linux/freezer.h>
#include <asm/uaccess.h>
#include <asm/uaccess.h>
#include <asm/io.h>
#include <asm/io.h>
#include <asm/mman.h>
#include <asm/mman.h>
@@ -1602,7 +1603,8 @@ static int ep_poll(struct eventpoll *ep, struct epoll_event __user *events,
			}
			}


			spin_unlock_irqrestore(&ep->lock, flags);
			spin_unlock_irqrestore(&ep->lock, flags);
			if (!schedule_hrtimeout_range(to, slack, HRTIMER_MODE_ABS))
			if (!freezable_schedule_hrtimeout_range(to, slack,
								HRTIMER_MODE_ABS))
				timed_out = 1;
				timed_out = 1;


			spin_lock_irqsave(&ep->lock, flags);
			spin_lock_irqsave(&ep->lock, flags);
+1 −1
Original line number Original line Diff line number Diff line
@@ -79,7 +79,7 @@ int nfs_wait_bit_killable(void *word)
{
{
	if (fatal_signal_pending(current))
	if (fatal_signal_pending(current))
		return -ERESTARTSYS;
		return -ERESTARTSYS;
	freezable_schedule();
	freezable_schedule_unsafe();
	return 0;
	return 0;
}
}
EXPORT_SYMBOL_GPL(nfs_wait_bit_killable);
EXPORT_SYMBOL_GPL(nfs_wait_bit_killable);
+1 −1
Original line number Original line Diff line number Diff line
@@ -33,7 +33,7 @@ nfs3_rpc_wrapper(struct rpc_clnt *clnt, struct rpc_message *msg, int flags)
		res = rpc_call_sync(clnt, msg, flags);
		res = rpc_call_sync(clnt, msg, flags);
		if (res != -EJUKEBOX)
		if (res != -EJUKEBOX)
			break;
			break;
		freezable_schedule_timeout_killable(NFS_JUKEBOX_RETRY_TIME);
		freezable_schedule_timeout_killable_unsafe(NFS_JUKEBOX_RETRY_TIME);
		res = -ERESTARTSYS;
		res = -ERESTARTSYS;
	} while (!fatal_signal_pending(current));
	} while (!fatal_signal_pending(current));
	return res;
	return res;
Loading