Skip to contentSkip to conversation

chcr: Support for Chelsio's Crypto Hardware

bug report Dan Carpenter 1 participant 1 message Oct 12, 2016 Crypto API

lore
Share & tools
lore
#0 lore raw

Hello Hariprasad Shenai,

This is a semi-automatic email about new static checker warnings.

The patch 324429d74127: "chcr: Support for Chelsio's Crypto Hardware" from Aug 17, 2016, leads to the following Smatch complaint:

drivers/crypto/chelsio/chcr_algo.c:378 write_sg_data_page_desc()
error: we previously assumed 'sg' could be null (see line 376)

drivers/crypto/chelsio/chcr_algo.c
375 while (count > 0) {
376 if (sg && (!(sg->length)))

                            ^^

Check.

377 break;

   378			spage = sg_page(sg);
                                ^^^^^^^^^^^

Unchecked dereference inside function.

   379			get_page(spage);
   380			page_len = min(sg->length, count);

regards,
dan carpenter