net: qualcomm: rmnet: Fix use after free while sending command ack
authorSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Tue, 5 Jun 2018 01:43:38 +0000 (19:43 -0600)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Jun 2018 14:17:05 +0000 (10:17 -0400)
commit3602207ca6582dd359308b7bd2ce08348cc0854e
tree08e0f5eec871e222f37de34825113408049d27d8
parent9deb441c113ae9e761e42f78d90736d762ff49a3
net: qualcomm: rmnet: Fix use after free while sending command ack

When sending an ack to a command packet, the skb is still referenced
after it is sent to the real device. Since the real device could
free the skb, the device pointer would be invalid.
Also, remove an unnecessary variable.

Fixes: ceed73a2cf4a ("drivers: net: ethernet: qualcomm: rmnet: Initial implementation")
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qualcomm/rmnet/rmnet_map_command.c