From: Dan Carpenter <dan.carpenter@oracle.com>
To: daniel@iogearbox.net
Cc: bpf@vger.kernel.org
Subject: [bug report] bpf, sockmap: convert to generic sk_msg interface
Date: Mon, 14 Oct 2019 15:13:30 +0300 [thread overview]
Message-ID: <20191014121330.GA14089@mwanda> (raw)
Hello Daniel Borkmann,
This is a semi-automatic email about new static checker warnings.
The patch 604326b41a6f: "bpf, sockmap: convert to generic sk_msg
interface" from Oct 13, 2018, leads to the following Smatch complaint:
net/core/skmsg.c:792 sk_psock_write_space()
error: we previously assumed 'psock' could be null (see line 790)
net/core/skmsg.c
789 psock = sk_psock(sk);
790 if (likely(psock && sk_psock_test_state(psock, SK_PSOCK_TX_ENABLED)))
^^^^^
Check for NULL
791 schedule_work(&psock->work);
792 write_space = psock->saved_write_space;
^^^^^^^^^^^^^^^^^^^^^^^^
793 rcu_read_unlock();
794 write_space(sk);
^^^^^^^^^^^^^^
The warning is on the wrong line. The dereference is really here.
regards,
dan carpenter
next reply other threads:[~2019-10-14 12:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-14 12:13 Dan Carpenter [this message]
2019-10-14 16:46 ` [bug report] bpf, sockmap: convert to generic sk_msg interface Martin Lau
2019-10-14 16:53 ` John Fastabend
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191014121330.GA14089@mwanda \
--to=dan.carpenter@oracle.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox