Hi Sebastian:
Thanks for your explanation and I will send the patch accordingly.
On Sun, Oct 13, 2019 at 8:12 PM Sebastian Reichel wrote:
>
> Hi,
>
> On Thu, Oct 03, 2019 at 09:21:44PM -0700, Yizhuo Zhai wrote:
> > drivers/power/supply/rt5033_battery.c:
&
.
On Wed, Oct 9, 2019 at 10:48 PM Eric Dumazet wrote:
>
>
>
> On 10/9/19 10:37 PM, Yizhuo Zhai wrote:
> > Hi All:
> >
> > drivers/spi/spi.c:
> >
> > The function to_spi_device() could return NULL, but some callers
> > in this file does not c
t, but it doesn't apply to linux-next any more. Can
> you re-write it on top of the most recent staging-next and resend?
>
> regards,
> dan carpenter
>
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
.
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
Hi All:
In function sata_rcar_bmdma_fill_sg, macro for_each_sg uses sg_next(),
which could return NULL as "sg", however, there's no check before
dereferencing it (in sg_dma_address()), which is potentially unsafe.
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
(),
iwl_mvm_power_configure_uapsd(),
iwl_mvm_power_allow_uapsd(), etc.
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
(),
mem_cgroup_reset(), etc.
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
his case is not easy since the error return is not an
acceptable return value for axi_clkgen_recalc_rate().
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
return value -EINVAL is unacceptable
for ds1343_show_glitchfilter().
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
ontrol flow, which is potentially unsafe.
The patch is hard since we do not know the correct value to initialize them.
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
Hi All:
net/sched/sch_mq.c:
Inside function mq_dump_class(), mq_queue_get() could return NULL,
however, the return value of dev_queue is not checked and get used.
This could potentially be unsafe.
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California
Hi All:
drivers/sfi/sfi_core.c:
Inside function sfi_map_table(), sfi_map_memory() could return NULL,
however, the return value of sfi_map_memory() is not checked and get
used. This could potentially be unsafe.
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University
Hi All:
drivers/scsi/scsi.c:
Inside function __starget_for_each_device(), dev_to_shost()
could return NULL,however, the return value shost is not
checked and get used. This could potentially be unsafe.
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California
Hi All:
drivers/scsi/scsi_transport_spi.c:
Inside function store_spi_transport_period(), dev_to_shost()
could return NULL, however, the return value shost is not
checked and get used. This could potentially be unsafe.
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University
,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
Hi All:
drivers/target/iscsi/cxgbit/cxgbit_ddp.c:
Inside function cxgbit_ddp_sgl_check(), sg_next() could return NULL,
however, the return value of sg_next() is not checked and get
dereferenced. This could potentially be unsafe.
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
the error code is out of the return type: irqreturn_t.
Thanks for your time to check this case.
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
imply return -EINVAL in stm32_pwm_lp_get_state() because the
return type is void.
Thanks for your time to check this case.
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
imply return -EINVAL in rt5033_battery_get_present()
because it's not an acceptable return value.
Thanks for your time to check this case.
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
L in hip04_reset_ppe() because
the return type is void.
Thanks for your time to check this case.
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
+ int ret;
> >
> > regmap_write(mdio_dev->subctrl_vbase, cfg_reg, set_val);
>
>
> Grepping for regmap_{read,write}() shows how big an issue this is.
>
> I don't know what to do, maybe we can work over time to add checks to
> all calls and then force warnings on unchecked return values so that
> the problem is not introduced in the future.
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
REG3_BL30_INITIALIZED)
> > return 0;
> > }
> > @@ -1014,7 +1028,11 @@ static irqreturn_t meson_sar_adc_irq(int irq, void
> > *data)
> > unsigned int cnt, threshold;
> > u32 regval;
>
> same as above
>
> + int ret;
>
> >
> > - regmap_read(priv->regmap, MESON_SAR_ADC_REG0, );
> > + int ret = regmap_read(priv->regmap, MESON_SAR_ADC_REG0, );
>
> + ret = regmap_read(priv->regmap, MESON_SAR_ADC_REG0, );
>
> > +
> > + if (ret)
> > + return ret;
> > +
> > cnt = FIELD_GET(MESON_SAR_ADC_REG0_FIFO_COUNT_MASK, regval);
> > threshold = FIELD_GET(MESON_SAR_ADC_REG0_FIFO_CNT_IRQ_MASK, regval);
> >
> > --
> > 2.17.1
> >
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
s just unconditionally assings a value to this variable which will
> stop any warnings but there's no analysis explaining why this is a good
> fix - are we actually forgetting to check something we should be
> checking, are we sure that this is the correct value to use?
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
quot;);
> > + return ret;
> > + }
> >
> > - regmap_read(regmap_st, AT91_ST_SR, );
> > sr &= irqmask;
> >
> > /*
> > --
> > 2.17.1
> >
>
> --
> Alexandre Belloni, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
ad(info->regmap, AXP288_PS_BOOT_REASON_REG, );
>> + if (ret) {
>> + dev_err(info->dev, "failed to read
>> AXP288_PS_BOOT_REASON_REG\n");
>> + return;
>> + }
>> +
>> for (i = 0, rsi = axp288_pwr_up_down_info; *rsi;
rn ret;
> + }
> +
> reg_value &= st_msk;
> if ((!!check_st) == (!!reg_value))
> break;
> --
> 2.17.1
>
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
> be uninitialized if function regmap_read() returns -EINVAL.
> > However, it will be used directly in the if statement, which
> > is potentially unsafe.
> >
> > Signed-off-by: Yizhuo
>
> This doesn't apply to any of my trees.
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
Our tool did not trace back the whole path, so, now we could say it
might happen.
On Thu, Aug 22, 2019 at 1:12 PM Michal Hocko wrote:
>
> On Thu 22-08-19 13:07:17, Yizhuo Zhai wrote:
> > This will happen if variable "wb->memcg_css" is NULL. This case is reported
; cx2341x_ctrl_query(>hdw->enc_ctl_state,);
> > /* Strip out the const so we can adjust a function pointer. It's
> > OK to do this here because we know this is a dynamically created
> >
>
--
Kind Regards,
Yizhuo Zhai
Computer Science, Graduate Student
University of California, Riverside
Make sense, I will send the new patch. Thanks for the opinion.
On Thu, Feb 7, 2019 at 1:25 AM Maxime Ripard wrote:
>
> On Wed, Feb 06, 2019 at 09:53:16PM -0800, Yizhuo Zhai wrote:
> >
> >
> > On Wed, Feb 6, 2019 at 9:52 PM Yizhuo Zhai wrote:
> > >
> > &
Thanks, but why initialization matters here? Is performance the main concern?
On Wed, Feb 6, 2019 at 9:52 PM Yizhuo Zhai wrote:
>
> Thanks, but why initialization matters here? Is performance the main concern?
>
> On Wed, Feb 6, 2019 at 8:17 PM David Miller wrote:
>>
>&g
33 matches
Mail list logo