Bug in vme subsystem (vme.c)

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

 



Hi,

In vme.c, function vme_master_set(), vme_check_window() is called,
where invalid restrictions are applied. In case of address space
VME_A16, vme_base + size must not exceed VME_A16_MAX, which is defined
in include/linux/vme.h to 0x10000ULL. The second test is never
evaluated.

As slave windows must not overlap, this means that there can not be
more than one window in this address space on any VME bus member,
because the only valid base address would be 0x0. The correct test
should be the maximum value of a 64-bit unsigned integer plus 1, minus
0xffff; and if checking is already done, maybe some alignment test
could help. Other than this, the call to vme_check_window() could also
be eliminated.

-- 
Christoph
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux