Re: [PATCH v3 2/4] tty: n_gsm: add keep alive support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 03, 2023 at 03:50:21PM +0100, D. Starke wrote:
> +struct gsm_config_ext {
> +	__u32 keep_alive;	/* Control channel keep-alive in 1/100th of a
> +				 * second (0 to disable)
> +				 */
> +	__u32 reserved[7];	/* For future use */

You are not checking these fields, so this means any future use of them
will not be allowed (like the problem you have which required this new
structure.)

Please, always verify that the values here are 0, and if not, error out
with -EINVAL.  That's the only way you can properly reserve this for
future use.  The kernel documentation about "how to write an ioctl"
should describe all of this, right?

thanks,

greg k-h



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux