Re: [PATCH repost] Fix panic in virtnet_remove

From: David Miller
Date: Fri Jul 22 2011 - 00:30:12 EST


From: "Michael S. Tsirkin" <mst@xxxxxxxxxx>
Date: Wed, 20 Jul 2011 17:31:15 +0300

> On Wed, Jul 20, 2011 at 07:26:02PM +0530, Krishna Kumar wrote:
>> Fix a panic in virtnet_remove. unregister_netdev has already
>> freed up the netdev (and virtnet_info) due to dev->destructor
>> being set, while virtnet_info is still required. Remove
>> virtnet_free altogether, and move the freeing of the per-cpu
>> statistics from virtnet_free to virtnet_remove.
>>
>> Tested patch below.
>>
>> Signed-off-by: Krishna Kumar <krkumar2@xxxxxxxxxx>
>
> Also note that the crash was apparently introduced by
> 3fa2a1df909482cc234524906e4bd30dee3514df in net-next,
> so this is a net-next only patch.
>
> Stephen, was there any special reason to free the memory
> in the destructor like you did?
>
> Acked-by: Michael S. Tsirkin <mst@xxxxxxxxxx>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/