[lkml]   [2010]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH v2 4/4] splice: fix updating sd->pos wrongly
    On Sat, May 29, 2010 at 10:09 PM, Jamie Lokier <> wrote:
    > Not true if the "file" is /dev/mem or /dev/kmem.  The starting offset
    > can be negative, so can end at zero.
    > It's an obscure case and I don't know if you can sendfile from
    > /dev/{,k}mem anyway :-) but illustrates why sd->pos != 0 is dubious.

    So the safe way is checking if splice_read() updates pos or not, isn't it?

    if (sd->pos != prev_pos)
    sd->pos = prev_pos + ret;

    Changli Gao(
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2010-05-29 16:25    [W:0.020 / U:2.204 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site