Thread (53 messages) 53 messages, 13 authors, 2015-08-14

Re: [PATCH 31/31] dma-mapping-common: skip kmemleak checks for page-less SG entries

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2015-08-12 16:05:21
Also in: linux-arch, linux-media, linux-mips, linux-s390, linuxppc-dev, lkml, nvdimm, sparclinux

On Wed, Aug 12, 2015 at 12:05 AM, Christoph Hellwig [off-list ref] wrote:
+       for_each_sg(sg, s, nents, i) {
+               if (sg_has_page(s))
+                       kmemcheck_mark_initialized(sg_virt(s), s->length);
+       }
[ Again, I'm responding to one random patch - this pattern was in
other patches too.  ]

A question: do we actually expect to mix page-less and pageful SG
entries in the same SG list?

How does that happen?

(I'm not saying it can't, I'm just wondering where people expect this
to happen).

IOW, maybe it would be valid to have a rule saying "a SG list is
either all pageful or pageless, never mixed", and then have the "if"
statement outside the loop rather than inside.

                      Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help