Project

General

Profile

Actions

Feature #3831

open

146: Mixing operations of RCU nested read sections of different types

Added by Vadim Mutilin almost 12 years ago. Updated almost 12 years ago.

Status:
Open
Priority:
Normal
Start date:
12/27/2012
Due date:
% Done:

80%

Estimated time:
Published in build:

Description

Name
RCU read sections nesting
Title
Mixing operations of RCU nested read sections of different types
Description
Nested RCU read sections are allowed by Linux documentation, one read section may contain inside another read section. Read section starts with rcu_read_lock and ends with rcu_read_unlock operation. It is prohibited to mix start of one type of section with end of another type of section. For example, it is prohibited to mix original RCU and RCU BH operations.

Examples
Example of incorrect behavior:
rcu_read_lock(); // starting original RCU section
rcu_read_lock_bh(); //starting RCU BH nested section
rcu_read_unlock(); //BUG: RCU BH section should be ended first!
rcu_read_unlock_bh();

Correct usage example:
rcu_read_lock();
rcu_read_lock_bh();
rcu_read_unlock_bh();
rcu_read_unlock();

Actions

Also available in: Atom PDF