pointless code in probe_kernel_read

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

 



Hi Helge

I noted that you created this function in commit 
db080f9c530f78dad661257885a1893506077068

long probe_kernel_read(void *dst, const void *src, size_t size)
{
        unsigned long addr = (unsigned long)src;

        if (size < 0 || addr < PAGE_SIZE)
                return -EFAULT;

        /* check for I/O space F_EXTEND(0xfff00000) access as well? */

        return __probe_kernel_read(dst, src, size);
}

size_t is unsigned, so comparison size < 0 doesn't make sense. What 
exactly did you mean by this test?

Mikulas
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux