| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /// Find uses of standard freeing functons on values allocated using devm_ |
|---|
| 2 | 3 | /// functions. Values allocated using the devm_functions are freed when |
|---|
| 3 | 4 | /// the device is detached, and thus the use of the standard freeing |
|---|
| 4 | 5 | /// function would cause a double free. |
|---|
| 5 | | -/// See Documentation/driver-model/devres.txt for more information. |
|---|
| 6 | +/// See Documentation/driver-api/driver-model/devres.rst for more information. |
|---|
| 6 | 7 | /// |
|---|
| 7 | 8 | /// A difficulty of detecting this problem is that the standard freeing |
|---|
| 8 | 9 | /// function might be called from a different function than the one |
|---|
| .. | .. |
|---|
| 14 | 15 | /// less reliable in these cases. |
|---|
| 15 | 16 | /// |
|---|
| 16 | 17 | // Confidence: Moderate |
|---|
| 17 | | -// Copyright: (C) 2011 Julia Lawall, INRIA/LIP6. GPLv2. |
|---|
| 18 | | -// Copyright: (C) 2011 Gilles Muller, INRIA/LiP6. GPLv2. |
|---|
| 18 | +// Copyright: (C) 2011 Julia Lawall, INRIA/LIP6. |
|---|
| 19 | +// Copyright: (C) 2011 Gilles Muller, INRIA/LiP6. |
|---|
| 19 | 20 | // URL: http://coccinelle.lip6.fr/ |
|---|
| 20 | 21 | // Comments: |
|---|
| 21 | 22 | // Options: --no-includes --include-headers |
|---|
| .. | .. |
|---|
| 51 | 52 | | |
|---|
| 52 | 53 | x = devm_ioremap(...) |
|---|
| 53 | 54 | | |
|---|
| 54 | | - x = devm_ioremap_nocache(...) |
|---|
| 55 | | -| |
|---|
| 56 | 55 | x = devm_ioport_map(...) |
|---|
| 57 | 56 | ) |
|---|
| 58 | 57 | |
|---|
| .. | .. |
|---|
| 84 | 83 | | |
|---|
| 85 | 84 | x = ioremap(...) |
|---|
| 86 | 85 | | |
|---|
| 87 | | - x = ioremap_nocache(...) |
|---|
| 88 | | -| |
|---|
| 89 | 86 | x = ioport_map(...) |
|---|
| 90 | 87 | ) |
|---|
| 91 | 88 | ... |
|---|
| 92 | 89 | ( |
|---|
| 93 | 90 | kfree@p(x) |
|---|
| 94 | 91 | | |
|---|
| 95 | | - kzfree@p(x) |
|---|
| 96 | | -| |
|---|
| 97 | | - __krealloc@p(x, ...) |
|---|
| 92 | + kfree_sensitive@p(x) |
|---|
| 98 | 93 | | |
|---|
| 99 | 94 | krealloc@p(x, ...) |
|---|
| 100 | 95 | | |
|---|
| .. | .. |
|---|
| 117 | 112 | ( |
|---|
| 118 | 113 | * kfree@p(x) |
|---|
| 119 | 114 | | |
|---|
| 120 | | -* kzfree@p(x) |
|---|
| 121 | | -| |
|---|
| 122 | | -* __krealloc@p(x, ...) |
|---|
| 115 | +* kfree_sensitive@p(x) |
|---|
| 123 | 116 | | |
|---|
| 124 | 117 | * krealloc@p(x, ...) |
|---|
| 125 | 118 | | |
|---|