Bug 4822 - smb_allocate_request() possible problem with nr_requests counter
Summary: smb_allocate_request() possible problem with nr_requests counter
Status: REJECTED WILL_NOT_FIX
Alias: None
Product: File System
Classification: Unclassified
Component: Samba/SMB (show other bugs)
Hardware: i386 Linux
: P2 low
Assignee: fs_samba-smb
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-30 07:56 UTC by Johan Bengtsson
Modified: 2007-07-10 19:19 UTC (History)
3 users (show)

See Also:
Kernel Version: 2.6.11.8
Subsystem:
Regression: ---
Bisected commit-id:


Attachments

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

Note You need to log in before you can comment on or make changes to this bug.