mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 14:23:38 +00:00
gpio-button-hotplug: fix data race
bh_event_add_var can be called by multiple threads concurrently, so it shall not use a static char buffer Signed-off-by: Andrey Erokhin <a.erokhin@inango-systems.com>
This commit is contained in:
parent
244dbb0b6b
commit
9fc7db0684
@ -107,7 +107,7 @@ static struct bh_map button_map[] = {
|
|||||||
static __printf(3, 4)
|
static __printf(3, 4)
|
||||||
int bh_event_add_var(struct bh_event *event, int argv, const char *format, ...)
|
int bh_event_add_var(struct bh_event *event, int argv, const char *format, ...)
|
||||||
{
|
{
|
||||||
static char buf[128];
|
char buf[128];
|
||||||
char *s;
|
char *s;
|
||||||
va_list args;
|
va_list args;
|
||||||
int len;
|
int len;
|
||||||
|
Loading…
Reference in New Issue
Block a user