Re: [PATCH] ceph: don't leak snap_rwsem in handle_cap_grant

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 6/6/22 6:36 PM, Jeff Layton wrote:
On Mon, 2022-06-06 at 11:12 +0100, Luís Henriques wrote:
Jeff Layton <jlayton@xxxxxxxxxx> writes:

When handle_cap_grant is called on an IMPORT op, then the snap_rwsem is
held and the function is expected to release it before returning. It
currently fails to do that in all cases which could lead to a deadlock.

URL: https://tracker.ceph.com/issues/55857
This looks good.  Maybe it could have here a 'Fixes: e8a4d26771547'.
Otherwise:

Reviewed-by: Luís Henriques <lhenriques@xxxxxxx>

Cheers,
Thanks,

Actually, I think this got broken in 6f05b30ea063a2 (ceph: reset
i_requested_max_size if file write is not wanted).

Have updated it.

-- Xiubo


The problem is the && part of the condition. We need to release the
rwsem regardless of whether ci->i_auth_cap == cap.




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Ceph Dev]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux