From 608ddd6aa17b1955d0ba56b910020bcebed81b77 Mon Sep 17 00:00:00 2001 From: shadow Date: Thu, 13 Dec 2007 08:59:01 +0000 Subject: [PATCH] not alloc memory with spinlock held. b=14418 i=green i=johann --- lustre/ChangeLog | 7 +++++++ lustre/obdclass/obd_config.c | 16 ++++++---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index e983e53..8a0f551 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -14,6 +14,13 @@ tbd Cluster File Systems, Inc. * Recommended e2fsprogs version: 1.40.2-cfs4 * Note that reiserfs quotas are disabled on SLES 10 in this kernel. +Severity : minor +Bugzilla : 14418 +Frequency : only at startup +Description: not alloc memory with spinlock held. +Details : allocation memory with GFP_KERNEL can produce sleep deadlock, + if any spinlock held. + Severity : major Frequency : always Bugzilla : 14270 diff --git a/lustre/obdclass/obd_config.c b/lustre/obdclass/obd_config.c index f5c7be5..54cdc8f 100644 --- a/lustre/obdclass/obd_config.c +++ b/lustre/obdclass/obd_config.c @@ -278,27 +278,23 @@ int class_setup(struct obd_device *obd, struct lustre_cfg *lcfg) /* just leave this on forever. I can't use obd_set_up here because other fns check that status, and we're not actually set up yet. */ obd->obd_starting = 1; - + spin_unlock(&obd->obd_dev_lock); + /* create an uuid-export hash body */ - err = lustre_hash_init(&obd->obd_uuid_hash_body, "UUID_HASH", + err = lustre_hash_init(&obd->obd_uuid_hash_body, "UUID_HASH", 128, &uuid_hash_operations); - if (err) { - spin_unlock(&obd->obd_dev_lock); + if (err) GOTO(err_hash, err); - } /* create a nid-export hash body */ - err = lustre_hash_init(&obd->obd_nid_hash_body, "NID_HASH", + err = lustre_hash_init(&obd->obd_nid_hash_body, "NID_HASH", 128, &nid_hash_operations); - if (err) { - spin_unlock(&obd->obd_dev_lock); + if (err) GOTO(err_hash, err); - } /* create a nid-stats hash body */ err = lustre_hash_init(&obd->obd_nid_stats_hash_body, "NID_STATS", 128, &nid_stat_hash_operations); - spin_unlock(&obd->obd_dev_lock); if (err) GOTO(err_hash, err); -- 1.8.3.1