All of lore.kernel.org
 help / color / mirror / Atom feed
* pointless code in probe_kernel_read
@ 2013-11-11 15:13 Mikulas Patocka
  2013-11-11 21:33 ` Helge Deller
  0 siblings, 1 reply; 2+ messages in thread
From: Mikulas Patocka @ 2013-11-11 15:13 UTC (permalink / raw)
  To: Helge Deller; +Cc: linux-parisc

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-11 21:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-11 15:13 pointless code in probe_kernel_read Mikulas Patocka
2013-11-11 21:33 ` Helge Deller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.