Message ID | 20201231174331.64539-1-xie.he.0141@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | b40f97b91a3b167ab22c9e9f1ef00b1615ff01e9 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net] net: lapb: Decrease the refcount of "struct lapb_cb" in lapb_device_event | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | success | CCed 6 of 6 maintainers |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 7 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
netdev/stable | success | Stable not CCed |
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Thu, 31 Dec 2020 09:43:31 -0800 you wrote: > In lapb_device_event, lapb_devtostruct is called to get a reference to > an object of "struct lapb_cb". lapb_devtostruct increases the refcount > of the object and returns a pointer to it. However, we didn't decrease > the refcount after we finished using the pointer. This patch fixes this > problem. > > Fixes: a4989fa91110 ("net/lapb: support netdev events") > Cc: Martin Schiller <ms@dev.tdt.de> > Signed-off-by: Xie He <xie.he.0141@gmail.com> > > [...] Here is the summary with links: - [net] net: lapb: Decrease the refcount of "struct lapb_cb" in lapb_device_event https://git.kernel.org/netdev/net/c/b40f97b91a3b You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
On 2020-12-31 18:43, Xie He wrote: > In lapb_device_event, lapb_devtostruct is called to get a reference to > an object of "struct lapb_cb". lapb_devtostruct increases the refcount > of the object and returns a pointer to it. However, we didn't decrease > the refcount after we finished using the pointer. This patch fixes this > problem. > > Fixes: a4989fa91110 ("net/lapb: support netdev events") > Cc: Martin Schiller <ms@dev.tdt.de> > Signed-off-by: Xie He <xie.he.0141@gmail.com> > --- > net/lapb/lapb_iface.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/net/lapb/lapb_iface.c b/net/lapb/lapb_iface.c > index 213ea7abc9ab..40961889e9c0 100644 > --- a/net/lapb/lapb_iface.c > +++ b/net/lapb/lapb_iface.c > @@ -489,6 +489,7 @@ static int lapb_device_event(struct notifier_block > *this, unsigned long event, > break; > } > > + lapb_put(lapb); > return NOTIFY_DONE; > } Well, I guess I missed that one. Thank you! Acked-by: Martin Schiller <ms@dev.tdt.de>
diff --git a/net/lapb/lapb_iface.c b/net/lapb/lapb_iface.c index 213ea7abc9ab..40961889e9c0 100644 --- a/net/lapb/lapb_iface.c +++ b/net/lapb/lapb_iface.c @@ -489,6 +489,7 @@ static int lapb_device_event(struct notifier_block *this, unsigned long event, break; } + lapb_put(lapb); return NOTIFY_DONE; }
In lapb_device_event, lapb_devtostruct is called to get a reference to an object of "struct lapb_cb". lapb_devtostruct increases the refcount of the object and returns a pointer to it. However, we didn't decrease the refcount after we finished using the pointer. This patch fixes this problem. Fixes: a4989fa91110 ("net/lapb: support netdev events") Cc: Martin Schiller <ms@dev.tdt.de> Signed-off-by: Xie He <xie.he.0141@gmail.com> --- net/lapb/lapb_iface.c | 1 + 1 file changed, 1 insertion(+)