]> git.baikalelectronics.ru Git - kernel.git/commit
netconsole: fix multiple race conditions
authorNikolay Aleksandrov <nikolay@redhat.com>
Thu, 24 Oct 2013 10:09:24 +0000 (12:09 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 25 Oct 2013 23:26:58 +0000 (19:26 -0400)
commit774c61ba3bc038dc2237475adca2b881d63ce67c
treeb80c4d38acd41a1d7b3afcbc5ba5a2f1958d401e
parent103b86dcbfe806182711a5cd8cf9b42b09293ddc
netconsole: fix multiple race conditions

In every netconsole option that can be set through configfs there's a
race when checking for nt->enabled since it can be modified at the same
time. Probably the most damage can be done by store_enabled when racing
with another instance of itself. Fix all the races with one stone by
moving the mutex lock around the ->store call for all options.

Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/netconsole.c