diff options
author | YongSu Yoo <[email protected]> | 2022-06-23 11:35:43 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <[email protected]> | 2022-11-25 10:05:25 +0000 |
commit | bbffe6f6b933198260db6e2dcd78f7de3e6b5aa6 (patch) | |
tree | 0b8a96790dc5d517522fc9a66c4dc04a5c2708ce /net/lapb/lapb_timer.c | |
parent | 37e6d30e89d699449082b22845f515fe47648087 (diff) |
media: dvb_ringbuffer : Fix a bug in dvb_ringbuffer.c
The function dvb_ringbuffer_pkt_next in
/linux-next/drviers/media/dvb-core/dvb_ringbuffer.c,
which searches the idx of the next valid packet in the ring
buffer of the ca->slot_info[slot].rx_buffer at
/linux-next/drivers/media/dvb-core/dvb_ca_en50221.c,
has the following problem.
In calculating the amounts of the consumed address of the ring
buffer, if the read address(rbuf->pread) of the ring buffer is
smaller than the idx, the amounts of the searched address
should be (idx - rbuf->pread),
whereas if the read address(rbuf->pread) of the ring buffer is
larger than the idx, the amounts of the consumed address should
be (idx - rbuf->pread + rbug->size). But there exists an
incorrect logic that the rbug-size was not properly added on
(idx - rbug->pread) in the later case. With this commit, we
fixed this bug.
Link: https://lore.kernel.org/linux-media/[email protected]
Signed-off-by: Yongsu Yoo <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions