Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 39703
b: refs/heads/master
c: 5206a79
h: refs/heads/master
i:
  39701: 10edad0
  39699: a03471b
  39695: 219f455
v: v3
  • Loading branch information
Linus Torvalds committed Oct 16, 2006
1 parent 621fea3 commit f5288a8
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3f5306927d800306ebba542438cfdf1a1c418376
refs/heads/master: 5206a79d7b217c139116fc6faef55d1c0e65c800
4 changes: 2 additions & 2 deletions trunk/drivers/char/rio/rioctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su
p->RIOError.Error = COPYIN_FAILED;
return -EFAULT;
}
if (portStats.port >= RIO_PORTS) {
if (portStats.port < 0 || portStats.port >= RIO_PORTS) {
p->RIOError.Error = PORT_NUMBER_OUT_OF_RANGE;
return -ENXIO;
}
Expand Down Expand Up @@ -702,7 +702,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su
p->RIOError.Error = COPYIN_FAILED;
return -EFAULT;
}
if (portStats.port >= RIO_PORTS) {
if (portStats.port < 0 || portStats.port >= RIO_PORTS) {
p->RIOError.Error = PORT_NUMBER_OUT_OF_RANGE;
return -ENXIO;
}
Expand Down
13 changes: 9 additions & 4 deletions trunk/drivers/ide/ide-taskfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,8 +524,8 @@ int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
task_ioreg_t *hobsptr = args.hobRegister;
int err = 0;
int tasksize = sizeof(struct ide_task_request_s);
int taskin = 0;
int taskout = 0;
unsigned int taskin = 0;
unsigned int taskout = 0;
u8 io_32bit = drive->io_32bit;
char __user *buf = (char __user *)arg;

Expand All @@ -538,8 +538,13 @@ int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
return -EFAULT;
}

taskout = (int) req_task->out_size;
taskin = (int) req_task->in_size;
taskout = req_task->out_size;
taskin = req_task->in_size;

if (taskin > 65536 || taskout > 65536) {
err = -EINVAL;
goto abort;
}

if (taskout) {
int outtotal = tasksize;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/megaraid/megaraid_mbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ megaraid_init_mbox(adapter_t *adapter)

if (((magic64 == HBA_SIGNATURE_64_BIT) &&
((adapter->pdev->subsystem_device !=
PCI_SUBSYS_ID_MEGARAID_SATA_150_6) ||
PCI_SUBSYS_ID_MEGARAID_SATA_150_6) &&
(adapter->pdev->subsystem_device !=
PCI_SUBSYS_ID_MEGARAID_SATA_150_4))) ||
(adapter->pdev->vendor == PCI_VENDOR_ID_LSI_LOGIC &&
Expand Down
27 changes: 14 additions & 13 deletions trunk/include/asm-frv/highmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ extern struct page *kmap_atomic_to_page(void *ptr);
dampr = paddr | xAMPRx_L | xAMPRx_M | xAMPRx_S | xAMPRx_SS_16Kb | xAMPRx_V; \
\
if (type != __KM_CACHE) \
asm volatile("movgs %0,dampr"#ampr :: "r"(dampr)); \
asm volatile("movgs %0,dampr"#ampr :: "r"(dampr) : "memory"); \
else \
asm volatile("movgs %0,iampr"#ampr"\n" \
"movgs %0,dampr"#ampr"\n" \
:: "r"(dampr) \
:: "r"(dampr) : "memory" \
); \
\
asm("movsg damlr"#ampr",%0" : "=r"(damlr)); \
Expand All @@ -104,7 +104,7 @@ extern struct page *kmap_atomic_to_page(void *ptr);
asm volatile("movgs %0,tplr \n" \
"movgs %1,tppr \n" \
"tlbpr %0,gr0,#2,#1" \
: : "r"(damlr), "r"(dampr)); \
: : "r"(damlr), "r"(dampr) : "memory"); \
\
/*printk("TLB: SECN sl=%d L=%08lx P=%08lx\n", slot, damlr, dampr);*/ \
\
Expand All @@ -115,7 +115,7 @@ static inline void *kmap_atomic(struct page *page, enum km_type type)
{
unsigned long paddr;

preempt_disable();
inc_preempt_count();
paddr = page_to_phys(page);

switch (type) {
Expand All @@ -138,16 +138,16 @@ static inline void *kmap_atomic(struct page *page, enum km_type type)
}
}

#define __kunmap_atomic_primary(type, ampr) \
do { \
asm volatile("movgs gr0,dampr"#ampr"\n"); \
if (type == __KM_CACHE) \
asm volatile("movgs gr0,iampr"#ampr"\n"); \
#define __kunmap_atomic_primary(type, ampr) \
do { \
asm volatile("movgs gr0,dampr"#ampr"\n" ::: "memory"); \
if (type == __KM_CACHE) \
asm volatile("movgs gr0,iampr"#ampr"\n" ::: "memory"); \
} while(0)

#define __kunmap_atomic_secondary(slot, vaddr) \
do { \
asm volatile("tlbpr %0,gr0,#4,#1" : : "r"(vaddr)); \
#define __kunmap_atomic_secondary(slot, vaddr) \
do { \
asm volatile("tlbpr %0,gr0,#4,#1" : : "r"(vaddr) : "memory"); \
} while(0)

static inline void kunmap_atomic(void *kvaddr, enum km_type type)
Expand All @@ -170,7 +170,8 @@ static inline void kunmap_atomic(void *kvaddr, enum km_type type)
default:
BUG();
}
preempt_enable();
dec_preempt_count();
preempt_check_resched();
}

#endif /* !__ASSEMBLY__ */
Expand Down

0 comments on commit f5288a8

Please sign in to comment.