| .. | .. |
|---|
| 69 | 69 | zip_ops->csum = 1; /* Adler checksum desired */ |
|---|
| 70 | 70 | } |
|---|
| 71 | 71 | |
|---|
| 72 | | -int zip_ctx_init(struct zip_kernel_ctx *zip_ctx, int lzs_flag) |
|---|
| 72 | +static int zip_ctx_init(struct zip_kernel_ctx *zip_ctx, int lzs_flag) |
|---|
| 73 | 73 | { |
|---|
| 74 | 74 | struct zip_operation *comp_ctx = &zip_ctx->zip_comp; |
|---|
| 75 | 75 | struct zip_operation *decomp_ctx = &zip_ctx->zip_decomp; |
|---|
| .. | .. |
|---|
| 107 | 107 | return -ENOMEM; |
|---|
| 108 | 108 | } |
|---|
| 109 | 109 | |
|---|
| 110 | | -void zip_ctx_exit(struct zip_kernel_ctx *zip_ctx) |
|---|
| 110 | +static void zip_ctx_exit(struct zip_kernel_ctx *zip_ctx) |
|---|
| 111 | 111 | { |
|---|
| 112 | 112 | struct zip_operation *comp_ctx = &zip_ctx->zip_comp; |
|---|
| 113 | 113 | struct zip_operation *dec_ctx = &zip_ctx->zip_decomp; |
|---|
| .. | .. |
|---|
| 119 | 119 | zip_data_buf_free(dec_ctx->output, MAX_OUTPUT_BUFFER_SIZE); |
|---|
| 120 | 120 | } |
|---|
| 121 | 121 | |
|---|
| 122 | | -int zip_compress(const u8 *src, unsigned int slen, |
|---|
| 122 | +static int zip_compress(const u8 *src, unsigned int slen, |
|---|
| 123 | 123 | u8 *dst, unsigned int *dlen, |
|---|
| 124 | 124 | struct zip_kernel_ctx *zip_ctx) |
|---|
| 125 | 125 | { |
|---|
| .. | .. |
|---|
| 155 | 155 | return ret; |
|---|
| 156 | 156 | } |
|---|
| 157 | 157 | |
|---|
| 158 | | -int zip_decompress(const u8 *src, unsigned int slen, |
|---|
| 158 | +static int zip_decompress(const u8 *src, unsigned int slen, |
|---|
| 159 | 159 | u8 *dst, unsigned int *dlen, |
|---|
| 160 | 160 | struct zip_kernel_ctx *zip_ctx) |
|---|
| 161 | 161 | { |
|---|
| .. | .. |
|---|
| 260 | 260 | ret = zip_ctx_init(zip_ctx, 0); |
|---|
| 261 | 261 | |
|---|
| 262 | 262 | if (ret) { |
|---|
| 263 | | - kzfree(zip_ctx); |
|---|
| 263 | + kfree_sensitive(zip_ctx); |
|---|
| 264 | 264 | return ERR_PTR(ret); |
|---|
| 265 | 265 | } |
|---|
| 266 | 266 | |
|---|
| .. | .. |
|---|
| 279 | 279 | ret = zip_ctx_init(zip_ctx, 1); |
|---|
| 280 | 280 | |
|---|
| 281 | 281 | if (ret) { |
|---|
| 282 | | - kzfree(zip_ctx); |
|---|
| 282 | + kfree_sensitive(zip_ctx); |
|---|
| 283 | 283 | return ERR_PTR(ret); |
|---|
| 284 | 284 | } |
|---|
| 285 | 285 | |
|---|
| .. | .. |
|---|
| 291 | 291 | struct zip_kernel_ctx *zip_ctx = ctx; |
|---|
| 292 | 292 | |
|---|
| 293 | 293 | zip_ctx_exit(zip_ctx); |
|---|
| 294 | | - kzfree(zip_ctx); |
|---|
| 294 | + kfree_sensitive(zip_ctx); |
|---|
| 295 | 295 | } |
|---|
| 296 | 296 | |
|---|
| 297 | 297 | int zip_scomp_compress(struct crypto_scomp *tfm, |
|---|