Thread (4 messages) 4 messages, 1 author, 2017-02-17

Re: [PATCH v4 1/2] crypto: skcipher AF_ALG - overhaul memory management

flat view

From: Stephan Müller <hidden>
Date: 2017-02-17 19:30:38

Am Donnerstag, 16. Februar 2017, 22:21:44 CET schrieb Stephan Müller:

Hi,
quoted hunk ↗ jump to hunk
+static unsigned int skcipher_count_tsgl(struct sock *sk, size_t bytes)
 {
 	struct alg_sock *ask = alg_sk(sk);
 	struct skcipher_ctx *ctx = ask->private;
-	struct skcipher_sg_list *sgl;
+	struct skcipher_tsgl *sgl;
 	struct scatterlist *sg;
-	int i;
+	unsigned int i;
+	unsigned int sgl_count = 0;
+
+	if (!bytes)
+		return 0;
+
+	while (!list_empty(&ctx->tsgl_list)) {
This is wrong, it should be list_for_each_entry_safe(sgl, tmp, &ctx-
tsgl_list, list) {
I will send a new patch shortly.

Ciao
Stephan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help