diff for duplicates of <11821784842672-git-send-email-swhiteho@redhat.com> diff --git a/a/1.txt b/N1/1.txt index cb44699..b31b5b6 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,19 +1 @@ - -This problem was originally reported against GFS6.1, but the same issue exists -in upstream DLM. This patch keeps the rsb iterator assigning under the rsbtbl -list lock. Each time we process an rsb we grab a reference to it to make sure -it is not freed out from underneath us, and then put it when we get the next rsb -in the list or move onto another list. - -Signed-off-by: Josef Bacik <jwhiter@redhat.com> -Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> ---- - fs/dlm/debug_fs.c | 9 ++++++++- - 1 files changed, 8 insertions(+), 1 deletions(-) --------------- next part -------------- -A non-text attachment was scrubbed... -Name: b366510ec8e4fcf5a918a0c9fc1ba967d543838b.diff -Type: text/x-patch -Size: 1326 bytes -Desc: not available -URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20070618/f89d0ea7/attachment.bin> +This is a multi-part message in MIME format. diff --git a/N1/2.hdr b/N1/2.hdr new file mode 100644 index 0000000..5f63a06 --- /dev/null +++ b/N1/2.hdr @@ -0,0 +1,2 @@ +Content-Type: text/plain; charset=UTF-8; format=fixed +Content-Transfer-Encoding: 8bit diff --git a/N1/2.txt b/N1/2.txt new file mode 100644 index 0000000..db7fd64 --- /dev/null +++ b/N1/2.txt @@ -0,0 +1,12 @@ + +This problem was originally reported against GFS6.1, but the same issue exists +in upstream DLM. This patch keeps the rsb iterator assigning under the rsbtbl +list lock. Each time we process an rsb we grab a reference to it to make sure +it is not freed out from underneath us, and then put it when we get the next rsb +in the list or move onto another list. + +Signed-off-by: Josef Bacik <jwhiter@redhat.com> +Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> +--- + fs/dlm/debug_fs.c | 9 ++++++++- + 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/N1/3.hdr b/N1/3.hdr new file mode 100644 index 0000000..29c8d7a --- /dev/null +++ b/N1/3.hdr @@ -0,0 +1,3 @@ +Content-Type: text/x-patch; name="b366510ec8e4fcf5a918a0c9fc1ba967d543838b.diff" +Content-Transfer-Encoding: 8bit +Content-Disposition: inline; filename="b366510ec8e4fcf5a918a0c9fc1ba967d543838b.diff" diff --git a/N1/3.txt b/N1/3.txt new file mode 100644 index 0000000..c46fbb1 --- /dev/null +++ b/N1/3.txt @@ -0,0 +1,45 @@ +diff --git a/fs/dlm/debug_fs.c b/fs/dlm/debug_fs.c +index 61ba670..9e27a16 100644 +--- a/fs/dlm/debug_fs.c ++++ b/fs/dlm/debug_fs.c +@@ -17,6 +17,7 @@ + #include <linux/debugfs.h> + + #include "dlm_internal.h" ++#include "lock.h" + + #define DLM_DEBUG_BUF_LEN 4096 + static char debug_buf[DLM_DEBUG_BUF_LEN]; +@@ -166,6 +167,9 @@ static int rsb_iter_next(struct rsb_iter *ri) + read_lock(&ls->ls_rsbtbl[i].lock); + if (!list_empty(&ls->ls_rsbtbl[i].list)) { + ri->next = ls->ls_rsbtbl[i].list.next; ++ ri->rsb = list_entry(ri->next, struct dlm_rsb, ++ res_hashchain); ++ dlm_hold_rsb(ri->rsb); + read_unlock(&ls->ls_rsbtbl[i].lock); + break; + } +@@ -176,6 +180,7 @@ static int rsb_iter_next(struct rsb_iter *ri) + if (ri->entry >= ls->ls_rsbtbl_size) + return 1; + } else { ++ struct dlm_rsb *old = ri->rsb; + i = ri->entry; + read_lock(&ls->ls_rsbtbl[i].lock); + ri->next = ri->next->next; +@@ -184,11 +189,13 @@ static int rsb_iter_next(struct rsb_iter *ri) + ri->next = NULL; + ri->entry++; + read_unlock(&ls->ls_rsbtbl[i].lock); ++ dlm_put_rsb(old); + goto top; + } ++ ri->rsb = list_entry(ri->next, struct dlm_rsb, res_hashchain); + read_unlock(&ls->ls_rsbtbl[i].lock); ++ dlm_put_rsb(old); + } +- ri->rsb = list_entry(ri->next, struct dlm_rsb, res_hashchain); + + return 0; + } diff --git a/a/content_digest b/N1/content_digest index 15b1ece..7cf1244 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -3,10 +3,16 @@ "ref\011821784801162-git-send-email-swhiteho@redhat.com\0" "ref\01182178482182-git-send-email-swhiteho@redhat.com\0" "From\0Steven Whitehouse <swhiteho@redhat.com>\0" - "Subject\0[Cluster-devel] [PATCH 4/4] [DLM] keep dlm from panicing when traversing rsb list in debugfs\0" + "Subject\0[PATCH 4/4] [DLM] keep dlm from panicing when traversing rsb list in debugfs\0" "Date\0Mon, 18 Jun 2007 15:54:30 +0100\0" - "To\0cluster-devel.redhat.com\0" - "\00:1\0" + "To\0cluster-devel@redhat.com" + " linux-kernel@vger.kernel.org\0" + "Cc\0Josef Bacik <jwhiter@redhat.com>" + " Steven Whitehouse <swhiteho@redhat.com>\0" + "\01:1\0" + "b\0" + This is a multi-part message in MIME format. + "\01:2\0" "b\0" "\n" "This problem was originally reported against GFS6.1, but the same issue exists\n" @@ -19,13 +25,54 @@ "Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>\n" "---\n" " fs/dlm/debug_fs.c | 9 ++++++++-\n" - " 1 files changed, 8 insertions(+), 1 deletions(-)\n" - "-------------- next part --------------\n" - "A non-text attachment was scrubbed...\n" - "Name: b366510ec8e4fcf5a918a0c9fc1ba967d543838b.diff\n" - "Type: text/x-patch\n" - "Size: 1326 bytes\n" - "Desc: not available\n" - URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20070618/f89d0ea7/attachment.bin> + 1 files changed, 8 insertions(+), 1 deletions(-) + "\01:3\0" + "fn\0b366510ec8e4fcf5a918a0c9fc1ba967d543838b.diff\0" + "b\0" + "diff --git a/fs/dlm/debug_fs.c b/fs/dlm/debug_fs.c\n" + "index 61ba670..9e27a16 100644\n" + "--- a/fs/dlm/debug_fs.c\n" + "+++ b/fs/dlm/debug_fs.c\n" + "@@ -17,6 +17,7 @@\n" + " #include <linux/debugfs.h>\n" + " \n" + " #include \"dlm_internal.h\"\n" + "+#include \"lock.h\"\n" + " \n" + " #define DLM_DEBUG_BUF_LEN 4096\n" + " static char debug_buf[DLM_DEBUG_BUF_LEN];\n" + "@@ -166,6 +167,9 @@ static int rsb_iter_next(struct rsb_iter *ri)\n" + " \t\t\tread_lock(&ls->ls_rsbtbl[i].lock);\n" + " \t\t\tif (!list_empty(&ls->ls_rsbtbl[i].list)) {\n" + " \t\t\t\tri->next = ls->ls_rsbtbl[i].list.next;\n" + "+\t\t\t\tri->rsb = list_entry(ri->next, struct dlm_rsb,\n" + "+\t\t\t\t\t\t\tres_hashchain);\n" + "+\t\t\t\tdlm_hold_rsb(ri->rsb);\n" + " \t\t\t\tread_unlock(&ls->ls_rsbtbl[i].lock);\n" + " \t\t\t\tbreak;\n" + " \t\t\t}\n" + "@@ -176,6 +180,7 @@ static int rsb_iter_next(struct rsb_iter *ri)\n" + " \t\tif (ri->entry >= ls->ls_rsbtbl_size)\n" + " \t\t\treturn 1;\n" + " \t} else {\n" + "+\t\tstruct dlm_rsb *old = ri->rsb;\n" + " \t\ti = ri->entry;\n" + " \t\tread_lock(&ls->ls_rsbtbl[i].lock);\n" + " \t\tri->next = ri->next->next;\n" + "@@ -184,11 +189,13 @@ static int rsb_iter_next(struct rsb_iter *ri)\n" + " \t\t\tri->next = NULL;\n" + " \t\t\tri->entry++;\n" + " \t\t\tread_unlock(&ls->ls_rsbtbl[i].lock);\n" + "+\t\t\tdlm_put_rsb(old);\n" + " \t\t\tgoto top;\n" + " }\n" + "+\t\tri->rsb = list_entry(ri->next, struct dlm_rsb, res_hashchain);\n" + " \t\tread_unlock(&ls->ls_rsbtbl[i].lock);\n" + "+\t\tdlm_put_rsb(old);\n" + " \t}\n" + "-\tri->rsb = list_entry(ri->next, struct dlm_rsb, res_hashchain);\n" + " \n" + " \treturn 0;\n" + } -49b3c969f3ddb3da5ceb17d157dd4b4fd8f06621a7b56a31ac04c67d844f05a5 +0e5655f10bd5f61cedde8a46e3f1410a471fd75c3012803d16497aca885114c1
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.