Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1728010

Re: [PATCH 1/3] ALSA: ymfpci: Use common error handling code in snd_card_ymfpci_probe()

From Takashi Iwai <tiwai@suse.de>
Newsgroups linux.kernel
Subject Re: [PATCH 1/3] ALSA: ymfpci: Use common error handling code in snd_card_ymfpci_probe()
Date 2017-09-07 10:10 +0200
Message-ID <un02S-5LU-11@gated-at.bofh.it> (permalink)
References <umOuJ-6gq-5@gated-at.bofh.it> <umOuK-6gq-15@gated-at.bofh.it> <umQwx-7yL-5@gated-at.bofh.it> <umZJx-5lZ-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, 07 Sep 2017 09:41:39 +0200,
SF Markus Elfring wrote:
> 
> >> @@ -336,21 +331,24 @@ static int snd_card_ymfpci_probe(struct pci_dev *pci,
> >>  			legacy_ctrl &= ~YMFPCI_LEGACY_FMEN;
> >>  			pci_write_config_word(pci, PCIR_DSXG_LEGACY, legacy_ctrl);
> >>  		} else if ((err = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0) {
> >> -			snd_card_free(card);
> >                         ^^^^^^^^^^^^^^^^^^^
> >>  			dev_err(card->dev, "cannot create opl3 hwdep\n");
> >                                 ^^^^^^^^^
> >> -			return err;
> >> +			goto free_card;
> > 
> > Heh.  I was worried that some of these re-orderings would introduce bugs
> > but actually this one fixes a use after free.
> 
> Thanks for your constructive feedback.
> 
> Does it mean that a special tag should be added to a commit message?

No need for resend, I'll add some more notes at merging.


thanks,

Takashi

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/3] ALSA: ymfpci: Fine-tuning for some function  implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-06 21:50 +0200
  [PATCH 2/3] ALSA: ymfpci: Use common error handling code in  snd_ymfpci_create() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-06 21:50 +0200
    Re: [PATCH 2/3] ALSA: ymfpci: Use common error handling code in snd_ymfpci_create() Takashi Iwai <tiwai@suse.de> - 2017-09-07 10:40 +0200
  [PATCH 1/3] ALSA: ymfpci: Use common error handling code in  snd_card_ymfpci_probe() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-06 21:50 +0200
    Re: [PATCH 1/3] ALSA: ymfpci: Use common error handling code in  snd_card_ymfpci_probe() Dan Carpenter <dan.carpenter@oracle.com> - 2017-09-07 00:00 +0200
      Re: [PATCH 1/3] ALSA: ymfpci: Use common error handling code in  snd_card_ymfpci_probe() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-07 09:50 +0200
        Re: [PATCH 1/3] ALSA: ymfpci: Use common error handling code in snd_card_ymfpci_probe() Takashi Iwai <tiwai@suse.de> - 2017-09-07 10:10 +0200
    Re: [PATCH 1/3] ALSA: ymfpci: Use common error handling code in snd_card_ymfpci_probe() Takashi Iwai <tiwai@suse.de> - 2017-09-07 10:40 +0200
  [PATCH 3/3] ALSA: ymfpci: Adjust 17 checks for null pointers SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-06 22:00 +0200
    Re: [PATCH 3/3] ALSA: ymfpci: Adjust 17 checks for null pointers Takashi Iwai <tiwai@suse.de> - 2017-09-07 10:40 +0200

csiph-web