Commit 31f4104e authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'locking_urgent_for_v6.4_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull locking fix from Borislav Petkov:

 - Make sure __down_read_common() is always inlined so that the callers'
   names land in traceevents output and thus the blocked function can be
   identified

* tag 'locking_urgent_for_v6.4_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  locking/rwsem: Add __always_inline annotation to __down_read_common() and inlined callers
parents ef21831c 92cc5d00
...@@ -1240,7 +1240,7 @@ static struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem) ...@@ -1240,7 +1240,7 @@ static struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem)
/* /*
* lock for reading * lock for reading
*/ */
static inline int __down_read_common(struct rw_semaphore *sem, int state) static __always_inline int __down_read_common(struct rw_semaphore *sem, int state)
{ {
int ret = 0; int ret = 0;
long count; long count;
...@@ -1258,17 +1258,17 @@ static inline int __down_read_common(struct rw_semaphore *sem, int state) ...@@ -1258,17 +1258,17 @@ static inline int __down_read_common(struct rw_semaphore *sem, int state)
return ret; return ret;
} }
static inline void __down_read(struct rw_semaphore *sem) static __always_inline void __down_read(struct rw_semaphore *sem)
{ {
__down_read_common(sem, TASK_UNINTERRUPTIBLE); __down_read_common(sem, TASK_UNINTERRUPTIBLE);
} }
static inline int __down_read_interruptible(struct rw_semaphore *sem) static __always_inline int __down_read_interruptible(struct rw_semaphore *sem)
{ {
return __down_read_common(sem, TASK_INTERRUPTIBLE); return __down_read_common(sem, TASK_INTERRUPTIBLE);
} }
static inline int __down_read_killable(struct rw_semaphore *sem) static __always_inline int __down_read_killable(struct rw_semaphore *sem)
{ {
return __down_read_common(sem, TASK_KILLABLE); return __down_read_common(sem, TASK_KILLABLE);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment