Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
List overview
Download
cluster-commits
September 2014
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
cluster-commits@lists.stg.fedorahosted.org
3 participants
127 discussions
Start a n
N
ew thread
fence-agents: master - [doc] Improve wiki export
by Marek Grác
24 Sep '14
24 Sep '14
Gitweb:
http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=842aabd3…
Commit: 842aabd3b2d27da36ac1bb2c210163f83613d591 Parent: b7b26b816be8d79a8ff6e32b1d023a8b5354ab28 Author: Marek 'marx' Grac <mgrac(a)redhat.com> AuthorDate: Wed Sep 24 14:57:20 2014 +0200 Committer: Marek 'marx' Grac <mgrac(a)redhat.com> CommitterDate: Wed Sep 24 14:57:20 2014 +0200 [doc] Improve wiki export --- fence/agents/lib/fence2wiki.xsl | 2 +- fence/agents/xenapi/fence_xenapi.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fence/agents/lib/fence2wiki.xsl b/fence/agents/lib/fence2wiki.xsl index b94cbc1..8112169 100644 --- a/fence/agents/lib/fence2wiki.xsl +++ b/fence/agents/lib/fence2wiki.xsl @@ -2,10 +2,10 @@ <xsl:stylesheet version='1.0' xmlns:xsl="
http://www.w3.org/1999/XSL/Transform
"> <xsl:template match="/resource-agent"> +[=#<xsl:value-of select="@name" />] ||='''<xsl:value-of select="@shortdesc" />''' =||='''<xsl:value-of select="@name" />''' =|| || '''Name Of The Argument For STDIN''' || '''Name Of The Argument For Command-Line''' || '''Default Value''' ||'''Description''' || <xsl:apply-templates select="parameters/parameter" /> -<xsl:text>-</xsl:text> </xsl:template> <xsl:template match="parameters/parameter">|| <xsl:value-of select="@name" /> || <xsl:value-of select="getopt/@mixed" /> || {{{<xsl:value-of select="content/@default" disable-output-escaping="yes"/>}}} || <xsl:value-of select="shortdesc" /> || diff --git a/fence/agents/xenapi/fence_xenapi.py b/fence/agents/xenapi/fence_xenapi.py index f32c4ea..655831e 100644 --- a/fence/agents/xenapi/fence_xenapi.py +++ b/fence/agents/xenapi/fence_xenapi.py @@ -206,7 +206,7 @@ def main(): options = check_input(device_opt, process_input(device_opt)) docs = {} - docs["shortdesc"] = "Fence agent fo Citrix XenServer over XenAPI" + docs["shortdesc"] = "Fence agent for Citrix XenServer over XenAPI" docs["longdesc"] = "\ fence_cxs is an I/O Fencing agent used on Citrix XenServer hosts. \ It uses the XenAPI, supplied by Citrix, to establish an XML-RPC sesssion \
1
0
0
0
fence-agents: master - [doc] Improve wiki export
by Marek Grác
22 Sep '14
22 Sep '14
Gitweb:
http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=b7b26b81…
Commit: b7b26b816be8d79a8ff6e32b1d023a8b5354ab28 Parent: f07ee2abe99ef84ed4bf18b2df111d4c2bb1f43c Author: Marek 'marx' Grac <mgrac(a)redhat.com> AuthorDate: Mon Sep 22 16:38:52 2014 +0200 Committer: Marek 'marx' Grac <mgrac(a)redhat.com> CommitterDate: Mon Sep 22 16:38:52 2014 +0200 [doc] Improve wiki export --- fence/agents/lib/fence2wiki.xsl | 10 +++++----- fence/agents/ovh/fence_ovh.py | 2 +- fence/agents/xenapi/fence_xenapi.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fence/agents/lib/fence2wiki.xsl b/fence/agents/lib/fence2wiki.xsl index 93853a0..b94cbc1 100644 --- a/fence/agents/lib/fence2wiki.xsl +++ b/fence/agents/lib/fence2wiki.xsl @@ -1,14 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> -<xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform
"> +<xsl:stylesheet version='1.0' xmlns:xsl="
http://www.w3.org/1999/XSL/Transform
"> <xsl:template match="/resource-agent"> -||- <xsl:value-of select="@shortdesc" /> (<xsl:value-of select="@name" />) =|| -|| stdin argument || command-line argument || description || +||='''<xsl:value-of select="@shortdesc" />''' =||='''<xsl:value-of select="@name" />''' =|| +|| '''Name Of The Argument For STDIN''' || '''Name Of The Argument For Command-Line''' || '''Default Value''' ||'''Description''' || <xsl:apply-templates select="parameters/parameter" /> -- +<xsl:text>-</xsl:text> </xsl:template> -<xsl:template match="parameters/parameter">|| <xsl:value-of select="@name" /> || <xsl:value-of select="getopt/@mixed" /> || <xsl:value-of select="shortdesc" />|| +<xsl:template match="parameters/parameter">|| <xsl:value-of select="@name" /> || <xsl:value-of select="getopt/@mixed" /> || {{{<xsl:value-of select="content/@default" disable-output-escaping="yes"/>}}} || <xsl:value-of select="shortdesc" /> || </xsl:template> </xsl:stylesheet> \ No newline at end of file diff --git a/fence/agents/ovh/fence_ovh.py b/fence/agents/ovh/fence_ovh.py index 14a0706..170df11 100644 --- a/fence/agents/ovh/fence_ovh.py +++ b/fence/agents/ovh/fence_ovh.py @@ -29,7 +29,7 @@ def define_new_opts(): all_opt["email"] = { "getopt" : "Z:", "longopt" : "email", - "help" : "-Z, --email=<email> email for reboot message: admin(a)domain.com", + "help" : "-Z, --email=[email] email for reboot message: admin(a)domain.com", "required" : "1", "shortdesc" : "Reboot email", "default" : "", diff --git a/fence/agents/xenapi/fence_xenapi.py b/fence/agents/xenapi/fence_xenapi.py index 6f759d7..f32c4ea 100644 --- a/fence/agents/xenapi/fence_xenapi.py +++ b/fence/agents/xenapi/fence_xenapi.py @@ -206,7 +206,7 @@ def main(): options = check_input(device_opt, process_input(device_opt)) docs = {} - docs["shortdesc"] = "XenAPI based fencing for the Citrix XenServer virtual machines." + docs["shortdesc"] = "Fence agent fo Citrix XenServer over XenAPI" docs["longdesc"] = "\ fence_cxs is an I/O Fencing agent used on Citrix XenServer hosts. \ It uses the XenAPI, supplied by Citrix, to establish an XML-RPC sesssion \
1
0
0
0
fence-agents: master - fence_apc: --shell-timeout was used instead of --power-timeout
by Marek Grác
22 Sep '14
22 Sep '14
Gitweb:
http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=f07ee2ab…
Commit: f07ee2abe99ef84ed4bf18b2df111d4c2bb1f43c Parent: 316ecfbad27231ced5c383d16a4f06a1679c90da Author: Marek 'marx' Grac <mgrac(a)redhat.com> AuthorDate: Mon Sep 22 14:46:43 2014 +0200 Committer: Marek 'marx' Grac <mgrac(a)redhat.com> CommitterDate: Mon Sep 22 14:46:43 2014 +0200 fence_apc: --shell-timeout was used instead of --power-timeout --- fence/agents/apc/fence_apc.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fence/agents/apc/fence_apc.py b/fence/agents/apc/fence_apc.py index 83bfe07..f2080f1 100644 --- a/fence/agents/apc/fence_apc.py +++ b/fence/agents/apc/fence_apc.py @@ -170,9 +170,9 @@ def set_power_status(conn, options): conn.send_eol(action) conn.log_expect(options, "Enter 'YES' to continue or <ENTER> to cancel :", int(options["--shell-timeout"])) conn.send_eol("YES") - conn.log_expect(options, "Press <ENTER> to continue...", int(options["--shell-timeout"])) + conn.log_expect(options, "Press <ENTER> to continue...", int(options["--power-timeout"])) conn.send_eol("") - conn.log_expect(options, options["--command-prompt"], int(options["--shell-timeout"])) + conn.log_expect(options, options["--command-prompt"], int(options["--power-timeout"])) conn.send(chr(03)) conn.log_expect(options, "- Logout", int(options["--shell-timeout"])) conn.log_expect(options, options["--command-prompt"], int(options["--shell-timeout"]))
1
0
0
0
gfs2-utils: master - libgfs2: Remove superfluous NULL check from gfs2_rgrp_free
by Andrew Price
19 Sep '14
19 Sep '14
Gitweb:
http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=d3743efabd…
Commit: d3743efabda1118a54beb84e43655809f64a103d Parent: 45047cbf2cdfa57f309e2235334ed4cb038efb99 Author: Andrew Price <anprice(a)redhat.com> AuthorDate: Fri Sep 19 21:24:48 2014 +0100 Committer: Andrew Price <anprice(a)redhat.com> CommitterDate: Fri Sep 19 21:24:48 2014 +0100 libgfs2: Remove superfluous NULL check from gfs2_rgrp_free Coverity was complaining that this NULL check indicated that previous dereferences were bad. Remove the NULL check and let free(3) deal with NULL conditions (of which there are none in this case). Signed-off-by: Andrew Price <anprice(a)redhat.com> --- gfs2/libgfs2/rgrp.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/gfs2/libgfs2/rgrp.c b/gfs2/libgfs2/rgrp.c index 1abcc82..ed8e01d 100644 --- a/gfs2/libgfs2/rgrp.c +++ b/gfs2/libgfs2/rgrp.c @@ -254,8 +254,7 @@ void gfs2_rgrp_free(struct osi_root *rgrp_tree) } gfs2_rgrp_relse(rgd); /* free them all. */ } - if(rgd->bits) - free(rgd->bits); + free(rgd->bits); osi_erase(&rgd->node, rgrp_tree); free(rgd); }
1
0
0
0
gfs2-utils: master - libgfs2: Clean up broken rgrp length check
by Andrew Price
19 Sep '14
19 Sep '14
Gitweb:
http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=45047cbf2c…
Commit: 45047cbf2cdfa57f309e2235334ed4cb038efb99 Parent: f67b54c097b5fbb6ace1c3589139c35e3d46adf1 Author: Andrew Price <anprice(a)redhat.com> AuthorDate: Fri Sep 19 11:20:05 2014 +0100 Committer: Andrew Price <anprice(a)redhat.com> CommitterDate: Fri Sep 19 11:20:05 2014 +0100 libgfs2: Clean up broken rgrp length check This length check had broken logic (!length && length > ...) and always used the theoretical maximum rgrp size instead of a real maximum for the fs. Replace the check with a check for a zero length. Signed-off-by: Andrew Price <anprice(a)redhat.com> --- gfs2/libgfs2/rgrp.c | 8 +------- 1 files changed, 1 insertions(+), 7 deletions(-) diff --git a/gfs2/libgfs2/rgrp.c b/gfs2/libgfs2/rgrp.c index 0d0f000..1abcc82 100644 --- a/gfs2/libgfs2/rgrp.c +++ b/gfs2/libgfs2/rgrp.c @@ -154,15 +154,9 @@ void lgfs2_rgrp_bitbuf_free(lgfs2_rgrp_t rg) uint64_t gfs2_rgrp_read(struct gfs2_sbd *sdp, struct rgrp_tree *rgd) { unsigned x, length = rgd->ri.ri_length; - uint64_t max_rgrp_bitbytes, max_rgrp_len; struct gfs2_buffer_head **bhs; - /* Max size of an rgrp is 2GB. Figure out how many blocks that is: */ - max_rgrp_bitbytes = ((2147483648 / sdp->bsize) / GFS2_NBBY); - max_rgrp_len = max_rgrp_bitbytes / sdp->bsize; - if (!length && length > max_rgrp_len) - return -1; - if (gfs2_check_range(sdp, rgd->ri.ri_addr)) + if (length == 0 || gfs2_check_range(sdp, rgd->ri.ri_addr)) return -1; bhs = calloc(length, sizeof(struct gfs2_buffer_head *));
1
0
0
0
gfs2-utils: master - gfs2_edit: Fix use-after-free in find_wrap_pt
by Andrew Price
19 Sep '14
19 Sep '14
Gitweb:
http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=f67b54c097…
Commit: f67b54c097b5fbb6ace1c3589139c35e3d46adf1 Parent: 2b4fcf7ac3589fa8cef3b9985fdca3562b0fbb07 Author: Andrew Price <anprice(a)redhat.com> AuthorDate: Thu Sep 18 17:43:47 2014 +0100 Committer: Andrew Price <anprice(a)redhat.com> CommitterDate: Thu Sep 18 17:54:59 2014 +0100 gfs2_edit: Fix use-after-free in find_wrap_pt Spotted by coverity: Calling "brelse(struct gfs2_buffer_head *)" dereferences freed pointer. Refactor the find_wrap_pt function to make it easier to manage memory and minimise scope. Signed-off-by: Andrew Price <anprice(a)redhat.com> --- gfs2/edit/journal.c | 70 ++++++++++++++++++++++++++++---------------------- 1 files changed, 39 insertions(+), 31 deletions(-) diff --git a/gfs2/edit/journal.c b/gfs2/edit/journal.c index 58f4798..81d7a90 100644 --- a/gfs2/edit/journal.c +++ b/gfs2/edit/journal.c @@ -297,50 +297,58 @@ static int print_ld_blks(const uint64_t *b, const char *end, int start_line, return bcount; } +static int is_wrap_pt(char *buf, uint64_t *highest_seq) +{ + struct gfs2_buffer_head tbh = { .b_data = buf }; + + if (get_block_type(&tbh, NULL) == GFS2_METATYPE_LH) { + uint64_t seq; + + if (sbd.gfs1) { + struct gfs_log_header lh; + gfs_log_header_in(&lh, &tbh); + seq = lh.lh_sequence; + } else { + struct gfs2_log_header lh; + gfs2_log_header_in(&lh, &tbh); + seq = lh.lh_sequence; + } + if (seq < *highest_seq) + return 1; + *highest_seq = seq; + } + return 0; +} + /** * find_wrap_pt - figure out where a journal wraps * Returns: The wrap point, in bytes */ -static uint64_t find_wrap_pt(struct gfs2_inode *j_inode, char *jbuf, - uint64_t jblock, uint64_t j_size) +static uint64_t find_wrap_pt(struct gfs2_inode *ji, char *jbuf, uint64_t jblock, uint64_t j_size) { - struct gfs2_buffer_head *j_bh = NULL, dummy_bh; - uint64_t jb, abs_block; - int error; + uint64_t jb = 0; uint64_t highest_seq = 0; for (jb = 0; jb < j_size; jb += (sbd.gfs1 ? 1 : sbd.bsize)) { + int found = 0; + if (sbd.gfs1) { - if (j_bh) - brelse(j_bh); + struct gfs2_buffer_head *j_bh; + j_bh = bread(&sbd, jblock + jb); - abs_block = jblock + jb; - dummy_bh.b_data = j_bh->b_data; + found = is_wrap_pt(j_bh->b_data, &highest_seq); + brelse(j_bh); } else { - error = fsck_readi(j_inode, (void *)jbuf, jb, - sbd.bsize, &abs_block); - if (!error) /* end of file */ - break; - dummy_bh.b_data = jbuf; - } - if (get_block_type(&dummy_bh, NULL) == GFS2_METATYPE_LH) { - struct gfs2_log_header lh; - struct gfs_log_header lh1; + int copied; + uint64_t abs_block; - if (sbd.gfs1) { - gfs_log_header_in(&lh1, &dummy_bh); - if (lh1.lh_sequence < highest_seq) - return jb; - highest_seq = lh1.lh_sequence; - } else { - gfs2_log_header_in(&lh, &dummy_bh); - if (lh.lh_sequence < highest_seq) - return jb; - highest_seq = lh.lh_sequence; - } + copied = fsck_readi(ji, jbuf, jb, sbd.bsize, &abs_block); + if (!copied) /* end of file */ + break; + found = is_wrap_pt(jbuf, &highest_seq); } - if (j_bh) - brelse(j_bh); + if (found) + return jb; } return 0; }
1
0
0
0
gfs2-utils: master - gfs2_edit: Set umask before calling mkstemp in savemetaopen()
by Andrew Price
19 Sep '14
19 Sep '14
Gitweb:
http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=2b4fcf7ac3…
Commit: 2b4fcf7ac3589fa8cef3b9985fdca3562b0fbb07 Parent: 5ad00f239c7ccfa89e279a4996a29a12783bef6e Author: Andrew Price <anprice(a)redhat.com> AuthorDate: Thu Sep 18 14:51:41 2014 +0100 Committer: Andrew Price <anprice(a)redhat.com> CommitterDate: Thu Sep 18 14:51:41 2014 +0100 gfs2_edit: Set umask before calling mkstemp in savemetaopen() Spotted by coverity: Calling "mkstemp(char *)" without securely setting umask first. Signed-off-by: Andrew Price <anprice(a)redhat.com> --- gfs2/edit/savemeta.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/gfs2/edit/savemeta.c b/gfs2/edit/savemeta.c index 360b144..5147ee5 100644 --- a/gfs2/edit/savemeta.c +++ b/gfs2/edit/savemeta.c @@ -259,6 +259,7 @@ static struct metafd savemetaopen(char *out_fn, int gziplevel) struct metafd mfd = {-1, NULL, NULL, gziplevel}; char gzmode[3] = "w9"; char dft_fn[] = DFT_SAVE_FILE; + mode_t mask = umask(S_IXUSR | S_IRWXG | S_IRWXO); if (!out_fn) { out_fn = dft_fn; @@ -266,6 +267,7 @@ static struct metafd savemetaopen(char *out_fn, int gziplevel) } else { mfd.fd = open(out_fn, O_RDWR | O_CREAT, 0644); } + umask(mask); mfd.filename = out_fn; if (mfd.fd < 0) {
1
0
0
0
gfs2-utils: master - gfs2_edit: Fix signed value used as array index in print_ld_blks
by Andrew Price
19 Sep '14
19 Sep '14
Gitweb:
http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=5ad00f239c…
Commit: 5ad00f239c7ccfa89e279a4996a29a12783bef6e Parent: 137f1730280d8ac02999eb64e0629763252386eb Author: Andrew Price <anprice(a)redhat.com> AuthorDate: Thu Sep 18 14:27:17 2014 +0100 Committer: Andrew Price <anprice(a)redhat.com> CommitterDate: Thu Sep 18 14:27:17 2014 +0100 gfs2_edit: Fix signed value used as array index in print_ld_blks Spotted by coverity: Using variable "type" as an index to array "allocdesc[sbd.gfs1]". Signed-off-by: Andrew Price <anprice(a)redhat.com> --- gfs2/edit/journal.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gfs2/edit/journal.c b/gfs2/edit/journal.c index 5b824a4..58f4798 100644 --- a/gfs2/edit/journal.c +++ b/gfs2/edit/journal.c @@ -263,9 +263,12 @@ static int print_ld_blks(const uint64_t *b, const char *end, int start_line, j_bmap_bh = bread(&sbd, abs_block + bcount); rgd->bits[bmap].bi_bh = j_bmap_bh; - type = lgfs2_get_bitmap(&sbd, tblk, - rgd); + type = lgfs2_get_bitmap(&sbd, tblk, rgd); brelse(j_bmap_bh); + if (type < 0) { + perror("Error printing log descriptor blocks"); + exit(1); + } rgd->bits[bmap].bi_bh = save_bh; print_gfs2("bit for blk 0x%llx is %d " "(%s)",
1
0
0
0
gfs2-utils: master - gfs2_convert: Fix potential memory leaks in adjust_inode
by Andrew Price
19 Sep '14
19 Sep '14
Gitweb:
http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=137f173028…
Commit: 137f1730280d8ac02999eb64e0629763252386eb Parent: fb30e395e6e8a05246f37365f141bef22b73193e Author: Andrew Price <anprice(a)redhat.com> AuthorDate: Thu Sep 18 14:07:32 2014 +0100 Committer: Andrew Price <anprice(a)redhat.com> CommitterDate: Thu Sep 18 14:07:32 2014 +0100 gfs2_convert: Fix potential memory leaks in adjust_inode Spotted by coverity: Variable "inode" going out of scope leaks the storage it points to. Signed-off-by: Andrew Price <anprice(a)redhat.com> --- gfs2/convert/gfs2_convert.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/gfs2/convert/gfs2_convert.c b/gfs2/convert/gfs2_convert.c index 19a9839..16ec150 100644 --- a/gfs2/convert/gfs2_convert.c +++ b/gfs2/convert/gfs2_convert.c @@ -877,7 +877,7 @@ static int adjust_inode(struct gfs2_sbd *sbp, struct gfs2_buffer_head *bh) if (!fixdir) { /*FIXME: Same message as fix_cdpn_symlink */ log_crit(_("Error: out of memory.\n")); - return -1; + goto err_freei; } memset(fixdir, 0, sizeof(struct inode_block)); fixdir->di_addr = inode->i_di.di_num.no_addr; @@ -931,18 +931,18 @@ static int adjust_inode(struct gfs2_sbd *sbp, struct gfs2_buffer_head *bh) inode->i_di.di_generation = 0; if (adjust_indirect_blocks(sbp, inode)) - return -1; + goto err_freei; /* Check for cdpns */ if (S_ISLNK(inode->i_di.di_mode)) { ret = fix_cdpn_symlink(sbp, bh, inode); if (ret) - return -1; + goto err_freei; } /* Check for extended attributes */ if (inode->i_di.di_eattr) { ret = fix_xattr(sbp, bh, inode); if (ret) - return -1; + goto err_freei; } } @@ -950,6 +950,9 @@ static int adjust_inode(struct gfs2_sbd *sbp, struct gfs2_buffer_head *bh) inode_put(&inode); /* does gfs2_dinode_out if modified */ sbp->md.next_inum++; /* update inode count */ return 0; +err_freei: + inode_put(&inode); + return -1; } /* adjust_inode */ static int next_rg_meta(struct rgrp_tree *rgd, uint64_t *block, int first)
1
0
0
0
gfs2-utils: master - fsck.gfs2: Fix memory leak in pass2
by Andrew Price
19 Sep '14
19 Sep '14
Gitweb:
http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=fb30e395e6…
Commit: fb30e395e6e8a05246f37365f141bef22b73193e Parent: 99ec0b8d3d26fc24e945ac515c001baf352b39ee Author: Andrew Price <anprice(a)redhat.com> AuthorDate: Thu Sep 18 13:50:58 2014 +0100 Committer: Andrew Price <anprice(a)redhat.com> CommitterDate: Thu Sep 18 13:50:58 2014 +0100 fsck.gfs2: Fix memory leak in pass2 Spotted by coverity: Variable "ip" going out of scope leaks the storage it points to. Signed-off-by: Andrew Price <anprice(a)redhat.com> --- gfs2/fsck/pass2.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/gfs2/fsck/pass2.c b/gfs2/fsck/pass2.c index 2971b8c..1559d8e 100644 --- a/gfs2/fsck/pass2.c +++ b/gfs2/fsck/pass2.c @@ -1988,6 +1988,7 @@ int pass2(struct gfs2_sbd *sdp) if (error) { log_err(_("Error adding directory %s: %s\n"), "'.'", strerror(errno)); + fsck_inode_put(&ip); return -errno; } if (cur_blks != ip->i_di.di_blocks) {
1
0
0
0
← Newer
1
2
3
4
...
13
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
Results per page:
10
25
50
100
200