Bug 2144

Summary: Alpha kernel oops from stat(NULL,...)
Product: [Retired] Red Hat Linux Reporter: Owen Taylor <otaylor>
Component: kernelAssignee: Cristian Gafton <gafton>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0   
Target Milestone: ---   
Target Release: ---   
Hardware: alpha   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-08-21 18:18:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Owen Taylor 1999-04-12 18:38:14 UTC
Calling stat with a NULL pointer produces an oops on the
current Alpha kernel instead of correct returning
EFAULT. (as it does on Intel)

The following program demonstrates.

====
#include <sys/stat.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <unistd.h>

int main ()
{
  struct stat buf;

  if (stat (NULL, &buf) != 0)
    printf("Error correctly returned: %s\n",
	    strerror (errno));
}

Comment 1 Jeff Johnson 1999-08-21 18:18:59 UTC
The behavior on 2.2.5 alpha is to generate an exception message
on the console and return EFAULT.