public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 ./WHATS_NEW lib/filters/filter-persistent.c
@ 2010-01-06 13:25 mbroz
0 siblings, 0 replies; 3+ messages in thread
From: mbroz @ 2010-01-06 13:25 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz@sourceware.org 2010-01-06 13:25:36
Modified files:
. : WHATS_NEW
lib/filters : filter-persistent.c
Log message:
Use fixed buffer to prevent stack overflow in persistent filter dump.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1364&r2=1.1365
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/filters/filter-persistent.c.diff?cvsroot=lvm2&r1=1.39&r2=1.40
--- LVM2/WHATS_NEW 2010/01/05 21:32:59 1.1364
+++ LVM2/WHATS_NEW 2010/01/06 13:25:36 1.1365
@@ -1,5 +1,6 @@
Version 2.02.57 -
====================================
+ Use fixed buffer to prevent stack overflow in persistent filter dump.
Use snapshot metadata usage to determine if a snapshot is empty.
Insert missing stack macros to all activate_lv and deactivate_lv callers.
Insert missing stack macros to all suspend_lv and resume_lv callers.
--- LVM2/lib/filters/filter-persistent.c 2009/12/11 13:16:38 1.39
+++ LVM2/lib/filters/filter-persistent.c 2010/01/06 13:25:36 1.40
@@ -143,7 +143,7 @@
{
void *d;
int first = 1;
- char *buf, *str;
+ char buf[2 * PATH_MAX];
struct dm_hash_node *n;
for (n = dm_hash_get_first(pf->devices); n;
@@ -160,13 +160,8 @@
first = 0;
}
- str = dm_hash_get_key(pf->devices, n);
- if (!(buf = alloca(escaped_len(str)))) {
- log_error("persistent filter device path stack "
- "allocation failed");
- return;
- }
- fprintf(fp, "\t\t\"%s\"", escape_double_quotes(buf, str));
+ escape_double_quotes(buf, dm_hash_get_key(pf->devices, n));
+ fprintf(fp, "\t\t\"%s\"", buf);
}
if (!first)
^ permalink raw reply [flat|nested] 3+ messages in thread
* LVM2 ./WHATS_NEW lib/filters/filter-persistent.c
@ 2011-05-12 12:42 prajnoha
0 siblings, 0 replies; 3+ messages in thread
From: prajnoha @ 2011-05-12 12:42 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: prajnoha@sourceware.org 2011-05-12 12:42:48
Modified files:
. : WHATS_NEW
lib/filters : filter-persistent.c
Log message:
Do not issue an error message when unable to remove .cache on read-only fs.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1988&r2=1.1989
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/filters/filter-persistent.c.diff?cvsroot=lvm2&r1=1.49&r2=1.50
--- LVM2/WHATS_NEW 2011/05/07 15:52:50 1.1988
+++ LVM2/WHATS_NEW 2011/05/12 12:42:47 1.1989
@@ -1,5 +1,6 @@
Version 2.02.86 -
=================================
+ Do not issue an error message when unable to remove .cache on read-only fs.
Avoid memlock size mismatch by preallocating stdio line buffers.
Reorganize lvconvert --repair code to allow reuse.
Rewrite vgreduce --removemissing --force leveraging shared lvconvert code.
--- LVM2/lib/filters/filter-persistent.c 2011/04/22 12:05:33 1.49
+++ LVM2/lib/filters/filter-persistent.c 2011/05/12 12:42:48 1.50
@@ -108,7 +108,7 @@
log_very_verbose("Obtaining device list from "
"udev. Removing obolete %s.",
pf->file);
- if (unlink(pf->file) < 0)
+ if (unlink(pf->file) < 0 && errno != EROFS)
log_sys_error("unlink", pf->file);
}
return 1;
^ permalink raw reply [flat|nested] 3+ messages in thread
* LVM2 ./WHATS_NEW lib/filters/filter-persistent.c
@ 2010-06-01 19:02 agk
0 siblings, 0 replies; 3+ messages in thread
From: agk @ 2010-06-01 19:02 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2010-06-01 19:02:12
Modified files:
. : WHATS_NEW
lib/filters : filter-persistent.c
Log message:
Don't merge unchanged persistent cache file before dumping if tool scanned.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1601&r2=1.1602
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/filters/filter-persistent.c.diff?cvsroot=lvm2&r1=1.41&r2=1.42
--- LVM2/WHATS_NEW 2010/06/01 12:08:50 1.1601
+++ LVM2/WHATS_NEW 2010/06/01 19:02:12 1.1602
@@ -1,5 +1,6 @@
Version 2.02.67 -
===============================
+ Don't merge unchanged persistent cache file before dumping if tool scanned.
Fix incorrect memory pool deallocation while using vg_read for files.
Add --type parameter description to the lvcreate man page.
Replace strncmp kernel version number checks with proper ones.
--- LVM2/lib/filters/filter-persistent.c 2010/05/13 13:04:05 1.41
+++ LVM2/lib/filters/filter-persistent.c 2010/06/01 19:02:12 1.42
@@ -295,6 +295,7 @@
{
struct pfilter *pf;
struct dev_filter *f = NULL;
+ struct stat info;
if (!(pf = dm_malloc(sizeof(*pf))))
return_NULL;
@@ -314,6 +315,10 @@
if (!(f = dm_malloc(sizeof(*f))))
goto_bad;
+ /* Only merge cache file before dumping it if it changed externally. */
+ if (!stat(pf->file, &info))
+ pf->ctime = info.st_ctime;
+
f->passes_filter = _lookup_p;
f->destroy = _persistent_destroy;
f->private = pf;
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-05-12 12:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-06 13:25 LVM2 ./WHATS_NEW lib/filters/filter-persistent.c mbroz
2010-06-01 19:02 agk
2011-05-12 12:42 prajnoha
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).