net: rmnet_data: Remove the NAPI context for rmnet_data devices
Commit 28207b51 ("net: rmnet_data: Add NAPI context for rmnet_data devices") added a NAPI struct per rmnet_data device. This was to ensure that the NAPI struct is always available even if there was a hotplug. However, this seems to be leading to some races where the NAPI struct is accessed concurrently across cores. The race here is between napi_gro_receive on one core with napi_complete running on the other accessing the same NAPI struct. If napi_gro_receive runs slightly earlier, napi_complete would see that the napi->gro_list would be non NULL in __napi_complete even though it had cleared earlier and would lead to a BUG. If napi_complete runs slightly earlier, napi_gro_receive would dereference a NULL pointer even though it had assigned an skb to napi->gro_list. Fix this by using the per cpu backlog struct as the NAPI struct for queuing packets to GRO engine. Access across cores would not be a problem in case of hotplug as they would use core specific structures. CRs-Fixed: 966095 Change-Id: I831df5b93cc6ee77355f2e98af89efcffe825bd8 Signed-off-by:Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Loading
Please register or sign in to comment