On Thu, Jan 24, 2019 at 05:23:59PM +0800, Herbert Xu wrote:
> On Thu, Jan 24, 2019 at 09:50:35AM +0100, Ard Biesheuvel wrote:
> >
> > Thanks for yet another round of cleanup
> > 
> > I'll look into these, but I'd like to clarify one thing first.
> > 
> > IIUC, you are trying to deal with the case where a single scatterlist
> > element describes a range that strides two pages, and I wonder if that
> > is a valid use of scatterlists in the first place.
> > 
> > Herbert?
> 
> Yes it is valid.  IIRC the network stack may generate such a
> scatterlist.
> 

Also it can easily happen with kmalloced buffers, e.g.

        buf = kmalloc(10000, GFP_KERNEL);

        [...]

        sg_init_one(&sg, buf, 10000);

- Eric

Reply via email to