kzfree()
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest8 patches 15 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | slab: introduce kzfree()include/ mm/ | +20 | 4 replies | |
| 2/8 | crypto: use kzfree()crypto/ | +1 | 0 replies | |
| 3/8 | s390: use kzfree()arch/ drivers/ | +2 | 0 replies | |
| 4/8 | md: use kzfree()drivers/ | +2 | 0 replies | |
| 5/8 | usb: use kzfree()drivers/ drivers/ | +2 | 0 replies | |
| 6/8 | cifs: use kzfree()fs/ fs/ | +6 | 5 replies | |
| 7/8 | ecryptfs: use kzfree()fs/ fs/ | +2 | 3 replies | |
| 8/8 | atm: use kzfree()net/ | +4 | 0 replies |
Reviews trailers per patch
3 of 8 patches have a Reviewed-by or Acked-by.
| Patch | Pekka Enberg | Steve French | Tyler Hicks |
|---|---|---|---|
| 1/8 | A-b | ||
| 2/8 | |||
| 3/8 | |||
| 4/8 | |||
| 5/8 | |||
| 6/8 | R-b | A-b A-b | |
| 7/8 | A-b | ||
| 8/8 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [patch 0/8] kzfree()
This series introduces kzfree() and converts callsites which do memset() + kfree() explicitely.
The callsites may be incomplete, I used coccinelle [1] to find them.
Regarding the recent re-exporting of ksize() to modules and the discussion around it [2], this removes the single modular in-tree user of ksize() again (unless I overgrepped something).
kfree() uses ksize() internally to determine the size of the memory region to zero out. This could mean overhead as the size is actually that of the kmalloc cache the object is from, but memset() + kfree() isn't really the common fast path pattern.
I left out w1 because I think it doesn't need to zero the memory at all. I will take a deeper look into it and send a followup with either a kzfree() conversion or removal of the memset() alltogether.
Hannes
[1] http://www.emn.fr/x-info/coccinelle/
@@ expression M, S; @@ - memset(M, 0, S); - kfree(M); + kzfree(M);
(from the back of my head, no coccinelle installed on this box)
[2] http://lkml.org/lkml/2009/2/10/144
arch/s390/crypto/prng.c | 3 +-- crypto/api.c | 5 +---- drivers/md/dm-crypt.c | 6 ++---- drivers/s390/crypto/zcrypt_pcixcc.c | 3 +-- drivers/usb/host/hwa-hc.c | 3 +-- drivers/usb/wusbcore/cbaf.c | 3 +-- fs/cifs/connect.c | 7 ++----- fs/cifs/misc.c | 12 ++++-------- fs/ecryptfs/keystore.c | 3 +-- fs/ecryptfs/messaging.c | 3 +-- include/linux/slab.h | 1 + mm/util.c | 19 +++++++++++++++++++ net/atm/mpoa_caches.c | 14 ++++---------- 13 files changed, 39 insertions(+), 43 deletions(-)
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>