lkml.org 
[lkml]   [2005]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectBUG?: request_irq can apparently sleep

Hi,

the basic question is: Is request_irq allowed to sleep?

A lot of code suggest that sleeping is not allowed, including a
call to kmalloc(..., GFP_ATOMIC) in request_irq itself.

However, we have the following at least theoretically possible call chain:

request_irq->setup_irq->register_handler_proc->proc_mkdir->
->proc_mkdir_mode->proc_create->kmalloc (..., GFP_KERNEL)->BOOM

The code in kernel/fs/proc/generic.c looks like this:

ent = kmalloc(sizeof(struct proc_dir_entry) + len + 1, GFP_KERNEL);
if (!ent) goto out;

Given that check for ent != NULL this should probably be changed to an
GFP_ATOMIC allocation. Am I missing something?

regards Christian

--
THAT'S ALL FOLKS!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-10-31 11:44    [W:0.037 / U:1.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site