View Single Post
Old 03-12-10, 12:42 PM   #3
dtor
Registered User
 
Join Date: Nov 2004
Posts: 2
Default Re: nvidia-190.53-2.6.33.patch has a bug in it

Heh, not only community patch has a bug in it, but it looks like Nvidia made the same error in their official driver:

#if defined(KERNEL_2_4) || \
(NV_ACPI_WALK_NAMESPACE_ARGUMENT_COUNT == 6)
#define NV_ACPI_WALK_NAMESPACE(type, args...) acpi_walk_namespace(type, args)
#elif (NV_ACPI_WALK_NAMESPACE_ARGUMENT_COUNT == 7)
#define NV_ACPI_WALK_NAMESPACE(type, args...) \
acpi_walk_namespace(type, args, NULL)
#else
#error "NV_ACPI_WALK_NAMESPACE_ARGUMENT_COUNT value unrecognized!"
#endif

As you can see, in the case if 7 arguments NULL is added as the last argument to acpi_walk_namespace().

In all fairness, the bug will only manifest when compiling with DEBUG since the other call site uses NULLs for context and return value arguments as well.
dtor is offline   Reply With Quote