Bug 4822

Summary: smb_allocate_request() possible problem with nr_requests counter
Product: File System Reporter: Johan Bengtsson (johan.bengtsson)
Component: Samba/SMBAssignee: fs_samba-smb
Status: REJECTED WILL_NOT_FIX    
Severity: low CC: alexn, bunk, protasnb
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.11.8 Subsystem:
Regression: --- Bisected commit-id:

Description Johan Bengtsson 2005-06-30 07:56:39 UTC
Problem Description:
By looking at the code in smb_allocate_request() (during a search for another 
bug) I discovered that the nr_requests counter gets increased in a loop, tested 
if there is not too many request allocated already and if there is loop is 
repeated.

I guess one of the following changes would be proper:
- Move the increase out of the loop.
- Insert a decrease in the loop since there actually was no allocation.

As it is now, if the test fails the counter will be increased until it wraps 
around and the test thereby succeeds. I guess that was not the inteded 
behaviour. Since there are no schedule() calls enabled I guess that takes some 
raw processor time and then simly succeeds.

However, I have not found any case where that test fails so I don't see any 
real problem with it, but the code does not seem to do the intended purpose.
Comment 1 Alexander Nyberg 2005-07-02 03:24:56 UTC
smbfs is slowly being deprecated by cifs so I doubt much work will be done with
it. Please try cifs instead
Comment 2 Natalie Protasevich 2007-07-06 18:33:45 UTC
Johan,
Have you resolved your problems by switching to CIFS?
Thanks.
Comment 3 Johan Bengtsson 2007-07-10 04:35:24 UTC
Yes, switching to CIFS solved my problem