lkml.org 
[lkml]   [2014]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
Subjectusage of rcu_dereference_raw
Hi Paul,

I was trying to see the various uses of rcu_dereference_ functions to
understand how they were being used. A doubt cropped up while doing this:

* rcu_dereference_raw(): the documentation explicitly mentions that this
should be minimally used as this does no checking of read critical sections
and does not implement barriers. But looking at the code, there are various
places where this is being used and it is being used I think in a buggy
way. For example, in drivers/net/wireless/iwlwifi/dvm/main.c, there is this:

kfree(rcu_dereference_raw(priv->noa_data));

I can't imagine a scenario in which this is valid. So my question is this:
do most of the uses of rcu_dereference_raw() need to be changed to use other
dereference functions or are there cases where its usage is valid?

Regards,
--
Pranith


\
 
 \ /
  Last update: 2014-04-22 00:01    [W:0.047 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site