summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorSage Weil <sage@redhat.com>2014-09-26 19:30:06 +0400
committerJiri Slaby <jslaby@suse.cz>2014-10-31 17:11:06 +0300
commit8ef9958bef569b081698d4ad25b263560d2a1720 (patch)
treeaaf410e2001cdd82f74e42cff8305a9cbee6ef0c /drivers/usb/gadget
parentb346e6df896c35f174c5613a78b97f4cea9143d6 (diff)
downloadlinux-8ef9958bef569b081698d4ad25b263560d2a1720.tar.xz
Btrfs: fix race in WAIT_SYNC ioctl
commit 42383020beb1cfb05f5d330cc311931bc4917a97 upstream. We check whether transid is already committed via last_trans_committed and then search through trans_list for pending transactions. If last_trans_committed is updated by btrfs_commit_transaction after we check it (there is no locking), we will fail to find the committed transaction and return EINVAL to the caller. This has been observed occasionally by ceph-osd (which uses this ioctl heavily). Fix by rechecking whether the provided transid <= last_trans_committed after the search fails, and if so return 0. Signed-off-by: Sage Weil <sage@redhat.com> Signed-off-by: Chris Mason <clm@fb.com> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'drivers/usb/gadget')
0 files changed, 0 insertions, 0 deletions