[PATCH 4.17 059/101] sfc: correctly initialise filter rwsem for farch

From: Greg Kroah-Hartman
Date: Fri Jul 20 2018 - 08:46:47 EST


4.17-stable review patch. If anyone has any objections, please let me know.

------------------

From: Bert Kenward <bkenward@xxxxxxxxxxxxxx>

[ Upstream commit cafb39600e7a73263122a0e2db052d691686378f ]

Fixes: fc7a6c287ff3 ("sfc: use a semaphore to lock farch filters too")
Suggested-by: Joseph Korty <joe.korty@xxxxxxxxxxxxxxxxx>
Signed-off-by: Bert Kenward <bkenward@xxxxxxxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
drivers/net/ethernet/sfc/farch.c | 1 +
1 file changed, 1 insertion(+)

--- a/drivers/net/ethernet/sfc/farch.c
+++ b/drivers/net/ethernet/sfc/farch.c
@@ -2794,6 +2794,7 @@ int efx_farch_filter_table_probe(struct
if (!state)
return -ENOMEM;
efx->filter_state = state;
+ init_rwsem(&state->lock);

table = &state->table[EFX_FARCH_FILTER_TABLE_RX_IP];
table->id = EFX_FARCH_FILTER_TABLE_RX_IP;