mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
vt: Grab console_lock around con_is_bound in show_bind
Not really harmful not to, but also not harm in grabbing the lock. And this shuts up a new WARNING I introduced in commitddde3c18b7("vt: More locking checks"). Reported-by: Jens Remus <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: Nicolas Pitre <[email protected]> Cc: Martin Hostettler <[email protected]> Cc: Adam Borowski <[email protected]> Cc: Mikulas Patocka <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Sam Ravnborg <[email protected]> Fixes:ddde3c18b7("vt: More locking checks") Signed-off-by: Daniel Vetter <[email protected]> Tested-by: Jens Remus <[email protected]> Acked-by: Sam Ravnborg <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
4a2b8560e3
commit
61d51456f3
1 changed files with 5 additions and 1 deletions
|
|
@ -3771,7 +3771,11 @@ static ssize_t show_bind(struct device *dev, struct device_attribute *attr,
|
|||
char *buf)
|
||||
{
|
||||
struct con_driver *con = dev_get_drvdata(dev);
|
||||
int bind = con_is_bound(con->con);
|
||||
int bind;
|
||||
|
||||
console_lock();
|
||||
bind = con_is_bound(con->con);
|
||||
console_unlock();
|
||||
|
||||
return snprintf(buf, PAGE_SIZE, "%i\n", bind);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue