Skip to content

Commit be61af3

Browse files
committed
Merge tag 'staging-5.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging driver fixes from Greg KH: "Here are some small staging driver fixes for reported problems. They include: - wfx header file cleanup patch reverted as it could cause problems - comedi driver endian fixes - buffer overflow problems for staging wifi drivers - build dependency issue for rtl8192e driver All have been in linux-next for a while with no reported problems" * tag 'staging-5.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (23 commits) Revert "staging: wfx: remove unused included header files" staging: rtl8188eu: prevent ->ssid overflow in rtw_wx_set_scan() staging: rtl8188eu: fix potential memory corruption in rtw_check_beacon_data() staging: rtl8192u: fix ->ssid overflow in r8192_wx_set_scan() staging: comedi: pcl726: Use 16-bit 0 for interrupt data staging: comedi: ni_65xx: Use 16-bit 0 for interrupt data staging: comedi: ni_6527: Use 16-bit 0 for interrupt data staging: comedi: comedi_parport: Use 16-bit 0 for interrupt data staging: comedi: amplc_pc236_common: Use 16-bit 0 for interrupt data staging: comedi: pcl818: Fix endian problem for AI command data staging: comedi: pcl711: Fix endian problem for AI command data staging: comedi: me4000: Fix endian problem for AI command data staging: comedi: dmm32at: Fix endian problem for AI command data staging: comedi: das800: Fix endian problem for AI command data staging: comedi: das6402: Fix endian problem for AI command data staging: comedi: adv_pci1710: Fix endian problem for AI command data staging: comedi: addi_apci_1500: Fix endian problem for command sample staging: comedi: addi_apci_1032: Fix endian problem for COS sample staging: ks7010: prevent buffer overflow in ks_wlan_set_scan() staging: rtl8712: Fix possible buffer overflow in r8712_sitesurvey_cmd ...
2 parents cc14086 + 16d7586 commit be61af3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+169
-38
lines changed

drivers/staging/comedi/drivers/addi_apci_1032.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ static irqreturn_t apci1032_interrupt(int irq, void *d)
260260
struct apci1032_private *devpriv = dev->private;
261261
struct comedi_subdevice *s = dev->read_subdev;
262262
unsigned int ctrl;
263+
unsigned short val;
263264

264265
/* check interrupt is from this device */
265266
if ((inl(devpriv->amcc_iobase + AMCC_OP_REG_INTCSR) &
@@ -275,7 +276,8 @@ static irqreturn_t apci1032_interrupt(int irq, void *d)
275276
outl(ctrl & ~APCI1032_CTRL_INT_ENA, dev->iobase + APCI1032_CTRL_REG);
276277

277278
s->state = inl(dev->iobase + APCI1032_STATUS_REG) & 0xffff;
278-
comedi_buf_write_samples(s, &s->state, 1);
279+
val = s->state;
280+
comedi_buf_write_samples(s, &val, 1);
279281
comedi_handle_events(dev, s);
280282

281283
/* enable the interrupt */

drivers/staging/comedi/drivers/addi_apci_1500.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ static irqreturn_t apci1500_interrupt(int irq, void *d)
208208
struct comedi_device *dev = d;
209209
struct apci1500_private *devpriv = dev->private;
210210
struct comedi_subdevice *s = dev->read_subdev;
211-
unsigned int status = 0;
211+
unsigned short status = 0;
212212
unsigned int val;
213213

214214
val = inl(devpriv->amcc + AMCC_OP_REG_INTCSR);
@@ -238,14 +238,14 @@ static irqreturn_t apci1500_interrupt(int irq, void *d)
238238
*
239239
* Mask Meaning
240240
* ---------- ------------------------------------------
241-
* 0x00000001 Event 1 has occurred
242-
* 0x00000010 Event 2 has occurred
243-
* 0x00000100 Counter/timer 1 has run down (not implemented)
244-
* 0x00001000 Counter/timer 2 has run down (not implemented)
245-
* 0x00010000 Counter 3 has run down (not implemented)
246-
* 0x00100000 Watchdog has run down (not implemented)
247-
* 0x01000000 Voltage error
248-
* 0x10000000 Short-circuit error
241+
* 0b00000001 Event 1 has occurred
242+
* 0b00000010 Event 2 has occurred
243+
* 0b00000100 Counter/timer 1 has run down (not implemented)
244+
* 0b00001000 Counter/timer 2 has run down (not implemented)
245+
* 0b00010000 Counter 3 has run down (not implemented)
246+
* 0b00100000 Watchdog has run down (not implemented)
247+
* 0b01000000 Voltage error
248+
* 0b10000000 Short-circuit error
249249
*/
250250
comedi_buf_write_samples(s, &status, 1);
251251
comedi_handle_events(dev, s);

drivers/staging/comedi/drivers/adv_pci1710.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -300,11 +300,11 @@ static int pci1710_ai_eoc(struct comedi_device *dev,
300300
static int pci1710_ai_read_sample(struct comedi_device *dev,
301301
struct comedi_subdevice *s,
302302
unsigned int cur_chan,
303-
unsigned int *val)
303+
unsigned short *val)
304304
{
305305
const struct boardtype *board = dev->board_ptr;
306306
struct pci1710_private *devpriv = dev->private;
307-
unsigned int sample;
307+
unsigned short sample;
308308
unsigned int chan;
309309

310310
sample = inw(dev->iobase + PCI171X_AD_DATA_REG);
@@ -345,7 +345,7 @@ static int pci1710_ai_insn_read(struct comedi_device *dev,
345345
pci1710_ai_setup_chanlist(dev, s, &insn->chanspec, 1, 1);
346346

347347
for (i = 0; i < insn->n; i++) {
348-
unsigned int val;
348+
unsigned short val;
349349

350350
/* start conversion */
351351
outw(0, dev->iobase + PCI171X_SOFTTRG_REG);
@@ -395,7 +395,7 @@ static void pci1710_handle_every_sample(struct comedi_device *dev,
395395
{
396396
struct comedi_cmd *cmd = &s->async->cmd;
397397
unsigned int status;
398-
unsigned int val;
398+
unsigned short val;
399399
int ret;
400400

401401
status = inw(dev->iobase + PCI171X_STATUS_REG);
@@ -455,7 +455,7 @@ static void pci1710_handle_fifo(struct comedi_device *dev,
455455
}
456456

457457
for (i = 0; i < devpriv->max_samples; i++) {
458-
unsigned int val;
458+
unsigned short val;
459459
int ret;
460460

461461
ret = pci1710_ai_read_sample(dev, s, s->async->cur_chan, &val);

drivers/staging/comedi/drivers/amplc_pc236_common.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ static irqreturn_t pc236_interrupt(int irq, void *d)
126126

127127
handled = pc236_intr_check(dev);
128128
if (dev->attached && handled) {
129-
comedi_buf_write_samples(s, &s->state, 1);
129+
unsigned short val = 0;
130+
131+
comedi_buf_write_samples(s, &val, 1);
130132
comedi_handle_events(dev, s);
131133
}
132134
return IRQ_RETVAL(handled);

drivers/staging/comedi/drivers/comedi_parport.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,13 @@ static irqreturn_t parport_interrupt(int irq, void *d)
210210
struct comedi_device *dev = d;
211211
struct comedi_subdevice *s = dev->read_subdev;
212212
unsigned int ctrl;
213+
unsigned short val = 0;
213214

214215
ctrl = inb(dev->iobase + PARPORT_CTRL_REG);
215216
if (!(ctrl & PARPORT_CTRL_IRQ_ENA))
216217
return IRQ_NONE;
217218

218-
comedi_buf_write_samples(s, &s->state, 1);
219+
comedi_buf_write_samples(s, &val, 1);
219220
comedi_handle_events(dev, s);
220221

221222
return IRQ_HANDLED;

drivers/staging/comedi/drivers/das6402.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ static irqreturn_t das6402_interrupt(int irq, void *d)
186186
if (status & DAS6402_STATUS_FFULL) {
187187
async->events |= COMEDI_CB_OVERFLOW;
188188
} else if (status & DAS6402_STATUS_FFNE) {
189-
unsigned int val;
189+
unsigned short val;
190190

191191
val = das6402_ai_read_sample(dev, s);
192192
comedi_buf_write_samples(s, &val, 1);

drivers/staging/comedi/drivers/das800.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ static irqreturn_t das800_interrupt(int irq, void *d)
427427
struct comedi_cmd *cmd;
428428
unsigned long irq_flags;
429429
unsigned int status;
430-
unsigned int val;
430+
unsigned short val;
431431
bool fifo_empty;
432432
bool fifo_overflow;
433433
int i;

drivers/staging/comedi/drivers/dmm32at.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ static irqreturn_t dmm32at_isr(int irq, void *d)
404404
{
405405
struct comedi_device *dev = d;
406406
unsigned char intstat;
407-
unsigned int val;
407+
unsigned short val;
408408
int i;
409409

410410
if (!dev->attached) {

drivers/staging/comedi/drivers/me4000.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ static irqreturn_t me4000_ai_isr(int irq, void *dev_id)
924924
struct comedi_subdevice *s = dev->read_subdev;
925925
int i;
926926
int c = 0;
927-
unsigned int lval;
927+
unsigned short lval;
928928

929929
if (!dev->attached)
930930
return IRQ_NONE;

drivers/staging/comedi/drivers/ni_6527.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,9 @@ static irqreturn_t ni6527_interrupt(int irq, void *d)
195195
return IRQ_NONE;
196196

197197
if (status & NI6527_STATUS_EDGE) {
198-
comedi_buf_write_samples(s, &s->state, 1);
198+
unsigned short val = 0;
199+
200+
comedi_buf_write_samples(s, &val, 1);
199201
comedi_handle_events(dev, s);
200202
}
201203

0 commit comments

Comments
 (0)