Commit 8ddb332
i40e/i40evf: avoid mutex re-init
If the driver were to happen to have a mutex held while
the i40e_init_adminq call was called, the init_adminq might
inadvertently call mutex_init on a lock that was held
which is a violation of the calling semantics.
Fix this by avoiding adminq.c code allocating/freeing this memory, and
then do the same work only once in probe/remove.
Testing Hints (Required if no HSD): for VF, load i40evf in bare metal
and echo 32 > sriov_numvfs; echo 0 > sriov_numvfs in a loop. Yes this
is a horrible thing to do.
Change-ID: Ida263c51b34e195252179e7e5e400d73a99be7a2
Reported-by: Stefan Assmann <sassmann@redhat.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>1 parent 6e80a18 commit 8ddb332
File tree
4 files changed
+20
-13
lines changed- drivers/net/ethernet/intel
- i40evf
- i40e
4 files changed
+20
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
567 | 567 | | |
568 | 568 | | |
569 | 569 | | |
570 | | - | |
571 | | - | |
572 | | - | |
573 | | - | |
574 | 570 | | |
575 | 571 | | |
576 | 572 | | |
| |||
664 | 660 | | |
665 | 661 | | |
666 | 662 | | |
667 | | - | |
668 | | - | |
669 | 663 | | |
670 | 664 | | |
671 | 665 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10295 | 10295 | | |
10296 | 10296 | | |
10297 | 10297 | | |
| 10298 | + | |
| 10299 | + | |
| 10300 | + | |
| 10301 | + | |
| 10302 | + | |
| 10303 | + | |
10298 | 10304 | | |
10299 | 10305 | | |
10300 | 10306 | | |
| |||
10697 | 10703 | | |
10698 | 10704 | | |
10699 | 10705 | | |
10700 | | - | |
10701 | 10706 | | |
10702 | 10707 | | |
10703 | 10708 | | |
| |||
10740 | 10745 | | |
10741 | 10746 | | |
10742 | 10747 | | |
| 10748 | + | |
| 10749 | + | |
| 10750 | + | |
| 10751 | + | |
10743 | 10752 | | |
10744 | 10753 | | |
10745 | 10754 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
551 | 551 | | |
552 | 552 | | |
553 | 553 | | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | 554 | | |
559 | 555 | | |
560 | 556 | | |
| |||
596 | 592 | | |
597 | 593 | | |
598 | 594 | | |
599 | | - | |
600 | | - | |
601 | 595 | | |
602 | 596 | | |
603 | 597 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2476 | 2476 | | |
2477 | 2477 | | |
2478 | 2478 | | |
| 2479 | + | |
| 2480 | + | |
| 2481 | + | |
| 2482 | + | |
| 2483 | + | |
| 2484 | + | |
2479 | 2485 | | |
2480 | 2486 | | |
2481 | 2487 | | |
| |||
2629 | 2635 | | |
2630 | 2636 | | |
2631 | 2637 | | |
| 2638 | + | |
| 2639 | + | |
| 2640 | + | |
| 2641 | + | |
2632 | 2642 | | |
2633 | 2643 | | |
2634 | 2644 | | |
| |||
0 commit comments