diff options
author | Tony Lindgren <tony@atomide.com> | 2020-06-08 10:14:49 -0700 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2020-06-08 10:14:49 -0700 |
commit | 4263eb6880df8383fff0efb872278a99eb6142c8 (patch) | |
tree | 67ab9bf228e4f5f341f9408e055180932b39fe06 /net/netlabel | |
parent | 636338d7968e47c7f2e0b772a2a825ad932883fb (diff) | |
parent | 8e326a8bdef3fb42b92bf2742e8405d9b9209367 (diff) |
Merge branch 'fixes-v5.7' into fixes
Diffstat (limited to 'net/netlabel')
-rw-r--r-- | net/netlabel/Kconfig | 2 | ||||
-rw-r--r-- | net/netlabel/netlabel_kapi.c | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/net/netlabel/Kconfig b/net/netlabel/Kconfig index 64280a1d3906..07b03c306f28 100644 --- a/net/netlabel/Kconfig +++ b/net/netlabel/Kconfig @@ -14,6 +14,6 @@ config NETLABEL Documentation/netlabel as well as the NetLabel SourceForge project for configuration tools and additional documentation. - * http://netlabel.sf.net + * https://github.com/netlabel/netlabel_tools If you are unsure, say N. diff --git a/net/netlabel/netlabel_kapi.c b/net/netlabel/netlabel_kapi.c index 409a3ae47ce2..5e1239cef000 100644 --- a/net/netlabel/netlabel_kapi.c +++ b/net/netlabel/netlabel_kapi.c @@ -734,6 +734,12 @@ int netlbl_catmap_getlong(struct netlbl_lsm_catmap *catmap, if ((off & (BITS_PER_LONG - 1)) != 0) return -EINVAL; + /* a null catmap is equivalent to an empty one */ + if (!catmap) { + *offset = (u32)-1; + return 0; + } + if (off < catmap->startbit) { off = catmap->startbit; *offset = off; |