public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Keith Owens <kaos@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: Re: salinfo incorrectly returning -ENOMEM
Date: Sat, 28 Jan 2006 00:07:25 +0000	[thread overview]
Message-ID: <15585.1138406845@ocs3.ocs.com.au> (raw)
In-Reply-To: <1138400466.19287.24.camel@krebs.dannf>

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.


  parent reply	other threads:[~2006-01-28  0:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-27 22:21 salinfo incorrectly returning -ENOMEM dann frazier
2006-01-27 22:45 ` Prarit Bhargava
2006-01-27 23:24 ` dann frazier
2006-01-28  0:07 ` Keith Owens [this message]
2006-02-08 17:52 ` dann frazier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15585.1138406845@ocs3.ocs.com.au \
    --to=kaos@sgi.com \
    --cc=linux-ia64@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox