Project

General

Profile

Actions

Bug #237

closed

Bug #235: meta: Missing list checks for *list_add*

batadv_neigh_node_new: Missing list checks for *list_add*

Added by Sven Eckelmann about 8 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
06/26/2015
Due date:
% Done:

100%

Estimated time:

Description

Simon debugged the refcnt problem and submitted some patches to fix them. I had a brief look and noticed that there are possible more problems similar to the *list_del* ones - just with *list_add*. Basically some functions use some kind of get function, notice that the element does not exist and then create a new one to add to the list. Only the "list_add" is protected. The result may be that an element in twice in a list when only a single occurrence is allowed.

The problem I saw is that functions adding objects in an RCU protected list are missing an definitive check. They first call some kind of *_get (rcu_read_lock only) to check if an object with this value already exists and then uses some kind of *_add to allocate a new object and add it (which may already be added in by a different context). So it has to be made sure that nothing modifies the list between the check and the add of the new object).

Linus already proposed a patch: https://patchwork.open-mesh.org/project/b.a.t.m.a.n./patch/1452150672-11174-2-git-send-email-linus.luessing@c0d3.blue/


Related issues 1 (0 open1 closed)

Related to batman-adv - Bug #242: batadv_neigh_node_release: Double batadv_hardif_neigh_putClosedMarek Lindner03/05/2016

Actions
Actions #1

Updated by Sven Eckelmann about 8 years ago

  • Related to Bug #242: batadv_neigh_node_release: Double batadv_hardif_neigh_put added
Actions #2

Updated by Sven Eckelmann about 8 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Looks like Linus' patch was accepted.

Actions #3

Updated by Sven Eckelmann about 8 years ago

  • Status changed from Resolved to Closed
Actions #4

Updated by Sven Eckelmann about 7 years ago

  • Target version set to 2016.2
Actions #5

Updated by Sven Eckelmann almost 4 years ago

  • Description updated (diff)
Actions

Also available in: Atom PDF