From: Kirill A. Shutemov Date: Tue, 30 Dec 2014 00:48:09 +0000 (+0200) Subject: 9p: use unsigned integers for nwqid/count X-Git-Tag: omap-for-v4.2/o2_dc~84^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6250a8badb311953a49bedb16ed17eb59d21c03a;p=pandora-kernel.git 9p: use unsigned integers for nwqid/count As specification says, all integers in messages are unsigned. Let's fix behaviour of p9pdu_vreadf()/p9pdu_vwritef() accordingly. Fix for p9pdu_vreadf() is critical. If server replies with Rwalk, where nwqid > SHRT_MAX, the value will be interpreted as negative. kmalloc, in its order, will cast the value to (very big) size_t. It should never happen in normal situation: we never submit Twalk with nwname > 16, but malicious or broken server can still produce problematic Rwalk. Signed-off-by: Kirill A. Shutemov Signed-off-by: Dominique Martinet Signed-off-by: Eric Van Hensbergen --- Reading git-diff-tree failed