.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* user_defined.c: user defined key type |
---|
2 | 3 | * |
---|
3 | 4 | * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved. |
---|
4 | 5 | * Written by David Howells (dhowells@redhat.com) |
---|
5 | | - * |
---|
6 | | - * This program is free software; you can redistribute it and/or |
---|
7 | | - * modify it under the terms of the GNU General Public License |
---|
8 | | - * as published by the Free Software Foundation; either version |
---|
9 | | - * 2 of the License, or (at your option) any later version. |
---|
10 | 6 | */ |
---|
11 | 7 | |
---|
12 | | -#include <linux/module.h> |
---|
| 8 | +#include <linux/export.h> |
---|
13 | 9 | #include <linux/init.h> |
---|
14 | 10 | #include <linux/slab.h> |
---|
15 | 11 | #include <linux/seq_file.h> |
---|
.. | .. |
---|
86 | 82 | */ |
---|
87 | 83 | void user_free_preparse(struct key_preparsed_payload *prep) |
---|
88 | 84 | { |
---|
89 | | - kzfree(prep->payload.data[0]); |
---|
| 85 | + kfree_sensitive(prep->payload.data[0]); |
---|
90 | 86 | } |
---|
91 | 87 | EXPORT_SYMBOL_GPL(user_free_preparse); |
---|
92 | 88 | |
---|
.. | .. |
---|
95 | 91 | struct user_key_payload *payload; |
---|
96 | 92 | |
---|
97 | 93 | payload = container_of(head, struct user_key_payload, rcu); |
---|
98 | | - kzfree(payload); |
---|
| 94 | + kfree_sensitive(payload); |
---|
99 | 95 | } |
---|
100 | 96 | |
---|
101 | 97 | /* |
---|
.. | .. |
---|
151 | 147 | { |
---|
152 | 148 | struct user_key_payload *upayload = key->payload.data[0]; |
---|
153 | 149 | |
---|
154 | | - kzfree(upayload); |
---|
| 150 | + kfree_sensitive(upayload); |
---|
155 | 151 | } |
---|
156 | 152 | |
---|
157 | 153 | EXPORT_SYMBOL_GPL(user_destroy); |
---|