summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorMaxime Coquelin <maxime.coquelin@st.com>2015-06-16 14:53:19 +0300
committerLuis Henriques <luis.henriques@canonical.com>2015-07-15 12:00:37 +0300
commit5bfa73eeb0dc99db9cef974299f74a38518904a3 (patch)
tree6fe3f5bc2185b1b1ce7f6f6b8cb1e08385f73e92 /security
parent29d883d9e4df45679fe5a19d467eeff60caab2d9 (diff)
downloadlinux-5bfa73eeb0dc99db9cef974299f74a38518904a3.tar.xz
regmap: Fix possible shift overflow in regmap_field_init()
commit 921cc29473a0d7c109105c1876ddb432f4a4be7d upstream. The way the mask is generated in regmap_field_init() is wrong. Indeed, a field initialized with msb = 31 and lsb = 0 provokes a shift overflow while calculating the mask field. On some 32 bits architectures, such as x86, the generated mask is 0, instead of the expected 0xffffffff. This patch uses GENMASK() to fix the problem, as this macro is already safe regarding shift overflow. Signed-off-by: Maxime Coquelin <maxime.coquelin@st.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions