The patch titled

     fix: dmi_check_system

has been added to the -mm tree.  Its filename is

     fix-dmi_check_system.patch

Patches currently in -mm which might be from [EMAIL PROTECTED] are

fsnotify-hook-on-removexattr-too.patch
ibm-hdaps-accelerometer-driver-with-probing.patch
fix-dmi_check_system.patch



From: Robert Love <[EMAIL PROTECTED]>

Background:

        1) dmi_check_system() returns the count of the number of 
           matches.  Zero thus means no matches.
        2) A match callback can return nonzero to stop the match
           checking.

Bug: The count is incremented after we check for the nonzero return value,
so it does not reflect the actual count.  We could say this is intended,
for some dumb reason, except that it means that a match on the first check
returns zero--no matches--if the callback returns nonzero.

Attached patch implements the count before calling the callback and thus
before potentially short-circuiting.

Signed-off-by: Robert Love <[EMAIL PROTECTED]>
Cc: Andrey Panin <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---

 arch/i386/kernel/dmi_scan.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN arch/i386/kernel/dmi_scan.c~fix-dmi_check_system 
arch/i386/kernel/dmi_scan.c
--- devel/arch/i386/kernel/dmi_scan.c~fix-dmi_check_system      2005-08-29 
23:59:27.000000000 -0700
+++ devel-akpm/arch/i386/kernel/dmi_scan.c      2005-08-29 23:59:27.000000000 
-0700
@@ -248,9 +248,9 @@ int dmi_check_system(struct dmi_system_i
                        /* No match */
                        goto fail;
                }
+               count++;
                if (d->callback && d->callback(d))
                        break;
-               count++;
 fail:          d++;
        }
 
_
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to