Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 71070edf authored by Pradeep P V K's avatar Pradeep P V K Committed by Gerrit - the friendly Code Review server
Browse files

fuse: Set fuse request error upon fuse abort connection



There is a minor race in setting the fuse out request error
between fuse_abort_conn() and fuse_dev_do_read() as explained
below.
Thread-1                        Thread-2
========                        ========
->fuse_simple_request()        ->shutdown
  ->__fuse_request_send()
     ->queue_request()         ->fuse_abort_conn()
->fuse_dev_do_read()                ->acquire(fpq->lock)
  ->wait_for(fpq->lock)        ->set err to all req's in fpq->io
  ->release(fpq->lock)
  ->acquire(fpq->lock)
  ->add req to fpq->io
The above scenario may cause Thread-1 request to add into
fpq->io list after Thread-2 sets -ECONNABORTED err to all
its requests in fpq->io list. This leaves Thread-1 request
with unset err and this further misleads as a completed
request without an err set upon request_end().

Handle this by setting the err appropriately.

Change-Id: I7961c421939423290f6b78a619490d2cc3fbcb33
Signed-off-by: default avatarPradeep P V K <pragalla@codeaurora.org>
parent 36b30f51
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment