mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
netlabel: fix a problem with netlbl_secattr_catmap_setrng()
We try to be clever and set large chunks of the bitmap at once, when possible; unfortunately we weren't very clever when we wrote the code and messed up the if-conditional. Fix this bug and restore proper operation. Signed-off-by: Janak Desai <[email protected]> Signed-off-by: Paul Moore <[email protected]>
This commit is contained in:
parent
9735a22799
commit
341e0cb593
1 changed files with 1 additions and 1 deletions
|
|
@ -677,7 +677,7 @@ int netlbl_catmap_setrng(struct netlbl_lsm_catmap **catmap,
|
|||
u32 spot = start;
|
||||
|
||||
while (rc == 0 && spot <= end) {
|
||||
if (((spot & (BITS_PER_LONG - 1)) != 0) &&
|
||||
if (((spot & (BITS_PER_LONG - 1)) == 0) &&
|
||||
((end - spot) > BITS_PER_LONG)) {
|
||||
rc = netlbl_catmap_setlong(catmap,
|
||||
spot,
|
||||
|
|
|
|||
Loading…
Reference in a new issue