Re: [PATCH v2] netfilter: nf_sockopt_find() / nf_register_sockopt() should not return EINTR
From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: 2014-07-31 10:55:25
Also in:
netfilter-devel
From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: 2014-07-31 10:55:25
Also in:
netfilter-devel
On Thu, Jul 24, 2014 at 10:41:35PM +0200, Eric Dumazet wrote:
From: Eric Dumazet <edumazet@google.com> getsockopt() or setsockopt() sometimes returns -EINTR instead of -ENOPROTOOPT, causing headaches to application developers. This is because unsupported commands might go through nf_sockopt_find() and this function returns -EINTR if a signal is pending. Just use non interruptible mutex functions, as there is no reason we should sleep for a long time here.
On top of this patch, I think that at least we can also ged rid of these interruptible mutex from the netfilter/core code too (see preliminary patch attached). I can also adapt the callers so they don't check anymore the return value as they will always succeed. Comments? Thanks.