#ifndef LOCKME_H #define LOCKME_H #include #include "die.h" static inline void xlockme(void) { if (mlockall(MCL_CURRENT | MCL_FUTURE) != 0) panic("Cannot lock pages!\n"); } static inline void xunlockme(void) { munlockall(); } #endif /* LOCKME_H */ rnate' title='Atom feed' href='https://git.distanz.ch/cgit.cgi/linux/net-next.git/atom/?h=nds-private-remove' type='application/atom+xml'/>
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2016-08-24 12:41:54 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2016-08-26 17:30:20 +0200
commitc016c7e45ddfa5085b35b644e659ec014969740d (patch)
tree5311ad15af134ee0839f59612f67796e3094b3a8
parent5ca8cc5bf11faed257c762018aea9106d529232f (diff)
netfilter: nf_tables: honor NLM_F_EXCL flag in set element insertion
If the NLM_F_EXCL flag is set, then new elements that clash with an existing one return EEXIST. In case you try to add an element whose data area differs from what we have, then this returns EBUSY. If no flag is specified at all, then this returns success to userspace. This patch also update the set insert operation so we can fetch the existing element that clashes with the one you want to add, we need this to make sure the element data doesn't differ. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>