net/ice/base: adjust profile ID map locks
authorQi Zhang <qi.z.zhang@intel.com>
Thu, 11 Jun 2020 08:43:21 +0000 (16:43 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 30 Jun 2020 12:52:29 +0000 (14:52 +0200)
commitd6e0dca1d5cf5e58a8e0e0dc288035d7874432d9
tree7980789f468da62dd621effaac2701043bdfc2fe
parent4f299b7169000aa55fe7a48fe98736f728e4f710
net/ice/base: adjust profile ID map locks

The profile id map lock should be held till the caller completes
all references of that profile entries.

The current code releases the lock right after the match search.
This caused a driver issue when the profile map entries were
referenced after it was freed in other thread after the lock was
released earlier.

Also return type of get/set profile functions were changed to
return the ice status instead of the profile entry pointer.
This will prevent the caller referencing the profile fields
outside the lock.

Signed-off-by: Victor Raj <victor.raj@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
drivers/net/ice/base/ice_flex_pipe.c
drivers/net/ice/base/ice_flow.c