[Pkg-utopia-commits] r1990 - in /packages/unstable/hal/debian: changelog patches/90_fix_crash_after_fdi_cache_generation.patch patches/91_fix_invalid_fdi_cache_on_empty_matches.patch
sjoerd at users.alioth.debian.org
sjoerd at users.alioth.debian.org
Sat Dec 22 15:40:05 UTC 2007
Author: sjoerd
Date: Sat Dec 22 15:40:05 2007
New Revision: 1990
URL: http://svn.debian.org/wsvn/pkg-utopia/?sc=1&rev=1990
Log:
* debian/patches/90_fix_crash_after_fdi_cache_generation.patch:
- Added. Fix a hal crash when the fdi cache is regenerated while
hal is running (From upstream git).
* debian/patches/91_fix_invalid_fdi_cache_on_empty_matches.patch:
- Added. Fix a bug causing the fdi cache to be invalid when an fdi files
contains empty match rules. (Closes: #456310)
Added:
packages/unstable/hal/debian/patches/90_fix_crash_after_fdi_cache_generation.patch
packages/unstable/hal/debian/patches/91_fix_invalid_fdi_cache_on_empty_matches.patch
Modified:
packages/unstable/hal/debian/changelog
Modified: packages/unstable/hal/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/hal/debian/changelog?rev=1990&op=diff
==============================================================================
--- packages/unstable/hal/debian/changelog (original)
+++ packages/unstable/hal/debian/changelog Sat Dec 22 15:40:05 2007
@@ -26,6 +26,12 @@
* debian/patches/87_fix_hurd_compilation.patch:
- Added. Fix compilation on the Hurd. Based on a patch by Samuel Thibault
(Closes: #444574)
+ * debian/patches/90_fix_crash_after_fdi_cache_generation.patch:
+ - Added. Fix a hal crash when the fdi cache is regenerated while
+ hal is running (From upstream git).
+ * debian/patches/91_fix_invalid_fdi_cache_on_empty_matches.patch:
+ - Added. Fix a bug causing the fdi cache to be invalid when an fdi files
+ contains empty match rules. (Closes: #456310)
-- Michael Biebl <biebl at debian.org> Wed, 12 Dec 2007 22:34:48 +0100
Added: packages/unstable/hal/debian/patches/90_fix_crash_after_fdi_cache_generation.patch
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/hal/debian/patches/90_fix_crash_after_fdi_cache_generation.patch?rev=1990&op=file
==============================================================================
--- packages/unstable/hal/debian/patches/90_fix_crash_after_fdi_cache_generation.patch (added)
+++ packages/unstable/hal/debian/patches/90_fix_crash_after_fdi_cache_generation.patch Sat Dec 22 15:40:05 2007
@@ -1,0 +1,31 @@
+commit ab31f06ca5388d4915156d3dac60c3fc52908260
+Author: Danny Kukawka <danny.kukawka at web.de>
+Date: Thu Dec 6 21:16:02 2007 +0100
+
+ fix possible segfault on fdi-cache recreation
+
+ This fixes https://bugzilla.novell.com/show_bug.cgi?id=344231, where
+ HAL crash if a fdi-file get changed/updated and a new device appears
+ after the recreation of the FDI cache.
+
+diff --git a/hald/device_info.c b/hald/device_info.c
+index d601e60..88936cd 100644
+--- a/hald/device_info.c
++++ b/hald/device_info.c
+@@ -1119,13 +1119,15 @@ rules_match_and_merge_device (void *fdi_rules_list, HalDevice *d)
+ /* merge the device info type, either preprobe, info or policy */
+ gboolean
+ di_search_and_merge (HalDevice *d, DeviceInfoType type){
+- struct cache_header *header = (struct cache_header*) RULES_PTR(0);
++ struct cache_header *header;
+
+ /* make sure our fdi rule cache is up to date */
+ if (di_cache_coherency_check (FALSE)) {
+ di_rules_init ();
+ }
+
++ header = (struct cache_header*) RULES_PTR(0);
++
+ switch (type) {
+ case DEVICE_INFO_TYPE_PREPROBE:
+ /* Checking if we have at least one preprobe rule */
Added: packages/unstable/hal/debian/patches/91_fix_invalid_fdi_cache_on_empty_matches.patch
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/hal/debian/patches/91_fix_invalid_fdi_cache_on_empty_matches.patch?rev=1990&op=file
==============================================================================
--- packages/unstable/hal/debian/patches/91_fix_invalid_fdi_cache_on_empty_matches.patch (added)
+++ packages/unstable/hal/debian/patches/91_fix_invalid_fdi_cache_on_empty_matches.patch Sat Dec 22 15:40:05 2007
@@ -1,0 +1,31 @@
+commit 74ce4177ffecf8b455176cdf87e04a817e4c279a
+Author: Sjoerd Simons <sjoerd at luon.net>
+Date: Sat Dec 22 15:42:54 2007 +0100
+
+ ensure match rules are always stored before writing the jump_position in the cache
+
+ When a match rule is empty the expat end callback is called while the match
+ rule isn't saved yet. This patch ensures the match rule is saved _before_
+ saving the jump_positions, if this is not done then the jump_position will be
+ overwritten with 0.
+
+ Fixes hal aborting on Fujitsu laptops because the fujitsu fdi contains an
+ empty <match /> rule. Reported in
+ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=456314 and its dupes
+
+diff --git a/hald/create_cache.c b/hald/create_cache.c
+index 37e2d10..882de1b 100644
+--- a/hald/create_cache.c
++++ b/hald/create_cache.c
+@@ -432,6 +432,11 @@ end (void *data, const char *el){
+
+ if (rtype == RULE_UNKNOWN) return;
+ if (rtype == RULE_MATCH){
++ if (fdi_ctx->rule.rtype == RULE_MATCH) {
++ /* the match rule wasn't stored yet, store it now. So it's stored
++ * _before_ jump_position is written into the cache */
++ store_rule(fdi_ctx);
++ }
+ set_jump_position(fdi_ctx);
+ return;
+ }
More information about the Pkg-utopia-commits
mailing list