From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 3 Jun 2019 16:22:19 +0200 From: Halil Pasic Subject: Re: [PATCH v3 2/8] s390/cio: introduce DMA pools to cio In-Reply-To: <20190603160428.2112077a.pasic@linux.ibm.com> References: <20190529122657.166148-1-mimu@linux.ibm.com> <20190529122657.166148-3-mimu@linux.ibm.com> <20190603133745.240c00a7.cohuck@redhat.com> <035b4bd3-5856-e8e5-91bf-ba0b5c7c3736@linux.ibm.com> <20190603160428.2112077a.pasic@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: <20190603162219.31de2df9.pasic@linux.ibm.com> Sender: kvm-owner@vger.kernel.org List-Archive: List-Post: To: Michael Mueller Cc: Cornelia Huck , KVM Mailing List , Linux-S390 Mailing List , Sebastian Ott , Heiko Carstens , virtualization@lists.linux-foundation.org, "Michael S . Tsirkin" , Christoph Hellwig , Thomas Huth , Christian Borntraeger , Viktor Mihajlovski , Vasily Gorbik , Janosch Frank , Claudio Imbrenda , Farhan Ali , Eric Farman , Pierre Morel List-ID: On Mon, 3 Jun 2019 16:04:28 +0200 Halil Pasic wrote: > On Mon, 3 Jun 2019 14:09:02 +0200 > Michael Mueller wrote: > > > >> @@ -1059,16 +1168,19 @@ static int __init css_bus_init(void) > > >> if (ret) > > >> goto out_unregister; > > >> ret = register_pm_notifier(&css_power_notifier); > > >> - if (ret) { > > >> - unregister_reboot_notifier(&css_reboot_notifier); > > >> - goto out_unregister; > > >> - } > > >> + if (ret) > > >> + goto out_unregister_rn; > > >> + ret = cio_dma_pool_init(); > > >> + if (ret) > > >> + goto out_unregister_rn; > > > > > > Don't you also need to unregister the pm notifier on failure here? > > > > Mmh, that was the original intention. Thanks! > > I suppose we could also move cio_dma_pool_init() right before the > register_reboot_notifier() call and goto out_unregister on error. > Forget it, then we have to rollback the pool creation if the register stuff fails... Sorry for the noise. Regards, Halil From mboxrd@z Thu Jan 1 00:00:00 1970 From: Halil Pasic Subject: Re: [PATCH v3 2/8] s390/cio: introduce DMA pools to cio Date: Mon, 3 Jun 2019 16:22:19 +0200 Message-ID: <20190603162219.31de2df9.pasic@linux.ibm.com> References: <20190529122657.166148-1-mimu@linux.ibm.com> <20190529122657.166148-3-mimu@linux.ibm.com> <20190603133745.240c00a7.cohuck@redhat.com> <035b4bd3-5856-e8e5-91bf-ba0b5c7c3736@linux.ibm.com> <20190603160428.2112077a.pasic@linux.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20190603160428.2112077a.pasic@linux.ibm.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: Michael Mueller Cc: Vasily Gorbik , Linux-S390 Mailing List , Thomas Huth , Claudio Imbrenda , KVM Mailing List , Sebastian Ott , "Michael S . Tsirkin" , Pierre Morel , Cornelia Huck , Heiko Carstens , Eric Farman , virtualization@lists.linux-foundation.org, Christoph Hellwig , Christian Borntraeger , Farhan Ali , Viktor Mihajlovski , Janosch Frank List-Id: virtualization@lists.linuxfoundation.org On Mon, 3 Jun 2019 16:04:28 +0200 Halil Pasic wrote: > On Mon, 3 Jun 2019 14:09:02 +0200 > Michael Mueller wrote: > > > >> @@ -1059,16 +1168,19 @@ static int __init css_bus_init(void) > > >> if (ret) > > >> goto out_unregister; > > >> ret = register_pm_notifier(&css_power_notifier); > > >> - if (ret) { > > >> - unregister_reboot_notifier(&css_reboot_notifier); > > >> - goto out_unregister; > > >> - } > > >> + if (ret) > > >> + goto out_unregister_rn; > > >> + ret = cio_dma_pool_init(); > > >> + if (ret) > > >> + goto out_unregister_rn; > > > > > > Don't you also need to unregister the pm notifier on failure here? > > > > Mmh, that was the original intention. Thanks! > > I suppose we could also move cio_dma_pool_init() right before the > register_reboot_notifier() call and goto out_unregister on error. > Forget it, then we have to rollback the pool creation if the register stuff fails... Sorry for the noise. Regards, Halil