[lkml]   [2017]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectPossible race in ibmasm.ko

While searching for races in the Linux kernel I've come across
"drivers/misc/ibmasm/ibmasm.ko" module. Here is a question that I came
up with while analyzing results. Lines are given using the info from
Linux v4.12.

Consider the following case:

Thread 1: Thread 2:
->ibmasm_receive_event event_file_open
buffer = sp->event_buffer ->ibmasm_event_reader_register
buffer->next_serial_number++ sp->event_buffer->next_serial_number
(event.c: line 73) (event.c: line 133)

There is a possibility of event serial_number clash if in
ibmasm_event_reader_register value of next_serial_number field is read
before the assignment happens. This is possible only if the readers can
dynamically subscribe to an event. Is this case feasible from your point
of view?

Thank you for your time.

-- Anton Volkov
Linux Verification Center, ISPRAS

 \ /
  Last update: 2017-08-18 16:16    [W:0.026 / U:3.668 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site