lkml.org 
[lkml]   [2010]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectregd: sleeping in atomic
Hi,

Stanse found an atomic error in reg_copy_regd:

static int reg_copy_regd(const struct ieee80211_regdomain **dst_regd,
const struct ieee80211_regdomain *src_regd)
{
struct ieee80211_regdomain *regd;
int size_of_regd = 0;
unsigned int i;

size_of_regd = sizeof(struct ieee80211_regdomain) +
((src_regd->n_reg_rules + 1) * sizeof(struct
ieee80211_reg_rule));

regd = kzalloc(size_of_regd, GFP_KERNEL); <---- here

Called from:

static void reg_regdb_search(struct work_struct *work)
{
spin_lock(&reg_regdb_search_lock);
while (!list_empty(&reg_regdb_search_list)) {
...
for (i=0; i<reg_regdb_size; i++) {
curdom = reg_regdb[i];

if (!memcmp(request->alpha2, curdom->alpha2, 2)) {
r = reg_copy_regd(&regdom, curdom);
...
spin_unlock(&reg_regdb_search_lock);
}

Whole error temporarily available at:
http://decibel.fi.muni.cz/~xslaby/stanse/error.cgi?db=34-rc&id=578

It is introduced by 3b377ea9d4efc94dc52fe41b4dfdb463635ab298.

Do you plan to extend it somehow or may the spinlock be converted to
mutex? If not how much may size_of_regd be -- can we safely switch to
GFP_ATOMIC?

--
js


\
 
 \ /
  Last update: 2010-03-16 14:29    [W:0.046 / U:0.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site