.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * NetLabel Domain Hash Table |
---|
3 | 4 | * |
---|
.. | .. |
---|
7 | 8 | * as CIPSO and RIPSO. |
---|
8 | 9 | * |
---|
9 | 10 | * Author: Paul Moore <paul@paul-moore.com> |
---|
10 | | - * |
---|
11 | 11 | */ |
---|
12 | 12 | |
---|
13 | 13 | /* |
---|
14 | 14 | * (c) Copyright Hewlett-Packard Development Company, L.P., 2006, 2008 |
---|
15 | | - * |
---|
16 | | - * This program is free software; you can redistribute it and/or modify |
---|
17 | | - * it under the terms of the GNU General Public License as published by |
---|
18 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
19 | | - * (at your option) any later version. |
---|
20 | | - * |
---|
21 | | - * This program is distributed in the hope that it will be useful, |
---|
22 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
23 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
---|
24 | | - * the GNU General Public License for more details. |
---|
25 | | - * |
---|
26 | | - * You should have received a copy of the GNU General Public License |
---|
27 | | - * along with this program; if not, see <http://www.gnu.org/licenses/>. |
---|
28 | | - * |
---|
29 | 15 | */ |
---|
30 | 16 | |
---|
31 | 17 | #include <linux/types.h> |
---|
.. | .. |
---|
107 | 93 | |
---|
108 | 94 | /** |
---|
109 | 95 | * netlbl_domhsh_hash - Hashing function for the domain hash table |
---|
110 | | - * @domain: the domain name to hash |
---|
| 96 | + * @key: the domain name to hash |
---|
111 | 97 | * |
---|
112 | 98 | * Description: |
---|
113 | 99 | * This is the hashing function for the domain hash table, it returns the |
---|
.. | .. |
---|
158 | 144 | if (domain != NULL) { |
---|
159 | 145 | bkt = netlbl_domhsh_hash(domain); |
---|
160 | 146 | bkt_list = &netlbl_domhsh_rcu_deref(netlbl_domhsh)->tbl[bkt]; |
---|
161 | | - list_for_each_entry_rcu(iter, bkt_list, list) |
---|
| 147 | + list_for_each_entry_rcu(iter, bkt_list, list, |
---|
| 148 | + lockdep_is_held(&netlbl_domhsh_lock)) |
---|
162 | 149 | if (iter->valid && |
---|
163 | 150 | netlbl_family_match(iter->family, family) && |
---|
164 | 151 | strcmp(iter->domain, domain) == 0) |
---|
.. | .. |
---|
625 | 612 | audit_buf = netlbl_audit_start_common(AUDIT_MAC_MAP_DEL, audit_info); |
---|
626 | 613 | if (audit_buf != NULL) { |
---|
627 | 614 | audit_log_format(audit_buf, |
---|
628 | | - " nlbl_domain=%s res=%u", |
---|
629 | | - entry->domain ? entry->domain : "(default)", |
---|
630 | | - ret_val == 0 ? 1 : 0); |
---|
| 615 | + " nlbl_domain=%s res=1", |
---|
| 616 | + entry->domain ? entry->domain : "(default)"); |
---|
631 | 617 | audit_log_end(audit_buf); |
---|
632 | 618 | } |
---|
633 | 619 | |
---|