Jann Horn 8cff10da50 netfilter: nf_log: don't hold nf_log_mutex during user access
commit ce00bf07cc95a57cd20b208e02b3c2604e532ae8 upstream.

The old code would indefinitely block other users of nf_log_mutex if
a userspace access in proc_dostring() blocked e.g. due to a userfaultfd
region. Fix it by moving proc_dostring() out of the locked region.

This is a followup to commit 266d07cb1c9a ("netfilter: nf_log: fix
sleeping function called from invalid context"), which changed this code
from using rcu_read_lock() to taking nf_log_mutex.

Fixes: 266d07cb1c9a ("netfilter: nf_log: fix sleeping function calle[...]")
Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11 16:03:51 +02:00
..
2018-05-16 10:06:51 +02:00
2017-11-15 17:13:11 +01:00
2015-11-23 14:56:15 -05:00
2015-10-07 04:27:43 -07:00
2015-10-21 00:49:24 +02:00
2018-05-30 07:48:59 +02:00
2018-06-13 16:15:28 +02:00
2018-05-30 07:48:56 +02:00
2018-04-24 09:32:11 +02:00
2018-02-25 11:03:37 +01:00