netfilter: IDLETIMER: fix invalid deference of timer

"timer" was checked for null, but used later without being re-checked.

Change-Id: Ib4d08cd49860c9f157d1cac556705ba85cd44f4e
Reported-by: dan.carpenter@oracle.com
Signed-off-by: JP Abgrall <jpa@google.com>
Signed-off-by: engstk <eng.stk@sapo.pt>
sched: Fix inaccurate accounting for real-time task

It is possible that rq->clock_task was not updated in put_prev_task()
in which case we can potentially overcharge a real-time task for time
it did not run. This is because clock_task could be stale and not
represent the exact time real-time task started running.

Fix this by forcing update of rq->clock_task when real-time task
starts running.

Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: engstk <eng.stk@sapo.pt>
block: Merge BFQ-v7r7

CHANGELOG for BFQv7r7

v7r7:
. BUGFIX: Prevent the OOM queue from being involved in the queue
  cooperation mechanism. In fact, since the requests temporarily
  redirected to the OOM queue could be redirected again to dedicated
  queues at any time, the state needed to correctly handle merging
  with the OOM queue would be quite complex and expensive to
  maintain. Besides, in such a critical condition as an out of
  memory, the benefits of queue merging may be little relevant, or
  even negligible.
. IMPROVEMENT: Let the OOM queue be initialized only once. Previously,
  the OOM queue was reinitialized, at each request enqueue, with the
  parameters related to the process that issued that request.
  Depending on the parameters of the processes doing I/O, this could
  easily cause the OOM queue to be moved continuously across service
  trees, or even across groups. It also caused the parameters of the
  OOM queue to be continuously reset in any case.
. CODE IMPROVEMENT. Performed some minor code cleanups, and added some
  BUG_ON()s that, if the weight of an entity becomes inconsistent,
  should better help understand why.

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>