mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: Nicolas Pitre <nico@fluxnic.net>, Greg KH <gregkh@linuxfoundation.org>
Cc: kilobyte@angband.pl, daniel.vetter@ffwll.ch,
	Gen Zhang <blackgod016574@gmail.com>,
	mpatocka@redhat.com, textshell@uchuujin.de,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] vt: Fix a missing-check bug in con_init()
Date: Mon, 10 Jun 2019 09:10:05 +0200	[thread overview]
Message-ID: <3f1429f7-99cb-555c-bfe0-b36a8e989ae3@suse.cz> (raw)
In-Reply-To: <nycvar.YSQ.7.76.1906082010430.1558@knanqh.ubzr>

On 09. 06. 19, 2:15, Nicolas Pitre wrote:
>>>> +fail1:
>>>> +	while (currcons > 0) {
>>>> +		currcons--;
>>>> +		kfree(vc_cons[currcons].d->vc_screenbuf);
>>>> +fail2:
>>>> +		kfree(vc_cons[currcons].d);
>>>> +		vc_cons[currcons].d = NULL;
>>>> +	}
>>
>> Wait, will that even work?  You can jump into the middle of a while
>> loop?
> 
> Absolutely.

In C99, exceptions are only blocks with variable-sized declarations
(like "int a[b]").

thanks,
-- 
js
suse labs

  parent reply	other threads:[~2019-06-10  7:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-28  0:45 Gen Zhang
2019-06-08 16:01 ` Gen Zhang
2019-06-08 16:21   ` Greg KH
2019-06-08 16:27     ` Gen Zhang
2019-06-08 16:34     ` Gen Zhang
2019-06-08 16:22   ` Greg KH
2019-06-08 16:30     ` Gen Zhang
2019-06-09  0:15     ` Nicolas Pitre
2019-06-10  6:45       ` Gen Zhang
2019-06-10 14:31         ` Nicolas Pitre
2019-06-10  7:10       ` Jiri Slaby [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-05-21  2:29 [PATCH v2] vt: Fix a missing-check bug in drivers/tty/vt/vt.c Gen Zhang
2019-05-21  2:55 ` Nicolas Pitre
2019-05-21  3:09   ` Gen Zhang
2019-05-21  3:26     ` Nicolas Pitre
2019-05-21  4:00       ` Gen Zhang
2019-05-21  4:30         ` Nicolas Pitre
2019-05-21  7:39           ` Gen Zhang
2019-05-22  2:43             ` Nicolas Pitre
2019-05-22 12:19               ` [PATCH v3] " Gen Zhang
2019-05-22 14:18                 ` Nicolas Pitre
2019-05-24  2:27                   ` [PATCH v3] vt: Fix a missing-check bug in con_init() Gen Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3f1429f7-99cb-555c-bfe0-b36a8e989ae3@suse.cz \
    --to=jslaby@suse.cz \
    --cc=blackgod016574@gmail.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=gregkh@linuxfoundation.org \
    --cc=kilobyte@angband.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    --cc=nico@fluxnic.net \
    --cc=textshell@uchuujin.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®