<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/cifs/netmisc.c, branch linux-3.14.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.14.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.14.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2013-11-11T22:33:25Z</updated>
<entry>
<title>cifs: change ERRnomem error mapping from ENOMEM to EREMOTEIO</title>
<updated>2013-11-11T22:33:25Z</updated>
<author>
<name>Jeff Layton</name>
</author>
<published>2013-11-07T20:02:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cce0244ab0af78f8f01ad826d2f9813a9580b105'/>
<id>urn:sha1:cce0244ab0af78f8f01ad826d2f9813a9580b105</id>
<content type='text'>
Sometimes, the server will report an error that basically indicates
that it's running out of resources. These include these under SMB1:

NT_STATUS_NO_MEMORY
NT_STATUS_SECTION_TOO_BIG
NT_STATUS_TOO_MANY_PAGING_FILES

...and this one under SMB2:

STATUS_NO_MEMORY

Currently, this gets mapped to ENOMEM by the client, but that's
confusing as an ENOMEM error is typically an indicator that the
client is out of memory.

Change these errors to instead map to EREMOTEIO to indicate that
the problem is actually server-side and not on the client.

Reported-by: "ISHIKAWA,chiaki" &lt;ishikawa@yk.rim.or.jp&gt;
Signed-off-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
</content>
</entry>
<entry>
<title>cifs: ntstatus_to_dos_map[] is not terminated</title>
<updated>2013-10-14T17:14:01Z</updated>
<author>
<name>Tim Gardner</name>
</author>
<published>2013-10-13T19:29:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0c26606cbe4937f2228a27bb0c2cad19855be87a'/>
<id>urn:sha1:0c26606cbe4937f2228a27bb0c2cad19855be87a</id>
<content type='text'>
Functions that walk the ntstatus_to_dos_map[] array could
run off the end. For example, ntstatus_to_dos() loops
while ntstatus_to_dos_map[].ntstatus is not 0. Granted,
this is mostly theoretical, but could be used as a DOS attack
if the error code in the SMB header is bogus.

[Might consider adding to stable, as this patch is low risk - Steve]

Reviewed-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Tim Gardner &lt;tim.gardner@canonical.com&gt;
Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
</content>
</entry>
<entry>
<title>[CIFS] cifs: Rename cERROR and cFYI to cifs_dbg</title>
<updated>2013-05-05T03:17:23Z</updated>
<author>
<name>Joe Perches</name>
</author>
<published>2013-05-05T03:12:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f96637be081141d6f8813429499f164260b49d70'/>
<id>urn:sha1:f96637be081141d6f8813429499f164260b49d70</id>
<content type='text'>
It's not obvious from reading the macro names that these macros
are for debugging.  Convert the names to a single more typical
kernel style cifs_dbg macro.

	cERROR(1, ...)   -&gt; cifs_dbg(VFS, ...)
	cFYI(1, ...)     -&gt; cifs_dbg(FYI, ...)
	cFYI(DBG2, ...)  -&gt; cifs_dbg(NOISY, ...)

Move the terminating format newline from the macro to the call site.

Add CONFIG_CIFS_DEBUG function cifs_vfs_err to emit the
"CIFS VFS: " prefix for VFS messages.

Size is reduced ~ 1% when CONFIG_CIFS_DEBUG is set (default y)

$ size fs/cifs/cifs.ko*
   text    data     bss     dec     hex filename
 265245	   2525	    132	 267902	  4167e	fs/cifs/cifs.ko.new
 268359    2525     132  271016   422a8 fs/cifs/cifs.ko.old

Other miscellaneous changes around these conversions:

o Miscellaneous typo fixes
o Add terminating \n's to almost all formats and remove them
  from the macros to be more kernel style like.  A few formats
  previously had defective \n's
o Remove unnecessary OOM messages as kmalloc() calls dump_stack
o Coalesce formats to make grep easier,
  added missing spaces when coalescing formats
o Use %s, __func__ instead of embedded function name
o Removed unnecessary "cifs: " prefixes
o Convert kzalloc with multiply to kcalloc
o Remove unused cifswarn macro

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
</content>
</entry>
<entry>
<title>cifs: map NT_STATUS_SHARING_VIOLATION to EBUSY instead of ETXTBSY</title>
<updated>2013-03-13T19:09:20Z</updated>
<author>
<name>Sachin Prabhu</name>
</author>
<published>2013-03-11T13:08:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=47c78f4a70d791ff44cab3254b489605a52e3181'/>
<id>urn:sha1:47c78f4a70d791ff44cab3254b489605a52e3181</id>
<content type='text'>
NT_SHARING_VIOLATION errors are mapped to ETXTBSY which is unexpected
for operations such as unlink where we can hit these errors.

The patch maps the error NT_SHARING_VIOLATION to EBUSY instead. The
patch also replaces all instances of ETXTBSY in
cifs_rename_pending_delete() with EBUSY.

Signed-off-by: Sachin Prabhu &lt;sprabhu@redhat.com&gt;
Reviewed-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Steve French &lt;sfrench@us.ibm.com&gt;
</content>
</entry>
<entry>
<title>cifs: get rid of smb_vol-&gt;UNCip and smb_vol-&gt;port</title>
<updated>2012-12-05T19:27:30Z</updated>
<author>
<name>Jeff Layton</name>
</author>
<published>2012-11-26T16:09:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b979aaa1777259330435c47f900833dabe9189e8'/>
<id>urn:sha1:b979aaa1777259330435c47f900833dabe9189e8</id>
<content type='text'>
Passing this around as a string is contorted and painful. Instead, just
convert these to a sockaddr as soon as possible, since that's how we're
going to work with it later anyway.

Signed-off-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
</content>
</entry>
<entry>
<title>cifs: change DOS/NT/POSIX mapping of ERRnoresource</title>
<updated>2012-09-26T17:55:42Z</updated>
<author>
<name>Jeff Layton</name>
</author>
<published>2012-09-24T13:33:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4f2b86aba87a2654a1258ffe09c22ce70ab69d60'/>
<id>urn:sha1:4f2b86aba87a2654a1258ffe09c22ce70ab69d60</id>
<content type='text'>
ERRnoresource is an ERRSRV level (aka server-side) error and means "No
resources currently available for request". Currently that maps to POSIX
-ENOBUFS. No NT errors map to it currently.

NT_STATUS_INSUFFICIENT_RESOURCES and NT_STATUS_INSUFF_SERVER_RESOURCES
are also similar in meaning. Currently the client maps those to
ERRnomem, which maps to -ENOMEM in POSIX.

All of these mappings seem to be quite wrong to me and are confusing for
users. All of the above errors indicate problems on the server, not the
client. Reporting -ENOMEM or -ENOBUFS implies that the client is running
out of resources.

This patch changes those mappings. The NT_* errors are changed to map to
the SRV level ERRnoresource. That error is in turn changed to return
-EREMOTEIO which is the only POSIX error I could find that conveys that
something went wrong on the server. While we're at it, change the SMB2
equivalent error to return the same.

Signed-off-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Acked-by: Suresh Jayaraman &lt;sjayaraman@suse.com&gt;
Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
</content>
</entry>
<entry>
<title>CIFS: Move readdir code to ops struct</title>
<updated>2012-09-25T02:46:29Z</updated>
<author>
<name>Pavel Shilovsky</name>
</author>
<published>2012-09-18T23:20:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=92fc65a74a2be1388d774f7dbf82c9adea1745cf'/>
<id>urn:sha1:92fc65a74a2be1388d774f7dbf82c9adea1745cf</id>
<content type='text'>
Signed-off-by: Pavel Shilovsky &lt;pshilovsky@samba.org&gt;
Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
</content>
</entry>
<entry>
<title>cifs: writing past end of struct in cifs_convert_address()</title>
<updated>2012-03-31T22:32:18Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2012-03-01T07:06:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2545e0720a5a4bf8ebccc6f793f97a246cf3f18d'/>
<id>urn:sha1:2545e0720a5a4bf8ebccc6f793f97a246cf3f18d</id>
<content type='text'>
"s6-&gt;sin6_scope_id" is an int bits but strict_strtoul() writes a long
so this can corrupt memory on 64 bit systems.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Steve French &lt;sfrench@us.ibm.com&gt;
</content>
</entry>
<entry>
<title>CIFS: Separate protocol-specific code from cifs_readv_receive code</title>
<updated>2012-03-23T18:28:03Z</updated>
<author>
<name>Pavel Shilovsky</name>
</author>
<published>2012-03-23T18:28:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5ffef7bf1dd582e93b15f8cc735328a556a1d2c4'/>
<id>urn:sha1:5ffef7bf1dd582e93b15f8cc735328a556a1d2c4</id>
<content type='text'>
Signed-off-by: Pavel Shilovsky &lt;piastry@etersoft.ru&gt;
</content>
</entry>
<entry>
<title>cifs: consolidate SendReceive response checks</title>
<updated>2011-05-23T02:58:24Z</updated>
<author>
<name>Jeff Layton</name>
</author>
<published>2011-05-19T20:22:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2c8f981d93f830c167c811f046b5107cc24b6e1b'/>
<id>urn:sha1:2c8f981d93f830c167c811f046b5107cc24b6e1b</id>
<content type='text'>
Further consolidate the SendReceive code by moving the checks run over
the packet into a separate function that all the SendReceive variants
can call.

We can also eliminate the check for a receive_len that's too big or too
small. cifs_demultiplex_thread already checks that and disconnects the
socket if that occurs, while setting the midStatus to MALFORMED. It'll
never call this code if that's the case.

Finally do a little cleanup. Use "goto out" on errors so that the flow
of code in the normal case is more evident. Also switch the logErr
variable in map_smb_to_linux_error to a bool.

Reviewed-by: Pavel Shilovsky &lt;piastry@etersoft.ru&gt;
Signed-off-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Steve French &lt;sfrench@us.ibm.com&gt;
</content>
</entry>
</feed>
