summaryrefslogtreecommitdiffstats
path: root/net/lapb/lapb_in.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2014-12-09 21:28:32 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-12-10 17:47:26 +0100
commit9ad6d99f189c274b42bedd6efc2b31a17ce733a7 (patch)
tree1869fa7c8840329713082928bf4a83969504b963 /net/lapb/lapb_in.c
parent3cf54b34dafe800d9522b93249b6f4c1bfb50de2 (diff)
drm/i915: Make i915_pipe_crc_read() oops proof
Currently i915_pipe_crc_read() will drop pipe_crc->lock for the entire duration of the copy_to_user() loop, which means it'll access pipe_crc->entries without any protection. If another thread sneaks in and frees pipe_crc->entries the code will oops. Reorganize the code to hold the lock around everything except copy_to_user(). After the copy the lock is reacquired and the the number of available entries is rechecked. Since this is a debug feature simplify the error handling a bit by consuming the crc entry even if copy_to_user() would fail. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'net/lapb/lapb_in.c')
0 files changed, 0 insertions, 0 deletions