[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <DB9PR10MB5881A1920E49A1B03E64C5CBE0DA9@DB9PR10MB5881.EURPRD10.PROD.OUTLOOK.COM>
Date: Mon, 6 Feb 2023 10:32:06 +0000
From: "Starke, Daniel" <daniel.starke@...mens.com>
To: Greg KH <gregkh@...uxfoundation.org>
CC: "linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
"jirislaby@...nel.org" <jirislaby@...nel.org>,
"ilpo.jarvinen@...ux.intel.com" <ilpo.jarvinen@...ux.intel.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v3 2/4] tty: n_gsm: add keep alive support
> > +static int gsm_config_ext(struct gsm_mux *gsm, struct gsm_config_ext *ce)
> > +{
> > + unsigned int i;
> > +
> > + gsm->keep_alive = ce->keep_alive;
> > + /*
> > + * Check that userspace doesn't put stuff in here to prevent breakages
> > + * in the future.
> > + */
> > + for (i = 0; i < ARRAY_SIZE(ce->reserved); i++)
> > + if (ce->reserved[i])
> > + return -EINVAL;
>
> Do the check before you save off the keep_alive variable?
Thank you for this hint!
I will change this and send a new version of this patch series.
Best regards,
Daniel Starke
Powered by blists - more mailing lists