From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gu Zheng Subject: Re: [PATCH] aio: clean up aio ring in the fail path Date: Thu, 05 Dec 2013 09:22:59 +0800 Message-ID: <529FD573.3090006@cn.fujitsu.com> References: <529F019A.2040401@cn.fujitsu.com> <20131204145416.GA22438@redhat.com> <529FD388.7030907@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable To: Dave Jones , Benjamin , linux-aio@kvack.org, fsdevel , linux-kernel , Al Viro , Kent , Kristian Nielsen , guz.fnst@cn.fujitsu.com Return-path: In-Reply-To: <529FD388.7030907@cn.fujitsu.com> Sender: owner-linux-aio@kvack.org List-Id: linux-fsdevel.vger.kernel.org On 12/05/2013 09:14 AM, Gu Zheng wrote: > Hi Dave, >=20 > On 12/04/2013 10:54 PM, Dave Jones wrote: >=20 >> On Wed, Dec 04, 2013 at 06:19:06PM +0800, Gu Zheng wrote: >> > Clean up the aio ring file in the fail path of aio=5Fsetup=5Fring >> > and ioctx=5Falloc. And maybe it can fix the GPF issue reported by >> > Dave Jones: >> > https://lkml.org/lkml/2013/11/25/898 >> >=20 >> >=20 >> > Signed-off-by: Gu Zheng >> > --- >> > fs/aio.c | 8 ++++++-- >> > 1 files changed, 6 insertions(+), 2 deletions(-) >> >=20 >> > diff --git a/fs/aio.c b/fs/aio.c >> > index 08159ed..6efb7f6 100644 >> > --- a/fs/aio.c >> > +++ b/fs/aio.c >> > @@ -367,8 +367,10 @@ static int aio=5Fsetup=5Fring(struct kioctx *ctx) >> > if (nr=5Fpages > AIO=5FRING=5FPAGES) { >> > ctx->ring=5Fpages =3D kcalloc(nr=5Fpages, sizeof(struct page *), >> > GFP=5FKERNEL); >> > - if (!ctx->ring=5Fpages) >> > + if (!ctx->ring=5Fpages) { >> > + put=5Faio=5Fring=5Ffile(ctx); >> > return -ENOMEM; >> > + } >> > } >> > =20 >> >> CC fs/aio.o >> fs/aio.c: In function =E2=80=98aio=5Fsetup=5Fring=E2=80=99: >> fs/aio.c:363:4: error: implicit declaration of function =E2=80=98put=5Fa= io=5Fring=5Ffile=E2=80=99 [-Werror=3Dimplicit-function-declaration] >> put=5Faio=5Fring=5Ffile(ctx); >> >> >> Is this dependant on another patch ? >=20 > It's applied on 3.12-rc2. Please ignore the previous defective patch I se= nt Sorry, s/3.12-rc2/3.13-rc2/ > before, and try again. >=20 > Regards, > Gu >=20 >> >> Dave >> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-kernel" = in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html >> Please read the FAQ at http://www.tux.org/lkml/ >> >=20 >=20 = -- To unsubscribe, send a message with 'unsubscribe linux-aio' in the body to majordomo@kvack.org. For more info on Linux AIO, see: http://www.kvack.org/aio/ Don't email: aart@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933249Ab3LEB3v (ORCPT ); Wed, 4 Dec 2013 20:29:51 -0500 Received: from cn.fujitsu.com ([222.73.24.84]:1821 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S932390Ab3LEB3s convert rfc822-to-8bit (ORCPT ); Wed, 4 Dec 2013 20:29:48 -0500 X-IronPort-AV: E=Sophos;i="4.93,829,1378828800"; d="scan'208";a="9193842" Message-ID: <529FD573.3090006@cn.fujitsu.com> Date: Thu, 05 Dec 2013 09:22:59 +0800 From: Gu Zheng User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1 MIME-Version: 1.0 To: Dave Jones , Benjamin , linux-aio@kvack.org, fsdevel , linux-kernel , Al Viro , Kent , Kristian Nielsen , guz.fnst@cn.fujitsu.com Subject: Re: [PATCH] aio: clean up aio ring in the fail path References: <529F019A.2040401@cn.fujitsu.com> <20131204145416.GA22438@redhat.com> <529FD388.7030907@cn.fujitsu.com> In-Reply-To: <529FD388.7030907@cn.fujitsu.com> X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/12/05 09:29:37, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/12/05 09:29:38 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/05/2013 09:14 AM, Gu Zheng wrote: > Hi Dave, > > On 12/04/2013 10:54 PM, Dave Jones wrote: > >> On Wed, Dec 04, 2013 at 06:19:06PM +0800, Gu Zheng wrote: >> > Clean up the aio ring file in the fail path of aio_setup_ring >> > and ioctx_alloc. And maybe it can fix the GPF issue reported by >> > Dave Jones: >> > https://lkml.org/lkml/2013/11/25/898 >> > >> > >> > Signed-off-by: Gu Zheng >> > --- >> > fs/aio.c | 8 ++++++-- >> > 1 files changed, 6 insertions(+), 2 deletions(-) >> > >> > diff --git a/fs/aio.c b/fs/aio.c >> > index 08159ed..6efb7f6 100644 >> > --- a/fs/aio.c >> > +++ b/fs/aio.c >> > @@ -367,8 +367,10 @@ static int aio_setup_ring(struct kioctx *ctx) >> > if (nr_pages > AIO_RING_PAGES) { >> > ctx->ring_pages = kcalloc(nr_pages, sizeof(struct page *), >> > GFP_KERNEL); >> > - if (!ctx->ring_pages) >> > + if (!ctx->ring_pages) { >> > + put_aio_ring_file(ctx); >> > return -ENOMEM; >> > + } >> > } >> > >> >> CC fs/aio.o >> fs/aio.c: In function ‘aio_setup_ring’: >> fs/aio.c:363:4: error: implicit declaration of function ‘put_aio_ring_file’ [-Werror=implicit-function-declaration] >> put_aio_ring_file(ctx); >> >> >> Is this dependant on another patch ? > > It's applied on 3.12-rc2. Please ignore the previous defective patch I sent Sorry, s/3.12-rc2/3.13-rc2/ > before, and try again. > > Regards, > Gu > >> >> Dave >> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html >> Please read the FAQ at http://www.tux.org/lkml/ >> > >