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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1194050108.3966.18.camel@localhost.localdomain>
Date:	Fri, 02 Nov 2007 17:35:08 -0700
From:	Mingming Cao <cmm@...ibm.com>
To:	ext4 development <linux-ext4@...r.kernel.org>
Subject: [PATCH][RFC]Ext4: Use get_cpu()/put_cpu() in preemptible context

Fix the warning of:

printk: 369 messages suppressed.
BUG: using smp_processor_id() in preemptible [00000001] code: fsx-linux/31702
caller is ext4_mb_new_blocks+0x2aa/0x1319

Signed-off-by: Mingming Cao <cmm@...ibm.com>

---
 fs/ext4/mballoc.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-2.6.24-rc1/fs/ext4/mballoc.c
===================================================================
--- linux-2.6.24-rc1.orig/fs/ext4/mballoc.c	2007-11-02 17:22:18.000000000 -0700
+++ linux-2.6.24-rc1/fs/ext4/mballoc.c	2007-11-02 17:23:02.000000000 -0700
@@ -4006,7 +4006,8 @@ static void ext4_mb_group_or_file(struct
 		return;
 
 	BUG_ON(ac->ac_lg != NULL);
-	ac->ac_lg = &sbi->s_locality_groups[smp_processor_id()];
+	ac->ac_lg = &sbi->s_locality_groups[get_cpu()];
+	put_cpu();
 
 	/* we're going to use group allocation */
 	ac->ac_flags |= EXT4_MB_HINT_GROUP_ALLOC;


-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ