lkml.org 
[lkml]   [2013]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] [extcon]:remove freed groups caused the panic or warning in unregister flow
Date


> -----Original Message-----
> From: Wang, Xiaoming
> Sent: Saturday, November 02, 2013 6:48 AM
> To: myungjoo.ham@samsung.com; cw00.choi@samsung.com;
> linux-kernel@vger.kernel.org
> Cc: Liu, Chuansheng; Zhang, Dongxing; Wang, Xiaoming
> Subject: [PATCH] [extcon]:remove freed groups caused the panic or warning in
> unregister flow
>
> (edev->extcon_dev_type.groups) has been freed before device_unregister.
> extcon_dev_unregister -> kfree(edev->extcon_dev_type.groups)
> then device_unregister -> device_del -> device_remove_attrs
> -> device_remove_groups(dev, type->groups);
> panic because type->groups has been freed.
>
This patch fix the panic that using the freed memory.

Tested-by: Liu, Chuansheng <chuansheng.liu@intel.com>
Reviewed-by: Liu, Chuansheng <chuansheng.liu@intel.com>


\
 
 \ /
  Last update: 2013-11-04 02:21    [W:0.070 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site