• Soeren Moch's avatar
    media: dmxdev: remove dvb_ringbuffer_flush() on writer side · 61eeaa1b
    Soeren Moch authored
    commit 414abbd2cd4c2618895f02ed3a76ec6647281436 upstream.
    
    In dvb_ringbuffer lock-less synchronizationof reader and writer threads is done
    with separateread and write pointers. Sincedvb_ringbuffer_flush() modifies the
    read pointer, this function must not be called from the writer thread.
    This patch removes the dvb_ringbuffer_flush() calls in the dmxdev ringbuffer
    write functions, this fixes Oopses "Unable to handle kernel paging request"
    I could observe for the call chaindvb_demux_read ->dvb_dmxdev_buffer_read ->
    dvb_ringbuffer_read_user -> __copy_to_user (the reader side of the ringbuffer).
    The flush calls at the write side are not necessary anyway since ringbuffer_flush
    is also called in dvb_dmxdev_buffer_read() when an error condition is set in the
    ringbuffer.
    This patch should also be applied to stable kernels.
    Signed-off-by: default avatarSoeren Moch <smoch@web.de>
    Reviewed-by: default avatarSakari Ailus <sakari.ailus@iki.fi>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    61eeaa1b
Name
Last commit
Last update
..
Kconfig Loading commit data...
Makefile Loading commit data...
demux.h Loading commit data...
dmxdev.c Loading commit data...
dmxdev.h Loading commit data...
dvb-usb-ids.h Loading commit data...
dvb_ca_en50221.c Loading commit data...
dvb_ca_en50221.h Loading commit data...
dvb_demux.c Loading commit data...
dvb_demux.h Loading commit data...
dvb_filter.c Loading commit data...
dvb_filter.h Loading commit data...
dvb_frontend.c Loading commit data...
dvb_frontend.h Loading commit data...
dvb_math.c Loading commit data...
dvb_math.h Loading commit data...
dvb_net.c Loading commit data...
dvb_net.h Loading commit data...
dvb_ringbuffer.c Loading commit data...
dvb_ringbuffer.h Loading commit data...
dvbdev.c Loading commit data...
dvbdev.h Loading commit data...