diff options
author | James Morris <james.l.morris@oracle.com> | 2015-07-11 09:13:45 +1000 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2015-07-11 09:13:45 +1000 |
commit | 3dbbbe0eb6e949409d215f660cfad782aa541a4b (patch) | |
tree | 455a263e0155b7096cc5766a86c71fbc9879e08a /security/selinux/ss/ebitmap.c | |
parent | Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux (diff) | |
parent | selinux: fix mprotect PROT_EXEC regression caused by mm change (diff) | |
download | linux-dev-3dbbbe0eb6e949409d215f660cfad782aa541a4b.tar.xz linux-dev-3dbbbe0eb6e949409d215f660cfad782aa541a4b.zip |
Merge branch 'upstream' of git://git.infradead.org/users/pcmoore/selinux into for-linus2
Diffstat (limited to 'security/selinux/ss/ebitmap.c')
-rw-r--r-- | security/selinux/ss/ebitmap.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/security/selinux/ss/ebitmap.c b/security/selinux/ss/ebitmap.c index afe6a269ec17..57644b1dc42e 100644 --- a/security/selinux/ss/ebitmap.c +++ b/security/selinux/ss/ebitmap.c @@ -153,6 +153,12 @@ int ebitmap_netlbl_import(struct ebitmap *ebmap, if (offset == (u32)-1) return 0; + /* don't waste ebitmap space if the netlabel bitmap is empty */ + if (bitmap == 0) { + offset += EBITMAP_UNIT_SIZE; + continue; + } + if (e_iter == NULL || offset >= e_iter->startbit + EBITMAP_SIZE) { e_prev = e_iter; |