[linux-cifs-client] [patch] prevent slab corruption by fixing race codition in cifs

Shirish Pargaonkar shirishpargaonkar at gmail.com
Sun Aug 16 10:38:57 MDT 2009


This patch prevents a slab corruption like this.  During heavy stress,
it is possible that
cifs_close will free up cifsFileInfo while due to delayed writes,
wrtPending of that
cifsFileInfo gets updated (decremented), cifsFileInfo either freed or
freed and allocated to another process.


Slab corruption: start=ffff8101e28e3818, len=256
Redzone: 0x5a2cf071/0x5a2cf071.
Last user: [<ffffffff88276ec4>](cifs_close+0x224/0x2c2 [cifs])
060: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6a 6b 6b 6b
Prev obj: start=ffff8101e28e3700, len=256
Redzone: 0x170fc2a5/0x170fc2a5.
Last user: [<ffffffff882784fa>](cifs_open+0x348/0x6d9 [cifs])
000: b8 d3 44 e2 01 81 ff ff a0 e2 c7 e1 01 81 ff ff
010: 68 f5 fa dc 01 81 ff ff 10 47 d4 dd 01 81 ff ff
Next obj: start=ffff8101e28e3930, len=256
Redzone: 0x170fc2a5/0x170fc2a5.
Last user: [<ffffffff882784fa>](cifs_open+0x348/0x6d9 [cifs])
000: 18 b8 2a e3 01 81 ff ff b8 a3 5a e0 01 81 ff ff
010: 68 f5 36 65 02 81 ff ff 40 99 a1 dc 01 81 ff ff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cifs.slabcorruption.patch
Type: application/octet-stream
Size: 4190 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/linux-cifs-client/attachments/20090816/4778157e/attachment-0001.obj>


More information about the linux-cifs-client mailing list