Re: [RFC PATCH] cifs: Fix credit handling in cifs_io_subrequest cleanup

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

 



Tom Talpey <tom@xxxxxxxxxx> wrote:

> From a protocol standpoint it's correct to reserve the credits while the
> operation is in flight. But from a code standpoint it seems risky to
> stop accounting for them. What if the operation is canceled, or times
> out?

No idea, TBH - SMB credits wrangling isn't my area of expertise.  Note the
patch is superfluous as smb2_readv/writev_callback() clear the credits at the
end; worse, it's actually wrong as we're not allowed to touch [rw]data after
calling ->async_readv()/->async_writev().

> I'd quibble with the assertion that the server will "give us new credits
> in the response". The number of granted credits is always the server's
> decision, not guaranteed by the protocol (except for certain edge
> conditions).

It does give us new credits in the response, doesn't it?  In
hdr.CreditRequest - though I suppose this could be zero.

> I guess I'd suggest a deeper review by someone familiar with the
> mechanics of fs/smb/client credit accounting. It might be ok!

I've given Steve a patch to try and find where the double add occurs.

David





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux