Repository navigation
Commit f48b726
IB/core: Add lock to multicast handlers
When two handlers used the same object in the old schema, we blocked
the process in the kernel. The new schema just returns -EBUSY. This
could lead to different behaviour in applications between the old
schema and the new schema. In most cases, using such handlers
concurrently could lead to crashing the process. For example, if
thread A destroys a QP and thread B modifies it, we could have the
destruction happens before the modification. In this case, we are
accessing freed memory which could lead to crashing the process.
This is true for most cases. However, attaching and detaching
a multicast address from QP concurrently is safe. Therefore, we
preserve the original behaviour by adding a lock there.
Signed-off-by: Matan Barak <matanb@mellanox.com>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>1 parent fd3c790 commit f48b726
2 files changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
| 167 | + | |
166 | 168 | | |
167 | 169 | | |
168 | 170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1352 | 1352 | | |
1353 | 1353 | | |
1354 | 1354 | | |
| 1355 | + | |
1355 | 1356 | | |
1356 | 1357 | | |
1357 | 1358 | | |
| |||
2589 | 2590 | | |
2590 | 2591 | | |
2591 | 2592 | | |
| 2593 | + | |
2592 | 2594 | | |
2593 | 2595 | | |
2594 | 2596 | | |
| |||
2612 | 2614 | | |
2613 | 2615 | | |
2614 | 2616 | | |
| 2617 | + | |
2615 | 2618 | | |
2616 | 2619 | | |
2617 | 2620 | | |
| |||
2636 | 2639 | | |
2637 | 2640 | | |
2638 | 2641 | | |
| 2642 | + | |
2639 | 2643 | | |
2640 | 2644 | | |
2641 | 2645 | | |
| |||
2650 | 2654 | | |
2651 | 2655 | | |
2652 | 2656 | | |
| 2657 | + | |
2653 | 2658 | | |
2654 | 2659 | | |
2655 | 2660 | | |
| |||
0 commit comments