Re: salinfo incorrectly returning -ENOMEM

From: Keith Owens <kaos_at_sgi.com>
Date: 2006-01-28 11:07:25
dann frazier (on Fri, 27 Jan 2006 15:21:06 -0700) wrote:
>salinfo_decode will silently exit occasionally due to a failed open
>of /proc/sal/XXX/data.  This is because the kernel is returning -ENOMEM
>after attempting to vmalloc a buffer of size  
>ia64_sal_get_state_info_size(data->type).
>
>However, on my system ia64_sal_get_state_info_size is returning 0, in
>which case I'd think a NULL vmalloc() result is correct.  
>
>This patch assumes, of course, that 0 is a reasonable return value from
>ia64_sal_get_state_info_size().

Nak this patch.

Zero is not a valid return value from ia64_sal_get_state_info_size().
That SAL call must return the maximum size for the record type so that
the OS can preallocate the required buffers while the OS is in normal
context.  The buffers cannot be allocated when the SAL interrupt occurs
because vmalloc cannot be used in interrupt context.  If SAL is not
returning a valid value from ia64_sal_get_state_info_size() then your
version of SAL is wrong and the only thing that the OS can do is to
give up on that record type.  So an error return to salinfo_decode is
the correct response here.

You said that salinfo_decode will silently exit.  Have you tried
salinfo 1.0, that logs why the salinfo_decode failed and retries it a
few times.

-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Sat Jan 28 11:08:02 2006

This archive was generated by hypermail 2.1.8 : 2006-01-28 11:08:10 EST