Skip to content

Commit c2bb524

Browse files
peterhurleygregkh
authored andcommitted
tty: Remove __lockfunc annotation from tty lock functions
The tty lock/unlock code does not belong in the special lockfunc section which is treated specially by stack backtraces. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent c1e33af commit c2bb524

File tree

3 files changed

+15
-17
lines changed

3 files changed

+15
-17
lines changed

drivers/tty/tty_ldisc.c

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -304,13 +304,13 @@ void tty_ldisc_deref(struct tty_ldisc *ld)
304304
EXPORT_SYMBOL_GPL(tty_ldisc_deref);
305305

306306

307-
static inline int __lockfunc
307+
static inline int
308308
__tty_ldisc_lock(struct tty_struct *tty, unsigned long timeout)
309309
{
310310
return ldsem_down_write(&tty->ldisc_sem, timeout);
311311
}
312312

313-
static inline int __lockfunc
313+
static inline int
314314
__tty_ldisc_lock_nested(struct tty_struct *tty, unsigned long timeout)
315315
{
316316
return ldsem_down_write_nested(&tty->ldisc_sem,
@@ -322,8 +322,7 @@ static inline void __tty_ldisc_unlock(struct tty_struct *tty)
322322
ldsem_up_write(&tty->ldisc_sem);
323323
}
324324

325-
static int __lockfunc
326-
tty_ldisc_lock(struct tty_struct *tty, unsigned long timeout)
325+
static int tty_ldisc_lock(struct tty_struct *tty, unsigned long timeout)
327326
{
328327
int ret;
329328

@@ -340,7 +339,7 @@ static void tty_ldisc_unlock(struct tty_struct *tty)
340339
__tty_ldisc_unlock(tty);
341340
}
342341

343-
static int __lockfunc
342+
static int
344343
tty_ldisc_lock_pair_timeout(struct tty_struct *tty, struct tty_struct *tty2,
345344
unsigned long timeout)
346345
{
@@ -376,14 +375,13 @@ tty_ldisc_lock_pair_timeout(struct tty_struct *tty, struct tty_struct *tty2,
376375
return 0;
377376
}
378377

379-
static void __lockfunc
380-
tty_ldisc_lock_pair(struct tty_struct *tty, struct tty_struct *tty2)
378+
static void tty_ldisc_lock_pair(struct tty_struct *tty, struct tty_struct *tty2)
381379
{
382380
tty_ldisc_lock_pair_timeout(tty, tty2, MAX_SCHEDULE_TIMEOUT);
383381
}
384382

385-
static void __lockfunc tty_ldisc_unlock_pair(struct tty_struct *tty,
386-
struct tty_struct *tty2)
383+
static void tty_ldisc_unlock_pair(struct tty_struct *tty,
384+
struct tty_struct *tty2)
387385
{
388386
__tty_ldisc_unlock(tty);
389387
if (tty2)

drivers/tty/tty_mutex.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Getting the big tty mutex.
1111
*/
1212

13-
void __lockfunc tty_lock(struct tty_struct *tty)
13+
void tty_lock(struct tty_struct *tty)
1414
{
1515
if (WARN(tty->magic != TTY_MAGIC, "L Bad %p\n", tty))
1616
return;
@@ -27,7 +27,7 @@ int tty_lock_interruptible(struct tty_struct *tty)
2727
return mutex_lock_interruptible(&tty->legacy_mutex);
2828
}
2929

30-
void __lockfunc tty_unlock(struct tty_struct *tty)
30+
void tty_unlock(struct tty_struct *tty)
3131
{
3232
if (WARN(tty->magic != TTY_MAGIC, "U Bad %p\n", tty))
3333
return;
@@ -36,13 +36,13 @@ void __lockfunc tty_unlock(struct tty_struct *tty)
3636
}
3737
EXPORT_SYMBOL(tty_unlock);
3838

39-
void __lockfunc tty_lock_slave(struct tty_struct *tty)
39+
void tty_lock_slave(struct tty_struct *tty)
4040
{
4141
if (tty && tty != tty->link)
4242
tty_lock(tty);
4343
}
4444

45-
void __lockfunc tty_unlock_slave(struct tty_struct *tty)
45+
void tty_unlock_slave(struct tty_struct *tty)
4646
{
4747
if (tty && tty != tty->link)
4848
tty_unlock(tty);

include/linux/tty.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -643,11 +643,11 @@ extern long vt_compat_ioctl(struct tty_struct *tty,
643643

644644
/* tty_mutex.c */
645645
/* functions for preparation of BKL removal */
646-
extern void __lockfunc tty_lock(struct tty_struct *tty);
646+
extern void tty_lock(struct tty_struct *tty);
647647
extern int tty_lock_interruptible(struct tty_struct *tty);
648-
extern void __lockfunc tty_unlock(struct tty_struct *tty);
649-
extern void __lockfunc tty_lock_slave(struct tty_struct *tty);
650-
extern void __lockfunc tty_unlock_slave(struct tty_struct *tty);
648+
extern void tty_unlock(struct tty_struct *tty);
649+
extern void tty_lock_slave(struct tty_struct *tty);
650+
extern void tty_unlock_slave(struct tty_struct *tty);
651651
extern void tty_set_lock_subclass(struct tty_struct *tty);
652652

653653
#ifdef CONFIG_PROC_FS

0 commit comments

Comments
 (0)