From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Mon, 01 Feb 2016 20:42:53 +0000 Subject: Re: [PATCH] [dm]fix NULL pointer in dm_exception_store_create() when create dm device Message-Id: <20160201204253.GD18440@kroah.com> List-Id: References: <1454310358-755-1-git-send-email-dingxiang@huawei.com> In-Reply-To: <1454310358-755-1-git-send-email-dingxiang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: DingXiang Cc: snitzer@redhat.com, stable@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org On Mon, Feb 01, 2016 at 03:05:58PM +0800, DingXiang wrote: > In some conditions(such as umount fs failed),origin path or origin bdev or both of the two is same > as cow's.If this happens, origin dev will be freed when get cow dev in function "dm_get_device" , > then "s->origin->dev" which used by "dm_exception_store_create" will be a NULL pointer. > > Signed-off-by:Ding Xiang > --- > drivers/md/dm-snap.c | 10 ++++++++++ > 1 files changed, 10 insertions(+), 0 deletions(-) This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read Documentation/stable_kernel_rules.txt for how to do this properly. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932455AbcBAUm6 (ORCPT ); Mon, 1 Feb 2016 15:42:58 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:58199 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932096AbcBAUmz (ORCPT ); Mon, 1 Feb 2016 15:42:55 -0500 X-Sasl-enc: +8fXLQEXJ79I/4c9tiKNqF9vpOVBuB0yqLKhALr+r2Ah 1454359374 Date: Mon, 1 Feb 2016 12:42:53 -0800 From: Greg KH To: DingXiang Cc: snitzer@redhat.com, stable@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] [dm]fix NULL pointer in dm_exception_store_create() when create dm device Message-ID: <20160201204253.GD18440@kroah.com> References: <1454310358-755-1-git-send-email-dingxiang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1454310358-755-1-git-send-email-dingxiang@huawei.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 01, 2016 at 03:05:58PM +0800, DingXiang wrote: > In some conditions(such as umount fs failed),origin path or origin bdev or both of the two is same > as cow's.If this happens, origin dev will be freed when get cow dev in function "dm_get_device" , > then "s->origin->dev" which used by "dm_exception_store_create" will be a NULL pointer. > > Signed-off-by:Ding Xiang > --- > drivers/md/dm-snap.c | 10 ++++++++++ > 1 files changed, 10 insertions(+), 0 deletions(-) This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read Documentation/stable_kernel_rules.txt for how to do this properly.