Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 316612 Details for
Bug 376831
Read from /proc/ppc64/rtas/error_log does not honor O_NONBLOCK
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Proposed patch
376831.patch (text/plain), 1.37 KB, created by
IBM Bug Proxy
on 2008-09-12 19:30:37 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
IBM Bug Proxy
Created:
2008-09-12 19:30:37 UTC
Size:
1.37 KB
patch
obsolete
>diff --git a/arch/powerpc/platforms/pseries/rtasd.c b/arch/powerpc/platforms/pseries/rtasd.c >index 2e4e040..11d5c5f 100644 >--- a/arch/powerpc/platforms/pseries/rtasd.c >+++ b/arch/powerpc/platforms/pseries/rtasd.c >@@ -293,21 +293,25 @@ static ssize_t rtas_log_read(struct file * file, char __user * buf, > if (!access_ok(VERIFY_WRITE, buf, count)) > return -EFAULT; > >- tmp = kmalloc(count, GFP_KERNEL); >- if (!tmp) >- return -ENOMEM; >- >- > spin_lock_irqsave(&rtasd_log_lock, s); > /* if it's 0, then we know we got the last one (the one in NVRAM) */ >- if (rtas_log_size == 0 && !no_logging) >+ if (rtas_log_size == 0 && !no_logging) { > nvram_clear_error_log(); >- spin_unlock_irqrestore(&rtasd_log_lock, s); >+ if (file->f_flags & O_NONBLOCK) { >+ spin_unlock_irqrestore(&rtasd_log_lock, s); >+ return -EAGAIN; >+ } > >+ } >+ spin_unlock_irqrestore(&rtasd_log_lock, s); > > error = wait_event_interruptible(rtas_log_wait, rtas_log_size); > if (error) >- goto out; >+ return error; >+ >+ tmp = kmalloc(count, GFP_KERNEL); >+ if (!tmp) >+ return -ENOMEM; > > spin_lock_irqsave(&rtasd_log_lock, s); > offset = rtas_error_log_buffer_max * (rtas_log_start & LOG_NUMBER_MASK); >@@ -318,7 +322,7 @@ static ssize_t rtas_log_read(struct file * file, char __user * buf, > spin_unlock_irqrestore(&rtasd_log_lock, s); > > error = copy_to_user(buf, tmp, count) ? -EFAULT : count; >-out: >+ > kfree(tmp); > return error; > } > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 376831
: 316612