Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1505424
| From | Chen-Yu Tsai <wens@csie.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] mmc: sunxi: Prevent against null dereference for vmmc |
| Date | 2016-10-21 05:00 +0200 |
| Message-ID | <suydP-7Zt-7@gated-at.bofh.it> (permalink) |
| References | <stZSP-2nd-105@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Oct 19, 2016 at 9:33 PM, Maxime Ripard <maxime.ripard@free-electrons.com> wrote: > VMMC is an optional regulator, which means that mmc_regulator_get_supply > will only return an error in case of a deferred probe, but not when the > regulator is not set in the DT. > > However, the sunxi driver assumes that VMMC is always there, and doesn't > check the value of the regulator pointer before using it, which obviously > leads to a (close to) null pointer dereference. > > Add proper checks to prevent that. > > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Chen-Yu Tsai <wens@csie.org>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2] mmc: sunxi: Prevent against null dereference for vmmc Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-10-19 16:20 +0200 Re: [PATCH v2] mmc: sunxi: Prevent against null dereference for vmmc Chen-Yu Tsai <wens@csie.org> - 2016-10-21 05:00 +0200 Re: [PATCH v2] mmc: sunxi: Prevent against null dereference for vmmc Ulf Hansson <ulf.hansson@linaro.org> - 2016-10-21 10:30 +0200
csiph-web