Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

login: do not try to close session fd if it is -1 #9642

Closed
wants to merge 1 commit into from

Conversation

keszybz
Copy link
Member

@keszybz keszybz commented Jul 18, 2018

f270533 added a check in session_device_stop()
whether the fd is valid. We should do the same in session_device_free().
In https://bugzilla.redhat.com/show_bug.cgi?id=1576347 we fail the assertion
in close_nointr(). The code changes quite a bit since then, but not that part.

f270533 added a check in session_device_stop()
whether the fd is valid. We should do the same in session_device_free().
In https://bugzilla.redhat.com/show_bug.cgi?id=1576347 we fail the assertion
in close_nointr(). The code changes quite a bit since then, but not that part.
@keszybz keszybz added the login label Jul 18, 2018
session_device_notify(sd, SESSION_DEVICE_RELEASE);
safe_close(sd->fd);
if (close_fd)
safe_close(sd->fd);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure i follow... safe_close() is a no-op anyway if sd->fd is negative, so what does this precisely change?

@keszybz
Copy link
Member Author

keszybz commented Jul 19, 2018

Pfff, there was close_nointr called directly from session_device_free in systemd 234, and I got confused. This patch doesn't make any sense.

@keszybz keszybz closed this Jul 19, 2018
@keszybz keszybz deleted the logind-close-check branch July 19, 2018 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants