21 May, 2020

2 commits


23 Oct, 2019

1 commit

  • The resources for a terminated socket are being cleaned up.
    This patch makes sure
    * no more data is received for an actively terminated socket
    * no more data is sent for an actively or passively terminated socket

    Signed-off-by: Ursula Braun
    Signed-off-by: Karsten Graul
    Signed-off-by: Jakub Kicinski

    Ursula Braun
     

11 Oct, 2019

2 commits

  • smc_rx_recvmsg() first checks if data is available, and then if
    RCV_SHUTDOWN is set. There is a race when smc_cdc_msg_recv_action() runs
    in between these 2 checks, receives data and sets RCV_SHUTDOWN.
    In that case smc_rx_recvmsg() would return from receive without to
    process the available data.
    Fix that with a final check for data available if RCV_SHUTDOWN is set.
    Move the check for data into a function and call it twice.
    And use the existing helper smc_rx_data_available().

    Fixes: 952310ccf2d8 ("smc: receive data from RMBE")
    Reviewed-by: Ursula Braun
    Signed-off-by: Karsten Graul
    Signed-off-by: Jakub Kicinski

    Karsten Graul
     
  • smc_cdc_rxed_any_close_or_senddone() is used as an end condition for the
    receive loop. This conflicts with smc_cdc_msg_recv_action() which could
    run in parallel and set the bits checked by
    smc_cdc_rxed_any_close_or_senddone() before the receive is processed.
    In that case we could return from receive with no data, although data is
    available. The same applies to smc_rx_wait().
    Fix this by checking for RCV_SHUTDOWN only, which is set in
    smc_cdc_msg_recv_action() after the receive was actually processed.

    Fixes: 952310ccf2d8 ("smc: receive data from RMBE")
    Reviewed-by: Ursula Braun
    Signed-off-by: Karsten Graul
    Signed-off-by: Jakub Kicinski

    Karsten Graul
     

01 Feb, 2019

1 commit

  • Al Viro pointed out that since there is only one pipe buffer type to which
    new data can be appended, it isn't necessary to have a ->can_merge field in
    struct pipe_buf_operations, we can just check for a magic type.

    Suggested-by: Al Viro
    Signed-off-by: Jann Horn
    Signed-off-by: Al Viro

    Jann Horn
     

24 Jul, 2018

2 commits


30 Jun, 2018

1 commit

  • The data transfer and CDC message headers differ in SMC-R and SMC-D.
    This patch adds support for the SMC-D data transfer to the existing SMC
    code. It consists of the following:

    * SMC-D CDC support
    * SMC-D tx support
    * SMC-D rx support

    The CDC header is stored at the beginning of the receive buffer. Thus, a
    rx_offset variable is added for the CDC header offset within the buffer
    (0 for SMC-R).

    Signed-off-by: Hans Wippel
    Signed-off-by: Ursula Braun
    Suggested-by: Thomas Richter
    Signed-off-by: David S. Miller

    Hans Wippel
     

24 May, 2018

1 commit


19 May, 2018

1 commit


04 May, 2018

3 commits

  • Provide an implementation for splice() when we are using SMC. See
    smc_splice_read() for further details.

    Signed-off-by: Stefan Raspl
    Signed-off-by: Ursula Braun <
    Signed-off-by: David S. Miller

    Stefan Raspl
     
  • Turn smc_rx_wait_data into a generic function that can be used at various
    instances to wait on traffic to complete with varying criteria.

    Signed-off-by: Stefan Raspl
    Signed-off-by: Ursula Braun <
    Signed-off-by: David S. Miller

    Stefan Raspl
     
  • Some of the conditions to exit recv() are common in two pathes - cleaning up
    code by moving the check up so we have it only once.

    Signed-off-by: Stefan Raspl
    Signed-off-by: Ursula Braun <
    Signed-off-by: David S. Miller

    Stefan Raspl
     

28 Apr, 2018

1 commit


12 Feb, 2018

1 commit

  • This is the mindless scripted replacement of kernel use of POLL*
    variables as described by Al, done by this script:

    for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do
    L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'`
    for f in $L; do sed -i "-es/^\([^\"]*\)\(\\)/\\1E\\2/" $f; done
    done

    with de-mangling cleanups yet to come.

    NOTE! On almost all architectures, the EPOLL* constants have the same
    values as the POLL* constants do. But they keyword here is "almost".
    For various bad reasons they aren't the same, and epoll() doesn't
    actually work quite correctly in some cases due to this on Sparc et al.

    The next patch from Al will sort out the final differences, and we
    should be all done.

    Scripted-by: Al Viro
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

08 Dec, 2017

1 commit

  • When waiting for data to be received it must be checked if the
    peer signals shutdown. The SMC code uses two different checks
    for this purpose, even though just one check is sufficient.
    This patch removes the superfluous test for SOCK_DONE.

    Signed-off-by: Ursula Braun
    Signed-off-by: David S. Miller

    Ursula Braun
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

22 Sep, 2017

1 commit

  • The SMC receive function currently lacks a timeout check under the
    condition that no data were received and no data are available. This
    patch adds such a check.

    Signed-off-by: Hans Wippel
    Signed-off-by: Ursula Braun
    Signed-off-by: David S. Miller

    Hans Wippel
     

30 Jul, 2017

1 commit

  • Usage of send buffer "sndbuf" is synced
    (a) before filling sndbuf for cpu access
    (b) after filling sndbuf for device access

    Usage of receive buffer "RMB" is synced
    (a) before reading RMB content for cpu access
    (b) after reading RMB content for device access

    Signed-off-by: Ursula Braun
    Signed-off-by: David S. Miller

    Ursula Braun
     

12 Apr, 2017

1 commit


03 Mar, 2017

1 commit

  • …sors into <linux/sched/signal.h>

    task_struct::signal and task_struct::sighand are pointers, which would normally make it
    straightforward to not define those types in sched.h.

    That is not so, because the types are accompanied by a myriad of APIs (macros and inline
    functions) that dereference them.

    Split the types and the APIs out of sched.h and move them into a new header, <linux/sched/signal.h>.

    With this change sched.h does not know about 'struct signal' and 'struct sighand' anymore,
    trying to put accessors into sched.h as a test fails the following way:

    ./include/linux/sched.h: In function ‘test_signal_types’:
    ./include/linux/sched.h:2461:18: error: dereferencing pointer to incomplete type ‘struct signal_struct’
    ^

    This reduces the size and complexity of sched.h significantly.

    Update all headers and .c code that relied on getting the signal handling
    functionality from <linux/sched.h> to include <linux/sched/signal.h>.

    The list of affected files in the preparatory patch was partly generated by
    grepping for the APIs, and partly by doing coverage build testing, both
    all[yes|mod|def|no]config builds on 64-bit and 32-bit x86, and an array of
    cross-architecture builds.

    Nevertheless some (trivial) build breakage is still expected related to rare
    Kconfig combinations and in-flight patches to various kernel code, but most
    of it should be handled by this patch.

    Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Mike Galbraith <efault@gmx.de>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Ingo Molnar <mingo@kernel.org>

    Ingo Molnar
     

10 Jan, 2017

1 commit