Messages in this thread | | | From | "Liu, Chuansheng" <> | Subject | RE: [PATCH] [extcon]:remove freed groups caused the panic or warning in unregister flow | Date | Mon, 4 Nov 2013 01:06:01 +0000 |
| |
> -----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>
| |