Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1628297
| From | Colin Ian King <colin.king@canonical.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | re: mtip32xx: add a status field to struct mtip_cmd |
| Date | 2017-04-21 16:10 +0200 |
| Message-ID | <tyHq3-6LU-53@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Hi,
CoverityScan found an issue with the following part of the patch:
- if (likely(!reserv))
- blk_mq_complete_request(rq, -ENODEV);
- else if (test_bit(MTIP_PF_IC_ACTIVE_BIT, &dd->port->flags)) {
+ if (likely(!reserv)) {
+ cmd->status = -ENODEV;
+ blk_mq_complete_request(rq, 0);
+ } else if (test_bit(MTIP_PF_IC_ACTIVE_BIT, &dd->port->flags)) {
The issue is:
static void mtip_no_dev_cleanup(struct request *rq, void *data, bool reserv)
{
struct driver_data *dd = (struct driver_data *)data;
struct mtip_cmd *cmd;
if (likely(!reserv)) {
cmd->status = -ENODEV;
CID 1430258 (#1 of 1): Uninitialized pointer write (UNINIT)4.
uninit_use: Using uninitialized value cmd.
..basically a null ptr dereference on cmd.
Colin
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
re: mtip32xx: add a status field to struct mtip_cmd Colin Ian King <colin.king@canonical.com> - 2017-04-21 16:10 +0200
Re: mtip32xx: add a status field to struct mtip_cmd Jens Axboe <axboe@kernel.dk> - 2017-04-21 16:20 +0200
Re: mtip32xx: add a status field to struct mtip_cmd Christoph Hellwig <hch@lst.de> - 2017-04-21 16:40 +0200
Re: mtip32xx: add a status field to struct mtip_cmd Jens Axboe <axboe@kernel.dk> - 2017-04-21 21:30 +0200
csiph-web