mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@kernel.org>
To: "Starke, Daniel" <daniel.starke@siemens.com>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 4/4] tty: n_gsm: fix missing corner cases in gsmld_poll()
Date: Thu, 7 Jul 2022 09:34:11 +0200	[thread overview]
Message-ID: <17759c4b-5858-12bb-4beb-c4a1d58c89ae@kernel.org> (raw)
In-Reply-To: <DB9PR10MB5881A05367C31A390EC3A042E0839@DB9PR10MB5881.EURPRD10.PROD.OUTLOOK.COM>

On 07. 07. 22, 9:00, Starke, Daniel wrote:
>>> @@ -3051,14 +3051,20 @@ static __poll_t gsmld_poll(struct tty_struct *tty, struct file *file,
>>>    	__poll_t mask = 0;
>>>    	struct gsm_mux *gsm = tty->disc_data;
>>>    
>>> +	if (!gsm)
>>> +		return EPOLLHUP;
>>
>> Hmm, how can this happen? It's a tty bug if it calls ld ops after NULLing
>> disc_data.
> 
> I can remove this check if it is redundant. Should I?

Sure as it makes little sense anyway. Even if gsm was non-NULL here, the 
backing disc_data would be freed on the accesses further.

thanks,
-- 
js
suse labs

  reply	other threads:[~2022-07-07  7:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-07  7:00 Starke, Daniel
2022-07-07  7:34 ` Jiri Slaby [this message]
     [not found] <20220706054452.3663-1-daniel.starke@siemens.com>
     [not found] ` <20220706054452.3663-4-daniel.starke@siemens.com>
2022-07-07  6:48   ` Jiri Slaby

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=17759c4b-5858-12bb-4beb-c4a1d58c89ae@kernel.org \
    --to=jirislaby@kernel.org \
    --cc=daniel.starke@siemens.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /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®