All of lore.kernel.org
 help / color / mirror / Atom feed
From: teigland@sourceware.org <teigland@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/dlm-kernel/src lkb.c
Date: 18 Sep 2006 17:00:24 -0000	[thread overview]
Message-ID: <20060918170024.24692.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4U4
Changes by:	teigland at sourceware.org	2006-09-18 17:00:23

Modified files:
	dlm-kernel/src : lkb.c 

Log message:
	Don't create lkids of 0.  When the lkid counter for bucket 0 of the
	hash table rolls over (it's uint16), we'd get a lkid of zero and
	assign it to the new lkb.  lock_dlm would be confused by a zero lkid
	and use some other, incorrect value as the lkid which would lead to
	a dlm error which would lead to a lock_dlm/gfs panic.
	this should fix bz 199673
	it may also fix bz 172944

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm-kernel/src/lkb.c.diff?cvsroot=cluster&only_with_tag=RHEL4U4&r1=1.3.2.1&r2=1.3.2.1.12.1

--- cluster/dlm-kernel/src/Attic/lkb.c	2005/01/18 10:46:52	1.3.2.1
+++ cluster/dlm-kernel/src/Attic/lkb.c	2006/09/18 17:00:23	1.3.2.1.12.1
@@ -79,6 +79,11 @@
 
 	lkid = bucket | (ls->ls_lkbtbl[bucket].counter++ << 16);
 
+	if (!lkid) {
+		write_unlock(&ls->ls_lkbtbl[bucket].lock);
+		goto retry;
+	}
+
 	if (__find_lock_by_id(ls, lkid)) {
 		write_unlock(&ls->ls_lkbtbl[bucket].lock);
 		goto retry;



             reply	other threads:[~2006-09-18 17:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-18 17:00 teigland [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-08-31 15:33 [Cluster-devel] cluster/dlm-kernel/src lkb.c teigland
2006-08-31 15:22 teigland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060918170024.24692.qmail@sourceware.org \
    --to=teigland@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.