lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 14 Aug 2007 12:41:13 -0700 From: akpm@...ux-foundation.org To: tytso@....edu Cc: linux-ext4@...r.kernel.org, akpm@...ux-foundation.org, m.kozlowski@...land.pl Subject: [patch 1/1] fs/jbd2/journal.c: kmalloc + memset conversion to kzalloc From: Mariusz Kozlowski <m.kozlowski@...land.pl> fs/jbd2/journal.c | 66771 -> 66719 (-52 bytes) fs/jbd2/journal.o | 199193 -> 199049 (-144 bytes) Signed-off-by: Mariusz Kozlowski <m.kozlowski@...land.pl> Signed-off-by: Andrew Morton <akpm@...ux-foundation.org> --- fs/jbd2/journal.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff -puN fs/jbd2/journal.c~fs-jbd2-journalc-kmalloc-memset-conversion-to-kzalloc fs/jbd2/journal.c --- a/fs/jbd2/journal.c~fs-jbd2-journalc-kmalloc-memset-conversion-to-kzalloc +++ a/fs/jbd2/journal.c @@ -929,17 +929,16 @@ static void journal_init_stats(journal_t { int size; - if (proc_jbd2_stats == NULL) + if (!proc_jbd2_stats) return; journal->j_history_max = 100; size = sizeof(struct transaction_stats_s) * journal->j_history_max; - journal->j_history = kmalloc(size, GFP_KERNEL); - if (journal->j_history == NULL) { + journal->j_history = kzalloc(size, GFP_KERNEL); + if (!journal->j_history) { journal->j_history_max = 0; return; } - memset(journal->j_history, 0, size); spin_lock_init(&journal->j_history_lock); } _ - To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists