<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/fs/smb/common, branch v7.0.10</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.0.10</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.0.10'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-02-12T16:31:12+00:00</updated>
<entry>
<title>Merge tag 'v7.0-rc-part1-ksmbd-and-smbdirect-fixes' of git://git.samba.org/ksmbd</title>
<updated>2026-02-12T16:31:12+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-02-12T16:31:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d53f4d93f3d686fd64513abb3977c9116bbfdaf8'/>
<id>urn:sha1:d53f4d93f3d686fd64513abb3977c9116bbfdaf8</id>
<content type='text'>
Pull smb server and smbdirect updates from Steve French:

 - Fix tcp connection leak

 - Fix potential use after free when freeing multichannel

 - Fix locking problem in showing channel list

 - Locking improvement for tree connection

 - Fix infinite loop when signing errors

 - Add /proc interface for monitoring server state

 - Fixes to avoid mixing iWarp and InfiniBand/RoCEv1/RoCEv2
   port ranges used for smbdirect

 - Fixes for smbdirect credit handling problems, these make
   the connections more reliable

* tag 'v7.0-rc-part1-ksmbd-and-smbdirect-fixes' of git://git.samba.org/ksmbd: (32 commits)
  ksmbd: fix non-IPv6 build
  ksmbd: convert tree_conns_lock to rw_semaphore
  ksmbd: fix missing chann_lock while iterating session channel list
  ksmbd: add chann_lock to protect ksmbd_chann_list xarray
  smb: server: correct value for smb_direct_max_fragmented_recv_size
  smb: client: correct value for smbd_max_fragmented_recv_size
  smb: server: fix leak of active_num_conn in ksmbd_tcp_new_connection()
  ksmbd: add procfs interface for runtime monitoring and statistics
  ksmbd: fix infinite loop caused by next_smb2_rcv_hdr_off reset in error paths
  smb: server: make use of rdma_restrict_node_type()
  smb: client: make use of rdma_restrict_node_type()
  RDMA/core: introduce rdma_restrict_node_type()
  smb: client: let send_done handle a completion without IB_SEND_SIGNALED
  smb: client: let smbd_post_send_negotiate_req() use smbd_post_send()
  smb: client: fix last send credit problem causing disconnects
  smb: client: make use of smbdirect_socket.send_io.bcredits
  smb: client: use smbdirect_send_batch processing
  smb: client: introduce and use smbd_{alloc, free}_send_io()
  smb: client: split out smbd_ib_post_send()
  smb: client: port and use the wait_for_credits logic used by server
  ...
</content>
</entry>
<entry>
<title>smb: common: add header guards to fs/smb/common/smb2status.h</title>
<updated>2026-02-09T03:24:42+00:00</updated>
<author>
<name>Stefan Metzmacher</name>
<email>metze@samba.org</email>
</author>
<published>2026-02-03T15:20:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cc40f19a30144b50e7fa648578c15d92176a146f'/>
<id>urn:sha1:cc40f19a30144b50e7fa648578c15d92176a146f</id>
<content type='text'>
This will allow it to be included multiple times without problems,
that's needed for the smbdirect move to common code.

Cc: Steve French &lt;smfrench@gmail.com&gt;
Cc: Tom Talpey &lt;tom@talpey.com&gt;
Cc: Long Li &lt;longli@microsoft.com&gt;
Cc: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>cifs: Autogenerate SMB2 error mapping table</title>
<updated>2026-02-09T03:23:53+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2025-12-23T00:05:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c527e13a7a6628176655d70ff166f0f594a77984'/>
<id>urn:sha1:c527e13a7a6628176655d70ff166f0f594a77984</id>
<content type='text'>
Autogenerate the SMB2 status to error code mapping table, from the
smb2status.h common header, sorting it by NT status code so that it can be
searched by binary chopping. This also reduces the number of places this
list is duplicated in the source.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
cc: Steve French &lt;stfrench@microsoft.com&gt;
cc: ChenXiaoSong &lt;chenxiaosong@kylinos.cn&gt;
cc: linux-cifs@vger.kernel.org
Signed-off-by: ChenXiaoSong &lt;chenxiaosong@kylinos.cn&gt;
Reviewed-by: David Howells &lt;dhowells@redhat.com&gt;
Link: https://lore.kernel.org/linux-cifs/20260106071507.1420900-3-chenxiaosong.chenxiaosong@linux.dev/
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: smbdirect: introduce smbdirect_socket.send_io.bcredits.*</title>
<updated>2026-02-08T23:12:57+00:00</updated>
<author>
<name>Stefan Metzmacher</name>
<email>metze@samba.org</email>
</author>
<published>2026-01-22T17:16:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8e94268b21c8235d430ce1aa6dc0b15952744b9b'/>
<id>urn:sha1:8e94268b21c8235d430ce1aa6dc0b15952744b9b</id>
<content type='text'>
It turns out that our code will corrupt the stream of
reassabled data transfer messages when we trigger an
immendiate (empty) send.

In order to fix this we'll have a single 'batch' credit per
connection. And code getting that credit is free to use
as much messages until remaining_length reaches 0, then
the batch credit it given back and the next logical send can
happen.

Cc: &lt;stable@vger.kernel.org&gt; # 6.18.x
Cc: Steve French &lt;smfrench@gmail.com&gt;
Cc: Tom Talpey &lt;tom@talpey.com&gt;
Cc: Long Li &lt;longli@microsoft.com&gt;
Cc: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Acked-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: smbdirect: introduce smbdirect_socket.recv_io.credits.available</title>
<updated>2026-02-08T23:12:57+00:00</updated>
<author>
<name>Stefan Metzmacher</name>
<email>metze@samba.org</email>
</author>
<published>2026-01-22T17:16:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6e3c5052f9686192e178806e017b7377155f4bab'/>
<id>urn:sha1:6e3c5052f9686192e178806e017b7377155f4bab</id>
<content type='text'>
The logic off managing recv credits by counting posted recv_io and
granted credits is racy.

That's because the peer might already consumed a credit,
but between receiving the incoming recv at the hardware
and processing the completion in the 'recv_done' functions
we likely have a window where we grant credits, which
don't really exist.

So we better have a decicated counter for the
available credits, which will be incremented
when we posted new recv buffers and drained when
we grant the credits to the peer.

Fixes: 5fb9b459b368 ("smb: client: count the number of posted recv_io messages in order to calculated credits")
Fixes: 89b021a72663 ("smb: server: manage recv credits by counting posted recv_io and granted credits")
Cc: &lt;stable@vger.kernel.org&gt; # 6.18.x
Cc: Steve French &lt;smfrench@gmail.com&gt;
Cc: Tom Talpey &lt;tom@talpey.com&gt;
Cc: Long Li &lt;longli@microsoft.com&gt;
Cc: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Acked-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>cifs: Label SMB2 statuses with errors</title>
<updated>2026-02-08T23:07:46+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2025-12-23T00:04:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=10dfb0738a9d383575614b5d4389953cb97e1841'/>
<id>urn:sha1:10dfb0738a9d383575614b5d4389953cb97e1841</id>
<content type='text'>
Label the SMB2 status entries with error codes as a prelude to
autogenerating the mapping table.  This was done with the following script:

        #!/usr/bin/perl -w
        use strict;

        my @error_mapping_table = ();
        my %statuses = ();

        #
        # Read the status list
        #
        my $f = "fs/smb/common/smb2status.h";
        open FILE, "&lt;$f" || die $f;
        my @contents = &lt;FILE&gt;;
        close FILE || die;

        my $l = 0;
        foreach (@contents) {
            $l++;
            if (m!^#define\s*([A-Za-z0-9_]+)\s+cpu_to_le32[(]([0-9a-fA-Fx]+)[)]!) {
                my $status = $1;
                my $code = $2;
                my $s;

                next if ($status =~ /^STATUS_SEVERITY/);

                if (exists($statuses{$status})) {
                    print("$f:$l: Duplicate declaration of ", $s-&gt;{status}, "\n");
                } else {
                    my %_s = (
                        status =&gt; $status,
                        code   =&gt; hex($code)
                        );
                    $statuses{$status} = \%_s;
                }
            }
        }

        #
        # Read the SMB2 status =&gt; error mapping table
        #
        $f = "fs/smb/client/smb2maperror.c";
        open(MFILE, "&lt;$f") || die $f;
        my @maperror = &lt;MFILE&gt;;
        close MFILE || die;

        my $parse = 0;
        my $acc = "";
        $l = 0;
        foreach my $line (@maperror) {
            chomp $line;
            $l++;
            if ($parse == 0 &amp;&amp;
                $line =~ /^static const struct status_to_posix_error smb2_error_map_table/) {
                $parse = 1;
                next;
            }

            last if ($parse &gt;= 1 &amp;&amp; $line =~ /^[}];/);

            if ($parse == 1) {
                if ($line =~ /[\t][{].*[}],/) {
                    $acc = $line;
                    $parse = 3;
                } elsif ($line =~ /[\t][{].*/) {
                    $acc = $line;
                    $parse = 2;
                    next;
                } elsif ($line =~ m!^\s*/[*].*[*]/!) {
                    next;
                } else {
                    die "smb2maperror.c:$l: unparseable mapping element\n";
                }
            }
            if ($parse == 2) {
                if ($line =~ /.*[}],/) {
                    $acc .= $line;
                    $parse = 3;
                } else {
                    $acc .= $line;
                }
            }

            if ($parse == 3) {
                $acc =~ s/\s+//g;
                if ($acc =~ m/[{](.*)[}]/) {
                    $acc = $1;
                } else {
                    die "'$acc'";
                }
                my ($status, $error, $string) = split(/,/, $acc);

                if (exists($statuses{$status})) {
                    my $s = $statuses{$status};

                    if (exists($s-&gt;{error})) {
                        print("$f:$l: Dup mapping entry $status\n");
                    }

                    $s-&gt;{error} = $error;
                    #print $s-&gt;{code}, " =&gt; ", $error, "\n";
                } else {
                    print STDERR "$f:$l: Unknown status $status\n";
                }

                $acc = "";
                $parse = 1;
            }
        }

        #
        # Sort the error table by STATUS_* value
        #
        my @order = ();

        foreach my $status (keys(%statuses)) {
            my $s = $statuses{$status};
            push @order, $s;
            unless (exists($s-&gt;{code})) {
                print("Unknown code for ", $s-&gt;{status}, "\n")
            } else {
                #print("Code for ", $s-&gt;{status}, " is ", $s-&gt;{code}, "\n");
            }
        }

        @order = sort( { $a-&gt;{code} &lt;=&gt; $b-&gt;{code} } @order);

        foreach my $s (@order) {
            my $status = $s-&gt;{status};
            my $error  = $s-&gt;{error};
            my $code   = $s-&gt;{code};

            my $pad = " ";
            if (length($status) &lt; 32) {
                my $n = 32 - length($status);
                $pad = "\t" x ((($n-1) / 8) + 1);
            }
            #printf("#define %s%scpu_to_le32(0x%08x) // -%s\n", $status, $pad, $code, $error);
            #printf("\t%s%s= 0x%08x, // -%s\n", $status, $pad, $code, $error);
        }

        #
        # Decorate the definitions
        #
        my @output = ();
        for (my $i = 0; $i &lt;= $#contents; $i++) {
            my $line = $contents[$i];
            if ($line =~ m!^#define\s*([A-Za-z0-9_]+)\s+cpu_to_le32[(]([0-9a-fA-Fx]+)[)]!) {
                my $status = $1;
                my $code = $2;

                if ($status =~ /^STATUS_SEVERITY/) {
                    push @output, $line;
                    next;
                }

                my $pad = " ";
                if (length($status) &lt; 40) {
                    my $n = 40 - length($status);
                    $pad = "\t" x ((($n-1) / 8) + 1);
                }

                my $s = $statuses{$1};
                my $error = "EIO";
                if (exists($s-&gt;{error})) {
                    $error = $s-&gt;{error};
                } else {
                    if (!$s-&gt;{code}) {
                        print "ZERO ", $status, "\n";
                        $error = "0";
                    } else {
                        $error = "-EIO";
                    }
                }

                #my $rev = "#define " . $status . $pad . "_S(" . $2 . ", " . $error . ")\n";
                my $rev = "#define " . $status . $pad . "cpu_to_le32(" . $2 . ") // " . $error . "\n";

                push @output, $rev;
            } else {
                push @output, $line;
            }
        }

        open FILE, "&gt;fs/smb/common/smb2status.h" || die;
        print FILE @output;
        close FILE || die;

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
cc: Steve French &lt;stfrench@microsoft.com&gt;
cc: ChenXiaoSong &lt;chenxiaosong@kylinos.cn&gt;
cc: linux-cifs@vger.kernel.org
Signed-off-by: ChenXiaoSong &lt;chenxiaosong@kylinos.cn&gt;
Reviewed-by: David Howells &lt;dhowells@redhat.com&gt;
Link: https://lore.kernel.org/linux-cifs/20260106071507.1420900-2-chenxiaosong.chenxiaosong@linux.dev/
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>cifs: SMB1 split: cifs_debug.c</title>
<updated>2026-02-08T23:07:45+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2025-12-17T12:53:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e5ac3ff6c6e7ea3bd0859edb80b9241135fe10c0'/>
<id>urn:sha1:e5ac3ff6c6e7ea3bd0859edb80b9241135fe10c0</id>
<content type='text'>
Split SMB1 bits from cifs_debug.c to smb1debug.c.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
cc: Steve French &lt;sfrench@samba.org&gt;
cc: Paulo Alcantara &lt;pc@manguebit.org&gt;
cc: Enzo Matsumiya &lt;ematsumiya@suse.de&gt;
cc: linux-cifs@vger.kernel.org
cc: linux-fsdevel@vger.kernel.org
cc: linux-kernel@vger.kernel.org
Acked-by: Enzo Matsumiya &lt;ematsumiya@suse.de&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'v6.19-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6</title>
<updated>2025-12-18T19:50:20+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2025-12-18T19:50:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a91e1138b7cb0e4dfa12ef823c6eedb34b28bd08'/>
<id>urn:sha1:a91e1138b7cb0e4dfa12ef823c6eedb34b28bd08</id>
<content type='text'>
Pull smb client fixes from Steve French:

 - important fix for reconnect problem

 - minor cleanup

* tag 'v6.19-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: update internal module version number
  smb: move some SMB1 definitions into common/smb1pdu.h
  smb: align durable reconnect v2 context to 8 byte boundary
</content>
</entry>
<entry>
<title>smb: move some SMB1 definitions into common/smb1pdu.h</title>
<updated>2025-12-16T23:43:01+00:00</updated>
<author>
<name>ZhangGuoDong</name>
<email>zhangguodong@kylinos.cn</email>
</author>
<published>2025-12-02T07:14:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=94d5b8dbc5d9caa8e01c8fab8d5ed56e843ff40e'/>
<id>urn:sha1:94d5b8dbc5d9caa8e01c8fab8d5ed56e843ff40e</id>
<content type='text'>
These definitions are only used by SMB1, so move them into the new
common/smb1pdu.h.

KSMBD only implements SMB_COM_NEGOTIATE, see MS-SMB2 3.3.5.2.

Co-developed-by: ChenXiaoSong &lt;chenxiaosong@kylinos.cn&gt;
Signed-off-by: ChenXiaoSong &lt;chenxiaosong@kylinos.cn&gt;
Signed-off-by: ZhangGuoDong &lt;zhangguodong@kylinos.cn&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: align durable reconnect v2 context to 8 byte boundary</title>
<updated>2025-12-16T23:42:49+00:00</updated>
<author>
<name>Bharath SM</name>
<email>bharathsm@microsoft.com</email>
</author>
<published>2025-12-16T15:56:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=05f5e355cf783b30bd6eb3dec17ed1a8b3cfa95c'/>
<id>urn:sha1:05f5e355cf783b30bd6eb3dec17ed1a8b3cfa95c</id>
<content type='text'>
Add a 4-byte Pad to create_durable_handle_reconnect_v2 so the DH2C
create context is 8 byte aligned.
This avoids malformed CREATE contexts on reconnect.
Recent change removed this Padding, adding it back.

Fixes: 81a45de432c6 ("smb: move create_durable_handle_reconnect_v2 to common/smb2pdu.h")

Signed-off-by: Bharath SM &lt;bharathsm@microsoft.com&gt;
Reviewed-by: Paulo Alcantara (Red Hat) &lt;pc@manguebit.org&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
</feed>
