diff options
author | Yongqin Liu <yongqin.liu@linaro.org> | 2020-04-28 00:49:45 +0800 |
---|---|---|
committer | YongQin Liu <yongqin.liu@linaro.org> | 2020-04-28 03:23:39 +0000 |
commit | 9d52ec64ef44b20151bc9a8b57db4982b6969723 (patch) | |
tree | d4586d2eeb7fa6d8418c097188628501844e1769 /drivers/net/can/slcan.c | |
parent | eca3a1de761510076ef78a8921345ad166609c31 (diff) | |
parent | fdd560ec460793a02cf226cc4f2aac6d0e637e5c (diff) |
Merge branch 'mirror-android-4.14-stable' into android-hikey-linaro-4.14
* mirror-android-4.14-stable: (1307 commits)
ANDROID: Incremental fs: Use simple compression in log buffer
ANDROID: dm-bow: Fix not to skip trim at framented range
ANDROID: Remove VLA from uid_sys_stats.c
ANDROID: cuttlefish_defconfig: enable CONFIG_DEBUG_LIST
Linux 4.14.177
KEYS: Don't write out to userspace while holding key semaphore
KEYS: Use individual pages in big_key for crypto buffers
mtd: phram: fix a double free issue in error path
mtd: lpddr: Fix a double free in probe()
locktorture: Print ratio of acquisitions, not failures
tty: evh_bytechan: Fix out of bounds accesses
fbdev: potential information leak in do_fb_ioctl()
net: dsa: bcm_sf2: Fix overflow checks
iommu/amd: Fix the configuration of GCR3 table root pointer
libnvdimm: Out of bounds read in __nd_ioctl()
ext2: fix debug reference to ext2_xattr_cache
ext2: fix empty body warnings when -Wextra is used
iommu/vt-d: Fix mm reference leak
NFS: Fix memory leaks in nfs_pageio_stop_mirroring()
drm/amdkfd: kfree the wrong pointer
...
Test: boot tested with hikey/hikey960 aosp-master-throttled-copped@6345223
Change-Id: Idba6936f4948affaed68cbcf99b9598a038567a2
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Diffstat (limited to 'drivers/net/can/slcan.c')
-rw-r--r-- | drivers/net/can/slcan.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/can/slcan.c b/drivers/net/can/slcan.c index 35564a9561b7..c5a616395c49 100644 --- a/drivers/net/can/slcan.c +++ b/drivers/net/can/slcan.c @@ -147,7 +147,7 @@ static void slc_bump(struct slcan *sl) u32 tmpid; char *cmd = sl->rbuff; - cf.can_id = 0; + memset(&cf, 0, sizeof(cf)); switch (*cmd) { case 'r': @@ -186,8 +186,6 @@ static void slc_bump(struct slcan *sl) else return; - *(u64 *) (&cf.data) = 0; /* clear payload */ - /* RTR frames may have a dlc > 0 but they never have any data bytes */ if (!(cf.can_id & CAN_RTR_FLAG)) { for (i = 0; i < cf.can_dlc; i++) { @@ -621,7 +619,10 @@ err_free_chan: tty->disc_data = NULL; clear_bit(SLF_INUSE, &sl->flags); slc_free_netdev(sl->dev); + /* do not call free_netdev before rtnl_unlock */ + rtnl_unlock(); free_netdev(sl->dev); + return err; err_exit: rtnl_unlock(); |