From 345741308f680bf496ef90c77687aff1c235dfb7 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sun, 7 Sep 2003 19:12:58 -0700 Subject: [PATCH] Arnd's new-and-improved _IOx() argument checking showed two sound drivers whose microcode load ioctl's used types with sizes that overflow the ioctl number. Mark them _IOx_BAD() to document the fact. --- include/sound/hdsp.h | 3 ++- include/sound/sscape_ioctl.h | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/sound/hdsp.h b/include/sound/hdsp.h index 5f64cc2cf4e45..84d73d20cc831 100644 --- a/include/sound/hdsp.h +++ b/include/sound/hdsp.h @@ -71,7 +71,8 @@ struct _snd_hdsp_firmware { unsigned long firmware_data[24413]; }; -#define SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE _IOW('H', 0x42, hdsp_firmware_t) +/* This ioctl is marked bad because the type is bigger than the IOCTL description */ +#define SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE _IOW_BAD('H', 0x42, hdsp_firmware_t) typedef struct _snd_hdsp_version hdsp_version_t; diff --git a/include/sound/sscape_ioctl.h b/include/sound/sscape_ioctl.h index baaa75e258f90..aadc930a6ba47 100644 --- a/include/sound/sscape_ioctl.h +++ b/include/sound/sscape_ioctl.h @@ -14,6 +14,8 @@ struct sscape_microcode }; #define SND_SSCAPE_LOAD_BOOTB _IOWR('P', 100, struct sscape_bootblock) -#define SND_SSCAPE_LOAD_MCODE _IOW('P', 101, struct sscape_microcode) + +/* This ioctl is marked bad because the type is bigger than the IOCTL description */ +#define SND_SSCAPE_LOAD_MCODE _IOW_BAD('P', 101, struct sscape_microcode) #endif -- 2.53.0