From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: re: squashfs: enhance parallel I/O
Date: Wed, 06 Nov 2013 16:18:36 +0000 [thread overview]
Message-ID: <20131106161836.GN15603@elgon.mountain> (raw)
Hello Minchan Kim,
This is a semi-automatic email about new static checker warnings.
The patch 8ae6a7f5a3a8: "squashfs: enhance parallel I/O" from Oct 28,
2013, leads to the following Smatch complaint:
fs/squashfs/decompressor_multi.c:124 squashfs_decompressor_destroy()
error: we previously assumed 'stream' could be null (see line 111)
fs/squashfs/decompressor_multi.c
110 struct squashfs_stream *stream = msblk->stream;
111 if (stream) {
^^^^^^
Patch introduces a check.
112 struct decomp_stream *decomp_strm;
113
114 while (!list_empty(&stream->strm_list)) {
115 decomp_strm = list_entry(stream->strm_list.prev,
116 struct decomp_stream, list);
117 list_del(&decomp_strm->list);
118 msblk->decompressor->free(decomp_strm->stream);
119 kfree(decomp_strm);
120 stream->avail_decomp--;
121 }
122 }
123
124 WARN_ON(stream->avail_decomp);
125 kfree(stream->comp_opts);
^^^^^^^^^^^^^^^^^
Patch introduces a couple unchecked dereferences.
126 kfree(stream);
regards,
dan carpenter
next reply other threads:[~2013-11-06 16:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-06 16:18 Dan Carpenter [this message]
2013-11-08 1:34 ` squashfs: enhance parallel I/O Phillip Lougher
2013-11-08 7:42 ` Dan Carpenter
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=20131106161836.GN15603@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
/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