algif_aead.c (408afb8d7847faea115508ba154346e33edfc7d5) | algif_aead.c (76e43e37a407857596778c9290720ace481879d0) |
---|---|
1/* 2 * algif_aead: User-space interface for AEAD algorithms 3 * 4 * Copyright (C) 2014, Stephan Mueller <smueller@chronox.de> 5 * 6 * This file provides the user-space API for AEAD ciphers. 7 * 8 * This program is free software; you can redistribute it and/or modify it --- 241 unchanged lines hidden (view full) --- 250 if (err) 251 goto free; 252 253 /* Create TX SGL for tag and chain it to RX SGL. */ 254 areq->tsgl_entries = af_alg_count_tsgl(sk, processed, 255 processed - as); 256 if (!areq->tsgl_entries) 257 areq->tsgl_entries = 1; | 1/* 2 * algif_aead: User-space interface for AEAD algorithms 3 * 4 * Copyright (C) 2014, Stephan Mueller <smueller@chronox.de> 5 * 6 * This file provides the user-space API for AEAD ciphers. 7 * 8 * This program is free software; you can redistribute it and/or modify it --- 241 unchanged lines hidden (view full) --- 250 if (err) 251 goto free; 252 253 /* Create TX SGL for tag and chain it to RX SGL. */ 254 areq->tsgl_entries = af_alg_count_tsgl(sk, processed, 255 processed - as); 256 if (!areq->tsgl_entries) 257 areq->tsgl_entries = 1; |
258 areq->tsgl = sock_kmalloc(sk, sizeof(*areq->tsgl) * 259 areq->tsgl_entries, | 258 areq->tsgl = sock_kmalloc(sk, array_size(sizeof(*areq->tsgl), 259 areq->tsgl_entries), |
260 GFP_KERNEL); 261 if (!areq->tsgl) { 262 err = -ENOMEM; 263 goto free; 264 } 265 sg_init_table(areq->tsgl, areq->tsgl_entries); 266 267 /* Release TX SGL, except for tag data and reassign tag data. */ --- 354 unchanged lines hidden --- | 260 GFP_KERNEL); 261 if (!areq->tsgl) { 262 err = -ENOMEM; 263 goto free; 264 } 265 sg_init_table(areq->tsgl, areq->tsgl_entries); 266 267 /* Release TX SGL, except for tag data and reassign tag data. */ --- 354 unchanged lines hidden --- |