Commit 5e744b2
FROMLIST: v4l: async: Move async subdev notifier operations to a separate structure
The async subdev notifier .bound(), .unbind() and .complete() operations
are function pointers stored directly in the v4l2_async_subdev
structure. As the structure isn't immutable, this creates a potential
security risk as the function pointers are mutable.
To fix this, move the function pointers to a new
v4l2_async_subdev_operations structure that can be made const in
drivers.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
(cherry picked from commit ef44d7cb0c00968dc62987a6d0438ec30ca8c06c)
https://git.linuxtv.org/sailus/media_tree.git/log/?h=010f7f4393fd
http://www.spinics.net/lists/linux-media/msg122688.html
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Conflicts:
drivers/media/pci/intel/ipu3/ipu3-cio2.c
(implement change in non-upstream driver)
drivers/media/platform/davinci/vpif_capture.c
(Change vpif_probe() instead of newer vpif_capture_get_pdata() UNTESTED)
drivers/media/platform/omap3isp/isp.c
(Add .bound = isp_subdev_notifier_bound which we still have UNTESTED)
drivers/media/platform/atmel/atmel-isc.c
drivers/media/platform/atmel/atmel-isi.c
drivers/media/platform/pxa_camera.c
drivers/media/platform/qcom/camss-8x16/camss.c
drivers/media/platform/rcar-vin/rcar-core.c
drivers/media/platform/rcar_drif.c
drivers/media/platform/stm32/stm32-dcmi.c
drivers/media/platform/ti-vpe/cal.c
drivers/staging/media/imx/imx-media-dev.c
(Ignore drivers we don't have)
BUG=b:64133998
TEST=media device topology shows subdevs registered successfully
TEST=no camera regression
Change-Id: Ic3c4a327763507c8b4fa242ae4642a633e3c7dbc
Reviewed-on: https://chromium-review.googlesource.com/693689
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>1 parent 01e017d commit 5e744b2
9 files changed
Lines changed: 73 additions & 38 deletions
File tree
- drivers/media
- platform
- am437x
- davinci
- exynos4-is
- omap3isp
- soc_camera
- xilinx
- v4l2-core
- include/media
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2424 | 2424 | | |
2425 | 2425 | | |
2426 | 2426 | | |
| 2427 | + | |
| 2428 | + | |
| 2429 | + | |
| 2430 | + | |
| 2431 | + | |
2427 | 2432 | | |
2428 | 2433 | | |
2429 | 2434 | | |
| |||
2597 | 2602 | | |
2598 | 2603 | | |
2599 | 2604 | | |
2600 | | - | |
2601 | | - | |
| 2605 | + | |
2602 | 2606 | | |
2603 | 2607 | | |
2604 | 2608 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1428 | 1428 | | |
1429 | 1429 | | |
1430 | 1430 | | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
1431 | 1436 | | |
1432 | 1437 | | |
1433 | 1438 | | |
| |||
1505 | 1510 | | |
1506 | 1511 | | |
1507 | 1512 | | |
1508 | | - | |
1509 | | - | |
| 1513 | + | |
1510 | 1514 | | |
1511 | 1515 | | |
1512 | 1516 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1243 | 1243 | | |
1244 | 1244 | | |
1245 | 1245 | | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
1246 | 1251 | | |
1247 | 1252 | | |
1248 | 1253 | | |
| |||
1316 | 1321 | | |
1317 | 1322 | | |
1318 | 1323 | | |
1319 | | - | |
1320 | | - | |
| 1324 | + | |
1321 | 1325 | | |
1322 | 1326 | | |
1323 | 1327 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1324 | 1324 | | |
1325 | 1325 | | |
1326 | 1326 | | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
1327 | 1332 | | |
1328 | 1333 | | |
1329 | 1334 | | |
| |||
1411 | 1416 | | |
1412 | 1417 | | |
1413 | 1418 | | |
1414 | | - | |
1415 | | - | |
| 1419 | + | |
1416 | 1420 | | |
1417 | 1421 | | |
1418 | 1422 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2307 | 2307 | | |
2308 | 2308 | | |
2309 | 2309 | | |
| 2310 | + | |
| 2311 | + | |
| 2312 | + | |
| 2313 | + | |
| 2314 | + | |
2310 | 2315 | | |
2311 | 2316 | | |
2312 | 2317 | | |
| |||
2470 | 2475 | | |
2471 | 2476 | | |
2472 | 2477 | | |
2473 | | - | |
2474 | | - | |
| 2478 | + | |
2475 | 2479 | | |
2476 | 2480 | | |
2477 | 2481 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1735 | 1735 | | |
1736 | 1736 | | |
1737 | 1737 | | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
1738 | 1744 | | |
1739 | 1745 | | |
1740 | 1746 | | |
| |||
1781 | 1787 | | |
1782 | 1788 | | |
1783 | 1789 | | |
1784 | | - | |
1785 | | - | |
1786 | | - | |
| 1790 | + | |
1787 | 1791 | | |
1788 | 1792 | | |
1789 | 1793 | | |
| |||
1880 | 1884 | | |
1881 | 1885 | | |
1882 | 1886 | | |
1883 | | - | |
1884 | | - | |
1885 | | - | |
| 1887 | + | |
1886 | 1888 | | |
1887 | 1889 | | |
1888 | 1890 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
355 | 360 | | |
356 | 361 | | |
357 | 362 | | |
| |||
552 | 557 | | |
553 | 558 | | |
554 | 559 | | |
555 | | - | |
556 | | - | |
| 560 | + | |
557 | 561 | | |
558 | 562 | | |
559 | 563 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
| 109 | + | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
118 | | - | |
| 117 | + | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
131 | | - | |
| 130 | + | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
218 | | - | |
| 217 | + | |
| 218 | + | |
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | | - | |
310 | | - | |
| 309 | + | |
| 310 | + | |
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
81 | 98 | | |
82 | 99 | | |
83 | 100 | | |
| 101 | + | |
84 | 102 | | |
85 | 103 | | |
86 | 104 | | |
87 | 105 | | |
88 | 106 | | |
89 | 107 | | |
90 | 108 | | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | 109 | | |
95 | 110 | | |
| 111 | + | |
96 | 112 | | |
97 | 113 | | |
98 | 114 | | |
99 | 115 | | |
100 | 116 | | |
101 | 117 | | |
102 | 118 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | 119 | | |
111 | 120 | | |
112 | 121 | | |
| |||
0 commit comments